[hamradio-commits] [xnec2c] 01/05: Imported Upstream version 3.0

Dave Hibberd hibby-guest at moszumanska.debian.org
Mon May 4 19:51:51 UTC 2015


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

hibby-guest pushed a commit to branch master
in repository xnec2c.

commit f8f590a6572d2f195f9b90357b348da86aec29cc
Author: Dave Hibberd <d at vehibberd.com>
Date:   Mon May 4 18:42:23 2015 +0100

    Imported Upstream version 3.0
---
 AUTHORS                                   |     3 +
 COPYING                                   |   674 +
 ChangeLog                                 |     1 +
 INSTALL                                   |   370 +
 Makefile.am                               |    43 +
 Makefile.in                               |   836 ++
 NEWS                                      |     1 +
 README                                    |     1 +
 aclocal.m4                                |  2084 +++
 autogen.sh                                |   538 +
 compile                                   |   347 +
 config.h.in                               |   144 +
 configure                                 |  9014 +++++++++++++
 configure.ac                              |    68 +
 depcomp                                   |   791 ++
 doc/NEC2-bug.txt                          |   114 +
 doc/NearFieldCalcs.txt                    |    71 +
 doc/images/charges.png                    |   Bin 0 -> 71251 bytes
 doc/images/currents.png                   |   Bin 0 -> 72417 bytes
 doc/images/excitation.png                 |   Bin 0 -> 38675 bytes
 doc/images/freq_plots.png                 |   Bin 0 -> 81447 bytes
 doc/images/nec2_edit.png                  |   Bin 0 -> 69487 bytes
 doc/images/radiation.png                  |   Bin 0 -> 202491 bytes
 doc/images/wire.png                       |   Bin 0 -> 29589 bytes
 doc/nec2c.txt                             |   151 +
 doc/xnec2c.1.gz                           |   Bin 0 -> 398 bytes
 doc/xnec2c.html                           |   962 ++
 examples/10-30m_bipyramid.nec             |    18 +
 examples/10-30m_sphere.nec                |    18 +
 examples/10-30m_vert.nec                  |    19 +
 examples/10-80m_G5RV.nec                  |    12 +
 examples/10-80m_Inverted-L.nec            |    11 +
 examples/10-80m_windom.nec                |    12 +
 examples/137MHz_turnstile-sloped.nec      |    17 +
 examples/137MHz_turnstile.nec             |    16 +
 examples/13cm_Yagi.nec                    |    20 +
 examples/13cm_corner_reflector.nec        |    14 +
 examples/13cm_helix+screen.nec            |    17 +
 examples/15m_delta-loop.nec               |    18 +
 examples/1MHz_3x_helicone.nec             |    18 +
 examples/1MHz_3x_helisphere.nec           |    18 +
 examples/1MHz_4x_helisphere.nec           |    17 +
 examples/1MHz_helivert.nec                |    18 +
 examples/1MHz_tower.nec                   |    31 +
 examples/20-40m_ground_plane.nec          |    13 +
 examples/20-40m_vert_circ_cliff.nec       |    15 +
 examples/20-40m_vert_linear_cliff.nec     |    15 +
 examples/20-40m_vert_sommerfeld_cliff.nec |    14 +
 examples/20m_car_ant.nec                  |   212 +
 examples/20m_quad.nec                     |    18 +
 examples/23cm_helix+radials.nec           |    16 +
 examples/23cm_helix+screen.nec            |    17 +
 examples/2m_1:4l-gp_on_pole.nec           |    14 +
 examples/2m_5:8l-gp_on_pole.nec           |    15 +
 examples/2m_EME_ant.nec                   |    23 +
 examples/2m_bigwheel.nec                  |    17 +
 examples/2m_halo_stack.nec                |    15 +
 examples/2m_sqr_halo.nec                  |    12 +
 examples/2m_sqr_halo_stack.nec            |    17 +
 examples/2m_xpol_omni.nec                 |    12 +
 examples/2m_xpol_omni_stack.nec           |    17 +
 examples/2m_yagi.nec                      |    17 +
 examples/30-80m_inv_L.nec                 |    10 +
 examples/35-55MHz_logper.nec              |    35 +
 examples/40m-moxon.nec                    |    19 +
 examples/6-17m_bipyramid.nec              |    19 +
 examples/6-20m_inv_cone.nec               |    15 +
 examples/6m_big-square_stack.nec          |    20 +
 examples/6m_bigwheel-stack.nec            |    21 +
 examples/70cm_collinear.nec               |    26 +
 examples/80m_zepp.nec                     |    12 +
 examples/T12m-H24m.nec                    |    15 +
 examples/T20m-H18m.nec                    |    16 +
 examples/airplane.nec                     |   264 +
 examples/buoy.nec                         |    13 +
 examples/conductivity.txt                 |    12 +
 examples/gray_hoverman.nec                |    18 +
 examples/ground.txt                       |    21 +
 examples/k9ay_5b4az.nec                   |    23 +
 examples/k9ay_orig.nec                    |    13 +
 examples/satellite.nec                    |    21 +
 install-sh                                |   527 +
 intltool-extract.in                       |     0
 intltool-merge.in                         |     0
 intltool-update.in                        |     0
 missing                                   |   215 +
 po/ChangeLog                              |     0
 po/LINGUAS                                |     0
 po/Makefile.in.in                         |   222 +
 po/POTFILES.in                            |    20 +
 src/Makefile.am                           |    41 +
 src/Makefile.in                           |   659 +
 src/calculations.c                        |  1408 ++
 src/calculations.h                        |    27 +
 src/callback_func.c                       |   783 ++
 src/callback_func.h                       |    31 +
 src/callbacks.c                           |  3682 ++++++
 src/callbacks.h                           |  1301 ++
 src/cmnd_edit.c                           |  2805 ++++
 src/cmnd_edit.h                           |    28 +
 src/common.h                              |  1303 ++
 src/draw.c                                |   322 +
 src/draw.h                                |    26 +
 src/draw_radiation.c                      |  1158 ++
 src/draw_radiation.h                      |    34 +
 src/draw_structure.c                      |   745 ++
 src/draw_structure.h                      |    26 +
 src/editors.h                             |   226 +
 src/fields.c                              |  1926 +++
 src/fields.h                              |    50 +
 src/fork.c                                |   668 +
 src/fork.h                                |    42 +
 src/geom_edit.c                           |  2435 ++++
 src/geom_edit.h                           |    28 +
 src/geometry.c                            |  1673 +++
 src/geometry.h                            |    26 +
 src/gnuplot.c                             |   511 +
 src/gnuplot.h                             |    26 +
 src/ground.c                              |   368 +
 src/ground.h                              |    26 +
 src/input.c                               |  1600 +++
 src/input.h                               |    70 +
 src/interface.c                           | 10157 ++++++++++++++
 src/interface.h                           |    35 +
 src/main.c                                |   492 +
 src/main.h                                |    36 +
 src/matrix.c                              |  1549 +++
 src/matrix.h                              |    28 +
 src/nec2_model.c                          |   692 +
 src/nec2_model.h                          |    36 +
 src/network.c                             |   749 ++
 src/network.h                             |    26 +
 src/plot_freqdata.c                       |  1353 ++
 src/plot_freqdata.h                       |    30 +
 src/radiation.c                           |   793 ++
 src/radiation.h                           |    28 +
 src/shared.c                              |   207 +
 src/shared.h                              |   212 +
 src/somnec.c                              |  1149 ++
 src/somnec.h                              |    49 +
 src/support.c                             |   144 +
 src/support.h                             |    69 +
 src/utils.c                               |   467 +
 src/utils.h                               |    34 +
 src/xnec2c.c                              |   738 ++
 src/xnec2c.h                              |    26 +
 xnec2c.glade                              | 19636 ++++++++++++++++++++++++++++
 xnec2c.gladep                             |     8 +
 148 files changed, 81360 insertions(+)

diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..510331a
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,3 @@
+Neoklis Kyriazis
+Ham Radio Call: 5B4AZ
+nkcyham at yahoo.com
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..94a9ed0
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,674 @@
+                    GNU GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+                            Preamble
+
+  The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+  The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works.  By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users.  We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors.  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+  To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights.  Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received.  You must make sure that they, too, receive
+or can get the source code.  And you must show them these terms so they
+know their rights.
+
+  Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+  For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software.  For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+  Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so.  This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software.  The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable.  Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products.  If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+  Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary.  To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+                       TERMS AND CONDITIONS
+
+  0. Definitions.
+
+  "This License" refers to version 3 of the GNU General Public License.
+
+  "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+  "The Program" refers to any copyrightable work licensed under this
+License.  Each licensee is addressed as "you".  "Licensees" and
+"recipients" may be individuals or organizations.
+
+  To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy.  The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+  A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+  To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy.  Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+  To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies.  Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+  An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License.  If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+  1. Source Code.
+
+  The "source code" for a work means the preferred form of the work
+for making modifications to it.  "Object code" means any non-source
+form of a work.
+
+  A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+  The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form.  A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+  The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities.  However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work.  For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+  The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+  The Corresponding Source for a work in source code form is that
+same work.
+
+  2. Basic Permissions.
+
+  All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met.  This License explicitly affirms your unlimited
+permission to run the unmodified Program.  The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work.  This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+  You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force.  You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright.  Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+  Conveying under any other circumstances is permitted solely under
+the conditions stated below.  Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+  3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+  No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+  When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+  4. Conveying Verbatim Copies.
+
+  You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+  You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+  5. Conveying Modified Source Versions.
+
+  You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+    a) The work must carry prominent notices stating that you modified
+    it, and giving a relevant date.
+
+    b) The work must carry prominent notices stating that it is
+    released under this License and any conditions added under section
+    7.  This requirement modifies the requirement in section 4 to
+    "keep intact all notices".
+
+    c) You must license the entire work, as a whole, under this
+    License to anyone who comes into possession of a copy.  This
+    License will therefore apply, along with any applicable section 7
+    additional terms, to the whole of the work, and all its parts,
+    regardless of how they are packaged.  This License gives no
+    permission to license the work in any other way, but it does not
+    invalidate such permission if you have separately received it.
+
+    d) If the work has interactive user interfaces, each must display
+    Appropriate Legal Notices; however, if the Program has interactive
+    interfaces that do not display Appropriate Legal Notices, your
+    work need not make them do so.
+
+  A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit.  Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+  6. Conveying Non-Source Forms.
+
+  You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+    a) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by the
+    Corresponding Source fixed on a durable physical medium
+    customarily used for software interchange.
+
+    b) Convey the object code in, or embodied in, a physical product
+    (including a physical distribution medium), accompanied by a
+    written offer, valid for at least three years and valid for as
+    long as you offer spare parts or customer support for that product
+    model, to give anyone who possesses the object code either (1) a
+    copy of the Corresponding Source for all the software in the
+    product that is covered by this License, on a durable physical
+    medium customarily used for software interchange, for a price no
+    more than your reasonable cost of physically performing this
+    conveying of source, or (2) access to copy the
+    Corresponding Source from a network server at no charge.
+
+    c) Convey individual copies of the object code with a copy of the
+    written offer to provide the Corresponding Source.  This
+    alternative is allowed only occasionally and noncommercially, and
+    only if you received the object code with such an offer, in accord
+    with subsection 6b.
+
+    d) Convey the object code by offering access from a designated
+    place (gratis or for a charge), and offer equivalent access to the
+    Corresponding Source in the same way through the same place at no
+    further charge.  You need not require recipients to copy the
+    Corresponding Source along with the object code.  If the place to
+    copy the object code is a network server, the Corresponding Source
+    may be on a different server (operated by you or a third party)
+    that supports equivalent copying facilities, provided you maintain
+    clear directions next to the object code saying where to find the
+    Corresponding Source.  Regardless of what server hosts the
+    Corresponding Source, you remain obligated to ensure that it is
+    available for as long as needed to satisfy these requirements.
+
+    e) Convey the object code using peer-to-peer transmission, provided
+    you inform other peers where the object code and Corresponding
+    Source of the work are being offered to the general public at no
+    charge under subsection 6d.
+
+  A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+  A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling.  In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage.  For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product.  A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+  "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source.  The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+  If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information.  But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+  The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed.  Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+  Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+  7. Additional Terms.
+
+  "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law.  If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+  When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it.  (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.)  You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+  Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+    a) Disclaiming warranty or limiting liability differently from the
+    terms of sections 15 and 16 of this License; or
+
+    b) Requiring preservation of specified reasonable legal notices or
+    author attributions in that material or in the Appropriate Legal
+    Notices displayed by works containing it; or
+
+    c) Prohibiting misrepresentation of the origin of that material, or
+    requiring that modified versions of such material be marked in
+    reasonable ways as different from the original version; or
+
+    d) Limiting the use for publicity purposes of names of licensors or
+    authors of the material; or
+
+    e) Declining to grant rights under trademark law for use of some
+    trade names, trademarks, or service marks; or
+
+    f) Requiring indemnification of licensors and authors of that
+    material by anyone who conveys the material (or modified versions of
+    it) with contractual assumptions of liability to the recipient, for
+    any liability that these contractual assumptions directly impose on
+    those licensors and authors.
+
+  All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10.  If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term.  If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+  If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+  Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+  8. Termination.
+
+  You may not propagate or modify a covered work except as expressly
+provided under this License.  Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+  However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+  Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+  Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+  9. Acceptance Not Required for Having Copies.
+
+  You are not required to accept this License in order to receive or
+run a copy of the Program.  Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance.  However,
+nothing other than this License grants you permission to propagate or
+modify any covered work.  These actions infringe copyright if you do
+not accept this License.  Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+  10. Automatic Licensing of Downstream Recipients.
+
+  Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License.  You are not responsible
+for enforcing compliance by third parties with this License.
+
+  An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations.  If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+  You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License.  For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+  11. Patents.
+
+  A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based.  The
+work thus licensed is called the contributor's "contributor version".
+
+  A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version.  For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+  Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+  In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement).  To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+  If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients.  "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+  If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+  A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License.  You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+  Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+  12. No Surrender of Others' Freedom.
+
+  If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all.  For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+  13. Use with the GNU Affero General Public License.
+
+  Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work.  The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+  14. Revised Versions of this License.
+
+  The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+  Each version is given a distinguishing version number.  If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation.  If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+  If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+  Later license versions may give you additional or different
+permissions.  However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+  15. Disclaimer of Warranty.
+
+  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  16. Limitation of Liability.
+
+  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+  17. Interpretation of Sections 15 and 16.
+
+  If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+                     END OF TERMS AND CONDITIONS
+
+            How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    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/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+  If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+    <program>  Copyright (C) <year>  <name of author>
+    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+  You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+  The GNU General Public License does not permit incorporating your program
+into proprietary programs.  If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library.  If this is what you want to do, use the GNU Lesser General
+Public License instead of this License.  But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..faaa93f
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1 @@
+Please read the user manual in the doc/ directory
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..2099840
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,370 @@
+Installation Instructions
+*************************
+
+Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation,
+Inc.
+
+   Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.  This file is offered as-is,
+without warranty of any kind.
+
+Basic Installation
+==================
+
+   Briefly, the shell command `./configure && make && make install'
+should configure, build, and install this package.  The following
+more-detailed instructions are generic; see the `README' file for
+instructions specific to this package.  Some packages provide this
+`INSTALL' file but do not implement all of the features documented
+below.  The lack of an optional feature in a given package is not
+necessarily a bug.  More recommendations for GNU packages can be found
+in *note Makefile Conventions: (standards)Makefile Conventions.
+
+   The `configure' shell script attempts to guess correct values for
+various system-dependent variables used during compilation.  It uses
+those values to create a `Makefile' in each directory of the package.
+It may also create one or more `.h' files containing system-dependent
+definitions.  Finally, it creates a shell script `config.status' that
+you can run in the future to recreate the current configuration, and a
+file `config.log' containing compiler output (useful mainly for
+debugging `configure').
+
+   It can also use an optional file (typically called `config.cache'
+and enabled with `--cache-file=config.cache' or simply `-C') that saves
+the results of its tests to speed up reconfiguring.  Caching is
+disabled by default to prevent problems with accidental use of stale
+cache files.
+
+   If you need to do unusual things to compile the package, please try
+to figure out how `configure' could check whether to do them, and mail
+diffs or instructions to the address given in the `README' so they can
+be considered for the next release.  If you are using the cache, and at
+some point `config.cache' contains results you don't want to keep, you
+may remove or edit it.
+
+   The file `configure.ac' (or `configure.in') is used to create
+`configure' by a program called `autoconf'.  You need `configure.ac' if
+you want to change it or regenerate `configure' using a newer version
+of `autoconf'.
+
+   The simplest way to compile this package is:
+
+  1. `cd' to the directory containing the package's source code and type
+     `./configure' to configure the package for your system.
+
+     Running `configure' might take a while.  While running, it prints
+     some messages telling which features it is checking for.
+
+  2. Type `make' to compile the package.
+
+  3. Optionally, type `make check' to run any self-tests that come with
+     the package, generally using the just-built uninstalled binaries.
+
+  4. Type `make install' to install the programs and any data files and
+     documentation.  When installing into a prefix owned by root, it is
+     recommended that the package be configured and built as a regular
+     user, and only the `make install' phase executed with root
+     privileges.
+
+  5. Optionally, type `make installcheck' to repeat any self-tests, but
+     this time using the binaries in their final installed location.
+     This target does not install anything.  Running this target as a
+     regular user, particularly if the prior `make install' required
+     root privileges, verifies that the installation completed
+     correctly.
+
+  6. You can remove the program binaries and object files from the
+     source code directory by typing `make clean'.  To also remove the
+     files that `configure' created (so you can compile the package for
+     a different kind of computer), type `make distclean'.  There is
+     also a `make maintainer-clean' target, but that is intended mainly
+     for the package's developers.  If you use it, you may have to get
+     all sorts of other programs in order to regenerate files that came
+     with the distribution.
+
+  7. Often, you can also type `make uninstall' to remove the installed
+     files again.  In practice, not all packages have tested that
+     uninstallation works correctly, even though it is required by the
+     GNU Coding Standards.
+
+  8. Some packages, particularly those that use Automake, provide `make
+     distcheck', which can by used by developers to test that all other
+     targets like `make install' and `make uninstall' work correctly.
+     This target is generally not run by end users.
+
+Compilers and Options
+=====================
+
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
+
+   You can give `configure' initial values for configuration parameters
+by setting variables in the command line or in the environment.  Here
+is an example:
+
+     ./configure CC=c99 CFLAGS=-g LIBS=-lposix
+
+   *Note Defining Variables::, for more details.
+
+Compiling For Multiple Architectures
+====================================
+
+   You can compile the package for more than one kind of computer at the
+same time, by placing the object files for each architecture in their
+own directory.  To do this, you can use GNU `make'.  `cd' to the
+directory where you want the object files and executables to go and run
+the `configure' script.  `configure' automatically checks for the
+source code in the directory that `configure' is in and in `..'.  This
+is known as a "VPATH" build.
+
+   With a non-GNU `make', it is safer to compile the package for one
+architecture at a time in the source code directory.  After you have
+installed the package for one architecture, use `make distclean' before
+reconfiguring for another architecture.
+
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
+Installation Names
+==================
+
+   By default, `make install' installs the package's commands under
+`/usr/local/bin', include files under `/usr/local/include', etc.  You
+can specify an installation prefix other than `/usr/local' by giving
+`configure' the option `--prefix=PREFIX', where PREFIX must be an
+absolute file name.
+
+   You can specify separate installation prefixes for
+architecture-specific files and architecture-independent files.  If you
+pass the option `--exec-prefix=PREFIX' to `configure', the package uses
+PREFIX as the prefix for installing programs and libraries.
+Documentation and other data files still use the regular prefix.
+
+   In addition, if you use an unusual directory layout you can give
+options like `--bindir=DIR' to specify different values for particular
+kinds of files.  Run `configure --help' for a list of the directories
+you can set and what kinds of files go in them.  In general, the
+default for these options is expressed in terms of `${prefix}', so that
+specifying just `--prefix' will affect all of the other directory
+specifications that were not explicitly provided.
+
+   The most portable way to affect installation locations is to pass the
+correct locations to `configure'; however, many packages provide one or
+both of the following shortcuts of passing variable assignments to the
+`make install' command line to change installation locations without
+having to reconfigure or recompile.
+
+   The first method involves providing an override variable for each
+affected directory.  For example, `make install
+prefix=/alternate/directory' will choose an alternate location for all
+directory configuration variables that were expressed in terms of
+`${prefix}'.  Any directories that were specified during `configure',
+but not in terms of `${prefix}', must each be overridden at install
+time for the entire installation to be relocated.  The approach of
+makefile variable overrides for each directory variable is required by
+the GNU Coding Standards, and ideally causes no recompilation.
+However, some platforms have known limitations with the semantics of
+shared libraries that end up requiring recompilation when using this
+method, particularly noticeable in packages that use GNU Libtool.
+
+   The second method involves providing the `DESTDIR' variable.  For
+example, `make install DESTDIR=/alternate/directory' will prepend
+`/alternate/directory' before all installation names.  The approach of
+`DESTDIR' overrides is not required by the GNU Coding Standards, and
+does not work on platforms that have drive letters.  On the other hand,
+it does better at avoiding recompilation issues, and works well even
+when some directory options were not specified in terms of `${prefix}'
+at `configure' time.
+
+Optional Features
+=================
+
+   If the package supports it, you can cause programs to be installed
+with an extra prefix or suffix on their names by giving `configure' the
+option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
+
+   Some packages pay attention to `--enable-FEATURE' options to
+`configure', where FEATURE indicates an optional part of the package.
+They may also pay attention to `--with-PACKAGE' options, where PACKAGE
+is something like `gnu-as' or `x' (for the X Window System).  The
+`README' should mention any `--enable-' and `--with-' options that the
+package recognizes.
+
+   For packages that use the X Window System, `configure' can usually
+find the X include and library files automatically, but if it doesn't,
+you can use the `configure' options `--x-includes=DIR' and
+`--x-libraries=DIR' to specify their locations.
+
+   Some packages offer the ability to configure how verbose the
+execution of `make' will be.  For these packages, running `./configure
+--enable-silent-rules' sets the default to minimal output, which can be
+overridden with `make V=1'; while running `./configure
+--disable-silent-rules' sets the default to verbose, which can be
+overridden with `make V=0'.
+
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   HP-UX `make' updates targets which have the same time stamps as
+their prerequisites, which makes it generally unusable when shipped
+generated files such as `configure' are involved.  Use GNU `make'
+instead.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+and if that doesn't work, try
+
+     ./configure CC="cc -nodtk"
+
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
+Specifying the System Type
+==========================
+
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
+`--build=TYPE' option.  TYPE can either be a short name for the system
+type, such as `sun4', or a canonical name which has the form:
+
+     CPU-COMPANY-SYSTEM
+
+where SYSTEM can have one of these forms:
+
+     OS
+     KERNEL-OS
+
+   See the file `config.sub' for the possible values of each field.  If
+`config.sub' isn't included in this package, then this package doesn't
+need to know the machine type.
+
+   If you are _building_ compiler tools for cross-compiling, you should
+use the option `--target=TYPE' to select the type of system they will
+produce code for.
+
+   If you want to _use_ a cross compiler, that generates code for a
+platform different from the build platform, you should specify the
+"host" platform (i.e., that on which the generated programs will
+eventually be run) with `--host=TYPE'.
+
+Sharing Defaults
+================
+
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
+`configure' looks for `PREFIX/share/config.site' if it exists, then
+`PREFIX/etc/config.site' if it exists.  Or, you can set the
+`CONFIG_SITE' environment variable to the location of the site script.
+A warning: not all `configure' scripts look for a site script.
+
+Defining Variables
+==================
+
+   Variables not defined in a site shell script can be set in the
+environment passed to `configure'.  However, some packages may run
+configure again during the build, and the customized values of these
+variables may be lost.  In order to avoid this problem, you should set
+them in the `configure' command line, using `VAR=value'.  For example:
+
+     ./configure CC=/usr/local2/bin/gcc
+
+causes the specified `gcc' to be used as the C compiler (unless it is
+overridden in the site shell script).
+
+Unfortunately, this technique does not work for `CONFIG_SHELL' due to
+an Autoconf limitation.  Until the limitation is lifted, you can use
+this workaround:
+
+     CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash
+
+`configure' Invocation
+======================
+
+   `configure' recognizes the following options to control how it
+operates.
+
+`--help'
+`-h'
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
+
+`--version'
+`-V'
+     Print the version of Autoconf used to generate the `configure'
+     script, and exit.
+
+`--cache-file=FILE'
+     Enable the cache: use and save the results of the tests in FILE,
+     traditionally `config.cache'.  FILE defaults to `/dev/null' to
+     disable caching.
+
+`--config-cache'
+`-C'
+     Alias for `--cache-file=config.cache'.
+
+`--quiet'
+`--silent'
+`-q'
+     Do not print messages saying which checks are being made.  To
+     suppress all normal output, redirect it to `/dev/null' (any error
+     messages will still be shown).
+
+`--srcdir=DIR'
+     Look for the package's source code in directory DIR.  Usually
+     `configure' can determine that directory automatically.
+
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
+`configure' also accepts some other, not widely useful, options.  Run
+`configure --help' for more details.
diff --git a/Makefile.am b/Makefile.am
new file mode 100644
index 0000000..cca5980
--- /dev/null
+++ b/Makefile.am
@@ -0,0 +1,43 @@
+## Process this file with automake to produce Makefile.in
+
+SUBDIRS = src po
+
+INTLTOOL_FILES = intltool-extract.in \
+                 intltool-merge.in \
+                 intltool-update.in
+
+EXTRA_DIST = \
+	autogen.sh \
+	xnec2c.glade \
+	xnec2c.gladep \
+	examples \
+	doc \
+	$(INTLTOOL_FILES)
+
+DISTCLEANFILES = \
+	intltool-extract* \
+    intltool-merge* \
+    intltool-update* \
+    po/.intltool-merge-cache*
+
+install-data-local:
+	@$(NORMAL_INSTALL)
+	if test -d $(srcdir)/pixmaps; then \
+	  $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \
+	  for pixmap in $(srcdir)/pixmaps/*; do \
+	    if test -f $$pixmap; then \
+	      $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \
+	    fi \
+	  done \
+	fi
+
+dist-hook:
+	if test -d pixmaps; then \
+	  mkdir $(distdir)/pixmaps; \
+	  for pixmap in pixmaps/*; do \
+	    if test -f $$pixmap; then \
+	      cp -p $$pixmap $(distdir)/pixmaps; \
+	    fi \
+	  done \
+	fi
+
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..694eca8
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,836 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+subdir = .
+DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
+	$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/configure $(am__configure_deps) \
+	$(srcdir)/config.h.in COPYING compile install-sh missing
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+SOURCES =
+DIST_SOURCES =
+RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
+	ctags-recursive dvi-recursive html-recursive info-recursive \
+	install-data-recursive install-dvi-recursive \
+	install-exec-recursive install-html-recursive \
+	install-info-recursive install-pdf-recursive \
+	install-ps-recursive install-recursive installcheck-recursive \
+	installdirs-recursive pdf-recursive ps-recursive \
+	tags-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_CLEAN_TARGETS) \
+  $(am__extra_recursive_targets)
+AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
+	cscope distdir dist dist-all distcheck
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
+	$(LISP)config.h.in
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+CSCOPE = cscope
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_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__post_remove_distdir = $(am__remove_distdir)
+am__relativize = \
+  dir0=`pwd`; \
+  sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+  sed_rest='s,^[^/]*/*,,'; \
+  sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+  sed_butlast='s,/*[^/]*$$,,'; \
+  while test -n "$$dir1"; do \
+    first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+    if test "$$first" != "."; then \
+      if test "$$first" = ".."; then \
+        dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+        dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+      else \
+        first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+        if test "$$first2" = "$$first"; then \
+          dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+        else \
+          dir2="../$$dir2"; \
+        fi; \
+        dir0="$$dir0"/"$$first"; \
+      fi; \
+    fi; \
+    dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+  done; \
+  reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz
+GZIP_ENV = --best
+DIST_TARGETS = dist-gzip
+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@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+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@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
+PACKAGE_LIBS = @PACKAGE_LIBS@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PROGRAMNAME_LOCALEDIR = @PROGRAMNAME_LOCALEDIR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+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@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+SUBDIRS = src po
+INTLTOOL_FILES = intltool-extract.in \
+                 intltool-merge.in \
+                 intltool-update.in
+
+EXTRA_DIST = \
+	autogen.sh \
+	xnec2c.glade \
+	xnec2c.gladep \
+	examples \
+	doc \
+	$(INTLTOOL_FILES)
+
+DISTCLEANFILES = \
+	intltool-extract* \
+    intltool-merge* \
+    intltool-update* \
+    po/.intltool-merge-cache*
+
+all: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+am--refresh: Makefile
+	@:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+	      $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+		&& exit 0; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    echo ' $(SHELL) ./config.status'; \
+	    $(SHELL) ./config.status;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	$(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+	@test -f $@ || rm -f stamp-h1
+	@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
+
+stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status config.h
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) 
+	($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+	rm -f stamp-h1
+	touch $@
+
+distclean-hdr:
+	-rm -f config.h stamp-h1
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run 'make' without going through this Makefile.
+# To change the values of 'make' variables: instead of editing Makefiles,
+# (1) if the variable is set in 'config.status', edit 'config.status'
+#     (which will cause the Makefiles to be regenerated when you run 'make');
+# (2) otherwise, pass the desired values on the 'make' command line.
+$(am__recursive_targets):
+	@fail=; \
+	if $(am__make_keepgoing); then \
+	  failcom='fail=yes'; \
+	else \
+	  failcom='exit 1'; \
+	fi; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	case "$@" in \
+	  distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+	  *) list='$(SUBDIRS)' ;; \
+	esac; \
+	for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
+	  else \
+	    local_target="$$target"; \
+	  fi; \
+	  ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	  || eval $$failcom; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-recursive
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	  empty_fix=.; \
+	else \
+	  include_option=--include; \
+	  empty_fix=; \
+	fi; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test ! -f $$subdir/TAGS || \
+	      set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+	  fi; \
+	done; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-recursive
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscope: cscope.files
+	test ! -s cscope.files \
+	  || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+clean-cscope:
+	-rm -f cscope.files
+cscope.files: clean-cscope cscopelist
+cscopelist: cscopelist-recursive
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+	-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	test -d "$(distdir)" || mkdir "$(distdir)"
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || 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; \
+	    dir1=$$subdir; dir2="$(top_distdir)"; \
+	    $(am__relativize); \
+	    new_top_distdir=$$reldir; \
+	    echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+	    echo "     am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+	    ($(am__cd) $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$$new_top_distdir" \
+	        distdir="$$new_distdir" \
+		am__remove_distdir=: \
+		am__skip_length_check=: \
+		am__skip_mode_fix=: \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+	$(MAKE) $(AM_MAKEFLAGS) \
+	  top_distdir="$(top_distdir)" distdir="$(distdir)" \
+	  dist-hook
+	-test -n "$(am__skip_mode_fix)" \
+	|| find "$(distdir)" -type d ! -perm -755 \
+		-exec chmod u+rwx,go+rx {} \; -o \
+	  ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+	  ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+	tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__post_remove_distdir)
+
+dist-bzip2: distdir
+	tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+	$(am__post_remove_distdir)
+
+dist-lzip: distdir
+	tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
+	$(am__post_remove_distdir)
+
+dist-xz: distdir
+	tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
+	$(am__post_remove_distdir)
+
+dist-tarZ: distdir
+	@echo WARNING: "Support for shar distribution archives is" \
+	               "deprecated." >&2
+	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+	tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+	$(am__post_remove_distdir)
+
+dist-shar: distdir
+	@echo WARNING: "Support for distribution archives compressed with" \
+		       "legacy program 'compress' is deprecated." >&2
+	@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
+	shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+	$(am__post_remove_distdir)
+
+dist-zip: distdir
+	-rm -f $(distdir).zip
+	zip -rq $(distdir).zip $(distdir)
+	$(am__post_remove_distdir)
+
+dist dist-all:
+	$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+	$(am__post_remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	case '$(DIST_ARCHIVES)' in \
+	*.tar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+	*.tar.bz2*) \
+	  bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+	*.tar.lz*) \
+	  lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
+	*.tar.xz*) \
+	  xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+	*.tar.Z*) \
+	  uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+	*.shar.gz*) \
+	  GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+	*.zip*) \
+	  unzip $(distdir).zip ;;\
+	esac
+	chmod -R a-w $(distdir)
+	chmod u+w $(distdir)
+	mkdir $(distdir)/_build $(distdir)/_inst
+	chmod a-w $(distdir)
+	test -d $(distdir)/_build || exit 0; \
+	dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+	  && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+	  && am__cwd=`pwd` \
+	  && $(am__cd) $(distdir)/_build \
+	  && ../configure \
+	    $(AM_DISTCHECK_CONFIGURE_FLAGS) \
+	    $(DISTCHECK_CONFIGURE_FLAGS) \
+	    --srcdir=.. --prefix="$$dc_install_base" \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+	  && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+	        distuninstallcheck \
+	  && chmod -R a-w "$$dc_install_base" \
+	  && ({ \
+	       (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+	       && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+	            distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+	      } || { rm -rf "$$dc_destdir"; exit 1; }) \
+	  && rm -rf "$$dc_destdir" \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist \
+	  && rm -rf $(DIST_ARCHIVES) \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+	  && cd "$$am__cwd" \
+	  || exit 1
+	$(am__post_remove_distdir)
+	@(echo "$(distdir) archives ready for distribution: "; \
+	  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:
+	@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)"; \
+	        fi ; \
+	        $(distuninstallcheck_listfiles) ; \
+	        exit 1; } >&2
+distcleancheck: distclean
+	@if test '$(srcdir)' = . ; then \
+	  echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+	  exit 1 ; \
+	fi
+	@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+	  || { echo "ERROR: files left in build directory after distclean:" ; \
+	       $(distcleancheck_listfiles) ; \
+	       exit 1; } >&2
+check-am: all-am
+check: check-recursive
+all-am: Makefile config.h
+installdirs: installdirs-recursive
+installdirs-am:
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+	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:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-recursive
+
+clean-am: clean-generic mostlyclean-am
+
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-hdr distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-data-local
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-generic
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(am__recursive_targets) all install-am install-strip
+
+.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
+	am--refresh check check-am clean clean-cscope clean-generic \
+	cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
+	dist-gzip dist-hook dist-lzip 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-data-local 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-am uninstall uninstall-am
+
+
+install-data-local:
+	@$(NORMAL_INSTALL)
+	if test -d $(srcdir)/pixmaps; then \
+	  $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \
+	  for pixmap in $(srcdir)/pixmaps/*; do \
+	    if test -f $$pixmap; then \
+	      $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \
+	    fi \
+	  done \
+	fi
+
+dist-hook:
+	if test -d pixmaps; then \
+	  mkdir $(distdir)/pixmaps; \
+	  for pixmap in pixmaps/*; do \
+	    if test -f $$pixmap; then \
+	      cp -p $$pixmap $(distdir)/pixmaps; \
+	    fi \
+	  done \
+	fi
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..faaa93f
--- /dev/null
+++ b/NEWS
@@ -0,0 +1 @@
+Please read the user manual in the doc/ directory
diff --git a/README b/README
new file mode 100644
index 0000000..faaa93f
--- /dev/null
+++ b/README
@@ -0,0 +1 @@
+Please read the user manual in the doc/ directory
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..26055c7
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,2084 @@
+# generated automatically by aclocal 1.14.1 -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
+m4_ifndef([AC_AUTOCONF_VERSION],
+  [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],,
+[m4_warning([this file was generated for autoconf 2.69.
+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'.])])
+
+# Copyright (C) 1995-2002 Free Software Foundation, Inc.
+# Copyright (C) 2001-2003,2004 Red Hat, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License.  As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+#
+# Macro to add for using GNU gettext.
+# Ulrich Drepper <drepper at cygnus.com>, 1995, 1996
+#
+# Modified to never use included libintl. 
+# Owen Taylor <otaylor at redhat.com>, 12/15/1998
+#
+# Major rework to remove unused code
+# Owen Taylor <otaylor at redhat.com>, 12/11/2002
+#
+# Added better handling of ALL_LINGUAS from GNU gettext version 
+# written by Bruno Haible, Owen Taylor <otaylor.redhat.com> 5/30/3002
+#
+# Modified to require ngettext
+# Matthias Clasen <mclasen at redhat.com> 08/06/2004
+#
+# We need this here as well, since someone might use autoconf-2.5x
+# to configure GLib then an older version to configure a package
+# using AM_GLIB_GNU_GETTEXT
+AC_PREREQ(2.53)
+
+dnl
+dnl We go to great lengths to make sure that aclocal won't 
+dnl try to pull in the installed version of these macros
+dnl when running aclocal in the glib directory.
+dnl
+m4_copy([AC_DEFUN],[glib_DEFUN])
+m4_copy([AC_REQUIRE],[glib_REQUIRE])
+dnl
+dnl At the end, if we're not within glib, we'll define the public
+dnl definitions in terms of our private definitions.
+dnl
+
+# GLIB_LC_MESSAGES
+#--------------------
+glib_DEFUN([GLIB_LC_MESSAGES],
+  [AC_CHECK_HEADERS([locale.h])
+    if test $ac_cv_header_locale_h = yes; then
+    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+      [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+    if test $am_cv_val_LC_MESSAGES = yes; then
+      AC_DEFINE(HAVE_LC_MESSAGES, 1,
+        [Define if your <locale.h> file defines LC_MESSAGES.])
+    fi
+  fi])
+
+# GLIB_PATH_PROG_WITH_TEST
+#----------------------------
+dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+glib_DEFUN([GLIB_PATH_PROG_WITH_TEST],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+  /*)
+  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in ifelse([$5], , $PATH, [$5]); do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if [$3]; then
+	ac_cv_path_$1="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+  ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+  AC_MSG_RESULT([$]$1)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+# GLIB_WITH_NLS
+#-----------------
+glib_DEFUN([GLIB_WITH_NLS],
+  dnl NLS is obligatory
+  [USE_NLS=yes
+    AC_SUBST(USE_NLS)
+
+    gt_cv_have_gettext=no
+
+    CATOBJEXT=NONE
+    XGETTEXT=:
+    INTLLIBS=
+
+    AC_CHECK_HEADER(libintl.h,
+     [gt_cv_func_dgettext_libintl="no"
+      libintl_extra_libs=""
+
+      #
+      # First check in libc
+      #
+      AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc,
+        [AC_TRY_LINK([
+#include <libintl.h>
+],
+         [return !ngettext ("","", 1)],
+	  gt_cv_func_ngettext_libc=yes,
+          gt_cv_func_ngettext_libc=no)
+        ])
+  
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+	      AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc,
+        	[AC_TRY_LINK([
+#include <libintl.h>
+],
+	          [return !dgettext ("","")],
+		  gt_cv_func_dgettext_libc=yes,
+	          gt_cv_func_dgettext_libc=no)
+        	])
+      fi
+  
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+        AC_CHECK_FUNCS(bind_textdomain_codeset)
+      fi
+
+      #
+      # If we don't have everything we want, check in libintl
+      #
+      if test "$gt_cv_func_dgettext_libc" != "yes" \
+	 || test "$gt_cv_func_ngettext_libc" != "yes" \
+         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+        
+        AC_CHECK_LIB(intl, bindtextdomain,
+	    [AC_CHECK_LIB(intl, ngettext,
+		    [AC_CHECK_LIB(intl, dgettext,
+			          gt_cv_func_dgettext_libintl=yes)])])
+
+	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+	  AC_MSG_CHECKING([if -liconv is needed to use gettext])
+	  AC_MSG_RESULT([])
+  	  AC_CHECK_LIB(intl, ngettext,
+          	[AC_CHECK_LIB(intl, dcgettext,
+		       [gt_cv_func_dgettext_libintl=yes
+			libintl_extra_libs=-liconv],
+			:,-liconv)],
+		:,-liconv)
+        fi
+
+        #
+        # If we found libintl, then check in it for bind_textdomain_codeset();
+        # we'll prefer libc if neither have bind_textdomain_codeset(),
+        # and both have dgettext and ngettext
+        #
+        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS -lintl $libintl_extra_libs"
+          unset ac_cv_func_bind_textdomain_codeset
+          AC_CHECK_FUNCS(bind_textdomain_codeset)
+          LIBS="$glib_save_LIBS"
+
+          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+            gt_cv_func_dgettext_libc=no
+          else
+            if test "$gt_cv_func_dgettext_libc" = "yes" \
+		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
+              gt_cv_func_dgettext_libintl=no
+            fi
+          fi
+        fi
+      fi
+
+      if test "$gt_cv_func_dgettext_libc" = "yes" \
+	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        gt_cv_have_gettext=yes
+      fi
+  
+      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        INTLLIBS="-lintl $libintl_extra_libs"
+      fi
+  
+      if test "$gt_cv_have_gettext" = "yes"; then
+	AC_DEFINE(HAVE_GETTEXT,1,
+	  [Define if the GNU gettext() function is already present or preinstalled.])
+	GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+	if test "$MSGFMT" != "no"; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS $INTLLIBS"
+	  AC_CHECK_FUNCS(dcgettext)
+	  MSGFMT_OPTS=
+	  AC_MSG_CHECKING([if msgfmt accepts -c])
+	  GLIB_RUN_PROG([$MSGFMT -c -o /dev/null],[
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: test 1.0\n"
+"PO-Revision-Date: 2007-02-15 12:01+0100\n"
+"Last-Translator: test <foo at bar.xx>\n"
+"Language-Team: C <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])])
+	  AC_SUBST(MSGFMT_OPTS)
+	  AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+	  GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+	    [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+	  AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
+			 return _nl_msg_cat_cntr],
+	    [CATOBJEXT=.gmo 
+             DATADIRNAME=share],
+	    [case $host in
+	    *-*-solaris*)
+	    dnl On Solaris, if bind_textdomain_codeset is in libc,
+	    dnl GNU format message catalog is always supported,
+            dnl since both are added to the libc all together.
+	    dnl Hence, we'd like to go with DATADIRNAME=share and
+	    dnl and CATOBJEXT=.gmo in this case.
+            AC_CHECK_FUNC(bind_textdomain_codeset,
+	      [CATOBJEXT=.gmo 
+               DATADIRNAME=share],
+	      [CATOBJEXT=.mo
+               DATADIRNAME=lib])
+	    ;;
+	    *-*-openbsd*)
+	    CATOBJEXT=.mo
+            DATADIRNAME=share
+	    ;;
+	    *)
+	    CATOBJEXT=.mo
+            DATADIRNAME=lib
+	    ;;
+	    esac])
+          LIBS="$glib_save_LIBS"
+	  INSTOBJEXT=.mo
+	else
+	  gt_cv_have_gettext=no
+	fi
+      fi
+    ])
+
+    if test "$gt_cv_have_gettext" = "yes" ; then
+      AC_DEFINE(ENABLE_NLS, 1,
+        [always defined to indicate that i18n is enabled])
+    fi
+
+    dnl Test whether we really found GNU xgettext.
+    if test "$XGETTEXT" != ":"; then
+      dnl If it is not GNU xgettext we define it as : so that the
+      dnl Makefiles still can work.
+      if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+        : ;
+      else
+        AC_MSG_RESULT(
+	  [found xgettext program is not GNU xgettext; ignore it])
+        XGETTEXT=":"
+      fi
+    fi
+
+    # We need to process the po/ directory.
+    POSUB=po
+
+    AC_OUTPUT_COMMANDS(
+      [case "$CONFIG_FILES" in *po/Makefile.in*)
+        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+      esac])
+
+    dnl These rules are solely for the distribution goal.  While doing this
+    dnl we only have to keep exactly one list of the available catalogs
+    dnl in configure.ac.
+    for lang in $ALL_LINGUAS; do
+      GMOFILES="$GMOFILES $lang.gmo"
+      POFILES="$POFILES $lang.po"
+    done
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST(CATALOGS)
+    AC_SUBST(CATOBJEXT)
+    AC_SUBST(DATADIRNAME)
+    AC_SUBST(GMOFILES)
+    AC_SUBST(INSTOBJEXT)
+    AC_SUBST(INTLLIBS)
+    AC_SUBST(PO_IN_DATADIR_TRUE)
+    AC_SUBST(PO_IN_DATADIR_FALSE)
+    AC_SUBST(POFILES)
+    AC_SUBST(POSUB)
+  ])
+
+# AM_GLIB_GNU_GETTEXT
+# -------------------
+# Do checks necessary for use of gettext. If a suitable implementation 
+# of gettext is found in either in libintl or in the C library,
+# it will set INTLLIBS to the libraries needed for use of gettext
+# and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable
+# gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST()
+# on various variables needed by the Makefile.in.in installed by 
+# glib-gettextize.
+dnl
+glib_DEFUN([GLIB_GNU_GETTEXT],
+  [AC_REQUIRE([AC_PROG_CC])dnl
+   
+   GLIB_LC_MESSAGES
+   GLIB_WITH_NLS
+
+   if test "$gt_cv_have_gettext" = "yes"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     else
+       AC_MSG_CHECKING(for catalogs to be installed)
+       NEW_LINGUAS=
+       for presentlang in $ALL_LINGUAS; do
+         useit=no
+         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+           desiredlanguages="$LINGUAS"
+         else
+           desiredlanguages="$ALL_LINGUAS"
+         fi
+         for desiredlang in $desiredlanguages; do
+ 	   # Use the presentlang catalog if desiredlang is
+           #   a. equal to presentlang, or
+           #   b. a variant of presentlang (because in this case,
+           #      presentlang can be used as a fallback for messages
+           #      which are not translated in the desiredlang catalog).
+           case "$desiredlang" in
+             "$presentlang"*) useit=yes;;
+           esac
+         done
+         if test $useit = yes; then
+           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+         fi
+       done
+       LINGUAS=$NEW_LINGUAS
+       AC_MSG_RESULT($LINGUAS)
+     fi
+
+     dnl Construct list of names of catalog files to be constructed.
+     if test -n "$LINGUAS"; then
+       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+     fi
+   fi
+
+   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+   dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
+   dnl Try to locate is.
+   MKINSTALLDIRS=
+   if test -n "$ac_aux_dir"; then
+     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+   fi
+   if test -z "$MKINSTALLDIRS"; then
+     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+   fi
+   AC_SUBST(MKINSTALLDIRS)
+
+   dnl Generate list of files to be processed by xgettext which will
+   dnl be included in po/Makefile.
+   test -d po || mkdir po
+   if test "x$srcdir" != "x."; then
+     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+       posrcprefix="$srcdir/"
+     else
+       posrcprefix="../$srcdir/"
+     fi
+   else
+     posrcprefix="../"
+   fi
+   rm -f po/POTFILES
+   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+	< $srcdir/po/POTFILES.in > po/POTFILES
+  ])
+
+# AM_GLIB_DEFINE_LOCALEDIR(VARIABLE)
+# -------------------------------
+# Define VARIABLE to the location where catalog files will
+# be installed by po/Makefile.
+glib_DEFUN([GLIB_DEFINE_LOCALEDIR],
+[glib_REQUIRE([GLIB_GNU_GETTEXT])dnl
+glib_save_prefix="$prefix"
+glib_save_exec_prefix="$exec_prefix"
+glib_save_datarootdir="$datarootdir"
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+test "x$exec_prefix" = xNONE && exec_prefix=$prefix
+datarootdir=`eval echo "${datarootdir}"`
+if test "x$CATOBJEXT" = "x.mo" ; then
+  localedir=`eval echo "${libdir}/locale"`
+else
+  localedir=`eval echo "${datadir}/locale"`
+fi
+prefix="$glib_save_prefix"
+exec_prefix="$glib_save_exec_prefix"
+datarootdir="$glib_save_datarootdir"
+AC_DEFINE_UNQUOTED($1, "$localedir",
+  [Define the location where the catalogs will be installed])
+])
+
+dnl
+dnl Now the definitions that aclocal will find
+dnl
+ifdef(glib_configure_ac,[],[
+AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)])
+AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)])
+])dnl
+
+# GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL])
+# 
+# Create a temporary file with TEST-FILE as its contents and pass the
+# file name to PROGRAM.  Perform ACTION-IF-PASS if PROGRAM exits with
+# 0 and perform ACTION-IF-FAIL for any other exit status.
+AC_DEFUN([GLIB_RUN_PROG],
+[cat >conftest.foo <<_ACEOF
+$2
+_ACEOF
+if AC_RUN_LOG([$1 conftest.foo]); then
+  m4_ifval([$3], [$3], [:])
+m4_ifvaln([$4], [else $4])dnl
+echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD
+sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD
+fi])
+
+
+
+dnl IT_PROG_INTLTOOL([MINIMUM-VERSION], [no-xml])
+# serial 42 IT_PROG_INTLTOOL
+AC_DEFUN([IT_PROG_INTLTOOL], [
+AC_PREREQ([2.50])dnl
+AC_REQUIRE([AM_NLS])dnl
+
+case "$am__api_version" in
+    1.[01234])
+	AC_MSG_ERROR([Automake 1.5 or newer is required to use intltool])
+    ;;
+    *)
+    ;;
+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])
+    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.])
+fi
+
+AC_PATH_PROG(INTLTOOL_UPDATE, [intltool-update])
+AC_PATH_PROG(INTLTOOL_MERGE, [intltool-merge])
+AC_PATH_PROG(INTLTOOL_EXTRACT, [intltool-extract])
+if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
+    AC_MSG_ERROR([The intltool scripts were not found. Please install intltool.])
+fi
+
+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)
+_IT_SUBST(INTLTOOL_KEYS_RULE)
+_IT_SUBST(INTLTOOL_PROP_RULE)
+_IT_SUBST(INTLTOOL_OAF_RULE)
+_IT_SUBST(INTLTOOL_PONG_RULE)
+_IT_SUBST(INTLTOOL_SERVER_RULE)
+_IT_SUBST(INTLTOOL_SHEET_RULE)
+_IT_SUBST(INTLTOOL_SOUNDLIST_RULE)
+_IT_SUBST(INTLTOOL_UI_RULE)
+_IT_SUBST(INTLTOOL_XAM_RULE)
+_IT_SUBST(INTLTOOL_KBD_RULE)
+_IT_SUBST(INTLTOOL_XML_RULE)
+_IT_SUBST(INTLTOOL_XML_NOMERGE_RULE)
+_IT_SUBST(INTLTOOL_CAVES_RULE)
+_IT_SUBST(INTLTOOL_SCHEMAS_RULE)
+_IT_SUBST(INTLTOOL_THEME_RULE)
+_IT_SUBST(INTLTOOL_SERVICE_RULE)
+_IT_SUBST(INTLTOOL_POLICY_RULE)
+
+# Check the gettext tools to make sure they are GNU
+AC_PATH_PROG(XGETTEXT, xgettext)
+AC_PATH_PROG(MSGMERGE, msgmerge)
+AC_PATH_PROG(MSGFMT, msgfmt)
+AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+    AC_MSG_ERROR([GNU gettext tools not found; required for intltool])
+fi
+
+AC_PATH_PROG(INTLTOOL_PERL, perl)
+if test -z "$INTLTOOL_PERL"; then
+   AC_MSG_ERROR([perl not found])
+fi
+AC_MSG_CHECKING([for perl >= 5.8.1])
+$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"`
+   AC_MSG_RESULT([$IT_PERL_VERSION])
+fi
+if test "x$2" != "xno-xml"; then
+   AC_MSG_CHECKING([for XML::Parser])
+   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
+       AC_MSG_RESULT([ok])
+   else
+       AC_MSG_ERROR([XML::Parser perl module is required for intltool])
+   fi
+fi
+
+# Substitute ALL_LINGUAS so we can use it in po/Makefile
+AC_SUBST(ALL_LINGUAS)
+
+# Set DATADIRNAME correctly if it is not set yet
+# (copied from glib-gettext.m4)
+if test -z "$DATADIRNAME"; then
+  AC_LINK_IFELSE(
+    [AC_LANG_PROGRAM([[]],
+                     [[extern int _nl_msg_cat_cntr;
+                       return _nl_msg_cat_cntr]])],
+    [DATADIRNAME=share],
+    [case $host in
+    *-*-solaris*)
+    dnl On Solaris, if bind_textdomain_codeset is in libc,
+    dnl GNU format message catalog is always supported,
+    dnl since both are added to the libc all together.
+    dnl Hence, we'd like to go with DATADIRNAME=share
+    dnl in this case.
+    AC_CHECK_FUNC(bind_textdomain_codeset,
+      [DATADIRNAME=share], [DATADIRNAME=lib])
+    ;;
+    *)
+    [DATADIRNAME=lib]
+    ;;
+    esac])
+fi
+AC_SUBST(DATADIRNAME)
+
+IT_PO_SUBDIR([po])
+
+])
+
+
+# IT_PO_SUBDIR(DIRNAME)
+# ---------------------
+# All po subdirs have to be declared with this macro; the subdir "po" is
+# declared by IT_PROG_INTLTOOL.
+#
+AC_DEFUN([IT_PO_SUBDIR],
+[AC_PREREQ([2.53])dnl We use ac_top_srcdir inside AC_CONFIG_COMMANDS.
+dnl
+dnl The following CONFIG_COMMANDS should be executed at the very end
+dnl of config.status.
+AC_CONFIG_COMMANDS_PRE([
+  AC_CONFIG_COMMANDS([$1/stamp-it], [
+    if [ ! grep "^# INTLTOOL_MAKEFILE$" "$1/Makefile.in" > /dev/null ]; then
+       AC_MSG_ERROR([$1/Makefile.in.in was not created by intltoolize.])
+    fi
+    rm -f "$1/stamp-it" "$1/stamp-it.tmp" "$1/POTFILES" "$1/Makefile.tmp"
+    >"$1/stamp-it.tmp"
+    [sed '/^#/d
+	 s/^[[].*] *//
+	 /^[ 	]*$/d
+	'"s|^|	$ac_top_srcdir/|" \
+      "$srcdir/$1/POTFILES.in" | sed '$!s/$/ \\/' >"$1/POTFILES"
+    ]
+    [sed '/^POTFILES =/,/[^\\]$/ {
+		/^POTFILES =/!d
+		r $1/POTFILES
+	  }
+	 ' "$1/Makefile.in" >"$1/Makefile"]
+    rm -f "$1/Makefile.tmp"
+    mv "$1/stamp-it.tmp" "$1/stamp-it"
+  ])
+])dnl
+])
+
+# _IT_SUBST(VARIABLE)
+# -------------------
+# Abstract macro to do either _AM_SUBST_NOTMAKE or AC_SUBST
+#
+AC_DEFUN([_IT_SUBST],
+[
+AC_SUBST([$1])
+m4_ifdef([_AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE([$1])])
+]
+)
+
+# deprecated macros
+AU_ALIAS([AC_PROG_INTLTOOL], [IT_PROG_INTLTOOL])
+# A hint is needed for aclocal from Automake <= 1.9.4:
+# AC_DEFUN([AC_PROG_INTLTOOL], ...)
+
+
+# nls.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2013 Free Software Foundation,
+dnl Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl   Ulrich Drepper <drepper at cygnus.com>, 1995-2000.
+dnl   Bruno Haible <haible at clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_NLS],
+[
+  AC_MSG_CHECKING([whether NLS is requested])
+  dnl Default is enabled NLS
+  AC_ARG_ENABLE([nls],
+    [  --disable-nls           do not use Native Language Support],
+    USE_NLS=$enableval, USE_NLS=yes)
+  AC_MSG_RESULT([$USE_NLS])
+  AC_SUBST([USE_NLS])
+])
+
+# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
+# serial 1 (pkg-config-0.24)
+# 
+# Copyright © 2004 Scott James Remnant <scott at netsplit.com>.
+#
+# 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
+AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
+AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=m4_default([$1], [0.9.0])
+	AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		AC_MSG_RESULT([yes])
+	else
+		AC_MSG_RESULT([no])
+		PKG_CONFIG=""
+	fi
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists.  Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+# Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+# only at the first occurence in configure.ac, so if the first place
+# it's called might be skipped (such as if it is within an "if", you
+# have to call PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+    AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+  m4_default([$2], [:])
+m4_ifvaln([$3], [else
+  $3])dnl
+fi])
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$$1"; then
+    pkg_cv_[]$1="$$1"
+ elif test -n "$PKG_CONFIG"; then
+    PKG_CHECK_EXISTS([$3],
+                     [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes ],
+		     [pkg_failed=yes])
+ else
+    pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+   	AC_MSG_RESULT([no])
+        _PKG_SHORT_ERRORS_SUPPORTED
+        if test $_pkg_short_errors_supported = yes; then
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
+        else 
+	        $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+	m4_default([$4], [AC_MSG_ERROR(
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT])[]dnl
+        ])
+elif test $pkg_failed = untried; then
+     	AC_MSG_RESULT([no])
+	m4_default([$4], [AC_MSG_FAILURE(
+[The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])[]dnl
+        ])
+else
+	$1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+	$1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+        AC_MSG_RESULT([yes])
+	$3
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+
+# PKG_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable pkgconfigdir as the location where a module
+# should install pkg-config .pc files. By default the directory is
+# $libdir/pkgconfig, but the default can be changed by passing
+# DIRECTORY. The user can override through the --with-pkgconfigdir
+# parameter.
+AC_DEFUN([PKG_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([pkgconfigdir],
+    [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],,
+    [with_pkgconfigdir=]pkg_default)
+AC_SUBST([pkgconfigdir], [$with_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_INSTALLDIR
+
+
+# PKG_NOARCH_INSTALLDIR(DIRECTORY)
+# -------------------------
+# Substitutes the variable noarch_pkgconfigdir as the location where a
+# module should install arch-independent pkg-config .pc files. By
+# default the directory is $datadir/pkgconfig, but the default can be
+# changed by passing DIRECTORY. The user can override through the
+# --with-noarch-pkgconfigdir parameter.
+AC_DEFUN([PKG_NOARCH_INSTALLDIR],
+[m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])])
+m4_pushdef([pkg_description],
+    [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@])
+AC_ARG_WITH([noarch-pkgconfigdir],
+    [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],,
+    [with_noarch_pkgconfigdir=]pkg_default)
+AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir])
+m4_popdef([pkg_default])
+m4_popdef([pkg_description])
+]) dnl PKG_NOARCH_INSTALLDIR
+
+
+# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE,
+# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+# -------------------------------------------
+# Retrieves the value of the pkg-config variable for the given module.
+AC_DEFUN([PKG_CHECK_VAR],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl
+
+_PKG_CONFIG([$1], [variable="][$3]["], [$2])
+AS_VAR_COPY([$1], [pkg_cv_][$1])
+
+AS_VAR_IF([$1], [""], [$5], [$4])dnl
+])# PKG_CHECK_VAR
+
+# Copyright (C) 2002-2013 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.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.14'
+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.14.1], [],
+      [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too.  Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_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.14.1])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-2013 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.
+
+# 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/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is '.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL                                            -*- Autoconf -*-
+
+# Copyright (C) 1997-2013 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.
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ([2.52])dnl
+ m4_if([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+       [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999-2013 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.
+
+
+# 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,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+m4_if([$1], [CC],   [depcc="$CC"   am_compiler_list=],
+      [$1], [CXX],  [depcc="$CXX"  am_compiler_list=],
+      [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+      [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'],
+      [$1], [UPC],  [depcc="$UPC"  am_compiler_list=],
+      [$1], [GCJ],  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                    [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # 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.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  am__universal=false
+  m4_case([$1], [CC],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac],
+    [CXX],
+    [case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac])
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    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.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES.
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+  [--enable-dependency-tracking],
+  [do not reject slow dependency extractors])
+AS_HELP_STRING(
+  [--disable-dependency-tracking],
+  [speeds up one-time build])])
+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 -*-
+
+# Copyright (C) 1999-2013 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.
+
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+  # Older Autoconf quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named 'Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running 'make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "$am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each '.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Do all the work for Automake.                             -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 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.
+
+# This macro actually does too much.  Some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O.
+m4_define([AC_PROG_CC],
+m4_defn([AC_PROG_CC])
+[_AM_PROG_CC_C_O
+])
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.65])dnl
+dnl Autoconf wants to disallow AM_ names.  We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[AC_DIAGNOSE([obsolete],
+             [$0: two- and three-arguments forms are deprecated.])
+m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(
+  m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]),
+  [ok:ok],,
+  [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package])
+ AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+AM_MISSING_PROG([AUTOCONF], [autoconf])
+AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+AM_MISSING_PROG([AUTOHEADER], [autoheader])
+AM_MISSING_PROG([MAKEINFO], [makeinfo])
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+AC_SUBST([mkdir_p], ['$(MKDIR_P)'])
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+	      [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+			     [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+		  [_AM_DEPENDENCIES([CC])],
+		  [m4_define([AC_PROG_CC],
+			     m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+		  [_AM_DEPENDENCIES([CXX])],
+		  [m4_define([AC_PROG_CXX],
+			     m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+		  [_AM_DEPENDENCIES([OBJC])],
+		  [m4_define([AC_PROG_OBJC],
+			     m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJCXX],
+		  [_AM_DEPENDENCIES([OBJCXX])],
+		  [m4_define([AC_PROG_OBJCXX],
+			     m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl
+])
+AC_REQUIRE([AM_SILENT_RULES])dnl
+dnl The testsuite driver may need to know about EXEEXT, so add the
+dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen.  This
+dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+  [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake at gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    AC_MSG_ERROR([Your 'rm' program is bad, sorry.])
+  fi
+fi])
+
+dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion.  Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001-2013 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.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+AC_SUBST([install_sh])])
+
+# Copyright (C) 2003-2013 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.
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Add --enable-maintainer-mode option to configure.         -*- Autoconf -*-
+# From Jim Meyering
+
+# Copyright (C) 1996-2013 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.
+
+# AM_MAINTAINER_MODE([DEFAULT-MODE])
+# ----------------------------------
+# Control maintainer-specific portions of Makefiles.
+# Default is to disable them, unless 'enable' is passed literally.
+# For symmetry, 'disable' may be passed as well.  Anyway, the user
+# can override the default with the --enable/--disable switch.
+AC_DEFUN([AM_MAINTAINER_MODE],
+[m4_case(m4_default([$1], [disable]),
+       [enable], [m4_define([am_maintainer_other], [disable])],
+       [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 enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode's default is 'disable' unless 'enable' is passed
+  AC_ARG_ENABLE([maintainer-mode],
+    [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+      am_maintainer_other[ make rules and dependencies not useful
+      (and sometimes confusing) to the casual installer])],
+    [USE_MAINTAINER_MODE=$enableval],
+    [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST([MAINT])dnl
+]
+)
+
+# Check to see how 'make' treats includes.	            -*- Autoconf -*-
+
+# Copyright (C) 2001-2013 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.
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
+
+# Copyright (C) 1997-2013 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.
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it is modern enough.
+# If it is, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
+else
+  am_missing_run=
+  AC_MSG_WARN(['missing' script is too old or missing])
+fi
+])
+
+# Helper functions for option handling.                     -*- Autoconf -*-
+
+# Copyright (C) 2001-2013 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.
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+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)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Copyright (C) 1999-2013 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.
+
+# _AM_PROG_CC_C_O
+# ---------------
+# Like AC_PROG_CC_C_O, but changed for automake.  We rewrite AC_PROG_CC
+# to automatically call this.
+AC_DEFUN([_AM_PROG_CC_C_O],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+AC_LANG_PUSH([C])dnl
+AC_CACHE_CHECK(
+  [whether $CC understands -c and -o together],
+  [am_cv_prog_cc_c_o],
+  [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])])
+  # Make sure it works both with $CC and with simple cc.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i])
+if test "$am_cv_prog_cc_c_o" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+AC_LANG_POP([C])])
+
+# For backward compatibility.
+AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
+
+# Copyright (C) 2001-2013 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.
+
+# AM_RUN_LOG(COMMAND)
+# -------------------
+# Run COMMAND, save the exit status in ac_status, and log it.
+# (This has been adapted from Autoconf's _AC_RUN_LOG macro.)
+AC_DEFUN([AM_RUN_LOG],
+[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+   ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+   (exit $ac_status); }])
+
+# Check to make sure that the build environment is sane.    -*- Autoconf -*-
+
+# Copyright (C) 1996-2013 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.
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \	]]*)
+    AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+     if test "$[*]" = "X"; then
+	# -L didn't work.
+	set X `ls -t "$srcdir/configure" conftest.file`
+     fi
+     if test "$[*]" != "X $srcdir/configure conftest.file" \
+	&& test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+	# If neither matched, then we have a broken ls.  This can happen
+	# if, for instance, CONFIG_SHELL is bash and it inherits a
+	# broken ls alias from the environment.  This has actually
+	# happened.  Such a system could not be considered "sane".
+	AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment])
+     fi
+     if test "$[2]" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT([yes])
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+  [AC_MSG_CHECKING([that generated files are newer than configure])
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
+
+# Copyright (C) 2009-2013 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.
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# ("yes" being less verbose, "no" or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+  [--enable-silent-rules],
+  [less verbose build output (undo: "make V=1")])
+AS_HELP_STRING(
+  [--disable-silent-rules],
+  [verbose build output (undo: "make V=0")])dnl
+])
+case $enable_silent_rules in @%:@ (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+dnl
+dnl A few 'make' implementations (e.g., NonStop OS and NextStep)
+dnl do not support nested variable expansions.
+dnl See automake bug#9928 and bug#10237.
+am_make=${MAKE-make}
+AC_CACHE_CHECK([whether $am_make supports nested variables],
+   [am_cv_make_support_nested_variables],
+   [if AS_ECHO([['TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi])
+if test $am_cv_make_support_nested_variables = yes; then
+  dnl Using '$V' instead of '$(V)' breaks IRIX make.
+  AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AC_SUBST([AM_V])dnl
+AM_SUBST_NOTMAKE([AM_V])dnl
+AC_SUBST([AM_DEFAULT_V])dnl
+AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001-2013 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.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor 'install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in "make install-strip", and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be 'maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006-2013 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.
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+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-2013 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.
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of 'v7', 'ustar', or 'pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+#     tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+#     $(am__untar) < result.tar
+#
+AC_DEFUN([_AM_PROG_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}'])
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+
+m4_if([$1], [v7],
+  [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
+
+  [m4_case([$1],
+    [ustar],
+     [# The POSIX 1988 'ustar' format is defined with fixed-size fields.
+      # There is notably a 21 bits limit for the UID and the GID.  In fact,
+      # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343
+      # and bug#13588).
+      am_max_uid=2097151 # 2^21 - 1
+      am_max_gid=$am_max_uid
+      # The $UID and $GID variables are not portable, so we need to resort
+      # to the POSIX-mandated id(1) utility.  Errors in the 'id' calls
+      # below are definitely unexpected, so allow the users to see them
+      # (that is, avoid stderr redirection).
+      am_uid=`id -u || echo unknown`
+      am_gid=`id -g || echo unknown`
+      AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format])
+      if test $am_uid -le $am_max_uid; then
+         AC_MSG_RESULT([yes])
+      else
+         AC_MSG_RESULT([no])
+         _am_tools=none
+      fi
+      AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format])
+      if test $am_gid -le $am_max_gid; then
+         AC_MSG_RESULT([yes])
+      else
+        AC_MSG_RESULT([no])
+        _am_tools=none
+      fi],
+
+  [pax],
+    [],
+
+  [m4_fatal([Unknown tar format])])
+
+  AC_MSG_CHECKING([how to create a $1 tar archive])
+
+  # Go ahead even if we have the value already cached.  We do so because we
+  # need to set the values for the 'am__tar' and 'am__untar' variables.
+  _am_tools=${am_cv_prog_tar_$1-$_am_tools}
+
+  for _am_tool in $_am_tools; do
+    case $_am_tool in
+    gnutar)
+      for _am_tar in tar gnutar gtar; do
+        AM_RUN_LOG([$_am_tar --version]) && break
+      done
+      am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+      am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+      am__untar="$_am_tar -xf -"
+      ;;
+    plaintar)
+      # Must skip GNU tar: if it does not support --format= it doesn't create
+      # ustar tarball either.
+      (tar --version) >/dev/null 2>&1 && continue
+      am__tar='tar chf - "$$tardir"'
+      am__tar_='tar chf - "$tardir"'
+      am__untar='tar xf -'
+      ;;
+    pax)
+      am__tar='pax -L -x $1 -w "$$tardir"'
+      am__tar_='pax -L -x $1 -w "$tardir"'
+      am__untar='pax -r'
+      ;;
+    cpio)
+      am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+      am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+      am__untar='cpio -i -H $1 -d'
+      ;;
+    none)
+      am__tar=false
+      am__tar_=false
+      am__untar=false
+      ;;
+    esac
+
+    # If the value was cached, stop now.  We just wanted to have am__tar
+    # and am__untar set.
+    test -n "${am_cv_prog_tar_$1}" && break
+
+    # tar/untar a dummy directory, and stop if the command works.
+    rm -rf conftest.dir
+    mkdir conftest.dir
+    echo GrepMe > conftest.dir/file
+    AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+    rm -rf conftest.dir
+    if test -s conftest.tar; then
+      AM_RUN_LOG([$am__untar <conftest.tar])
+      AM_RUN_LOG([cat conftest.dir/file])
+      grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+    fi
+  done
+  rm -rf conftest.dir
+
+  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
diff --git a/autogen.sh b/autogen.sh
new file mode 100755
index 0000000..befe42a
--- /dev/null
+++ b/autogen.sh
@@ -0,0 +1,538 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+#name of package
+test "$PKG_NAME" || PKG_NAME=Package
+test "$srcdir" || srcdir=.
+
+# default version requirements ...
+test "$REQUIRED_AUTOCONF_VERSION" || REQUIRED_AUTOCONF_VERSION=2.53
+test "$REQUIRED_AUTOMAKE_VERSION" || REQUIRED_AUTOMAKE_VERSION=1.9
+test "$REQUIRED_LIBTOOL_VERSION" || REQUIRED_LIBTOOL_VERSION=1.4.3
+test "$REQUIRED_GETTEXT_VERSION" || REQUIRED_GETTEXT_VERSION=0.10.40
+test "$REQUIRED_GLIB_GETTEXT_VERSION" || REQUIRED_GLIB_GETTEXT_VERSION=2.2.0
+test "$REQUIRED_INTLTOOL_VERSION" || REQUIRED_INTLTOOL_VERSION=0.25
+test "$REQUIRED_PKG_CONFIG_VERSION" || REQUIRED_PKG_CONFIG_VERSION=0.14.0
+test "$REQUIRED_GTK_DOC_VERSION" || REQUIRED_GTK_DOC_VERSION=1.0
+test "$REQUIRED_DOC_COMMON_VERSION" || REQUIRED_DOC_COMMON_VERSION=2.3.0
+test "$REQUIRED_GNOME_DOC_UTILS_VERSION" || REQUIRED_GNOME_DOC_UTILS_VERSION=0.4.2
+
+# a list of required m4 macros.  Package can set an initial value
+test "$REQUIRED_M4MACROS" || REQUIRED_M4MACROS=
+test "$FORBIDDEN_M4MACROS" || FORBIDDEN_M4MACROS=
+
+# Not all echo versions allow -n, so we check what is possible. This test is
+# based on the one in autoconf.
+ECHO_C=
+ECHO_N=
+case `echo -n x` in
+-n*)
+  case `echo 'x\c'` in
+  *c*) ;;
+  *)   ECHO_C='\c';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+# some terminal codes ...
+if tty < /dev/null 1>/dev/null 2>&1; then
+    boldface="`tput bold 2>/dev/null`"
+    normal="`tput sgr0 2>/dev/null`"
+else
+    boldface=
+    normal=
+fi
+printbold() {
+    echo $ECHO_N "$boldface" $ECHO_C
+    echo "$@"
+    echo $ECHO_N "$normal" $ECHO_C
+}    
+printerr() {
+    echo "$@" >&2
+}
+
+# Usage:
+#     compare_versions MIN_VERSION ACTUAL_VERSION
+# returns true if ACTUAL_VERSION >= MIN_VERSION
+compare_versions() {
+    ch_min_version=$1
+    ch_actual_version=$2
+    ch_status=0
+    IFS="${IFS=         }"; ch_save_IFS="$IFS"; IFS="."
+    set $ch_actual_version
+    for ch_min in $ch_min_version; do
+        ch_cur=`echo $1 | sed 's/[^0-9].*$//'`; shift # remove letter suffixes
+        if [ -z "$ch_min" ]; then break; fi
+        if [ -z "$ch_cur" ]; then ch_status=1; break; fi
+        if [ $ch_cur -gt $ch_min ]; then break; fi
+        if [ $ch_cur -lt $ch_min ]; then ch_status=1; break; fi
+    done
+    IFS="$ch_save_IFS"
+    return $ch_status
+}
+
+# Usage:
+#     version_check PACKAGE VARIABLE CHECKPROGS MIN_VERSION SOURCE
+# checks to see if the package is available
+version_check() {
+    vc_package=$1
+    vc_variable=$2
+    vc_checkprogs=$3
+    vc_min_version=$4
+    vc_source=$5
+    vc_status=1
+
+    vc_checkprog=`eval echo "\\$$vc_variable"`
+    if [ -n "$vc_checkprog" ]; then
+	printbold "using $vc_checkprog for $vc_package"
+	return 0
+    fi
+
+    if test "x$vc_package" = "xautomake" -a "x$vc_min_version" = "x1.4"; then
+	vc_comparator="="
+    else
+	vc_comparator=">="
+    fi
+    printbold "checking for $vc_package $vc_comparator $vc_min_version..."
+    for vc_checkprog in $vc_checkprogs; do
+	echo $ECHO_N "  testing $vc_checkprog... " $ECHO_C
+	if $vc_checkprog --version < /dev/null > /dev/null 2>&1; then
+	    vc_actual_version=`$vc_checkprog --version | head -n 1 | \
+                               sed 's/^.*[ 	]\([0-9.]*[a-z]*\).*$/\1/'`
+	    if compare_versions $vc_min_version $vc_actual_version; then
+		echo "found $vc_actual_version"
+		# set variables
+		eval "$vc_variable=$vc_checkprog; \
+			${vc_variable}_VERSION=$vc_actual_version"
+		vc_status=0
+		break
+	    else
+		echo "too old (found version $vc_actual_version)"
+	    fi
+	else
+	    echo "not found."
+	fi
+    done
+    if [ "$vc_status" != 0 ]; then
+	printerr "***Error***: You must have $vc_package $vc_comparator $vc_min_version installed"
+	printerr "  to build $PKG_NAME.  Download the appropriate package for"
+	printerr "  from your distribution or get the source tarball at"
+        printerr "    $vc_source"
+	printerr
+	exit $vc_status
+    fi
+    return $vc_status
+}
+
+# Usage:
+#     require_m4macro filename.m4
+# adds filename.m4 to the list of required macros
+require_m4macro() {
+    case "$REQUIRED_M4MACROS" in
+	$1\ * | *\ $1\ * | *\ $1) ;;
+	*) REQUIRED_M4MACROS="$REQUIRED_M4MACROS $1" ;;
+    esac
+}
+
+forbid_m4macro() {
+    case "$FORBIDDEN_M4MACROS" in
+	$1\ * | *\ $1\ * | *\ $1) ;;
+	*) FORBIDDEN_M4MACROS="$FORBIDDEN_M4MACROS $1" ;;
+    esac
+}
+
+# Usage:
+#     add_to_cm_macrodirs dirname
+# Adds the dir to $cm_macrodirs, if it's not there yet.
+add_to_cm_macrodirs() {
+    case $cm_macrodirs in
+    "$1 "* | *" $1 "* | *" $1") ;;
+    *) cm_macrodirs="$cm_macrodirs $1";;
+    esac
+}
+
+# Usage:
+#     print_m4macros_error
+# Prints an error message saying that autoconf macros were misused
+print_m4macros_error() {
+    printerr "***Error***: some autoconf macros required to build $PKG_NAME"
+    printerr "  were not found in your aclocal path, or some forbidden"
+    printerr "  macros were found.  Perhaps you need to adjust your"
+    printerr "  ACLOCAL_FLAGS?"
+    printerr
+}
+
+# Usage:
+#     check_m4macros
+# Checks that all the requested macro files are in the aclocal macro path
+# Uses REQUIRED_M4MACROS and ACLOCAL variables.
+check_m4macros() {
+    # construct list of macro directories
+    cm_macrodirs=`$ACLOCAL --print-ac-dir`
+    # aclocal also searches a version specific dir, eg. /usr/share/aclocal-1.9
+    # but it contains only Automake's own macros, so we can ignore it.
+
+    # Read the dirlist file, supported by Automake >= 1.7.
+    # If AUTOMAKE was defined, no version was detected.
+    if [ -z "$AUTOMAKE_VERSION" ] || compare_versions 1.7 $AUTOMAKE_VERSION && [ -s $cm_macrodirs/dirlist ]; then
+	cm_dirlist=`sed 's/[ 	]*#.*//;/^$/d' $cm_macrodirs/dirlist`
+	if [ -n "$cm_dirlist" ] ; then
+	    for cm_dir in $cm_dirlist; do
+		if [ -d $cm_dir ]; then
+		    add_to_cm_macrodirs $cm_dir
+		fi
+	    done
+	fi
+    fi
+
+    # Parse $ACLOCAL_FLAGS
+    set - $ACLOCAL_FLAGS
+    while [ $# -gt 0 ]; do
+	if [ "$1" = "-I" ]; then
+	    add_to_cm_macrodirs "$2"
+	    shift
+	fi
+	shift
+    done
+
+    cm_status=0
+    if [ -n "$REQUIRED_M4MACROS" ]; then
+	printbold "Checking for required M4 macros..."
+	# check that each macro file is in one of the macro dirs
+	for cm_macro in $REQUIRED_M4MACROS; do
+	    cm_macrofound=false
+	    for cm_dir in $cm_macrodirs; do
+		if [ -f "$cm_dir/$cm_macro" ]; then
+		    cm_macrofound=true
+		    break
+		fi
+		# The macro dir in Cygwin environments may contain a file
+		# called dirlist containing other directories to look in.
+		if [ -f "$cm_dir/dirlist" ]; then
+		    for cm_otherdir in `cat $cm_dir/dirlist`; do
+			if [ -f "$cm_otherdir/$cm_macro" ]; then
+			    cm_macrofound=true
+		            break
+			fi
+		    done
+		fi
+	    done
+	    if $cm_macrofound; then
+		:
+	    else
+		printerr "  $cm_macro not found"
+		cm_status=1
+	    fi
+	done
+    fi
+    if [ "$cm_status" != 0 ]; then
+        print_m4macros_error
+        exit $cm_status
+    fi
+    if [ -n "$FORBIDDEN_M4MACROS" ]; then
+	printbold "Checking for forbidden M4 macros..."
+	# check that each macro file is in one of the macro dirs
+	for cm_macro in $FORBIDDEN_M4MACROS; do
+	    cm_macrofound=false
+	    for cm_dir in $cm_macrodirs; do
+		if [ -f "$cm_dir/$cm_macro" ]; then
+		    cm_macrofound=true
+		    break
+		fi
+	    done
+	    if $cm_macrofound; then
+		printerr "  $cm_macro found (should be cleared from macros dir)"
+		cm_status=1
+	    fi
+	done
+    fi
+    if [ "$cm_status" != 0 ]; then
+        print_m4macros_error
+	exit $cm_status
+    fi
+}
+
+# try to catch the case where the macros2/ directory hasn't been cleared out.
+forbid_m4macro gnome-cxx-check.m4
+
+want_libtool=false
+want_gettext=false
+want_glib_gettext=false
+want_intltool=false
+want_pkg_config=false
+want_gtk_doc=false
+want_gnome_doc_utils=false
+want_maintainer_mode=false
+
+#tell Mandrake autoconf wrapper we want autoconf 2.5x, not 2.13
+WANT_AUTOCONF_2_5=1
+export WANT_AUTOCONF_2_5
+version_check autoconf AUTOCONF 'autoconf2.50 autoconf autoconf-2.53' $REQUIRED_AUTOCONF_VERSION \
+    "http://ftp.gnu.org/pub/gnu/autoconf/autoconf-$REQUIRED_AUTOCONF_VERSION.tar.gz"
+AUTOHEADER=`echo $AUTOCONF | sed s/autoconf/autoheader/`
+
+find_configure_files() {
+    configure_ac=
+    if test -f "$1/configure.ac"; then
+	configure_ac="$1/configure.ac"
+    elif test -f "$1/configure.in"; then
+	configure_ac="$1/configure.in"
+    fi
+    if test "x$configure_ac" != x; then
+	echo "$configure_ac"
+	$AUTOCONF -t 'AC_CONFIG_SUBDIRS:$1' "$configure_ac" | while read dir; do
+	    find_configure_files "$1/$dir"
+	done
+    fi
+}
+
+configure_files="`find_configure_files $srcdir`"
+
+for configure_ac in $configure_files; do
+    dirname=`dirname $configure_ac`
+    if [ -f $dirname/NO-AUTO-GEN ]; then
+	echo skipping $dirname -- flagged as no auto-gen
+	continue
+    fi
+    if grep "^A[CM]_PROG_LIBTOOL" $configure_ac >/dev/null ||
+       grep "^LT_INIT" $configure_ac >/dev/null; then
+	want_libtool=true
+    fi
+    if grep "^AM_GNU_GETTEXT" $configure_ac >/dev/null; then
+	want_gettext=true
+    fi
+    if grep "^AM_GLIB_GNU_GETTEXT" $configure_ac >/dev/null; then
+	want_glib_gettext=true
+    fi
+    if grep "^AC_PROG_INTLTOOL" $configure_ac >/dev/null ||
+       grep "^IT_PROG_INTLTOOL" $configure_ac >/dev/null; then
+	want_intltool=true
+    fi
+    if grep "^PKG_CHECK_MODULES" $configure_ac >/dev/null; then
+	want_pkg_config=true
+    fi
+    if grep "^GTK_DOC_CHECK" $configure_ac >/dev/null; then
+	want_gtk_doc=true
+    fi
+    if grep "^GNOME_DOC_INIT" $configure_ac >/dev/null; then
+        want_gnome_doc_utils=true
+    fi
+
+    # check that AM_MAINTAINER_MODE is used
+    if grep "^AM_MAINTAINER_MODE" $configure_ac >/dev/null; then
+	want_maintainer_mode=true
+    fi
+
+    if grep "^YELP_HELP_INIT" $configure_ac >/dev/null; then
+        require_m4macro yelp.m4
+    fi
+
+    # check to make sure gnome-common macros can be found ...
+    if grep "^GNOME_COMMON_INIT" $configure_ac >/dev/null ||
+       grep "^GNOME_DEBUG_CHECK" $configure_ac >/dev/null ||
+       grep "^GNOME_MAINTAINER_MODE_DEFINES" $configure_ac >/dev/null; then
+        require_m4macro gnome-common.m4
+    fi
+    if grep "^GNOME_COMPILE_WARNINGS" $configure_ac >/dev/null ||
+       grep "^GNOME_CXX_WARNINGS" $configure_ac >/dev/null; then
+        require_m4macro gnome-compiler-flags.m4
+    fi
+    if grep "^GNOME_CODE_COVERAGE" $configure_ac >/dev/null; then
+        require_m4macro gnome-code-coverage.m4
+    fi
+done
+
+case $REQUIRED_AUTOMAKE_VERSION in
+    1.4*) automake_progs="automake-1.4" ;;
+    1.5*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6 automake-1.5" ;;
+    1.6*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7 automake-1.6" ;;
+    1.7*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8 automake-1.7" ;;
+    1.8*) automake_progs="automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9 automake-1.8" ;;
+    1.9*) automake_progs="automake-1.14 automake-1.13 automake-1.12 automake-1.11 automake-1.10 automake-1.9" ;;
+    1.10*) automake_progs="automake-1.14 automake-1.13 automake-1.12 automake-1.11 automake-1.10" ;;
+    1.11*) automake_progs="automake-1.14 automake-1.13 automake-1.12 automake-1.11" ;;
+    1.12*) automake_progs="automake-1.14 automake-1.13 automake-1.12" ;;
+    1.13*) automake_progs="automake-1.14 automake-1.13" ;;
+    1.14*) automake_progs="automake-1.14 " ;;
+esac
+version_check automake AUTOMAKE "$automake_progs" $REQUIRED_AUTOMAKE_VERSION \
+    "http://ftp.gnu.org/pub/gnu/automake/automake-$REQUIRED_AUTOMAKE_VERSION.tar.gz"
+ACLOCAL=`echo $AUTOMAKE | sed s/automake/aclocal/`
+
+if $want_libtool; then
+    version_check libtool LIBTOOLIZE "libtoolize glibtoolize" $REQUIRED_LIBTOOL_VERSION \
+        "http://ftp.gnu.org/pub/gnu/libtool/libtool-$REQUIRED_LIBTOOL_VERSION.tar.gz"
+    require_m4macro libtool.m4
+fi
+
+if $want_gettext; then
+    version_check gettext GETTEXTIZE gettextize $REQUIRED_GETTEXT_VERSION \
+        "http://ftp.gnu.org/pub/gnu/gettext/gettext-$REQUIRED_GETTEXT_VERSION.tar.gz"
+    require_m4macro gettext.m4
+fi
+
+if $want_glib_gettext; then
+    version_check glib-gettext GLIB_GETTEXTIZE glib-gettextize $REQUIRED_GLIB_GETTEXT_VERSION \
+        "ftp://ftp.gtk.org/pub/gtk/v2.2/glib-$REQUIRED_GLIB_GETTEXT_VERSION.tar.gz"
+    require_m4macro glib-gettext.m4
+fi
+
+if $want_intltool; then
+    version_check intltool INTLTOOLIZE intltoolize $REQUIRED_INTLTOOL_VERSION \
+        "http://ftp.gnome.org/pub/GNOME/sources/intltool/"
+    require_m4macro intltool.m4
+fi
+
+if $want_pkg_config; then
+    version_check pkg-config PKG_CONFIG pkg-config $REQUIRED_PKG_CONFIG_VERSION \
+        "'http://www.freedesktop.org/software/pkgconfig/releases/pkgconfig-$REQUIRED_PKG_CONFIG_VERSION.tar.gz"
+    require_m4macro pkg.m4
+fi
+
+if $want_gtk_doc; then
+    version_check gtk-doc GTKDOCIZE gtkdocize $REQUIRED_GTK_DOC_VERSION \
+        "http://ftp.gnome.org/pub/GNOME/sources/gtk-doc/"
+    require_m4macro gtk-doc.m4
+fi
+
+if $want_gnome_doc_utils; then
+    version_check gnome-doc-utils GNOME_DOC_PREPARE gnome-doc-prepare $REQUIRED_GNOME_DOC_UTILS_VERSION \
+        "http://ftp.gnome.org/pub/GNOME/sources/gnome-doc-utils/"
+fi
+
+if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then
+    version_check gnome-common DOC_COMMON gnome-doc-common \
+        $REQUIRED_DOC_COMMON_VERSION " "
+fi
+
+check_m4macros
+
+if [ "$#" = 0 -a "x$NOCONFIGURE" = "x" ]; then
+  printerr "**Warning**: I am going to run \`configure' with no arguments."
+  printerr "If you wish to pass any to it, please specify them on the"
+  printerr \`$0\'" command line."
+  printerr
+fi
+
+topdir=`pwd`
+for configure_ac in $configure_files; do 
+    dirname=`dirname $configure_ac`
+    basename=`basename $configure_ac`
+    if [ -f $dirname/NO-AUTO-GEN ]; then
+	echo skipping $dirname -- flagged as no auto-gen
+    elif [ ! -w $dirname ]; then
+        echo skipping $dirname -- directory is read only
+    else
+	printbold "Processing $configure_ac"
+	cd $dirname
+
+        # Note that the order these tools are called should match what
+        # autoconf's "autoupdate" package does.  See bug 138584 for
+        # details.
+
+        # programs that might install new macros get run before aclocal
+	if grep "^A[CM]_PROG_LIBTOOL" $basename >/dev/null ||
+	   grep "^LT_INIT" $basename >/dev/null; then
+	    printbold "Running $LIBTOOLIZE..."
+	    $LIBTOOLIZE --force --copy || exit 1
+	fi
+
+	if grep "^AM_GLIB_GNU_GETTEXT" $basename >/dev/null; then
+	    printbold "Running $GLIB_GETTEXTIZE... Ignore non-fatal messages."
+	    echo "no" | $GLIB_GETTEXTIZE --force --copy || exit 1
+	elif grep "^AM_GNU_GETTEXT" $basename >/dev/null; then
+	   if grep "^AM_GNU_GETTEXT_VERSION" $basename > /dev/null; then
+	   	printbold "Running autopoint..."
+		autopoint --force || exit 1
+	   else
+	    	printbold "Running $GETTEXTIZE... Ignore non-fatal messages."
+	    	echo "no" | $GETTEXTIZE --force --copy || exit 1
+	   fi
+	fi
+
+	if grep "^AC_PROG_INTLTOOL" $basename >/dev/null ||
+           grep "^IT_PROG_INTLTOOL" $basename >/dev/null; then
+	    printbold "Running $INTLTOOLIZE..."
+	    $INTLTOOLIZE --force --copy --automake || exit 1
+	fi
+	if grep "^GTK_DOC_CHECK" $basename >/dev/null; then
+	    printbold "Running $GTKDOCIZE..."
+	    $GTKDOCIZE --copy || exit 1
+	fi
+
+	if [ "x$USE_COMMON_DOC_BUILD" = "xyes" ]; then
+	    printbold "Running gnome-doc-common..."
+	    gnome-doc-common --copy || exit 1
+	fi
+	if grep "^GNOME_DOC_INIT" $basename >/dev/null; then
+	    printbold "Running $GNOME_DOC_PREPARE..."
+	    $GNOME_DOC_PREPARE --force --copy || exit 1
+	fi
+
+        # Now run aclocal to pull in any additional macros needed
+
+	# if the AC_CONFIG_MACRO_DIR() macro is used, pass that
+	# directory to aclocal.
+	m4dir=`cat "$basename" | grep '^AC_CONFIG_MACRO_DIR' | sed -n -e 's/AC_CONFIG_MACRO_DIR(\([^()]*\))/\1/p' | sed -e 's/^\[\(.*\)\]$/\1/' | sed -e 1q`
+	if [ -n "$m4dir" ]; then
+	    m4dir="-I $m4dir"
+	fi
+	printbold "Running $ACLOCAL..."
+	$ACLOCAL $m4dir $ACLOCAL_FLAGS || exit 1
+
+	if grep "GNOME_AUTOGEN_OBSOLETE" aclocal.m4 >/dev/null; then
+	    printerr "*** obsolete gnome macros were used in $configure_ac"
+	fi
+
+	# Now that all the macros are sorted, run autoconf and autoheader ...
+	printbold "Running $AUTOCONF..."
+	$AUTOCONF || exit 1
+	if grep "^A[CM]_CONFIG_HEADER" $basename >/dev/null; then
+	    printbold "Running $AUTOHEADER..."
+	    $AUTOHEADER || exit 1
+	    # this prevents automake from thinking config.h.in is out of
+	    # date, since autoheader doesn't touch the file if it doesn't
+	    # change.
+	    test -f config.h.in && touch config.h.in
+	fi
+
+	# Finally, run automake to create the makefiles ...
+	printbold "Running $AUTOMAKE..."
+        if [ -f COPYING ]; then
+          cp -pf COPYING COPYING.autogen_bak
+        fi
+        if [ -f INSTALL ]; then
+          cp -pf INSTALL INSTALL.autogen_bak
+        fi
+	if [ $REQUIRED_AUTOMAKE_VERSION != 1.4 ]; then
+	    $AUTOMAKE --gnu --add-missing --copy -Wno-portability || exit 1
+	else
+	    $AUTOMAKE --gnu --add-missing --copy || exit 1
+	fi
+        if [ -f COPYING.autogen_bak ]; then
+          cmp COPYING COPYING.autogen_bak > /dev/null || cp -pf COPYING.autogen_bak COPYING
+          rm -f COPYING.autogen_bak
+        fi
+        if [ -f INSTALL.autogen_bak ]; then
+          cmp INSTALL INSTALL.autogen_bak > /dev/null || cp -pf INSTALL.autogen_bak INSTALL
+          rm -f INSTALL.autogen_bak
+        fi
+
+	cd "$topdir"
+    fi
+done
+
+conf_flags=""
+
+if $want_maintainer_mode; then
+    conf_flags="--enable-maintainer-mode"
+fi
+
+if test x$NOCONFIGURE = x; then
+    printbold Running $srcdir/configure $conf_flags "$@" ...
+    $srcdir/configure $conf_flags "$@" \
+	&& echo Now type \`make\' to compile $PKG_NAME || exit 1
+else
+    echo Skipping configure process.
+fi
diff --git a/compile b/compile
new file mode 100755
index 0000000..531136b
--- /dev/null
+++ b/compile
@@ -0,0 +1,347 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand '-c -o'.
+
+scriptversion=2012-10-14.11; # UTC
+
+# Copyright (C) 1999-2013 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey at cygnus.com>.
+#
+# 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, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake at gnu.org> or send patches to
+# <automake-patches at gnu.org>.
+
+nl='
+'
+
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" ""	$nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Windows hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+  file=$1
+  case $file in
+    / | /[!/]*) # absolute file, and not a UNC file
+      if test -z "$file_conv"; then
+	# lazily determine how to convert abs files
+	case `uname -s` in
+	  MINGW*)
+	    file_conv=mingw
+	    ;;
+	  CYGWIN*)
+	    file_conv=cygwin
+	    ;;
+	  *)
+	    file_conv=wine
+	    ;;
+	esac
+      fi
+      case $file_conv/,$2, in
+	*,$file_conv,*)
+	  ;;
+	mingw/*)
+	  file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+	  ;;
+	cygwin/*)
+	  file=`cygpath -m "$file" || echo "$file"`
+	  ;;
+	wine/*)
+	  file=`winepath -w "$file" || echo "$file"`
+	  ;;
+      esac
+      ;;
+  esac
+}
+
+# func_cl_dashL linkdir
+# Make cl look for libraries in LINKDIR
+func_cl_dashL ()
+{
+  func_file_conv "$1"
+  if test -z "$lib_path"; then
+    lib_path=$file
+  else
+    lib_path="$lib_path;$file"
+  fi
+  linker_opts="$linker_opts -LIBPATH:$file"
+}
+
+# func_cl_dashl library
+# Do a library search-path lookup for cl
+func_cl_dashl ()
+{
+  lib=$1
+  found=no
+  save_IFS=$IFS
+  IFS=';'
+  for dir in $lib_path $LIB
+  do
+    IFS=$save_IFS
+    if $shared && test -f "$dir/$lib.dll.lib"; then
+      found=yes
+      lib=$dir/$lib.dll.lib
+      break
+    fi
+    if test -f "$dir/$lib.lib"; then
+      found=yes
+      lib=$dir/$lib.lib
+      break
+    fi
+    if test -f "$dir/lib$lib.a"; then
+      found=yes
+      lib=$dir/lib$lib.a
+      break
+    fi
+  done
+  IFS=$save_IFS
+
+  if test "$found" != yes; then
+    lib=$lib.lib
+  fi
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+  # Assume a capable shell
+  lib_path=
+  shared=:
+  linker_opts=
+  for arg
+  do
+    if test -n "$eat"; then
+      eat=
+    else
+      case $1 in
+	-o)
+	  # configure might choose to run compile as 'compile cc -o foo foo.c'.
+	  eat=1
+	  case $2 in
+	    *.o | *.[oO][bB][jJ])
+	      func_file_conv "$2"
+	      set x "$@" -Fo"$file"
+	      shift
+	      ;;
+	    *)
+	      func_file_conv "$2"
+	      set x "$@" -Fe"$file"
+	      shift
+	      ;;
+	  esac
+	  ;;
+	-I)
+	  eat=1
+	  func_file_conv "$2" mingw
+	  set x "$@" -I"$file"
+	  shift
+	  ;;
+	-I*)
+	  func_file_conv "${1#-I}" mingw
+	  set x "$@" -I"$file"
+	  shift
+	  ;;
+	-l)
+	  eat=1
+	  func_cl_dashl "$2"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
+	-l*)
+	  func_cl_dashl "${1#-l}"
+	  set x "$@" "$lib"
+	  shift
+	  ;;
+	-L)
+	  eat=1
+	  func_cl_dashL "$2"
+	  ;;
+	-L*)
+	  func_cl_dashL "${1#-L}"
+	  ;;
+	-static)
+	  shared=false
+	  ;;
+	-Wl,*)
+	  arg=${1#-Wl,}
+	  save_ifs="$IFS"; IFS=','
+	  for flag in $arg; do
+	    IFS="$save_ifs"
+	    linker_opts="$linker_opts $flag"
+	  done
+	  IFS="$save_ifs"
+	  ;;
+	-Xlinker)
+	  eat=1
+	  linker_opts="$linker_opts $2"
+	  ;;
+	-*)
+	  set x "$@" "$1"
+	  shift
+	  ;;
+	*.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+	  func_file_conv "$1"
+	  set x "$@" -Tp"$file"
+	  shift
+	  ;;
+	*.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+	  func_file_conv "$1" mingw
+	  set x "$@" "$file"
+	  shift
+	  ;;
+	*)
+	  set x "$@" "$1"
+	  shift
+	  ;;
+      esac
+    fi
+    shift
+  done
+  if test -n "$linker_opts"; then
+    linker_opts="-link$linker_opts"
+  fi
+  exec "$@" $linker_opts
+  exit 1
+}
+
+eat=
+
+case $1 in
+  '')
+     echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+     exit 1;
+     ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand '-c -o'.
+Remove '-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file 'INSTALL'.
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "compile $scriptversion"
+    exit $?
+    ;;
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+    func_cl_wrapper "$@"      # Doesn't return...
+    ;;
+esac
+
+ofile=
+cfile=
+
+for arg
+do
+  if test -n "$eat"; then
+    eat=
+  else
+    case $1 in
+      -o)
+	# configure might choose to run compile as 'compile cc -o foo foo.c'.
+	# So we strip '-o arg' only if arg is an object.
+	eat=1
+	case $2 in
+	  *.o | *.obj)
+	    ofile=$2
+	    ;;
+	  *)
+	    set x "$@" -o "$2"
+	    shift
+	    ;;
+	esac
+	;;
+      *.c)
+	cfile=$1
+	set x "$@" "$1"
+	shift
+	;;
+      *)
+	set x "$@" "$1"
+	shift
+	;;
+    esac
+  fi
+  shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+  # If no '-o' option was seen then we might have been invoked from a
+  # pattern rule where we don't need one.  That is ok -- this is a
+  # normal compilation that the losing compiler can handle.  If no
+  # '.c' file was seen then we are probably linking.  That is also
+  # ok.
+  exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use '[/\\:.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
+while true; do
+  if mkdir "$lockdir" >/dev/null 2>&1; then
+    break
+  fi
+  sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+  test "$cofile" = "$ofile" || mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+  test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/config.h.in b/config.h.in
new file mode 100644
index 0000000..33f8c8e
--- /dev/null
+++ b/config.h.in
@@ -0,0 +1,144 @@
+/* config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* always defined to indicate that i18n is enabled */
+#undef ENABLE_NLS
+
+/* Gettext package. */
+#undef GETTEXT_PACKAGE
+
+/* Define to 1 if you have the `bind_textdomain_codeset' function. */
+#undef HAVE_BIND_TEXTDOMAIN_CODESET
+
+/* Define to 1 if you have the `dcgettext' function. */
+#undef HAVE_DCGETTEXT
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the `floor' function. */
+#undef HAVE_FLOOR
+
+/* Define to 1 if you have the `fork' function. */
+#undef HAVE_FORK
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define if your <locale.h> file defines LC_MESSAGES. */
+#undef HAVE_LC_MESSAGES
+
+/* Define to 1 if you have the <libintl.h> header file. */
+#undef HAVE_LIBINTL_H
+
+/* Define to 1 if you have the `m' library (-lm). */
+#undef HAVE_LIBM
+
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+   to 0 otherwise. */
+#undef HAVE_MALLOC
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `pow' function. */
+#undef HAVE_POW
+
+/* Define to 1 if your system has a GNU libc compatible `realloc' function,
+   and to 0 otherwise. */
+#undef HAVE_REALLOC
+
+/* Define to 1 if you have the `select' function. */
+#undef HAVE_SELECT
+
+/* Define to 1 if you have the `setlocale' function. */
+#undef HAVE_SETLOCALE
+
+/* Define to 1 if you have the `sqrt' function. */
+#undef HAVE_SQRT
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strstr' function. */
+#undef HAVE_STRSTR
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `vfork' function. */
+#undef HAVE_VFORK
+
+/* Define to 1 if you have the <vfork.h> header file. */
+#undef HAVE_VFORK_H
+
+/* Define to 1 if `fork' works. */
+#undef HAVE_WORKING_FORK
+
+/* Define to 1 if `vfork' works. */
+#undef HAVE_WORKING_VFORK
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to rpl_malloc if the replacement function should be used. */
+#undef malloc
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef pid_t
+
+/* Define to rpl_realloc if the replacement function should be used. */
+#undef realloc
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef ssize_t
+
+/* Define as `fork' if `vfork' does not work. */
+#undef vfork
diff --git a/configure b/configure
new file mode 100755
index 0000000..4bf60c7
--- /dev/null
+++ b/configure
@@ -0,0 +1,9014 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.69 for xnec2c 3.0.
+#
+# Report bugs to <nkcyham at yahoo.com>.
+#
+#
+# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+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
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+# Use a proper internal environment variable to ensure we don't fall
+  # into an infinite loop, continuously re-executing ourselves.
+  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
+    _as_can_reexec=no; export _as_can_reexec;
+    # 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
+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+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+as_fn_exit 255
+  fi
+  # We don't want this to propagate to other subprocesses.
+          { _as_can_reexec=; unset _as_can_reexec;}
+if test "x$CONFIG_SHELL" = x; then
+  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '\${1+\"\$@\"}'='\"\$@\"'
+  setopt NO_GLOB_SUBST
+else
+  case \`(set -o) 2>/dev/null\` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+"
+  as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+  exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1
+test -x / || exit 1"
+  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+  if (eval "$as_required") 2>/dev/null; then :
+  as_have_required=yes
+else
+  as_have_required=no
+fi
+  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  as_found=:
+  case $as_dir in #(
+	 /*)
+	   for as_base in sh bash ksh sh5; do
+	     # Try only shells that exist, to save several forks.
+	     as_shell=$as_dir/$as_base
+	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  CONFIG_SHELL=$as_shell as_have_required=yes
+		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+  break 2
+fi
+fi
+	   done;;
+       esac
+  as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+  CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+      if test "x$CONFIG_SHELL" != x; then :
+  export CONFIG_SHELL
+             # 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
+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+"$@"}
+# Admittedly, this is quite paranoid, since all the known shells bail
+# out after a failed `exec'.
+$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
+exit 255
+fi
+
+    if test x$as_have_required = xno; then :
+  $as_echo "$0: This script requires a shell more modern than all"
+  $as_echo "$0: the shells that I found on your system."
+  if test x${ZSH_VERSION+set} = xset ; then
+    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+  else
+    $as_echo "$0: Please tell bug-autoconf at gnu.org and nkcyham at yahoo.com
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+  fi
+  exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+  as_lineno_1=$LINENO as_lineno_1a=$LINENO
+  as_lineno_2=$LINENO as_lineno_2a=$LINENO
+  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
+  sed -n '
+    p
+    /[$]LINENO/=
+  ' <$as_myself |
+    sed '
+      s/[$]LINENO.*/&-/
+      t lineno
+      b
+      :lineno
+      N
+      :loop
+      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+      t loop
+      s/-\n.*//
+    ' >$as_me.lineno &&
+  chmod +x "$as_me.lineno" ||
+    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
+  # already done that, so ensure we don't try to do so again and fall
+  # in an infinite loop.  This has already happened in practice.
+  _as_can_reexec=no; export _as_can_reexec
+  # Don't try to exec as it changes $[0], causing all sort of problems
+  # (the dirname of $[0] is not the place where we might find the
+  # original and so on.  Autoconf is especially sensitive to this).
+  . "./$as_me.lineno"
+  # Exit status is that of the last command.
+  exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='xnec2c'
+PACKAGE_TARNAME='xnec2c'
+PACKAGE_VERSION='3.0'
+PACKAGE_STRING='xnec2c 3.0'
+PACKAGE_BUGREPORT='nkcyham at yahoo.com'
+PACKAGE_URL=''
+
+ac_unique_file="src/common.h"
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+PROGRAMNAME_LOCALEDIR
+MKINSTALLDIRS
+POSUB
+POFILES
+PO_IN_DATADIR_FALSE
+PO_IN_DATADIR_TRUE
+INTLLIBS
+INSTOBJEXT
+GMOFILES
+CATOBJEXT
+CATALOGS
+MSGFMT_OPTS
+EGREP
+GREP
+CPP
+GETTEXT_PACKAGE
+DATADIRNAME
+ALL_LINGUAS
+INTLTOOL_PERL
+GMSGFMT
+MSGFMT
+MSGMERGE
+XGETTEXT
+INTLTOOL_POLICY_RULE
+INTLTOOL_SERVICE_RULE
+INTLTOOL_THEME_RULE
+INTLTOOL_SCHEMAS_RULE
+INTLTOOL_CAVES_RULE
+INTLTOOL_XML_NOMERGE_RULE
+INTLTOOL_XML_RULE
+INTLTOOL_KBD_RULE
+INTLTOOL_XAM_RULE
+INTLTOOL_UI_RULE
+INTLTOOL_SOUNDLIST_RULE
+INTLTOOL_SHEET_RULE
+INTLTOOL_SERVER_RULE
+INTLTOOL_PONG_RULE
+INTLTOOL_OAF_RULE
+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
+INTLTOOL_EXTRACT
+INTLTOOL_MERGE
+INTLTOOL_UPDATE
+USE_NLS
+PACKAGE_LIBS
+PACKAGE_CFLAGS
+PKG_CONFIG_LIBDIR
+PKG_CONFIG_PATH
+PKG_CONFIG
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+ac_ct_CC
+CFLAGS
+CC
+am__fastdepCXX_FALSE
+am__fastdepCXX_TRUE
+CXXDEPMODE
+am__nodep
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CXX
+CPPFLAGS
+LDFLAGS
+CXXFLAGS
+CXX
+MAINT
+MAINTAINER_MODE_FALSE
+MAINTAINER_MODE_TRUE
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+AM_DEFAULT_V
+AM_V
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_maintainer_mode
+enable_dependency_tracking
+enable_nls
+'
+      ac_precious_vars='build_alias
+host_alias
+target_alias
+CXX
+CXXFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CCC
+CC
+CFLAGS
+PKG_CONFIG
+PKG_CONFIG_PATH
+PKG_CONFIG_LIBDIR
+PACKAGE_CFLAGS
+PACKAGE_LIBS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval $ac_prev=\$ac_option
+    ac_prev=
+    continue
+  fi
+
+  case $ac_option in
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_dashdash$ac_option in
+  --)
+    ac_dashdash=yes ;;
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=*)
+    datadir=$ac_optarg ;;
+
+  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+  | --dataroo | --dataro | --datar)
+    ac_prev=datarootdir ;;
+  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+    datarootdir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=no ;;
+
+  -docdir | --docdir | --docdi | --doc | --do)
+    ac_prev=docdir ;;
+  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+    docdir=$ac_optarg ;;
+
+  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+    ac_prev=dvidir ;;
+  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+    dvidir=$ac_optarg ;;
+
+  -enable-* | --enable-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid feature name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"enable_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval enable_$ac_useropt=\$ac_optarg ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+    ac_prev=htmldir ;;
+  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+  | --ht=*)
+    htmldir=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localedir | --localedir | --localedi | --localed | --locale)
+    ac_prev=localedir ;;
+  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+    localedir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst | --locals)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+    ac_prev=pdfdir ;;
+  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+    pdfdir=$ac_optarg ;;
+
+  -psdir | --psdir | --psdi | --psd | --ps)
+    ac_prev=psdir ;;
+  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+    psdir=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=\$ac_optarg ;;
+
+  -without-* | --without-*)
+    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+      as_fn_error $? "invalid package name: $ac_useropt"
+    ac_useropt_orig=$ac_useropt
+    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+    case $ac_user_opts in
+      *"
+"with_$ac_useropt"
+"*) ;;
+      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+	 ac_unrecognized_sep=', ';;
+    esac
+    eval with_$ac_useropt=no ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    case $ac_envvar in #(
+      '' | [0-9]* | *[!_$as_cr_alnum]* )
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+    esac
+    eval $ac_envvar=\$ac_optarg
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    $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}"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+  case $enable_option_checking in
+    no) ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+  esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
+		datadir sysconfdir sharedstatedir localstatedir includedir \
+		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+		libdir localedir mandir
+do
+  eval ac_val=\$$ac_var
+  # Remove trailing slashes.
+  case $ac_val in
+    */ )
+      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+      eval $ac_var=\$ac_val;;
+  esac
+  # Be sure to have absolute directory names.
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* )  continue;;
+    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+  esac
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+  as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+  as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then the parent directory.
+  ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_myself" : 'X\(//\)[^/]' \| \
+	 X"$as_myself" : 'X\(//\)$' \| \
+	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r "$srcdir/$ac_unique_file"; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+	pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+  srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+  eval ac_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_env_${ac_var}_value=\$${ac_var}
+  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+  eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+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 xnec2c 3.0 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking ...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR            user executables [EPREFIX/bin]
+  --sbindir=DIR           system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR        program executables [EPREFIX/libexec]
+  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
+  --libdir=DIR            object code libraries [EPREFIX/lib]
+  --includedir=DIR        C header files [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
+  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
+  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
+  --infodir=DIR           info documentation [DATAROOTDIR/info]
+  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
+  --mandir=DIR            man documentation [DATAROOTDIR/man]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/xnec2c]
+  --htmldir=DIR           html documentation [DOCDIR]
+  --dvidir=DIR            dvi documentation [DOCDIR]
+  --pdfdir=DIR            pdf documentation [DOCDIR]
+  --psdir=DIR             ps documentation [DOCDIR]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of xnec2c 3.0:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-silent-rules   less verbose build output (undo: "make V=1")
+  --disable-silent-rules  verbose build output (undo: "make V=0")
+  --enable-maintainer-mode
+                          enable make rules and dependencies not useful (and
+                          sometimes confusing) to the casual installer
+  --enable-dependency-tracking
+                          do not reject slow dependency extractors
+  --disable-dependency-tracking
+                          speeds up one-time build
+  --disable-nls           do not use Native Language Support
+
+Some influential environment variables:
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  LIBS        libraries to pass to the linker, e.g. -l<library>
+  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+              you have headers in a nonstandard directory <include dir>
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  PKG_CONFIG  path to pkg-config utility
+  PKG_CONFIG_PATH
+              directories to add to pkg-config's search path
+  PKG_CONFIG_LIBDIR
+              path overriding pkg-config's built-in search path
+  PACKAGE_CFLAGS
+              C compiler flags for PACKAGE, overriding pkg-config
+  PACKAGE_LIBS
+              linker flags for PACKAGE, overriding pkg-config
+  CPP         C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <nkcyham at yahoo.com>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d "$ac_dir" ||
+      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+      continue
+    ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+    cd "$ac_dir" || { ac_status=$?; continue; }
+    # Check for guested configure.
+    if test -f "$ac_srcdir/configure.gnu"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+    elif test -f "$ac_srcdir/configure"; then
+      echo &&
+      $SHELL "$ac_srcdir/configure" --help=recursive
+    else
+      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi || ac_status=$?
+    cd "$ac_pwd" || { ac_status=$?; break; }
+  done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+  cat <<\_ACEOF
+xnec2c configure 3.0
+generated by GNU Autoconf 2.69
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_cxx_try_compile LINENO
+# ----------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_cxx_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_cxx_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_cxx_try_compile
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext
+  if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest.$ac_objext; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  rm -f conftest.$ac_objext conftest$ac_exeext
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && {
+	 test -z "$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       } && test -s conftest$ac_exeext && {
+	 test "$cross_compiling" = yes ||
+	 test -x conftest$ac_exeext
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+	ac_retval=1
+fi
+  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+  # 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; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+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 \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+    which can conflict with char $2 (); below.
+    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+    <limits.h> exists even on freestanding compilers.  */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+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; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    grep -v '^ *+' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+    mv -f conftest.er1 conftest.err
+  fi
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } > conftest.i && {
+	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+	 test ! -s conftest.err
+       }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+    ac_retval=1
+fi
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  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 \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+  # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_header_compiler=yes
+else
+  ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  ac_header_preproc=yes
+else
+  ac_header_preproc=no
+fi
+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; }
+
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+  yes:no: )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+    ;;
+  no:yes:* )
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
+    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## -------------------------------- ##
+## Report this to nkcyham at yahoo.com ##
+## -------------------------------- ##"
+     ) | sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=\$ac_header_compiler"
+fi
+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; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+  if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then :
+  ac_retval=0
+else
+  $as_echo "$as_me: program exited with status $ac_status" >&5
+       $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+       ac_retval=$ac_status
+fi
+  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
+  as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+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 \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  eval "$3=yes"
+else
+  eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+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; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+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 \${$3+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  eval "$3=no"
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+	 return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+	    return 0;
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+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; ${as_lineno_stack:+:} unset as_lineno
+
+} # ac_fn_c_check_type
+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 xnec2c $as_me 3.0, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    $as_echo "PATH: $as_dir"
+  done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *\'*)
+      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+    2)
+      as_fn_append ac_configure_args1 " '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+	ac_must_keep_next=false # Got value, back to normal.
+      else
+	case $ac_arg in
+	  *=* | --config-cache | -C | -disable-* | --disable-* \
+	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+	  | -with-* | --with-* | -without-* | --without-* | --x)
+	    case "$ac_configure_args0 " in
+	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+	    esac
+	    ;;
+	  -* ) ac_must_keep_next=true ;;
+	esac
+      fi
+      as_fn_append ac_configure_args " '$ac_arg'"
+      ;;
+    esac
+  done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
+
+    $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+(
+  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+  (set) 2>&1 |
+    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      sed -n \
+	"s/'\''/'\''\\\\'\'''\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+      ;; #(
+    *)
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+)
+    echo
+
+    $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=\$$ac_var
+      case $ac_val in
+      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+      esac
+      $as_echo "$ac_var='\''$ac_val'\''"
+    done | sort
+    echo
+
+    if test -n "$ac_subst_files"; then
+      $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=\$$ac_var
+	case $ac_val in
+	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+	esac
+	$as_echo "$ac_var='\''$ac_val'\''"
+      done | sort
+      echo
+    fi
+
+    if test -s confdefs.h; then
+      $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+      echo
+      cat confdefs.h
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      $as_echo "$as_me: caught signal $ac_signal"
+    $as_echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core *.core core.conftest.* &&
+    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
+elif test "x$prefix" != xNONE; then
+  ac_site_file1=$prefix/share/config.site
+  ac_site_file2=$prefix/etc/config.site
+else
+  ac_site_file1=$ac_default_prefix/share/config.site
+  ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+  test "x$ac_site_file" = xNONE && continue
+  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special files
+  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
+  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . "$cache_file";;
+      *)                      . "./$cache_file";;
+    esac
+  fi
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val=\$ac_cv_env_${ac_var}_value
+  eval ac_new_val=\$ac_env_${ac_var}_value
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+	# differences in whitespace do not lead to failure.
+	ac_old_val_w=`echo x $ac_old_val`
+	ac_new_val_w=`echo x $ac_new_val`
+	if test "$ac_old_val_w" != "$ac_new_val_w"; then
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+	  ac_cache_corrupted=:
+	else
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+	  eval $ac_var=\$ac_old_val
+	fi
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
+$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
+	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
+$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+am__api_version='1.14'
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
+
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $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 ${ac_cv_path_install+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+  ./ | .// | /[cC]/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+	if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+	  if test $ac_prog = install &&
+	    grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  elif test $ac_prog = install &&
+	    grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+	    # program-specific install script used by HP pwplus--don't use.
+	    :
+	  else
+	    rm -rf conftest.one conftest.two conftest.dir
+	    echo one > conftest.one
+	    echo two > conftest.two
+	    mkdir conftest.dir
+	    if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+	      test -s conftest.one && test -s conftest.two &&
+	      test -s conftest.dir/conftest.one &&
+	      test -s conftest.dir/conftest.two
+	    then
+	      ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+	      break 3
+	    fi
+	  fi
+	fi
+      done
+    done
+    ;;
+esac
+
+  done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    INSTALL=$ac_install_sh
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \	]*)
+    as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
+esac
+
+# Do 'set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   am_has_slept=no
+   for am_try in 1 2; do
+     echo "timestamp, slept: $am_has_slept" > conftest.file
+     set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+     if test "$*" = "X"; then
+	# -L didn't work.
+	set X `ls -t "$srcdir/configure" conftest.file`
+     fi
+     if test "$*" != "X $srcdir/configure conftest.file" \
+	&& test "$*" != "X conftest.file $srcdir/configure"; then
+
+	# If neither matched, then we have a broken ls.  This can happen
+	# if, for instance, CONFIG_SHELL is bash and it inherits a
+	# broken ls alias from the environment.  This has actually
+	# happened.  Such a system could not be considered "sane".
+	as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
+  alias in your environment" "$LINENO" 5
+     fi
+     if test "$2" = conftest.file || test $am_try -eq 2; then
+       break
+     fi
+     # Just in case.
+     sleep 1
+     am_has_slept=yes
+   done
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+  ( sleep 1 ) &
+  am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
+test "$program_prefix" != NONE &&
+  program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --is-lightweight"; then
+  am_missing_run="$MISSING "
+else
+  am_missing_run=
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\	*)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using 'strip' when the user
+# run "make install-strip".  However 'strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the 'STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+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 ${ac_cv_prog_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+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 ${ac_cv_prog_ac_ct_STRIP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+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 ${ac_cv_path_mkdir+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in mkdir gmkdir; do
+	 for ac_exec_ext in '' $ac_executable_extensions; do
+	   as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
+	   case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+	     'mkdir (GNU coreutils) '* | \
+	     'mkdir (coreutils) '* | \
+	     'mkdir (fileutils) '4.1*)
+	       ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+	       break 3;;
+	   esac
+	 done
+       done
+  done
+IFS=$as_save_IFS
+
+fi
+
+  test -d ./--version && rmdir ./--version
+  if test "${ac_cv_path_mkdir+set}" = set; then
+    MKDIR_P="$ac_cv_path_mkdir -p"
+  else
+    # As a last resort, use the slow shell script.  Don't cache a
+    # value for MKDIR_P within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the value is a relative name.
+    MKDIR_P="$ac_install_sh -d"
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+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 ${ac_cv_prog_AWK+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$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 \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in # (((
+  yes) AM_DEFAULT_VERBOSITY=0;;
+   no) AM_DEFAULT_VERBOSITY=1;;
+    *) AM_DEFAULT_VERBOSITY=1;;
+esac
+am_make=${MAKE-make}
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
+$as_echo_n "checking whether $am_make supports nested variables... " >&6; }
+if ${am_cv_make_support_nested_variables+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if $as_echo 'TRUE=$(BAR$(V))
+BAR0=false
+BAR1=true
+V=1
+am__doit:
+	@$(TRUE)
+.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
+  am_cv_make_support_nested_variables=yes
+else
+  am_cv_make_support_nested_variables=no
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
+$as_echo "$am_cv_make_support_nested_variables" >&6; }
+if test $am_cv_make_support_nested_variables = yes; then
+    AM_V='$(V)'
+  AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
+else
+  AM_V=$AM_DEFAULT_VERBOSITY
+  AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
+fi
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+  # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+  # is not polluted with repeated "-I."
+  am__isrc=' -I$(srcdir)'
+  # test to see if srcdir already configured
+  if test -f $srcdir/config.status; then
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+  fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='xnec2c'
+ VERSION='3.0'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# For better backward compatibility.  To be removed once Automake 1.9.x
+# dies out for good.  For more background, see:
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
+# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
+mkdir_p='$(MKDIR_P)'
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+# 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}'
+
+
+# We'll loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar  pax cpio none'
+
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
+
+
+
+
+
+
+# POSIX will say in a future version that running "rm -f" with no argument
+# is OK; and we want to be able to make that assumption in our Makefile
+# recipes.  So use an aggressive probe to check that the usage we want is
+# actually supported "in the wild" to an acceptable degree.
+# See automake bug#10828.
+# To make any issue more visible, cause the running configure to be aborted
+# by default if the 'rm' program in use doesn't match our expectations; the
+# user can still override this though.
+if rm -f && rm -fr && rm -rf; then : OK; else
+  cat >&2 <<'END'
+Oops!
+
+Your 'rm' program seems unable to run without file operands specified
+on the command line, even when the '-f' option is present.  This is contrary
+to the behaviour of most rm programs out there, and not conforming with
+the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
+
+Please tell bug-automake at gnu.org about your system, including the value
+of your $PATH and any error possibly output before this message.  This
+can help us improve future automake versions.
+
+END
+  if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then
+    echo 'Configuration will proceed anyway, since you have set the' >&2
+    echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
+    echo >&2
+  else
+    cat >&2 <<'END'
+Aborting the configuration process, to ensure you take notice of the issue.
+
+You can download and install GNU coreutils to get an 'rm' implementation
+that behaves properly: <http://www.gnu.org/software/coreutils/>.
+
+If you want to complete the configuration process using your problematic
+'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
+to "yes", and re-run configure.
+
+END
+    as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5
+  fi
+fi
+
+ac_config_headers="$ac_config_headers config.h"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
+$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
+    # Check whether --enable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then :
+  enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
+$as_echo "$USE_MAINTAINER_MODE" >&6; }
+   if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+# Set CFLAGS if not set in environment
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether configure should try to set CFLAGS" >&5
+$as_echo_n "checking whether configure should try to set CFLAGS... " >&6; }
+if test "x${CFLAGS+set}" = xset; then
+   enable_cflags_setting=no
+else
+   enable_cflags_setting=yes
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_cflags_setting" >&5
+$as_echo "$enable_cflags_setting" >&6; }
+test "x$enable_cflags_setting" = xyes && CFLAGS="-Wall -O2"
+
+# Checks for programs.
+ac_ext=cpp
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -z "$CXX"; then
+  if test -n "$CCC"; then
+    CXX=$CCC
+  else
+    if test -n "$ac_tool_prefix"; then
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+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 ${ac_cv_prog_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
+$as_echo "$CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+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 ${ac_cv_prog_ac_ct_CXX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
+$as_echo "$ac_ct_CXX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CXX" && break
+done
+
+  if test "x$ac_ct_CXX" = x; then
+    CXX="g++"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CXX=$ac_ct_CXX
+  fi
+fi
+
+  fi
+fi
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5
+$as_echo_n "checking whether the C++ compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+  esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link_default") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile.  We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+	;;
+    [ab].out )
+	# We found the default executable, but exeext='' is most
+	# certainly right.
+	break;;
+    *.* )
+	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+	then :; else
+	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	fi
+	# We set ac_cv_exeext here because the later test for it is not
+	# safe: cross compilers may not add the suffix if given an `-o'
+	# argument, so we may need to know it at that point already.
+	# Even if this section looks crufty: it has the advantage of
+	# actually working.
+	break;;
+    * )
+	break;;
+  esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+  ac_file=''
+fi
+if test -z "$ac_file"; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C++ compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5
+$as_echo_n "checking for C++ compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+	  break;;
+    * ) break;;
+  esac
+done
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+  { { ac_try="$ac_link"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_link") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+  if { ac_try='./conftest$ac_cv_exeext'
+  { { case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_try") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C++ compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5; }
+    fi
+  fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+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 ${ac_cv_objext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compile") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then :
+  for ac_file in conftest.o conftest.obj conftest.*; do
+  test -f "$ac_file" || continue;
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+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 ${ac_cv_cxx_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
+$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GXX=yes
+else
+  GXX=
+fi
+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 ${ac_cv_prog_cxx_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
+   ac_cxx_werror_flag=yes
+   ac_cv_prog_cxx_g=no
+   CXXFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+else
+  CXXFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+
+else
+  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+	 CXXFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_cxx_try_compile "$LINENO"; then :
+  ac_cv_prog_cxx_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
+$as_echo "$ac_cv_prog_cxx_g" >&6; }
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from 'make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+  am__include=include
+  am__quote=
+  _am_result=GNU
+  ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   case `$am_make -s -f confmf 2> /dev/null` in #(
+   *the\ am__doit\ target*)
+     am__include=.include
+     am__quote="\""
+     _am_result=BSD
+     ;;
+   esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+  enableval=$enable_dependency_tracking;
+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=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+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 ${am_cv_CXX_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # 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.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    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.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; }
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+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 ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+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 ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+          if test -n "$ac_tool_prefix"; then
+    # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+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 ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  fi
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+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 ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl.exe
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+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 ${ac_cv_prog_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl.exe
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+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 ${ac_cv_prog_ac_ct_CC+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$ac_ct_CC" && break
+done
+
+  if test "x$ac_ct_CC" = x; then
+    CC=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    CC=$ac_ct_CC
+  fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+  { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+  *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+  ac_status=$?
+  if test -s conftest.err; then
+    sed '10a\
+... rest of stderr output deleted ...
+         10q' conftest.err >conftest.er1
+    cat conftest.er1 >&5
+  fi
+  rm -f conftest.er1 conftest.err
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }
+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 ${ac_cv_c_compiler_gnu+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_compiler_gnu=yes
+else
+  ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+  GCC=yes
+else
+  GCC=
+fi
+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 ${ac_cv_prog_cc_g+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_save_c_werror_flag=$ac_c_werror_flag
+   ac_c_werror_flag=yes
+   ac_cv_prog_cc_g=no
+   CFLAGS="-g"
+   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+else
+  CFLAGS=""
+      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+  ac_c_werror_flag=$ac_save_c_werror_flag
+	 CFLAGS="-g"
+	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+   ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+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 ${ac_cv_prog_cc_c89+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+struct stat;
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
+   function prototypes and stuff, but not '\xHH' hex character constants.
+   These don't provoke an error unfortunately, instead are silently treated
+   as 'x'.  The following induces an error, until -std is added to get
+   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
+   array size at least.  It's necessary to write '\x00'==0 to get something
+   that's true only with -std.  */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+   inside strings and character constants.  */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+  test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+  x)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+  xno)
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+  *)
+    CC="$CC $ac_cv_prog_cc_c89"
+    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5
+$as_echo_n "checking whether $CC understands -c and -o together... " >&6; }
+if ${am_cv_prog_cc_c_o+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+  # Make sure it works both with $CC and with simple cc.
+  # Following AC_PROG_CC_C_O, we do the test twice because some
+  # compilers refuse to overwrite an existing .o file with -o,
+  # though they will create one.
+  am_cv_prog_cc_c_o=yes
+  for am_i in 1 2; do
+    if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5
+   ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5
+   ac_status=$?
+   echo "$as_me:$LINENO: \$? = $ac_status" >&5
+   (exit $ac_status); } \
+         && test -f conftest2.$ac_objext; then
+      : OK
+    else
+      am_cv_prog_cc_c_o=no
+      break
+    fi
+  done
+  rm -f core conftest*
+  unset am_i
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5
+$as_echo "$am_cv_prog_cc_c_o" >&6; }
+if test "$am_cv_prog_cc_c_o" != yes; then
+   # Losing compiler, so override with the script.
+   # FIXME: It is wrong to rewrite CC.
+   # But if we don't then we get into trouble of one sort or another.
+   # A longer-term fix would be to have automake use am__CC in this case,
+   # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+   CC="$am_aux_dir/compile $CC"
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+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 ${am_cv_CC_dependencies_compiler_type+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # 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.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  am__universal=false
+  case " $depcc " in #(
+     *\ -arch\ *\ -arch\ *) am__universal=true ;;
+     esac
+
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
+      # Solaris 10 /bin/sh.
+      echo '/* dummy */' > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    # We check with '-c' and '-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle '-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs.
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
+    case $depmode in
+    gcc)
+      # This depmode causes a compiler race in universal mode.
+      test "$am__universal" = false || continue
+      ;;
+    nosideeffect)
+      # After this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested.
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    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.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
+    none) break ;;
+    esac
+    if depmode=$depmode \
+       source=sub/conftest.c object=$am__obj \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # or remarks (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored or not supported.
+      # When given -MP, icc 7.0 and 7.1 complain thusly:
+      #   icc: Command line warning: ignoring option '-M'; no argument required
+      # The diagnosis changed in icc 8.0:
+      #   icc: Command line remark: option '-MP' not supported
+      if (grep 'ignoring option' conftest.err ||
+          grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$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 \${ac_cv_prog_make_${ac_make}_set+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+	@echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+  *@@@%%%=?*=@@@%%%*)
+    eval ac_cv_prog_make_${ac_make}_set=yes;;
+  *)
+    eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+  SET_MAKE=
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+# Checks for libraries.
+pkg_modules="gtk+-2.0 >= 2.0.0"
+
+
+
+
+
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+	if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+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 ${ac_cv_path_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+  ac_pt_PKG_CONFIG=$PKG_CONFIG
+  # Extract the first word of "pkg-config", so it can be a program name with args.
+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 ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $ac_pt_PKG_CONFIG in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_pt_PKG_CONFIG" = x; then
+    PKG_CONFIG=""
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+    PKG_CONFIG=$ac_pt_PKG_CONFIG
+  fi
+else
+  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+	_pkg_min_version=0.9.0
+	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+	else
+		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+		PKG_CONFIG=""
+	fi
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PACKAGE" >&5
+$as_echo_n "checking for PACKAGE... " >&6; }
+
+if test -n "$PACKAGE_CFLAGS"; then
+    pkg_cv_PACKAGE_CFLAGS="$PACKAGE_CFLAGS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_PACKAGE_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+if test -n "$PACKAGE_LIBS"; then
+    pkg_cv_PACKAGE_LIBS="$PACKAGE_LIBS"
+ elif test -n "$PKG_CONFIG"; then
+    if test -n "$PKG_CONFIG" && \
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"\$pkg_modules\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "$pkg_modules") 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  pkg_cv_PACKAGE_LIBS=`$PKG_CONFIG --libs "$pkg_modules" 2>/dev/null`
+		      test "x$?" != "x0" && pkg_failed=yes
+else
+  pkg_failed=yes
+fi
+ else
+    pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+   	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+        _pkg_short_errors_supported=yes
+else
+        _pkg_short_errors_supported=no
+fi
+        if test $_pkg_short_errors_supported = yes; then
+	        PACKAGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$pkg_modules" 2>&1`
+        else
+	        PACKAGE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$pkg_modules" 2>&1`
+        fi
+	# Put the nasty error message in config.log where it belongs
+	echo "$PACKAGE_PKG_ERRORS" >&5
+
+	as_fn_error $? "Package requirements ($pkg_modules) were not met:
+
+$PACKAGE_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+Alternatively, you may set the environment variables PACKAGE_CFLAGS
+and PACKAGE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
+elif test $pkg_failed = untried; then
+     	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+Alternatively, you may set the environment variables PACKAGE_CFLAGS
+and PACKAGE_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
+else
+	PACKAGE_CFLAGS=$pkg_cv_PACKAGE_CFLAGS
+	PACKAGE_LIBS=$pkg_cv_PACKAGE_LIBS
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for atan2l in -lm" >&5
+$as_echo_n "checking for atan2l in -lm... " >&6; }
+if ${ac_cv_lib_m_atan2l+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char atan2l ();
+int
+main ()
+{
+return atan2l ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_m_atan2l=yes
+else
+  ac_cv_lib_m_atan2l=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_atan2l" >&5
+$as_echo "$ac_cv_lib_m_atan2l" >&6; }
+if test "x$ac_cv_lib_m_atan2l" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+  LIBS="-lm $LIBS"
+
+fi
+
+
+# Internationalization tools
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+    # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then :
+  enableval=$enable_nls; USE_NLS=$enableval
+else
+  USE_NLS=yes
+fi
+
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+
+
+
+
+case "$am__api_version" in
+    1.01234)
+	as_fn_error $? "Automake 1.5 or newer is required to use intltool" "$LINENO" 5
+    ;;
+    *)
+    ;;
+esac
+
+INTLTOOL_REQUIRED_VERSION_AS_INT=`echo 0.50.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.50.0"; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intltool >= 0.50.0" >&5
+$as_echo_n "checking for intltool >= 0.50.0... " >&6; }
+    { $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" ||
+	as_fn_error $? "Your intltool is too old.  You need intltool 0.50.0 or later." "$LINENO" 5
+fi
+
+# Extract the first word of "intltool-update", so it can be a program name with args.
+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 ${ac_cv_path_INTLTOOL_UPDATE+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $INTLTOOL_UPDATE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_INTLTOOL_UPDATE="$INTLTOOL_UPDATE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_INTLTOOL_UPDATE="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+INTLTOOL_UPDATE=$ac_cv_path_INTLTOOL_UPDATE
+if test -n "$INTLTOOL_UPDATE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_UPDATE" >&5
+$as_echo "$INTLTOOL_UPDATE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "intltool-merge", so it can be a program name with args.
+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 ${ac_cv_path_INTLTOOL_MERGE+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $INTLTOOL_MERGE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_INTLTOOL_MERGE="$INTLTOOL_MERGE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_INTLTOOL_MERGE="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+INTLTOOL_MERGE=$ac_cv_path_INTLTOOL_MERGE
+if test -n "$INTLTOOL_MERGE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_MERGE" >&5
+$as_echo "$INTLTOOL_MERGE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "intltool-extract", so it can be a program name with args.
+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 ${ac_cv_path_INTLTOOL_EXTRACT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $INTLTOOL_EXTRACT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_INTLTOOL_EXTRACT="$INTLTOOL_EXTRACT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_INTLTOOL_EXTRACT="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+INTLTOOL_EXTRACT=$ac_cv_path_INTLTOOL_EXTRACT
+if test -n "$INTLTOOL_EXTRACT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_EXTRACT" >&5
+$as_echo "$INTLTOOL_EXTRACT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test -z "$INTLTOOL_UPDATE" -o -z "$INTLTOOL_MERGE" -o -z "$INTLTOOL_EXTRACT"; then
+    as_fn_error $? "The intltool scripts were not found. Please install intltool." "$LINENO" 5
+fi
+
+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 $< $@'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check the gettext tools to make sure they are GNU
+# Extract the first word of "xgettext", so it can be a program name with args.
+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 ${ac_cv_path_XGETTEXT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $XGETTEXT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_XGETTEXT="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+XGETTEXT=$ac_cv_path_XGETTEXT
+if test -n "$XGETTEXT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+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 ${ac_cv_path_MSGMERGE+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MSGMERGE in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+MSGMERGE=$ac_cv_path_MSGMERGE
+if test -n "$MSGMERGE"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
+$as_echo "$MSGMERGE" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+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 ${ac_cv_path_MSGFMT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $MSGFMT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_MSGFMT="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+MSGFMT=$ac_cv_path_MSGFMT
+if test -n "$MSGFMT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+# Extract the first word of "gmsgfmt", so it can be a program name with args.
+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 ${ac_cv_path_GMSGFMT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $GMSGFMT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+  ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test -z "$XGETTEXT" -o -z "$MSGMERGE" -o -z "$MSGFMT"; then
+    as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
+fi
+xgversion="`$XGETTEXT --version|grep '(GNU ' 2> /dev/null`"
+mmversion="`$MSGMERGE --version|grep '(GNU ' 2> /dev/null`"
+mfversion="`$MSGFMT --version|grep '(GNU ' 2> /dev/null`"
+if test -z "$xgversion" -o -z "$mmversion" -o -z "$mfversion"; then
+    as_fn_error $? "GNU gettext tools not found; required for intltool" "$LINENO" 5
+fi
+
+# Extract the first word of "perl", so it can be a program name with args.
+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 ${ac_cv_path_INTLTOOL_PERL+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $INTLTOOL_PERL in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_INTLTOOL_PERL="$INTLTOOL_PERL" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_INTLTOOL_PERL="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  ;;
+esac
+fi
+INTLTOOL_PERL=$ac_cv_path_INTLTOOL_PERL
+if test -n "$INTLTOOL_PERL"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INTLTOOL_PERL" >&5
+$as_echo "$INTLTOOL_PERL" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+if test -z "$INTLTOOL_PERL"; then
+   as_fn_error $? "perl not found" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl >= 5.8.1" >&5
+$as_echo_n "checking for perl >= 5.8.1... " >&6; }
+$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"`
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IT_PERL_VERSION" >&5
+$as_echo "$IT_PERL_VERSION" >&6; }
+fi
+if test "x" != "xno-xml"; then
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XML::Parser" >&5
+$as_echo_n "checking for XML::Parser... " >&6; }
+   if `$INTLTOOL_PERL -e "require XML::Parser" 2>/dev/null`; then
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+   else
+       as_fn_error $? "XML::Parser perl module is required for intltool" "$LINENO" 5
+   fi
+fi
+
+# Substitute ALL_LINGUAS so we can use it in po/Makefile
+
+
+# Set DATADIRNAME correctly if it is not set yet
+# (copied from glib-gettext.m4)
+if test -z "$DATADIRNAME"; then
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+extern int _nl_msg_cat_cntr;
+                       return _nl_msg_cat_cntr
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  DATADIRNAME=share
+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" = xyes; then :
+  DATADIRNAME=share
+else
+  DATADIRNAME=lib
+fi
+
+    ;;
+    *)
+    DATADIRNAME=lib
+    ;;
+    esac
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+
+
+
+
+
+GETTEXT_PACKAGE=xnec2c
+
+
+cat >>confdefs.h <<_ACEOF
+#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
+_ACEOF
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if ${ac_cv_prog_CPP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+		     Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether nonexistent headers
+  # can be detected and how.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+  # Broken: success on invalid input.
+continue
+else
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+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 ${ac_cv_path_GREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -z "$GREP"; then
+  ac_path_GREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in grep ggrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_GREP" || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+  # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'GREP' >> "conftest.nl"
+    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_GREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_GREP="$ac_path_GREP"
+      ac_path_GREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_GREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_GREP"; then
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if ${ac_cv_path_EGREP+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+   then ac_cv_path_EGREP="$GREP -E"
+   else
+     if test -z "$EGREP"; then
+  ac_path_EGREP_found=false
+  # Loop through the user's path and test for each of PROGNAME-LIST
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_prog in egrep; do
+    for ac_exec_ext in '' $ac_executable_extensions; do
+      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+      as_fn_executable_p "$ac_path_EGREP" || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+  # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+  ac_count=0
+  $as_echo_n 0123456789 >"conftest.in"
+  while :
+  do
+    cat "conftest.in" "conftest.in" >"conftest.tmp"
+    mv "conftest.tmp" "conftest.in"
+    cp "conftest.in" "conftest.nl"
+    $as_echo 'EGREP' >> "conftest.nl"
+    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+    as_fn_arith $ac_count + 1 && ac_count=$as_val
+    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+      # Best one so far, save it but keep looking for a better one
+      ac_cv_path_EGREP="$ac_path_EGREP"
+      ac_path_EGREP_max=$ac_count
+    fi
+    # 10*(2^10) chars as input seems more than enough
+    test $ac_count -gt 10 && break
+  done
+  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+      $ac_path_EGREP_found && break 3
+    done
+  done
+  done
+IFS=$as_save_IFS
+  if test -z "$ac_cv_path_EGREP"; then
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+  fi
+else
+  ac_cv_path_EGREP=$EGREP
+fi
+
+   fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $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 ${ac_cv_header_stdc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+  ac_cv_header_stdc=yes
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then :
+  :
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+		   (('a' <= (c) && (c) <= 'i') \
+		     || ('j' <= (c) && (c) <= 'r') \
+		     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+	|| toupper (i) != TOUPPER (i))
+      return 2;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+  ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+		  inttypes.h stdint.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+   for ac_header in locale.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
+if test "x$ac_cv_header_locale_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LOCALE_H 1
+_ACEOF
+
+fi
+
+done
+
+    if test $ac_cv_header_locale_h = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
+$as_echo_n "checking for LC_MESSAGES... " >&6; }
+if ${am_cv_val_LC_MESSAGES+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <locale.h>
+int
+main ()
+{
+return LC_MESSAGES
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  am_cv_val_LC_MESSAGES=yes
+else
+  am_cv_val_LC_MESSAGES=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
+$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
+    if test $am_cv_val_LC_MESSAGES = yes; then
+
+$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
+
+    fi
+  fi
+     USE_NLS=yes
+
+
+    gt_cv_have_gettext=no
+
+    CATOBJEXT=NONE
+    XGETTEXT=:
+    INTLLIBS=
+
+    ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = xyes; then :
+  gt_cv_func_dgettext_libintl="no"
+      libintl_extra_libs=""
+
+      #
+      # First check in libc
+      #
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5
+$as_echo_n "checking for ngettext in libc... " >&6; }
+if ${gt_cv_func_ngettext_libc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <libintl.h>
+
+int
+main ()
+{
+return !ngettext ("","", 1)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gt_cv_func_ngettext_libc=yes
+else
+  gt_cv_func_ngettext_libc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5
+$as_echo "$gt_cv_func_ngettext_libc" >&6; }
+
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
+$as_echo_n "checking for dgettext in libc... " >&6; }
+if ${gt_cv_func_dgettext_libc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <libintl.h>
+
+int
+main ()
+{
+return !dgettext ("","")
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gt_cv_func_dgettext_libc=yes
+else
+  gt_cv_func_dgettext_libc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
+$as_echo "$gt_cv_func_dgettext_libc" >&6; }
+      fi
+
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+        for ac_func in bind_textdomain_codeset
+do :
+  ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
+if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_BIND_TEXTDOMAIN_CODESET 1
+_ACEOF
+
+fi
+done
+
+      fi
+
+      #
+      # If we don't have everything we want, check in libintl
+      #
+      if test "$gt_cv_func_dgettext_libc" != "yes" \
+	 || test "$gt_cv_func_ngettext_libc" != "yes" \
+         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
+$as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
+if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bindtextdomain ();
+int
+main ()
+{
+return bindtextdomain ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_bindtextdomain=yes
+else
+  ac_cv_lib_intl_bindtextdomain=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
+$as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
+if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
+$as_echo_n "checking for ngettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_ngettext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ngettext ();
+int
+main ()
+{
+return ngettext ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_ngettext=yes
+else
+  ac_cv_lib_intl_ngettext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
+$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
+if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
+$as_echo_n "checking for dgettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_dgettext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dgettext ();
+int
+main ()
+{
+return dgettext ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_dgettext=yes
+else
+  ac_cv_lib_intl_dgettext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
+$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
+if test "x$ac_cv_lib_intl_dgettext" = xyes; then :
+  gt_cv_func_dgettext_libintl=yes
+fi
+
+fi
+
+fi
+
+
+	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5
+$as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+$as_echo "" >&6; }
+  	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
+$as_echo_n "checking for ngettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_ngettext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ngettext ();
+int
+main ()
+{
+return ngettext ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_ngettext=yes
+else
+  ac_cv_lib_intl_ngettext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
+$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
+if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5
+$as_echo_n "checking for dcgettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_dcgettext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dcgettext ();
+int
+main ()
+{
+return dcgettext ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_dcgettext=yes
+else
+  ac_cv_lib_intl_dcgettext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5
+$as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
+if test "x$ac_cv_lib_intl_dcgettext" = xyes; then :
+  gt_cv_func_dgettext_libintl=yes
+			libintl_extra_libs=-liconv
+else
+  :
+fi
+
+else
+  :
+fi
+
+        fi
+
+        #
+        # If we found libintl, then check in it for bind_textdomain_codeset();
+        # we'll prefer libc if neither have bind_textdomain_codeset(),
+        # and both have dgettext and ngettext
+        #
+        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS -lintl $libintl_extra_libs"
+          unset ac_cv_func_bind_textdomain_codeset
+          for ac_func in bind_textdomain_codeset
+do :
+  ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
+if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_BIND_TEXTDOMAIN_CODESET 1
+_ACEOF
+
+fi
+done
+
+          LIBS="$glib_save_LIBS"
+
+          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+            gt_cv_func_dgettext_libc=no
+          else
+            if test "$gt_cv_func_dgettext_libc" = "yes" \
+		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
+              gt_cv_func_dgettext_libintl=no
+            fi
+          fi
+        fi
+      fi
+
+      if test "$gt_cv_func_dgettext_libc" = "yes" \
+	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        gt_cv_have_gettext=yes
+      fi
+
+      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        INTLLIBS="-lintl $libintl_extra_libs"
+      fi
+
+      if test "$gt_cv_have_gettext" = "yes"; then
+
+$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
+
+	# Extract the first word of "msgfmt", so it can be a program name with args.
+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 ${ac_cv_path_MSGFMT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case "$MSGFMT" in
+  /*)
+  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+  ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != "no"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+	if test "$MSGFMT" != "no"; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS $INTLLIBS"
+	  for ac_func in dcgettext
+do :
+  ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
+if test "x$ac_cv_func_dcgettext" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DCGETTEXT 1
+_ACEOF
+
+fi
+done
+
+	  MSGFMT_OPTS=
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5
+$as_echo_n "checking if msgfmt accepts -c... " >&6; }
+	  cat >conftest.foo <<_ACEOF
+
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: test 1.0\n"
+"PO-Revision-Date: 2007-02-15 12:01+0100\n"
+"Last-Translator: test <foo at bar.xx>\n"
+"Language-Team: C <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+_ACEOF
+if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5
+  ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+echo "$as_me: failed input was:" >&5
+sed 's/^/| /' conftest.foo >&5
+fi
+
+	  # Extract the first word of "gmsgfmt", so it can be a program name with args.
+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 ${ac_cv_path_GMSGFMT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $GMSGFMT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+  ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+	  # Extract the first word of "xgettext", so it can be a program name with args.
+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 ${ac_cv_path_XGETTEXT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case "$XGETTEXT" in
+  /*)
+  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+  ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+extern int _nl_msg_cat_cntr;
+			 return _nl_msg_cat_cntr
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  CATOBJEXT=.gmo
+             DATADIRNAME=share
+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" = xyes; then :
+  CATOBJEXT=.gmo
+               DATADIRNAME=share
+else
+  CATOBJEXT=.mo
+               DATADIRNAME=lib
+fi
+
+	    ;;
+	    *-*-openbsd*)
+	    CATOBJEXT=.mo
+            DATADIRNAME=share
+	    ;;
+	    *)
+	    CATOBJEXT=.mo
+            DATADIRNAME=lib
+	    ;;
+	    esac
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+          LIBS="$glib_save_LIBS"
+	  INSTOBJEXT=.mo
+	else
+	  gt_cv_have_gettext=no
+	fi
+      fi
+
+fi
+
+
+
+    if test "$gt_cv_have_gettext" = "yes" ; then
+
+$as_echo "#define ENABLE_NLS 1" >>confdefs.h
+
+    fi
+
+        if test "$XGETTEXT" != ":"; then
+                  if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+        : ;
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
+$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
+        XGETTEXT=":"
+      fi
+    fi
+
+    # We need to process the po/ directory.
+    POSUB=po
+
+    ac_config_commands="$ac_config_commands default-1"
+
+
+                for lang in $ALL_LINGUAS; do
+      GMOFILES="$GMOFILES $lang.gmo"
+      POFILES="$POFILES $lang.po"
+    done
+
+
+
+
+
+
+
+
+
+
+
+
+
+   if test "$gt_cv_have_gettext" = "yes"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
+$as_echo_n "checking for catalogs to be installed... " >&6; }
+       NEW_LINGUAS=
+       for presentlang in $ALL_LINGUAS; do
+         useit=no
+         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+           desiredlanguages="$LINGUAS"
+         else
+           desiredlanguages="$ALL_LINGUAS"
+         fi
+         for desiredlang in $desiredlanguages; do
+ 	   # Use the presentlang catalog if desiredlang is
+           #   a. equal to presentlang, or
+           #   b. a variant of presentlang (because in this case,
+           #      presentlang can be used as a fallback for messages
+           #      which are not translated in the desiredlang catalog).
+           case "$desiredlang" in
+             "$presentlang"*) useit=yes;;
+           esac
+         done
+         if test $useit = yes; then
+           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+         fi
+       done
+       LINGUAS=$NEW_LINGUAS
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
+$as_echo "$LINGUAS" >&6; }
+     fi
+
+          if test -n "$LINGUAS"; then
+       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+     fi
+   fi
+
+            MKINSTALLDIRS=
+   if test -n "$ac_aux_dir"; then
+     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+   fi
+   if test -z "$MKINSTALLDIRS"; then
+     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+   fi
+
+
+         test -d po || mkdir po
+   if test "x$srcdir" != "x."; then
+     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+       posrcprefix="$srcdir/"
+     else
+       posrcprefix="../$srcdir/"
+     fi
+   else
+     posrcprefix="../"
+   fi
+   rm -f po/POTFILES
+   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+	< $srcdir/po/POTFILES.in > po/POTFILES
+
+PROGRAMNAME_LOCALEDIR=${datadir}/locale
+
+
+# Gettext setup
+GETTEXT_PACKAGE=xnec2c
+
+
+cat >>confdefs.h <<_ACEOF
+#define GETTEXT_PACKAGE "$GETTEXT_PACKAGE"
+_ACEOF
+
+
+# Add the languages which your application supports here.
+ALL_LINGUAS=""
+
+   for ac_header in locale.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default"
+if test "x$ac_cv_header_locale_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LOCALE_H 1
+_ACEOF
+
+fi
+
+done
+
+    if test $ac_cv_header_locale_h = yes; then
+    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
+$as_echo_n "checking for LC_MESSAGES... " >&6; }
+if ${am_cv_val_LC_MESSAGES+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#include <locale.h>
+int
+main ()
+{
+return LC_MESSAGES
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  am_cv_val_LC_MESSAGES=yes
+else
+  am_cv_val_LC_MESSAGES=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
+$as_echo "$am_cv_val_LC_MESSAGES" >&6; }
+    if test $am_cv_val_LC_MESSAGES = yes; then
+
+$as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
+
+    fi
+  fi
+     USE_NLS=yes
+
+
+    gt_cv_have_gettext=no
+
+    CATOBJEXT=NONE
+    XGETTEXT=:
+    INTLLIBS=
+
+    ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = xyes; then :
+  gt_cv_func_dgettext_libintl="no"
+      libintl_extra_libs=""
+
+      #
+      # First check in libc
+      #
+      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in libc" >&5
+$as_echo_n "checking for ngettext in libc... " >&6; }
+if ${gt_cv_func_ngettext_libc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <libintl.h>
+
+int
+main ()
+{
+return !ngettext ("","", 1)
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gt_cv_func_ngettext_libc=yes
+else
+  gt_cv_func_ngettext_libc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_ngettext_libc" >&5
+$as_echo "$gt_cv_func_ngettext_libc" >&6; }
+
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+	      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in libc" >&5
+$as_echo_n "checking for dgettext in libc... " >&6; }
+if ${gt_cv_func_dgettext_libc+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+#include <libintl.h>
+
+int
+main ()
+{
+return !dgettext ("","")
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  gt_cv_func_dgettext_libc=yes
+else
+  gt_cv_func_dgettext_libc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_dgettext_libc" >&5
+$as_echo "$gt_cv_func_dgettext_libc" >&6; }
+      fi
+
+      if test "$gt_cv_func_ngettext_libc" = "yes" ; then
+        for ac_func in bind_textdomain_codeset
+do :
+  ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
+if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_BIND_TEXTDOMAIN_CODESET 1
+_ACEOF
+
+fi
+done
+
+      fi
+
+      #
+      # If we don't have everything we want, check in libintl
+      #
+      if test "$gt_cv_func_dgettext_libc" != "yes" \
+	 || test "$gt_cv_func_ngettext_libc" != "yes" \
+         || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then
+
+        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bindtextdomain in -lintl" >&5
+$as_echo_n "checking for bindtextdomain in -lintl... " >&6; }
+if ${ac_cv_lib_intl_bindtextdomain+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char bindtextdomain ();
+int
+main ()
+{
+return bindtextdomain ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_bindtextdomain=yes
+else
+  ac_cv_lib_intl_bindtextdomain=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_bindtextdomain" >&5
+$as_echo "$ac_cv_lib_intl_bindtextdomain" >&6; }
+if test "x$ac_cv_lib_intl_bindtextdomain" = xyes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
+$as_echo_n "checking for ngettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_ngettext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ngettext ();
+int
+main ()
+{
+return ngettext ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_ngettext=yes
+else
+  ac_cv_lib_intl_ngettext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
+$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
+if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dgettext in -lintl" >&5
+$as_echo_n "checking for dgettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_dgettext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl  $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dgettext ();
+int
+main ()
+{
+return dgettext ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_dgettext=yes
+else
+  ac_cv_lib_intl_dgettext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dgettext" >&5
+$as_echo "$ac_cv_lib_intl_dgettext" >&6; }
+if test "x$ac_cv_lib_intl_dgettext" = xyes; then :
+  gt_cv_func_dgettext_libintl=yes
+fi
+
+fi
+
+fi
+
+
+	if test "$gt_cv_func_dgettext_libintl" != "yes" ; then
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if -liconv is needed to use gettext" >&5
+$as_echo_n "checking if -liconv is needed to use gettext... " >&6; }
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5
+$as_echo "" >&6; }
+  	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ngettext in -lintl" >&5
+$as_echo_n "checking for ngettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_ngettext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char ngettext ();
+int
+main ()
+{
+return ngettext ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_ngettext=yes
+else
+  ac_cv_lib_intl_ngettext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_ngettext" >&5
+$as_echo "$ac_cv_lib_intl_ngettext" >&6; }
+if test "x$ac_cv_lib_intl_ngettext" = xyes; then :
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dcgettext in -lintl" >&5
+$as_echo_n "checking for dcgettext in -lintl... " >&6; }
+if ${ac_cv_lib_intl_dcgettext+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl -liconv $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+/* Override any GCC internal prototype to avoid an error.
+   Use char because int might match the return type of a GCC
+   builtin and then its argument prototype would still apply.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dcgettext ();
+int
+main ()
+{
+return dcgettext ();
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  ac_cv_lib_intl_dcgettext=yes
+else
+  ac_cv_lib_intl_dcgettext=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_dcgettext" >&5
+$as_echo "$ac_cv_lib_intl_dcgettext" >&6; }
+if test "x$ac_cv_lib_intl_dcgettext" = xyes; then :
+  gt_cv_func_dgettext_libintl=yes
+			libintl_extra_libs=-liconv
+else
+  :
+fi
+
+else
+  :
+fi
+
+        fi
+
+        #
+        # If we found libintl, then check in it for bind_textdomain_codeset();
+        # we'll prefer libc if neither have bind_textdomain_codeset(),
+        # and both have dgettext and ngettext
+        #
+        if test "$gt_cv_func_dgettext_libintl" = "yes" ; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS -lintl $libintl_extra_libs"
+          unset ac_cv_func_bind_textdomain_codeset
+          for ac_func in bind_textdomain_codeset
+do :
+  ac_fn_c_check_func "$LINENO" "bind_textdomain_codeset" "ac_cv_func_bind_textdomain_codeset"
+if test "x$ac_cv_func_bind_textdomain_codeset" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_BIND_TEXTDOMAIN_CODESET 1
+_ACEOF
+
+fi
+done
+
+          LIBS="$glib_save_LIBS"
+
+          if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then
+            gt_cv_func_dgettext_libc=no
+          else
+            if test "$gt_cv_func_dgettext_libc" = "yes" \
+		&& test "$gt_cv_func_ngettext_libc" = "yes"; then
+              gt_cv_func_dgettext_libintl=no
+            fi
+          fi
+        fi
+      fi
+
+      if test "$gt_cv_func_dgettext_libc" = "yes" \
+	|| test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        gt_cv_have_gettext=yes
+      fi
+
+      if test "$gt_cv_func_dgettext_libintl" = "yes"; then
+        INTLLIBS="-lintl $libintl_extra_libs"
+      fi
+
+      if test "$gt_cv_have_gettext" = "yes"; then
+
+$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
+
+	# Extract the first word of "msgfmt", so it can be a program name with args.
+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 ${ac_cv_path_MSGFMT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case "$MSGFMT" in
+  /*)
+  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then
+	ac_cv_path_MSGFMT="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no"
+  ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != "no"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+	if test "$MSGFMT" != "no"; then
+          glib_save_LIBS="$LIBS"
+          LIBS="$LIBS $INTLLIBS"
+	  for ac_func in dcgettext
+do :
+  ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext"
+if test "x$ac_cv_func_dcgettext" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_DCGETTEXT 1
+_ACEOF
+
+fi
+done
+
+	  MSGFMT_OPTS=
+	  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if msgfmt accepts -c" >&5
+$as_echo_n "checking if msgfmt accepts -c... " >&6; }
+	  cat >conftest.foo <<_ACEOF
+
+msgid ""
+msgstr ""
+"Content-Type: text/plain; charset=UTF-8\n"
+"Project-Id-Version: test 1.0\n"
+"PO-Revision-Date: 2007-02-15 12:01+0100\n"
+"Last-Translator: test <foo at bar.xx>\n"
+"Language-Team: C <LL at li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+_ACEOF
+if { { $as_echo "$as_me:${as_lineno-$LINENO}: \$MSGFMT -c -o /dev/null conftest.foo"; } >&5
+  ($MSGFMT -c -o /dev/null conftest.foo) 2>&5
+  ac_status=$?
+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+  test $ac_status = 0; }; then
+  MSGFMT_OPTS=-c; { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+echo "$as_me: failed input was:" >&5
+sed 's/^/| /' conftest.foo >&5
+fi
+
+	  # Extract the first word of "gmsgfmt", so it can be a program name with args.
+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 ${ac_cv_path_GMSGFMT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case $GMSGFMT in
+  [\\/]* | ?:[\\/]*)
+  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+  ;;
+  *)
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+  ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+	  # Extract the first word of "xgettext", so it can be a program name with args.
+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 ${ac_cv_path_XGETTEXT+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  case "$XGETTEXT" in
+  /*)
+  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then
+	ac_cv_path_XGETTEXT="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+  ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+	  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+
+int
+main ()
+{
+extern int _nl_msg_cat_cntr;
+			 return _nl_msg_cat_cntr
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+  CATOBJEXT=.gmo
+             DATADIRNAME=share
+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" = xyes; then :
+  CATOBJEXT=.gmo
+               DATADIRNAME=share
+else
+  CATOBJEXT=.mo
+               DATADIRNAME=lib
+fi
+
+	    ;;
+	    *-*-openbsd*)
+	    CATOBJEXT=.mo
+            DATADIRNAME=share
+	    ;;
+	    *)
+	    CATOBJEXT=.mo
+            DATADIRNAME=lib
+	    ;;
+	    esac
+fi
+rm -f core conftest.err conftest.$ac_objext \
+    conftest$ac_exeext conftest.$ac_ext
+          LIBS="$glib_save_LIBS"
+	  INSTOBJEXT=.mo
+	else
+	  gt_cv_have_gettext=no
+	fi
+      fi
+
+fi
+
+
+
+    if test "$gt_cv_have_gettext" = "yes" ; then
+
+$as_echo "#define ENABLE_NLS 1" >>confdefs.h
+
+    fi
+
+        if test "$XGETTEXT" != ":"; then
+                  if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+        : ;
+      else
+        { $as_echo "$as_me:${as_lineno-$LINENO}: result: found xgettext program is not GNU xgettext; ignore it" >&5
+$as_echo "found xgettext program is not GNU xgettext; ignore it" >&6; }
+        XGETTEXT=":"
+      fi
+    fi
+
+    # We need to process the po/ directory.
+    POSUB=po
+
+    ac_config_commands="$ac_config_commands default-2"
+
+
+                for lang in $ALL_LINGUAS; do
+      GMOFILES="$GMOFILES $lang.gmo"
+      POFILES="$POFILES $lang.po"
+    done
+
+
+
+
+
+
+
+
+
+
+
+
+
+   if test "$gt_cv_have_gettext" = "yes"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     else
+       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
+$as_echo_n "checking for catalogs to be installed... " >&6; }
+       NEW_LINGUAS=
+       for presentlang in $ALL_LINGUAS; do
+         useit=no
+         if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then
+           desiredlanguages="$LINGUAS"
+         else
+           desiredlanguages="$ALL_LINGUAS"
+         fi
+         for desiredlang in $desiredlanguages; do
+ 	   # Use the presentlang catalog if desiredlang is
+           #   a. equal to presentlang, or
+           #   b. a variant of presentlang (because in this case,
+           #      presentlang can be used as a fallback for messages
+           #      which are not translated in the desiredlang catalog).
+           case "$desiredlang" in
+             "$presentlang"*) useit=yes;;
+           esac
+         done
+         if test $useit = yes; then
+           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+         fi
+       done
+       LINGUAS=$NEW_LINGUAS
+       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
+$as_echo "$LINGUAS" >&6; }
+     fi
+
+          if test -n "$LINGUAS"; then
+       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+     fi
+   fi
+
+            MKINSTALLDIRS=
+   if test -n "$ac_aux_dir"; then
+     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+   fi
+   if test -z "$MKINSTALLDIRS"; then
+     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+   fi
+
+
+         test -d po || mkdir po
+   if test "x$srcdir" != "x."; then
+     if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then
+       posrcprefix="$srcdir/"
+     else
+       posrcprefix="../$srcdir/"
+     fi
+   else
+     posrcprefix="../"
+   fi
+   rm -f po/POTFILES
+   sed -e "/^#/d" -e "/^\$/d" -e "s,.*,	$posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
+	< $srcdir/po/POTFILES.in > po/POTFILES
+
+
+# Checks for header files.
+for ac_header in fcntl.h libintl.h locale.h stdlib.h string.h unistd.h
+do :
+  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+# Checks for typedefs, structures, and compiler characteristics.
+ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
+if test "x$ac_cv_type_pid_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_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" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default"
+if test "x$ac_cv_type_ssize_t" = xyes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define ssize_t int
+_ACEOF
+
+fi
+
+
+# Checks for library functions.
+for ac_header in vfork.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
+if test "x$ac_cv_header_vfork_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_VFORK_H 1
+_ACEOF
+
+fi
+
+done
+
+for ac_func in fork vfork
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+if test "x$ac_cv_func_fork" = xyes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
+$as_echo_n "checking for working fork... " >&6; }
+if ${ac_cv_func_fork_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_fork_works=cross
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+
+	  /* By Ruediger Kuhlmann. */
+	  return fork () < 0;
+
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_fork_works=yes
+else
+  ac_cv_func_fork_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
+$as_echo "$ac_cv_func_fork_works" >&6; }
+
+else
+  ac_cv_func_fork_works=$ac_cv_func_fork
+fi
+if test "x$ac_cv_func_fork_works" = xcross; then
+  case $host in
+    *-*-amigaos* | *-*-msdosdjgpp*)
+      # Override, as these systems have only a dummy fork() stub
+      ac_cv_func_fork_works=no
+      ;;
+    *)
+      ac_cv_func_fork_works=yes
+      ;;
+  esac
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
+fi
+ac_cv_func_vfork_works=$ac_cv_func_vfork
+if test "x$ac_cv_func_vfork" = xyes; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
+$as_echo_n "checking for working vfork... " >&6; }
+if ${ac_cv_func_vfork_works+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_vfork_works=cross
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+/* Thanks to Paul Eggert for this test.  */
+$ac_includes_default
+#include <sys/wait.h>
+#ifdef HAVE_VFORK_H
+# include <vfork.h>
+#endif
+/* On some sparc systems, changes by the child to local and incoming
+   argument registers are propagated back to the parent.  The compiler
+   is told about this with #include <vfork.h>, but some compilers
+   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
+   static variable whose address is put into a register that is
+   clobbered by the vfork.  */
+static void
+#ifdef __cplusplus
+sparc_address_test (int arg)
+# else
+sparc_address_test (arg) int arg;
+#endif
+{
+  static pid_t child;
+  if (!child) {
+    child = vfork ();
+    if (child < 0) {
+      perror ("vfork");
+      _exit(2);
+    }
+    if (!child) {
+      arg = getpid();
+      write(-1, "", 0);
+      _exit (arg);
+    }
+  }
+}
+
+int
+main ()
+{
+  pid_t parent = getpid ();
+  pid_t child;
+
+  sparc_address_test (0);
+
+  child = vfork ();
+
+  if (child == 0) {
+    /* Here is another test for sparc vfork register problems.  This
+       test uses lots of local variables, at least as many local
+       variables as main has allocated so far including compiler
+       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
+       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
+       reuse the register of parent for one of the local variables,
+       since it will think that parent can't possibly be used any more
+       in this routine.  Assigning to the local variable will thus
+       munge parent in the parent process.  */
+    pid_t
+      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
+      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
+    /* Convince the compiler that p..p7 are live; otherwise, it might
+       use the same hardware register for all 8 local variables.  */
+    if (p != p1 || p != p2 || p != p3 || p != p4
+	|| p != p5 || p != p6 || p != p7)
+      _exit(1);
+
+    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
+       from child file descriptors.  If the child closes a descriptor
+       before it execs or exits, this munges the parent's descriptor
+       as well.  Test for this by closing stdout in the child.  */
+    _exit(close(fileno(stdout)) != 0);
+  } else {
+    int status;
+    struct stat st;
+
+    while (wait(&status) != child)
+      ;
+    return (
+	 /* Was there some problem with vforking?  */
+	 child < 0
+
+	 /* Did the child fail?  (This shouldn't happen.)  */
+	 || status
+
+	 /* Did the vfork/compiler bug occur?  */
+	 || parent != getpid()
+
+	 /* Did the file descriptor bug occur?  */
+	 || fstat(fileno(stdout), &st) != 0
+	 );
+  }
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_vfork_works=yes
+else
+  ac_cv_func_vfork_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
+$as_echo "$ac_cv_func_vfork_works" >&6; }
+
+fi;
+if test "x$ac_cv_func_fork_works" = xcross; then
+  ac_cv_func_vfork_works=$ac_cv_func_vfork
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
+$as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
+fi
+
+if test "x$ac_cv_func_vfork_works" = xyes; then
+
+$as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
+
+else
+
+$as_echo "#define vfork fork" >>confdefs.h
+
+fi
+if test "x$ac_cv_func_fork_works" = xyes; then
+
+$as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
+
+fi
+
+for ac_header in stdlib.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
+if ${ac_cv_func_malloc_0_nonnull+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_malloc_0_nonnull=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main ()
+{
+return ! malloc (0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_malloc_0_nonnull=yes
+else
+  ac_cv_func_malloc_0_nonnull=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
+if test $ac_cv_func_malloc_0_nonnull = yes; then :
+
+$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
+
+else
+  $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
+
+   case " $LIBOBJS " in
+  *" malloc.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
+ ;;
+esac
+
+
+$as_echo "#define malloc rpl_malloc" >>confdefs.h
+
+fi
+
+
+for ac_header in stdlib.h
+do :
+  ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = xyes; then :
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_STDLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
+$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
+if ${ac_cv_func_realloc_0_nonnull+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test "$cross_compiling" = yes; then :
+  ac_cv_func_realloc_0_nonnull=no
+else
+  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h.  */
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *realloc ();
+#endif
+
+int
+main ()
+{
+return ! realloc (0, 0);
+  ;
+  return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+  ac_cv_func_realloc_0_nonnull=yes
+else
+  ac_cv_func_realloc_0_nonnull=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+  conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
+if test $ac_cv_func_realloc_0_nonnull = yes; then :
+
+$as_echo "#define HAVE_REALLOC 1" >>confdefs.h
+
+else
+  $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
+
+   case " $LIBOBJS " in
+  *" realloc.$ac_objext "* ) ;;
+  *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
+ ;;
+esac
+
+
+$as_echo "#define realloc rpl_realloc" >>confdefs.h
+
+fi
+
+
+for ac_func in floor pow select setlocale sqrt strstr
+do :
+  as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+  cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ac_config_files="$ac_config_files Makefile src/Makefile po/Makefile.in"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+    eval ac_val=\$$ac_var
+    case $ac_val in #(
+    *${as_nl}*)
+      case $ac_var in #(
+      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+      esac
+      case $ac_var in #(
+      _ | IFS | as_nl) ;; #(
+      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+      *) { eval $ac_var=; unset $ac_var;} ;;
+      esac ;;
+    esac
+  done
+
+  (set) 2>&1 |
+    case $as_nl`(ac_space=' '; set) 2>&1` in #(
+    *${as_nl}ac_space=\ *)
+      # `set' does not quote correctly, so add quotes: double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \.
+      sed -n \
+	"s/'/'\\\\''/g;
+	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;; #(
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+      ;;
+    esac |
+    sort
+) |
+  sed '
+     /^ac_cv_env_/b end
+     t clear
+     :clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+  if test -w "$cache_file"; then
+    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;}
+      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;}
+  fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
+  #    will be set to the directory where LIBOBJS objects are built.
+  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+   if test -n "$am_sleep_pid"; then
+     # Hide warnings about reused PIDs.
+     wait $am_sleep_pid 2>/dev/null
+   fi
+   { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
+ if test -n "$EXEEXT"; then
+  am__EXEEXT_TRUE=
+  am__EXEEXT_FALSE='#'
+else
+  am__EXEEXT_TRUE='#'
+  am__EXEEXT_FALSE=
+fi
+
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+  ac_config_commands="$ac_config_commands po/stamp-it"
+
+
+
+: "${CONFIG_STATUS=./config.status}"
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+  emulate sh
+  NULLCMD=:
+  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+  # is contrary to our usage.  Disable this feature.
+  alias -g '${1+"$@"}'='"$@"'
+  setopt NO_GLOB_SUBST
+else
+  case `(set -o) 2>/dev/null` in #(
+  *posix*) :
+    set -o posix ;; #(
+  *) :
+     ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='print -r --'
+  as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+  as_echo='printf %s\n'
+  as_echo_n='printf %s'
+else
+  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+    as_echo_n='/usr/ucb/echo -n'
+  else
+    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+    as_echo_n_body='eval
+      arg=$1;
+      case $arg in #(
+      *"$as_nl"*)
+	expr "X$arg" : "X\\(.*\\)$as_nl";
+	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+      esac;
+      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+    '
+    export as_echo_n_body
+    as_echo_n='sh -c $as_echo_n_body as_echo'
+  fi
+  export as_echo_body
+  as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+  PATH_SEPARATOR=:
+  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+      PATH_SEPARATOR=';'
+  }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.  Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+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
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+  done
+IFS=$as_save_IFS
+
+     ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+  as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+  exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there.  '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+  fi
+  $as_echo "$as_me: error: $2" >&2
+  as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+  return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+  set +e
+  as_fn_set_status $1
+  exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+  { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+  eval 'as_fn_append ()
+  {
+    eval $1+=\$2
+  }'
+else
+  as_fn_append ()
+  {
+    eval $1=\$$1\$2
+  }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+  eval 'as_fn_arith ()
+  {
+    as_val=$(( $* ))
+  }'
+else
+  as_fn_arith ()
+  {
+    as_val=`expr "$@" || test $? -eq 1`
+  }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+   test "X`expr 00001 : '.*\(...\)'`" = X001; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+  as_dirname=dirname
+else
+  as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+	 X"$0" : 'X\(//\)$' \| \
+	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+    sed '/^.*\/\([^/][^/]*\)\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\/\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+  case `echo 'xy\c'` in
+  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
+  xy)  ECHO_C='\c';;
+  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
+       ECHO_T='	';;
+  esac;;
+*)
+  ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+  rm -f conf$$.dir/conf$$.file
+else
+  rm -f conf$$.dir
+  mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+  if ln -s conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s='ln -s'
+    # ... but there are two gotchas:
+    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+    # In both cases, we have to default to `cp -pR'.
+    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+      as_ln_s='cp -pR'
+  elif ln conf$$.file conf$$ 2>/dev/null; then
+    as_ln_s=ln
+  else
+    as_ln_s='cp -pR'
+  fi
+else
+  as_ln_s='cp -pR'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+  case $as_dir in #(
+  -*) as_dir=./$as_dir;;
+  esac
+  test -d "$as_dir" || eval $as_mkdir_p || {
+    as_dirs=
+    while :; do
+      case $as_dir in #(
+      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+      *) as_qdir=$as_dir;;
+      esac
+      as_dirs="'$as_qdir' $as_dirs"
+      as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$as_dir" : 'X\(//\)[^/]' \| \
+	 X"$as_dir" : 'X\(//\)$' \| \
+	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      test -d "$as_dir" && break
+    done
+    test -z "$as_dirs" || eval "mkdir $as_dirs"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p='mkdir -p "$as_dir"'
+else
+  test -d ./-p && rmdir ./-p
+  as_mkdir_p=false
+fi
+
+
+# as_fn_executable_p FILE
+# -----------------------
+# Test if FILE is an executable regular file.
+as_fn_executable_p ()
+{
+  test -f "$1" && test -x "$1"
+} # as_fn_executable_p
+as_test_x='test -x'
+as_executable_p=as_fn_executable_p
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by xnec2c $as_me 3.0, which was
+generated by GNU Autoconf 2.69.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration.  Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+  -h, --help       print this help, then exit
+  -V, --version    print version number and configuration settings, then exit
+      --config     print configuration, then exit
+  -q, --quiet, --silent
+                   do not print progress messages
+  -d, --debug      don't remove temporary files
+      --recheck    update $as_me by reconfiguring in the same conditions
+      --file=FILE[:TEMPLATE]
+                   instantiate the configuration file FILE
+      --header=FILE[:TEMPLATE]
+                   instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <nkcyham at yahoo.com>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+xnec2c config.status 3.0
+configured by $0, generated by GNU Autoconf 2.69,
+  with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2012 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+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
+    ac_shift=shift
+    ;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+    $as_echo "$ac_cs_version"; exit ;;
+  --config | --confi | --conf | --con | --co | --c )
+    $as_echo "$ac_cs_config"; exit ;;
+  --debug | --debu | --deb | --de | --d | -d )
+    debug=: ;;
+  --file | --fil | --fi | --f )
+    $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;;
+  --header | --heade | --head | --hea )
+    $ac_shift
+    case $ac_optarg in
+    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+    ac_need_defaults=false;;
+  --he | --h)
+    # Conflict between --help and --header
+    as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+  --help | --hel | -h )
+    $as_echo "$ac_cs_usage"; exit ;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+  *) as_fn_append ac_config_targets " $1"
+     ac_need_defaults=false ;;
+
+  esac
+  shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+  shift
+  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+  CONFIG_SHELL='$SHELL'
+  export CONFIG_SHELL
+  exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+  $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+  case $ac_config_target in
+    "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
+    "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+    "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+    "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;;
+    "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+    "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+    "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+    "po/stamp-it") CONFIG_COMMANDS="$CONFIG_COMMANDS po/stamp-it" ;;
+
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used.  Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+  tmp= ac_tmp=
+  trap '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
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+  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.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+  eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+  ac_cs_awk_cr='\\r'
+else
+  ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+  echo "cat >conf$$subs.awk <<_ACEOF" &&
+  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+  echo "_ACEOF"
+} >conf$$subs.sh ||
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+  . ./conf$$subs.sh ||
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+  if test $ac_delim_n = $ac_delim_num; then
+    break
+  elif $ac_last_try; then
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+  N
+  s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
+  for (key in S) S_is_set[key] = 1
+  FS = ""
+
+}
+{
+  line = $ 0
+  nfields = split(line, field, "@")
+  substed = 0
+  len = length(field[1])
+  for (i = 2; i < nfields; i++) {
+    key = field[i]
+    keylen = length(key)
+    if (S_is_set[key]) {
+      value = S[key]
+      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+      len += length(value) + length(field[++i])
+      substed = 1
+    } else
+      len += 1 + keylen
+  }
+
+  print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+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 < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
+h
+s///
+s/^/:/
+s/[	 ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[	 ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[	 ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# 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 >"$ac_tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+  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
+  else
+    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+  fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any.  Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[	 ]*#[	 ]*define[	 ][	 ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[	 ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[	 ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  for (key in D) D_is_set[key] = 1
+  FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+  line = \$ 0
+  split(line, arg, " ")
+  if (arg[1] == "#") {
+    defundef = arg[2]
+    mac1 = arg[3]
+  } else {
+    defundef = substr(arg[1], 2)
+    mac1 = arg[2]
+  }
+  split(mac1, mac2, "(") #)
+  macro = mac2[1]
+  prefix = substr(line, 1, index(line, defundef) - 1)
+  if (D_is_set[macro]) {
+    # Preserve the white space surrounding the "#".
+    print prefix "define", macro P[macro] D[macro]
+    next
+  } else {
+    # Replace #undef with comments.  This is necessary, for example,
+    # in the case of _POSIX_SOURCE, which is predefined and required
+    # on some systems where configure will not decide to define it.
+    if (defundef == "undef") {
+      print "/*", prefix defundef, macro, "*/"
+      next
+    }
+  }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+  as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+  case $ac_tag in
+  :[FHLC]) ac_mode=$ac_tag; continue;;
+  esac
+  case $ac_mode$ac_tag in
+  :[FHL]*:*);;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :[FH]-) ac_tag=-:-;;
+  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+  esac
+  ac_save_IFS=$IFS
+  IFS=:
+  set x $ac_tag
+  IFS=$ac_save_IFS
+  shift
+  ac_file=$1
+  shift
+
+  case $ac_mode in
+  :L) ac_source=$1;;
+  :[FH])
+    ac_file_inputs=
+    for ac_f
+    do
+      case $ac_f in
+      -) 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 `:'.
+	 test -f "$ac_f" ||
+	   case $ac_f in
+	   [\\/$]*) false;;
+	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+	   esac ||
+	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+      esac
+      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+      as_fn_append ac_file_inputs " '$ac_f'"
+    done
+
+    # Let's still pretend it is `configure' which instantiates (i.e., don't
+    # use $as_me), people would be surprised to read:
+    #    /* config.h.  Generated by config.status.  */
+    configure_input='Generated from '`
+	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+	`' by configure.'
+    if test x"$ac_file" != x-; then
+      configure_input="$ac_file.  $configure_input"
+      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+    fi
+    # Neutralize special characters interpreted by sed in replacement strings.
+    case $configure_input in #(
+    *\&* | *\|* | *\\* )
+       ac_sed_conf_input=`$as_echo "$configure_input" |
+       sed 's/[\\\\&|]/\\\\&/g'`;; #(
+    *) ac_sed_conf_input=$configure_input;;
+    esac
+
+    case $ac_tag in
+    *:-:* | *:-) cat >"$ac_tmp/stdin" \
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+    esac
+    ;;
+  esac
+
+  ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$ac_file" : 'X\(//\)[^/]' \| \
+	 X"$ac_file" : 'X\(//\)$' \| \
+	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+  as_dir="$ac_dir"; as_fn_mkdir_p
+  ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+  # A ".." for each directory in $ac_dir_suffix.
+  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+  case $ac_top_builddir_sub in
+  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+  esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+  .)  # We are building in place.
+    ac_srcdir=.
+    ac_top_srcdir=$ac_top_builddir_sub
+    ac_abs_top_srcdir=$ac_pwd ;;
+  [\\/]* | ?:[\\/]* )  # Absolute name.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir
+    ac_abs_top_srcdir=$srcdir ;;
+  *) # Relative name.
+    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_build_prefix$srcdir
+    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+  case $ac_mode in
+  :F)
+  #
+  # CONFIG_FILE
+  #
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+  esac
+  ac_MKDIR_P=$MKDIR_P
+  case $MKDIR_P in
+  [\\/$]* | ?:[\\/]* ) ;;
+  */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+  esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+  p
+  q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+  ac_datarootdir_hack='
+  s&@datadir@&$datadir&g
+  s&@docdir@&$docdir&g
+  s&@infodir@&$infodir&g
+  s&@localedir@&$localedir&g
+  s&@mandir@&$mandir&g
+  s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+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 "$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' "$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 "$ac_tmp/stdin"
+  case $ac_file in
+  -) 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
+ ;;
+  :H)
+  #
+  # CONFIG_HEADER
+  #
+  if test x"$ac_file" != x-; then
+    {
+      $as_echo "/* $configure_input  */" \
+      && 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" "$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 "$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 "$ac_tmp/defines.awk"' "$ac_file_inputs" \
+      || as_fn_error $? "could not create -" "$LINENO" 5
+  fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $_am_arg | $_am_arg:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$_am_arg" : 'X\(//\)[^/]' \| \
+	 X"$_am_arg" : 'X\(//\)$' \| \
+	 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+
+  :C)  { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+  esac
+
+
+  case $ac_file$ac_mode in
+    "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+  # Older Autoconf quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named 'Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+      dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$mf" : 'X\(//\)[^/]' \| \
+	 X"$mf" : 'X\(//\)$' \| \
+	 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running 'make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "$am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+	 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	 X"$file" : 'X\(//\)[^/]' \| \
+	 X"$file" : 'X\(//\)$' \| \
+	 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)[^/].*/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\/\)$/{
+	    s//\1/
+	    q
+	  }
+	  /^X\(\/\).*/{
+	    s//\1/
+	    q
+	  }
+	  s/.*/./; q'`
+      as_dir=$dirpart/$fdir; as_fn_mkdir_p
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
+  done
+}
+ ;;
+    "default-1":C) case "$CONFIG_FILES" in *po/Makefile.in*)
+        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+      esac ;;
+    "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*)
+        sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
+      esac ;;
+    "po/stamp-it":C)
+    if  ! grep "^# INTLTOOL_MAKEFILE$" "po/Makefile.in" > /dev/null ; then
+       as_fn_error $? "po/Makefile.in.in was not created by intltoolize." "$LINENO" 5
+    fi
+    rm -f "po/stamp-it" "po/stamp-it.tmp" "po/POTFILES" "po/Makefile.tmp"
+    >"po/stamp-it.tmp"
+    sed '/^#/d
+	 s/^[[].*] *//
+	 /^[ 	]*$/d
+	'"s|^|	$ac_top_srcdir/|" \
+      "$srcdir/po/POTFILES.in" | sed '$!s/$/ \\/' >"po/POTFILES"
+
+    sed '/^POTFILES =/,/[^\\]$/ {
+		/^POTFILES =/!d
+		r po/POTFILES
+	  }
+	 ' "po/Makefile.in" >"po/Makefile"
+    rm -f "po/Makefile.tmp"
+    mv "po/stamp-it.tmp" "po/stamp-it"
+   ;;
+
+  esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/configure.ac b/configure.ac
new file mode 100644
index 0000000..92f0e9f
--- /dev/null
+++ b/configure.ac
@@ -0,0 +1,68 @@
+#                                               -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ([2.69])
+AC_INIT([xnec2c], [3.0], [nkcyham at yahoo.com])
+AM_INIT_AUTOMAKE
+AC_CONFIG_SRCDIR([src/common.h])
+AC_CONFIG_HEADERS([config.h])
+AM_MAINTAINER_MODE
+
+# Set CFLAGS if not set in environment
+AC_MSG_CHECKING([whether configure should try to set CFLAGS])
+if test "x${CFLAGS+set}" = xset; then
+   enable_cflags_setting=no
+else
+   enable_cflags_setting=yes
+fi
+AC_MSG_RESULT($enable_cflags_setting)
+test "x$enable_cflags_setting" = xyes && CFLAGS="-Wall -O2"
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_MAKE_SET
+
+# Checks for libraries.
+pkg_modules="gtk+-2.0 >= 2.0.0"
+PKG_CHECK_MODULES(PACKAGE, [$pkg_modules])
+AC_SUBST(PACKAGE_CFLAGS)
+AC_SUBST(PACKAGE_LIBS)
+AC_CHECK_LIB([m], [atan2l])
+
+# Internationalization tools
+IT_PROG_INTLTOOL([0.50.0])
+GETTEXT_PACKAGE=xnec2c
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE], ["$GETTEXT_PACKAGE"], [Gettext package.])
+AM_GLIB_GNU_GETTEXT
+PROGRAMNAME_LOCALEDIR=[${datadir}/locale]
+AC_SUBST(PROGRAMNAME_LOCALEDIR)
+
+# Gettext setup
+GETTEXT_PACKAGE=xnec2c
+AC_SUBST(GETTEXT_PACKAGE)
+AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Gettext package.])
+
+# Add the languages which your application supports here.
+ALL_LINGUAS=""
+AM_GLIB_GNU_GETTEXT
+
+# Checks for header files.
+AC_CHECK_HEADERS([fcntl.h libintl.h locale.h stdlib.h string.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+
+# Checks for library functions.
+AC_FUNC_FORK
+AC_FUNC_MALLOC
+AC_FUNC_REALLOC
+AC_CHECK_FUNCS([floor pow select setlocale sqrt strstr])
+
+AC_CONFIG_FILES([Makefile
+                 src/Makefile
+				 po/Makefile.in])
+AC_OUTPUT
diff --git a/depcomp b/depcomp
new file mode 100755
index 0000000..4ebd5b3
--- /dev/null
+++ b/depcomp
@@ -0,0 +1,791 @@
+#! /bin/sh
+# depcomp - compile a program generating dependencies as side-effects
+
+scriptversion=2013-05-30.07; # UTC
+
+# Copyright (C) 1999-2013 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, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+case $1 in
+  '')
+    echo "$0: No command.  Try '$0 --help' for more information." 1>&2
+    exit 1;
+    ;;
+  -h | --h*)
+    cat <<\EOF
+Usage: depcomp [--help] [--version] PROGRAM [ARGS]
+
+Run PROGRAMS ARGS to compile a file, generating dependencies
+as side-effects.
+
+Environment variables:
+  depmode     Dependency tracking mode.
+  source      Source file read by 'PROGRAMS ARGS'.
+  object      Object file output by 'PROGRAMS ARGS'.
+  DEPDIR      directory where to store dependencies.
+  depfile     Dependency file to output.
+  tmpdepfile  Temporary file to use when outputting dependencies.
+  libtool     Whether libtool is used (yes/no).
+
+Report bugs to <bug-automake at gnu.org>.
+EOF
+    exit $?
+    ;;
+  -v | --v*)
+    echo "depcomp $scriptversion"
+    exit $?
+    ;;
+esac
+
+# Get the directory component of the given path, and save it in the
+# global variables '$dir'.  Note that this directory component will
+# be either empty or ending with a '/' character.  This is deliberate.
+set_dir_from ()
+{
+  case $1 in
+    */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
+      *) dir=;;
+  esac
+}
+
+# Get the suffix-stripped basename of the given path, and save it the
+# global variable '$base'.
+set_base_from ()
+{
+  base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
+}
+
+# If no dependency file was actually created by the compiler invocation,
+# we still have to create a dummy depfile, to avoid errors with the
+# Makefile "include basename.Plo" scheme.
+make_dummy_depfile ()
+{
+  echo "#dummy" > "$depfile"
+}
+
+# Factor out some common post-processing of the generated depfile.
+# Requires the auxiliary global variable '$tmpdepfile' to be set.
+aix_post_process_depfile ()
+{
+  # If the compiler actually managed to produce a dependency file,
+  # post-process it.
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form 'foo.o: dependency.h'.
+    # Do two passes, one to just change these to
+    #   $object: dependency.h
+    # and one to simply output
+    #   dependency.h:
+    # which is needed to avoid the deleted-header problem.
+    { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
+      sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
+    } > "$depfile"
+    rm -f "$tmpdepfile"
+  else
+    make_dummy_depfile
+  fi
+}
+
+# A tabulation character.
+tab='	'
+# A newline character.
+nl='
+'
+# Character ranges might be problematic outside the C locale.
+# These definitions help.
+upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
+lower=abcdefghijklmnopqrstuvwxyz
+digits=0123456789
+alpha=${upper}${lower}
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+
+# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
+depfile=${depfile-`echo "$object" |
+  sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Avoid interferences from the environment.
+gccflag= dashmflag=
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+  # This is just like dashmstdout with a different argument.
+  dashmflag=-xM
+  depmode=dashmstdout
+fi
+
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+  # This is just like msvisualcpp but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvisualcpp
+fi
+
+if test "$depmode" = msvc7msys; then
+  # This is just like msvc7 but w/o cygpath translation.
+  # Just convert the backslash-escaped backslashes to single forward
+  # slashes to satisfy depend.m4
+  cygpath_u='sed s,\\\\,/,g'
+  depmode=msvc7
+fi
+
+if test "$depmode" = xlc; then
+  # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
+  gccflag=-qmakedep=gcc,-MF
+  depmode=gcc
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+## Unfortunately, FreeBSD c89 acceptance of flags depends upon
+## the command line argument order; so add the flags where they
+## appear in depend2.am.  Note that the slowdown incurred here
+## affects only configure: in makefiles, %FASTDEP% shortcuts this.
+  for arg
+  do
+    case $arg in
+    -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
+    *)  set fnord "$@" "$arg" ;;
+    esac
+    shift # fnord
+    shift # $arg
+  done
+  "$@"
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
+## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
+## (see the conditional assignment to $gccflag above).
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).  Also, it might not be
+##   supported by the other compilers which use the 'gcc' depmode.
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  # The second -e expression handles DOS-style file names with drive
+  # letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the "deleted header file" problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+## Some versions of gcc put a space before the ':'.  On the theory
+## that the space means something, we add a space to the output as
+## well.  hp depmode also adds that space, but also prefixes the VPATH
+## to the object.  Take care to not repeat it in the output.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like '#:fec' to the end of the
+    # dependency line.
+    tr ' ' "$nl" < "$tmpdepfile" \
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
+      | tr "$nl" ' ' >> "$depfile"
+    echo >> "$depfile"
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' "$nl" < "$tmpdepfile" \
+      | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+      >> "$depfile"
+  else
+    make_dummy_depfile
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+xlc)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  In older versions, this file always lives in the
+  # current directory.  Also, the AIX compiler puts '$object:' at the
+  # start of each line; $object doesn't have directory information.
+  # Version 6 uses the directory in both cases.
+  set_dir_from "$object"
+  set_base_from "$object"
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$base.u
+    tmpdepfile3=$dir.libs/$base.u
+    "$@" -Wc,-M
+  else
+    tmpdepfile1=$dir$base.u
+    tmpdepfile2=$dir$base.u
+    tmpdepfile3=$dir$base.u
+    "$@" -M
+  fi
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  aix_post_process_depfile
+  ;;
+
+tcc)
+  # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
+  # FIXME: That version still under development at the moment of writing.
+  #        Make that this statement remains true also for stable, released
+  #        versions.
+  # It will wrap lines (doesn't matter whether long or short) with a
+  # trailing '\', as in:
+  #
+  #   foo.o : \
+  #    foo.c \
+  #    foo.h \
+  #
+  # It will put a trailing '\' even on the last line, and will use leading
+  # spaces rather than leading tabs (at least since its commit 0394caf7
+  # "Emit spaces for -MD").
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
+  # We have to change lines of the first kind to '$object: \'.
+  sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
+  # And for each line of the second kind, we have to emit a 'dep.h:'
+  # dummy dependency, to avoid the deleted-header problem.
+  sed -n -e 's|^  *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+## The order of this option in the case statement is important, since the
+## shell code in configure will try each of these formats in the order
+## listed in this file.  A plain '-MD' option would be understood by many
+## compilers, so we must ensure this comes after the gcc and icc options.
+pgcc)
+  # Portland's C compiler understands '-MD'.
+  # Will always output deps to 'file.d' where file is the root name of the
+  # source file under compilation, even if file resides in a subdirectory.
+  # The object file name does not affect the name of the '.d' file.
+  # pgcc 10.2 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using '\' :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+  set_dir_from "$object"
+  # Use the source, not the object, to determine the base name, since
+  # that's sadly what pgcc will do too.
+  set_base_from "$source"
+  tmpdepfile=$base.d
+
+  # For projects that build the same source file twice into different object
+  # files, the pgcc approach of using the *source* file root name can cause
+  # problems in parallel builds.  Use a locking strategy to avoid stomping on
+  # the same $tmpdepfile.
+  lockdir=$base.d-lock
+  trap "
+    echo '$0: caught signal, cleaning up...' >&2
+    rmdir '$lockdir'
+    exit 1
+  " 1 2 13 15
+  numtries=100
+  i=$numtries
+  while test $i -gt 0; do
+    # mkdir is a portable test-and-set.
+    if mkdir "$lockdir" 2>/dev/null; then
+      # This process acquired the lock.
+      "$@" -MD
+      stat=$?
+      # Release the lock.
+      rmdir "$lockdir"
+      break
+    else
+      # If the lock is being held by a different process, wait
+      # until the winning process is done or we timeout.
+      while test -d "$lockdir" && test $i -gt 0; do
+        sleep 1
+        i=`expr $i - 1`
+      done
+    fi
+    i=`expr $i - 1`
+  done
+  trap - 1 2 13 15
+  if test $i -le 0; then
+    echo "$0: failed to acquire lock after $numtries attempts" >&2
+    echo "$0: check lockdir '$lockdir'" >&2
+    exit 1
+  fi
+
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
+    | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp2)
+  # The "hp" stanza above does not work with aCC (C++) and HP's ia64
+  # compilers, which have integrated preprocessors.  The correct option
+  # to use with these is +Maked; it writes dependencies to a file named
+  # 'foo.d', which lands next to the object file, wherever that
+  # happens to be.
+  # Much of this is similar to the tru64 case; see comments there.
+  set_dir_from  "$object"
+  set_base_from "$object"
+  if test "$libtool" = yes; then
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir.libs/$base.d
+    "$@" -Wc,+Maked
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    "$@" +Maked
+  fi
+  stat=$?
+  if test $stat -ne 0; then
+     rm -f "$tmpdepfile1" "$tmpdepfile2"
+     exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  if test -f "$tmpdepfile"; then
+    sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
+    # Add 'dependent.h:' lines.
+    sed -ne '2,${
+               s/^ *//
+               s/ \\*$//
+               s/$/:/
+               p
+             }' "$tmpdepfile" >> "$depfile"
+  else
+    make_dummy_depfile
+  fi
+  rm -f "$tmpdepfile" "$tmpdepfile2"
+  ;;
+
+tru64)
+  # The Tru64 compiler uses -MD to generate dependencies as a side
+  # effect.  'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
+  # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+  # dependencies in 'foo.d' instead, so we check for that too.
+  # Subdirectories are respected.
+  set_dir_from  "$object"
+  set_base_from "$object"
+
+  if test "$libtool" = yes; then
+    # Libtool generates 2 separate objects for the 2 libraries.  These
+    # two compilations output dependencies in $dir.libs/$base.o.d and
+    # in $dir$base.o.d.  We have to check for both files, because
+    # one of the two compilations can be disabled.  We should prefer
+    # $dir$base.o.d over $dir.libs/$base.o.d because the latter is
+    # automatically cleaned when .libs/ is deleted, while ignoring
+    # the former would cause a distcleancheck panic.
+    tmpdepfile1=$dir$base.o.d          # libtool 1.5
+    tmpdepfile2=$dir.libs/$base.o.d    # Likewise.
+    tmpdepfile3=$dir.libs/$base.d      # Compaq CCC V6.2-504
+    "$@" -Wc,-MD
+  else
+    tmpdepfile1=$dir$base.d
+    tmpdepfile2=$dir$base.d
+    tmpdepfile3=$dir$base.d
+    "$@" -MD
+  fi
+
+  stat=$?
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+    exit $stat
+  fi
+
+  for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
+  do
+    test -f "$tmpdepfile" && break
+  done
+  # Same post-processing that is required for AIX mode.
+  aix_post_process_depfile
+  ;;
+
+msvc7)
+  if test "$libtool" = yes; then
+    showIncludes=-Wc,-showIncludes
+  else
+    showIncludes=-showIncludes
+  fi
+  "$@" $showIncludes > "$tmpdepfile"
+  stat=$?
+  grep -v '^Note: including file: ' "$tmpdepfile"
+  if test $stat -ne 0; then
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  # The first sed program below extracts the file names and escapes
+  # backslashes for cygpath.  The second sed program outputs the file
+  # name when reading, but also accumulates all include files in the
+  # hold buffer in order to output them again at the end.  This only
+  # works with sed implementations that can handle large buffers.
+  sed < "$tmpdepfile" -n '
+/^Note: including file:  *\(.*\)/ {
+  s//\1/
+  s/\\/\\\\/g
+  p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/'"$tab"'\1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+  s/.*/'"$tab"'/
+  G
+  p
+}' >> "$depfile"
+  echo >> "$depfile" # make sure the fragment doesn't end with a backslash
+  rm -f "$tmpdepfile"
+  ;;
+
+msvc7msys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove '-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for ':'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
+  "$@" $dashmflag |
+    sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this sed invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  tr ' ' "$nl" < "$tmpdepfile" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no eat=no
+  for arg
+  do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    if test $eat = yes; then
+      eat=no
+      continue
+    fi
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -arch)
+      eat=yes ;;
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix=`echo "$object" | sed 's/^.*\././'`
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  # makedepend may prepend the VPATH from the source file name to the object.
+  # No need to regex-escape $object, excess matching of '.' is harmless.
+  sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process the last invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed '1,2d' "$tmpdepfile" \
+    | tr ' ' "$nl" \
+    | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
+    | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove '-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E \
+    | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+             -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
+    | sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the preprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+        set fnord "$@"
+        shift
+        shift
+        ;;
+    *)
+        set fnord "$@" "$arg"
+        shift
+        shift
+        ;;
+    esac
+  done
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
+  echo "$tab" >> "$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvcmsys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/doc/NEC2-bug.txt b/doc/NEC2-bug.txt
new file mode 100644
index 0000000..ea2f857
--- /dev/null
+++ b/doc/NEC2-bug.txt
@@ -0,0 +1,114 @@
+You are right, there is a bug in NEC-2 when the extended thin-wire
+kernel is used with wires connected to patches.  This has escaped
+detection for over 20 years.  I did not catch it yesterday, because I
+had MAXSEG=10000, and ICON1 and ICON2 are dimensioned to 2*MAXSEG, so
+10000 did not exceed the bound.
+
+The problem can be fixed as shown below.  In addition to subroutine
+CMWW, where you encountered the problem, the same changes need to be
+made in subroutines NEFLD and QDSRC.  With this change the extended
+kernel is not used at a wire end connected to a patch surface, but
+would be used on the rest of the wire if it is straight .
+
+The extended thin-wire kernel is only used on thick, straight wires,
+so is not very useful.  The code turns it off at junctions, bends and
+changes in radius.  Also, the connection of a wire to a patch surface
+is not good in NEC-2 or 4.  It works fairly well for something like a
+monopole on a surface, but not for a half loop connected to the
+surface.  A wire grid surface provides a better connection for a wire
+antenna.
+
+NEC-4 does not have the extended kernel, but instead puts the current
+on the wire surface with match points on the axis, and has an
+approximation for wire end caps that reduces the instability when the
+segment length to radius ratio  is small.  So NEC-4 would not have
+this problem.
+
+Thanks for finding this bug.
+
+Jerry Burke
+LLNL
+
+
+
+
+To fix the extended thin-wire kernel with patches in NEC-2:
+
+       SUBROUTINE CMWW (J,I1,I2,CM,NR,CW,NW,ITRP)
+       .
+       .
+C     DECIDE WETHER EXT. T.W. APPROX. CAN BE USED
+       IPR=ICON1(J)
+       IF(IPR.GT.10000)GO TO 5      !<---NEW
+       IF (IPR) 1,6,2
+1     IPR=-IPR
+       IF (-ICON1(IPR).NE.J) GO TO 7
+       GO TO 4
+2     IF (IPR.NE.J) GO TO 3
+       IF (CABJ*CABJ+SABJ*SABJ.GT.1.D-8) GO TO 7
+       GO TO 5
+3     IF (ICON2(IPR).NE.J) GO TO 7
+4     XI=ABS(CABJ*CAB(IPR)+SABJ*SAB(IPR)+SALPJ*SALP(IPR))
+       IF (XI.LT.0.999999D+0) GO TO 7
+       IF (ABS(BI(IPR)/B-1.).GT.1.D-6) GO TO 7
+5     IND1=0
+       GO TO 8
+6     IND1=1
+       GO TO 8
+7     IND1=2
+8     IPR=ICON2(J)
+       IF(IPR.GT.10000)GO TO 15     !<---NEW
+       IF (IPR) 9,14,10
+
+
+       SUBROUTINE NEFLD (XOB,YOB,ZOB,EX,EY,EZ)
+       .
+       .
+       IPR=ICON1(I)
+       IF(IPR.GT.10000)GO TO 9      !<---NEW
+       IF (IPR) 3,8,4
+3     IPR=-IPR
+       IF (-ICON1(IPR).NE.I) GO TO 9
+       GO TO 6
+4     IF (IPR.NE.I) GO TO 5
+       IF (CABJ*CABJ+SABJ*SABJ.GT.1.D-8) GO TO 9
+       GO TO 7
+5     IF (ICON2(IPR).NE.I) GO TO 9
+6     XI=ABS(CABJ*CAB(IPR)+SABJ*SAB(IPR)+SALPJ*SALP(IPR))
+       IF (XI.LT.0.999999D+0) GO TO 9
+       IF (ABS(BI(IPR)/B-1.).GT.1.D-6) GO TO 9
+7     IND1=0
+       GO TO 10
+8     IND1=1
+       GO TO 10
+9     IND1=2
+10    IPR=ICON2(I)
+       IF(IPR.GT.10000)GO TO 17    !<---NEW
+       IF (IPR) 11,16,12
+
+
+       SUBROUTINE QDSRC (IS,V,E)
+       .
+       .
+       IPR=ICON1(J)
+       IF(IPR.GT.10000)GO TO 7     !<---NEW
+       IF (IPR) 1,6,2
+1     IPR=-IPR
+       IF (-ICON1(IPR).NE.J) GO TO 7
+       GO TO 4
+2     IF (IPR.NE.J) GO TO 3
+       IF (CABJ*CABJ+SABJ*SABJ.GT.1.D-8) GO TO 7
+       GO TO 5
+3     IF (ICON2(IPR).NE.J) GO TO 7
+4     XI=ABS(CABJ*CAB(IPR)+SABJ*SAB(IPR)+SALPJ*SALP(IPR))
+       IF (XI.LT.0.999999D+0) GO TO 7
+       IF (ABS(BI(IPR)/B-1.).GT.1.D-6) GO TO 7
+5     IND1=0
+       GO TO 8
+6     IND1=1
+       GO TO 8
+7     IND1=2
+8     IPR=ICON2(J)
+       IF(IPR.GT.10000)GO TO 15      !<---NEW
+       IF (IPR) 9,14,10
+
diff --git a/doc/NearFieldCalcs.txt b/doc/NearFieldCalcs.txt
new file mode 100644
index 0000000..91b1be5
--- /dev/null
+++ b/doc/NearFieldCalcs.txt
@@ -0,0 +1,71 @@
+In this document I try to work out the formula for calculating the
+peak value of the total Near Electric or Magnetic field vector.
+-------------------------------------------------------------------
+Total Field Strength^2 = Sum of Real parts of each Component^2 e.g.
+1. Etot^2 = Ex^2 * cos(W*t + Fx)^2 + Ey^2 * cos(W*t + Fy)^2 + Ez^2 * cos(W*t + Fz)^2
+where Etot = Total Field Strength (vector sum) of components,
+Ex, Ey, Ez = Magnitude of Field components in X, Y, Z directions, eg EX, EY, EZ of NEC2
+Fx, Fy, Fz = Phase (in time) of above components, as calculated by NEC2
+W = 2 * pi * Freq (omega, angular freq) and t = time
+(Formula 1. is used by xnecview to animate the near field pattern)
+
+To calculate the maximum value of the total field vector, then the right
+side of eq. 1. must be maximized, e.g. its differential/time must be zero.
+
+To make calculations easier, cos(a)^2 is replaced by the equivalent (cos(2a)+1)/2
+Etot^2 = 0.5*[Ex^2*(cos(2W*t+2Fx)+1) + Ey^2*(cos(2W*t+2Fy)+1) + Ez^2*(cos(2W*t+2Fz)+1)]
+Etot^2 = 0.5*(Ex^2 + Ey^2 + Ez^2) +
+         0.5*[Ex^2*(cos(2W*t+2Fx) + Ey^2*(cos(2W*t+2Fy) + Ez^2*(cos(2W*t+2Fz)+1)]
+
+Now we use the equivalence cos(a+b) = cos(a)*cos(b)-sin(a)*sin(b) on cos(2W*t+2Fx) etc
+
+Etot^2 = 0.5*(Ex^2 + Ey^2 + Ez^2) +
+         0.5*[Ex^2*cos(2W*t)*cos(2Fx) + Ey^2*cos(2W*t)*cos(2Fy) + Ez^2*cos(2W*t)*cos(2Fz)] -
+         0.5*[Ex^2*sin(2W*t)*sin(2Fx) + Ey^2*sin(2W*t)*sin(2Fy) + Ez^2*sin(2W*t)*sin(2Fz)]
+
+2. Etot^2 = 0.5*(Ex^2 + Ey^2 + Ez^2) +
+            0.5*cos(2W*t)*[Ex^2*cos(2Fx) + Ey^2*cos(2Fy) + Ez^2*cos(2Fz)] -
+            0.5*sin(2W*t)*[Ex^2*sin(2Fx) + Ey^2*sin(2Fy) + Ez^2*sin(2Fz)]
+
+To make things easier, we give abbreviations to constant terms:
+A = Ex^2*cos(2Fx) + Ey^2*cos(2Fy) + Ez^2*cos(2Fz)
+B = Ex^2*sin(2Fx) + Ey^2*sin(2Fy) + Ez^2*sin(2Fz)
+
+3. Etot^2 = 0.5*[(Ex^2 + Ey^2 + Ez^2) + cos(2W*t)*A - sin(2W*t)*B]
+
+The time differential of the right side is: -W*[A*sin(2W*t) + B*cos(2W*t)]
+To maximize 3. then:
+4. A*sin(2W*t) + B*cos(2W*t) = 0
+
+From this we have: sin(2W*t) = -B/A*cos(2W*t) = -B/A*[1-sin(2W*t)^2]^0.5
+Hence sin(2W*t)^2 = (B/A)^2 - (B/A)^2 * sin(2W*t)^2
+      sin(2W*t)^2 * [1+(B/A)^2] = (B/A)^2
+      sin(2W*t)^2 = [(B/A)^2]/[1+(B/A)^2] = B^2/(A^2 + B^2)
+
+5. sin(2W*t) = +/- B/(A^2 + B^2)^0.5     cos(2W*t) = +/- A/(A^2 + B^2)^0.5
+
+To satisfy eq. 4., we must choose +/- pairs from the above four
+solutions to 4., to be substituted in 3., hence:
+
+Etot^2 = 0.5*[(Ex^2 + Ey^2 + Ez^2) +/- (A^2 + B^2)/(A^2 + B^2)^0.5] and
+Etot^2 = 0.5*[(Ex^2 + Ey^2 + Ez^2) +/- (A^2 + B^2)^0.5]
+From the above, the maximum (absolute) value of the total field strength vector is:
+
+6. Etot = sqrt( 0.5*[(Ex^2 + Ey^2 + Ez^2) +/- sqrt(C)] )   where
+      A = Ex^2 * cos(2Fx) + Ey^2 * cos(2Fy) + Ez^2 * cos(2Fz)
+      B = Ex^2 * sin(2Fx) + Ey^2 * sin(2Fy) + Ez^2 * sin(2Fz)
+      C = A^2 + B^2
+
+While incorporating these formulae in my "xnec2c" GUI for nec2c (my C
+translation of NEC2) I found that the best results are obtained when
+I use sin(2W*t) = - B/(A^2 + B^2)^0.5 and cos(2W*t) = + A/(A^2 + B^2)^0.5
+and Etot = sqrt( 0.5*[(Ex^2 + Ey^2 + Ez^2) + sqrt(C)] ). In order to
+find the direction of the total vector I need to calculate the component
+parts in x,y,z and for this I need to calculate Wt. I found that only
+the C function atan2 with arguments -B and +A as from 6. gives correct
+results for Wt.
+
+P.S. A, B and C are same as CP, SP and TP in:
+    "An Orientation to NEC Near Fields
+     Part 2. Some Refinements and NEC-4 Additions"
+     by L. B. Cebik, W4RNL
diff --git a/doc/images/charges.png b/doc/images/charges.png
new file mode 100644
index 0000000..e1c4056
Binary files /dev/null and b/doc/images/charges.png differ
diff --git a/doc/images/currents.png b/doc/images/currents.png
new file mode 100644
index 0000000..4657304
Binary files /dev/null and b/doc/images/currents.png differ
diff --git a/doc/images/excitation.png b/doc/images/excitation.png
new file mode 100644
index 0000000..29e7239
Binary files /dev/null and b/doc/images/excitation.png differ
diff --git a/doc/images/freq_plots.png b/doc/images/freq_plots.png
new file mode 100644
index 0000000..9071b12
Binary files /dev/null and b/doc/images/freq_plots.png differ
diff --git a/doc/images/nec2_edit.png b/doc/images/nec2_edit.png
new file mode 100644
index 0000000..d05602e
Binary files /dev/null and b/doc/images/nec2_edit.png differ
diff --git a/doc/images/radiation.png b/doc/images/radiation.png
new file mode 100644
index 0000000..5acbb1d
Binary files /dev/null and b/doc/images/radiation.png differ
diff --git a/doc/images/wire.png b/doc/images/wire.png
new file mode 100644
index 0000000..f0d5b05
Binary files /dev/null and b/doc/images/wire.png differ
diff --git a/doc/nec2c.txt b/doc/nec2c.txt
new file mode 100644
index 0000000..810285d
--- /dev/null
+++ b/doc/nec2c.txt
@@ -0,0 +1,151 @@
+
+  README File for nec2c
+
+  1. INTRODUCTION:
+  nec2c is a translation of the NEC2 FORTRAN source code to the C language.
+  The translation was performed mostly "by hand" and a lot of modifications
+  to the original program were introduced in order to modernize the NEC2
+  and to remove as many built-in limitations as possible. The attendant
+  SOMNEC program was also translated to C and incorporated in nec2c as a
+  function so that Sommerfeld ground solutions are a part of the program.
+
+  2. CHANGES:
+  The following is a list of the more significant changes incorporated into
+  nec2c during translation from FORTRAN to C:
+
+  * All GO TO constructs have been removed (all 961 of them!) and "spaghetti"
+  code sections untangled as far as was possible to the author. Still, a lot
+  of the code is not as clean and straightforward as might have been.
+
+  * Obsolete memory-saving practices (such as "equivalences" of different
+  variables) have been eliminated and memory-sharing variables have been
+  separated so that they are independent.
+
+  * All fixed-size arrays used in calculations have been replaced with
+  buffer pointers which are allocated memory dynamically according to the
+  needs of the program and the complexity of each structure's geometry.
+  There is a two-fold advantage in this - there is virtually no limit to
+  the complexity of a structure (number of segments/patches etc), and there
+  is no wasted memory in fixed arrays. Additionally, there is no need for
+  data storage/swapping between memory and files and therefore functions
+  relating to this activity and also the NGF form of solution have been
+  removed from the program.
+
+  * When a Sommerfeld finite ground solution is requested, since the
+  SOMNEC program has been incorporated in nec2c there is no need to store
+  the ground grid data in a file and read it when running nec2c. Instead,
+  ground grid data are calculated as needed and for each new frequency if
+  frequency stepping is specified.
+
+  * The factr() and solve() functions have been modified to handle the
+  main matrix (cm) in untransposed form so that calculations are faster.
+
+  * The parser that reads the input file allows the two characters of the
+  mnemonic to be in lower case if preferred. It also allows comments to be
+  inserted anywhere in the input file in Unix style, e.g. all lines
+  beginning with a '#' are ignored.
+
+  * Operationally, nec2c differs from NEC2 in not being an interactive
+  application. Instead, nec2c is a non-interactive command-line application
+  which accepts an input file name and optionally an output file name.
+  If this is not specified, a name for the output file is made by stripping
+  any extensions from the input file name and adding a ".out" extension.
+  Furthermore, nec2c has the potential of being incorporated in another
+  application (like a GUI) after suitable modifications, allowing the
+  creation of a stand-alone program without the need for reading files
+  produced separately.
+
+  * My original motive for translating NEC2 into C was to make it easier
+  to modify and modernize and to change obsolete functions and usage. As
+  a result I have edited to some extend the format of the output file to
+  make it more "human readable" (e.g. provided a single space between
+  adjacent numbers to avoid a hard-to-read "chain" of numbers joined by
+  - signs) etc. In my humble opinion these changes make the output file
+  easier to read and possibly somewhat more presentable, although this is
+  likely to be a problem with applications that read the output file in a
+  rigid manner, based on the exact output format. I apologize for this
+  change if it causes such problems but my intention is to eventually
+  modify nec2c to be used as part of a graphical application, providing
+  results for graphical plots directly in its buffers.
+
+  3. COMPILATION:
+  The nec2c package is very simple at this time and compilation basically
+  only requires a Linux platform with development tools installed (gcc,
+  make and optionally gdb and "valgrind" for debugging). To compile the
+  source code just type "make nec2c" in the nec2c directory and if all is
+  well an executable binary (nec2c) should be produced. If gdb is not
+  installed, remove the -g option from the line in Makefile the reads:
+  CC = gcc -Wall -O3 -g
+
+  These changes can also be made if debugging is not of interest, thereby
+  reducing the size of the binary and speeding it as well. If desired,
+  nec2c can be installed (to /usr/local/bin) with "make install".
+
+  There is a double precision FORTRAN source (nec2dx.f) in this package
+  and this can be compiled and installed by typing "make nec2dx" in the
+  nec2c directory. It can be run by typing nec2dx and supplying an input
+  and output file name and it may be used to check nec2c's results for
+  bugs etc.
+
+  4. USAGE: nec2c is run as a non-interactive command-line application
+  and is invoked in the following manner:
+  nec2c -i<input-file-name> [-o<output-file-name>][-hv]
+         -h: print this usage information and exit.
+         -v: print nec2c version number and exit.
+
+  The -i option is always needed and it specifies the name of the input
+  file. The -o switch is optional and it specifies the output file name.
+  If not used, a name for the output file is made by stripping any
+  extensions from the input file name and adding a ".out" extension, e.g.
+  nec2c -i yagi.nec will cause nec2c to read yagi.nec as the input file
+  and produce yagi.out as the output file.
+
+  5. BUGS!!
+  Translating such a complex and large program from FORTRAN to C and making
+  so many changes along the way is very prone to bugs in the new program.
+  I have fixed a lot of these by using various input files that hopefully
+  invoke most if not all of NEC2's functions but there must still be bugs
+  in nec2c that will surface with some specific combinations of "cards" in
+  some input file. The best way to check nec2c's results is to run nec2dx
+  with the same input file and compare results - there should be very close
+  agreement between them as nec2dx is also double-precision.
+
+  6. Version history:
+  Version 0.1 beta: First release of the translated NEC2
+
+  Version 0.2: I used the "valgrind" (http://valgrind.kde.org)
+  tool to check nec2c and found two significant bugs in intrp() and
+  subph()   which I (hopefully!) have fixed. I also fixed another bug
+  that was found by Tim Molteno in the netwk() routine.
+
+  If you intend to use valgrind (recommended!) to test nec2c for bugs
+  (mainly memory allocation/access errors) then do not use performance
+  enhancing C flags (e.g. do not use -Ox flags etc) otherwise you will get
+  false error reports.
+
+  Version 0.3: I have split nec2c.c into a number of smaller files to
+  make it easier to work on during bug-fixing or development.
+
+  Version 0.4: Fixed a bug in conect that caused segmentation faults
+  when only one wire segment exists in the structure. this is a case that
+  will probably never exist in practice but the seg fault had to be
+  fixed.
+
+  Version 0.5: Replaced the cmplx() function with a macro to speed up
+  calculations. Changed the fbar() and zint() functions from complex
+  long double to void type and returned the calculated values via a
+  pointer in the argument list. This was done to work around a bug I
+  could never trace, possibly due to gcc itself, were functions of the
+  complex long double type produce a NAN result on return.
+
+  7. License:
+  nec2c is Public Domain, same as the original FORTRAN source.
+  Please keep any software you write incorporating nec2c in Public Domain
+  or at least use an open license like GPL or BSD.
+
+  8. AUTHOR:
+
+  Neoklis Kyriazis
+
+  January 27 2004
+
diff --git a/doc/xnec2c.1.gz b/doc/xnec2c.1.gz
new file mode 100644
index 0000000..b9e2d3a
Binary files /dev/null and b/doc/xnec2c.1.gz differ
diff --git a/doc/xnec2c.html b/doc/xnec2c.html
new file mode 100644
index 0000000..e1501c2
--- /dev/null
+++ b/doc/xnec2c.html
@@ -0,0 +1,962 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
+"http://www.w3.org/TR/html4/loose.dtd">
+<html>
+<head>
+<meta name="generator" content="Bluefish 2.2.4" >
+<title>Xnec2c User Manual</title>
+<meta name="author" content="Neoklis Kyriazis" >
+<meta name="copyright" content="GPL v2.0 or higher">
+<meta name="keywords" content="xnec2c GTK2 graphical nec2c NEC2 C">
+<meta name="description" content=
+"xnec2c: GTK+v2-based GUI version of nec2c">
+<meta name="ROBOTS" content="INDEX, FOLLOW">
+<meta http-equiv="content-type" content="text/html; charset=utf-8">
+</head>
+<body>
+<div align="center">
+<h2>Xnec2c User Manual</h2>
+</div>
+<div align="center">
+<h4>Xnec2c is a GTK2-based Graphical version of nec2c, the C
+translation of NEC2</h4>
+</div>
+<ol>
+<li><b><a href="#Introduction">Introduction</a></b></li>
+<li><b><a href="#Features">Features</a></b>
+<ul>
+<li><b><a href="#Interactive">Interactive Operation</a></b></li>
+<li><b><a href="#NoOutFile">No Output File</a></b></li>
+<li><b><a href="#Windows">Windows</a></b></li>
+<li><b><a href="#Color">Color Coding</a></b></li>
+<li><b><a href="#OnDemand">On-demand Calculation</a></b></li>
+<li><b><a href="#Multithread">Multi-threaded operation on SMP
+machines</a></b></li>
+<li><b><a href="#Nec2Edit">Built-in NEC2 input file
+editor</a></b></li>
+</ul>
+</li>
+<li><b><a href="#Limitations">Limitations</a></b></li>
+<li><b><a href="#Compilation">Compilation and
+Installation</a></b></li>
+<li><b><a href="#Operation">Operation</a></b>
+<ul>
+<li><b><a href="#CommandLine">Command Line Options</a></b></li>
+<li><b><a href="#MainWindow">The Main Window</a></b></li>
+<li><b><a href="#RadiationWindow">The Radiation Pattern
+Window</a></b></li>
+<li><b><a href="#FrequencyWindow">Frequency Data Plots</a></b></li>
+<li><b><a href="#Nec2Treeview">NEC2 Input File Editor</a></b></li>
+</ul>
+</li>
+<li><b><a href="#InputFile">Input File Considerations</a></b></li>
+<li><b><a href="#OutputFile">Output File
+Considerations</a></b></li>
+<li><b><a href="#Version">Version History</a></b></li>
+<li><b><a href="#Bugs">Bugs and Inadequacies</a></b></li>
+<li><b><a href="#Acknowledgement">Acknowledgment</a></b></li>
+</ol>
+<b><a name="Introduction" id="Introduction">1.
+Introduction:</a></b><br>
+<p>Xnec2c is a GTK2-based Graphical version of nec2c, my
+translation to the C language of NEC2, the FORTRAN Numerical
+Electromagnetics Code commonly used for antenna simulation and
+analysis. The original nec2c is a non-interactive command-line
+application that reads standard NEC2 input files and produces an
+output file with data requested by "commands" in the input file. In
+contrast xnec2c is a GUI interactive application that (in its
+current form) reads NEC2 input files but presents output data in
+graphical form, e.g. as wire frame drawings of the radiation
+pattern or near E/H field, graphs of maximum gain, input impedance,
+vswr etc against frequency and simple rendering of the antenna
+structure, including color code representation of currents or
+charge densities. These results are only calculated and drawn on
+user demand via menu items or buttons, e.g. xnec2c is interactive
+and does not execute NEC2 "commands" in batch style as the original
+does. Printing of results to an output file has been removed
+starting from version 1.0, since xnec2c works in a way that does
+not allow printing compatible with the NEC2 format. If printing to
+file is needed then it is better to use the original NEC2 program,
+to avoid bugs that may still be lurking in the C translation.</p>
+<p>Xnec2c now has a built-in editor for NEC2 input files which can
+be used to edit geometry or command "card" data. This basic editor
+displays comment, geometry and command cards in tree views where
+individual rows, each representing a card, can have their cells
+edited directly for "raw" entry of data. More useful are pop-up
+"editor" windows that open when appropriate buttons are clicked or
+when a selected row is right-clicked with the mouse. These editors
+allow easier, more convenient entry and editing of individual rows,
+with no need for detailed knowledge of "card" formats. When editing
+is completed, the contents of the nec2 editor can be saved in a
+NEC2-compatible input file which can then be re-loaded by xnec2c
+for execution.</p>
+<b><a name="Features" id="Features">2. Features:</a></b><br>
+<ul>
+<li>
+<p><b><a name="Interactive" id="Interactive">Interactive
+Operation:</a></b><br>
+Xnec2c is interactive in its operation, e.g. when started it just
+shows its Main window in a "blank" state, indicating that no valid
+input data has been read in yet. The NEC2-type input file can be
+specified at start-up in the command line optionally with the <b>-i
+option</b> or it can be opened from the file selection dialog that
+appears via the <b>File->Open menu</b> of the <a href=
+"#MainWindow">Main window</a>. Once a valid input file is opened,
+all the normal widgets in the <a href="#MainWindow">Main window</a>
+appear so as to allow proper operation. The NEC2 "commands" in the
+input file are read in but not executed, until a request is issued
+by the user via buttons or menus in the appropriate windows.</p>
+</li>
+<li>
+<p><b><a name="NoOutFile" id="NoOutFile">No Output
+File:</a></b><br>
+Printing of results to an output file has been removed starting
+from version 1.0, since xnec2c works in a way that does not allow
+printing compatible with the NEC2 format. If printing to file is
+needed then it is better to use the original NEC2 program, to avoid
+bugs that may still be lurking in the C translation.</p>
+</li>
+<li><b><a name="Windows" id="Windows">Windows:</a></b><br>
+In its current form, xnec2c has three windows for the graphical
+display of output data: When started without an input file
+specified optionally by the -i <input-file> option, the
+<a href="#MainWindow">Main window</a> opens with most of the button
+and menu widgets hidden. When a valid input file is opened, all the
+hidden widgets are shown and the structure is drawn in the <a href=
+"#MainWindow">Main window's</a> drawing area widget. From the
+<b>View</b> menu, the <a href="#RadiationWindow">Radiation
+Pattern</a> and <a href="#FrequencyWindow">Frequency Related
+data</a> display windows can be opened, to draw either the Gain
+pattern or the Near E/H fields or Frequency-related Data like Input
+Impedance, VSWR, Max gain, F/B Ratio, Gain in the Viewer's
+direction etc. Both the <a href="#MainWindow">Main window</a> and
+the <a href="#RadiationWindow">Radiation Pattern window</a> have
+buttons to select fixed viewing angles of the structure or the
+radiation pattern, as well as spin buttons to input specific
+viewing angles.</li>
+<li>
+<p><b><a name="Color" id="Color">Color Coding:</a></b><br>
+Xnec2c uses color coding to visualize the Current or Charge
+distribution in the Structure's segments or patches as well as the
+Gain pattern or the Near E/H field pattern. Color coding is also
+used to clarify the Graphs of Frequency-related data. A color code
+strip is shown in the <a href="#MainWindow">Main</a> and <a href=
+"#RadiationWindow">Radiation Pattern</a> windows.</p>
+</li>
+<li>
+<p><b><a name="OnDemand" id="OnDemand">On-demand
+Calculation:</a></b><br>
+Since xnec2c collects data to be displayed in buffers directly from
+the functions that produce them, there is no need to produce and
+parse an output file and no need to re-run the program when certain
+input data (currently the frequency) is changed or when different
+output data (gain, near-fields, input impedance etc) is required.
+The frequency can be changed either from spin buttons in the
+<a href="#MainWindow">Main</a> and <a href=
+"#RadiationWindow">Radiation Pattern</a> windows or by clicking on
+the <a href="#FrequencyWindow">Frequency Data</a> window's graph
+drawing area. The frequency corresponding to the pointer position
+will then be used to re-calculate whatever data is on display.</p>
+</li>
+<li>
+<p><b><a name="Multithread" id="Multithread">Multi-threading
+operation on SMP machines:</a></b><br>
+Since version 1.0, xnec2c can run multi-threaded (by forking) on
+SMP machines, when executing a frequency loop. Multi-threading is
+enabled by using the -j<n> option, where n is the number of
+processors in a SMP machine. xnec2c will spawn n child processes,
+to which it will delegate calculation of frequency-dependent data
+for each frequency step. Thus data related to n frequency steps
+will be calculated concurrently and passed on the the parent
+process by pipes, to be further processed for graphical display.
+Child processes are spawned before GTK is initialized and started
+so that only the parent process is tied to the GUI interface. Thus
+there are n+1 processes running when the -j option is used and
+execution is faster by slightly less than n times. <b>Please
+note</b> that its pointless and counter-productive to specify a
+value of n greater than the number of steps in the frequency
+loop.</p>
+<p><b><a name="Nec2Edit" id="Nec2Edit">Built-in NEC2 input file
+editor:</a></b><br>
+Xnec2c has a built-in editor for NEC2 input files. Data in NEC2
+"cards" can be entered or edited either directly in the main editor
+window (tree view) or in more convenient dedicated editors for each
+type of card. Edited data can be saved to a NEC2 input file and
+reloaded for execution so that the edit-execute-display cycle is
+quicker and more convenient.</p>
+</li>
+</ul>
+<b><a name="Limitations" id="Limitations">3.
+Limitations:</a></b><br>
+<p>Since xnec2c is interactive, it cannot operate in the same way
+as NEC2 or nec2c. Specifically, commands that cause execution in
+NEC2/nec2c (XQ, RP etc), are only read in but not acted upon unless
+the user requests the display of relevant data. For example, if an
+RP command line is included in the input file, xnec2c reads the
+relevant data from that line but does not calculate/render the
+radiation pattern, until the user requests this by opening the
+<a href="#RadiationWindow">Radiation Pattern window</a> and
+clicking on the <b>Gain</b> button. In addition, the NX and WG/GF
+commands are not recognized since only one structure at a time can
+be input and evaluated, and the Numerical Green's function is not
+needed or implemented. Also, some options of certain commands (e.g.
+the surface wave option I1=1 of the RP command) are not implemented
+and they must not be used since they will disrupt or even crash
+xnec2c.</p>
+<p>There are advantages deriving from the interactive operation: it
+is possible, for example, to specify both the NE and NH commands in
+combination with a multiple-frequency FR card, although only the
+relevant data of the last command will be used.</p>
+<p><b><a name="Compilation" id="Compilation">4. Compilation and
+Installation:</a></b><br>
+Please note that I use <a href="http://www.voidlinux.eu">Void Linux
+AMD64</a> which is a "bleeding edge" type distribution, so there
+may be compilation and/or run time difficulties if you are using a
+relatively old distro. This is mostly true of the basic
+dependencies like GTK+ 2 and Glade-2, and there can also be sound
+card incompatibility problems at run time.</p>
+<p>To compile the package, it may be preferable to first run the
+included "autogen.sh" script in the package's top directory, to
+produce a fresh build environment. Then the "configure" script can
+be run with optional parameters to override the default settings
+and compiler flags, e.g: ./configure --prefix=/usr CFLAGS="-g -O2"
+will override the default /usr/local installation prefix and the
+"-Wall -O2" compiler flags.</p>
+<p>Running "make" in the package's top directory should produce the
+executable binary in src/. Running "make install" will install the
+binary into /usr/local/bin by default or under the specified
+prefix. It will also install the default configuration file into
+the user's home directory. This will have to be edited by the user
+as required. There is also this hypertext documentation file which
+you can copy to a location of your choice.</p>
+<p>No configuration files are needed and the sample input files
+that were used during development are in the xnec2c/examples
+directory. Please also read the <b>xnec2c/doc/nec2c.txt</b> file
+that describes the nec2c application that is used as the basis for
+xnec2c.</p>
+<b><a name="Operation" id="Operation">5. Operation:</a></b><br>
+<p><a name="CommandLine" id="CommandLine"><b>Command Line
+Options:</b></a><br>
+Xnec2c has the following command line options:<br></p>
+<p><b>-i <input-file-name></b>: Specify a NEC2 input file to
+be opened at start-up. If the -i option is omitted, xnec2c will
+take the last argument to be the input file path name, but will
+only open it if it has the .nec extension.</p>
+<p><b>-j <number of child processes to spawn></b>: Since
+version 1.0 xnec2c can run multi-threaded on SMP machines. This
+option specifies the number of child processes to spawn by forking,
+so that the total number of processes running will be n+1. n should
+be equal to the number of processors in a SMP machine. <b>Please
+note</b> that its pointless and counter-productive to specify a
+value of n greater than the number of steps in the frequency
+loop.<br></p>
+<p><b>-h:</b> Print usage information and exit.<br></p>
+<p><b>-v:</b> Print version information and exit.</p>
+<p><b><a name="MainWindow" id="MainWindow">The Main
+Window:</a></b><br>
+<img src="images/currents.png" width="679" height="738" border="0"
+hspace="10" vspace="10" alt="Main Window" align="left"> When
+starting xnec2c from a terminal or from a file manager (by OLE),
+the -i option can be used to specify a NEC2 input file: <b>xnec2c
+-i ~/nec2/turnstile.nec</b>. Otherwise an input file can be opened
+from the Main window's <b>File->Open</b> menu item. If the input
+file is valid, xnec2c will render the structure specified in the
+Geometry section of the file in the Main window's drawing area. The
+background color is black and the structure is rendered in blue.
+The excitation points (segments) are rendered in red, the x, y, z
+axis in white, loaded segments in yellow, transmission lines in
+cyan and two-port networks in magenta. These colors are hard-coded
+in the source code and at this stage of development there is no
+option to change them.</p>
+<p>Once an input file is opened, the structure display can be
+rotated around the Z axis and tilted about a horizontal axis
+through the origin. This can be done either by pressing button 1
+and dragging the structure with the mouse pointer, clicking the
+<b>X, Y, Z</b> or the right-arrow <b>Default</b> view button (45
+deg rotation and tilt). The actual value of rotation and tilt is
+shown in two spin button widgets which can also be used to change
+the viewing angle.</p>
+<p>Starting with version 2.1, the structure display can be zoomed
+in or out by using the mouse wheel or the Zoom controls (Zoom %
+spin wheel and the +/-/1 buttons) and it can also be moved around by
+dragging with the right mouse button 2.</p>
+<p>The current distribution or charge density in the structure can
+be displayed by clicking the <b>Cur</b> or <b>Chg</b> toggle
+buttons at the top right of the Main window. The distribution of
+current or charges is rendered by a color code, red for the maximum
+value and magenta for zero. The Frequency Loop control buttons can
+be used to Start, Pause or Reset the loop. There is a <b>Color
+Code</b> bar at the left of the second row of widgets in the Main
+window, indicating the color coding and the maximum value of the
+displayed quantity (at its right).</p>
+<p>The title in the border of the drawing area widget shows the
+user-selected function of the display, while the text entry widget
+at the right of the color code bar shows antenna gain in the Viewer
+direction, e.g. perpendicular to the Screen. To the right of this
+the <b>Frequency Spin Button</b> shows the current frequency in MHz
+for which the current/charge distribution and Viewer gain are
+calculated and displayed. If the <b>Redo Check box</b> is active,
+each time the frequency is changed in the spin button, all relevant
+data on display will be recalculated. If not, clicking the Redo
+button will initiate recalculation.</p>
+<p>Printing of results to an output file has been removed starting
+from version 1.0, since xnec2c works in a way that does not allow
+printing compatible with the NEC2 format. If printing to file is
+needed then it is better to use the original NEC2 program, to avoid
+bugs that may still be lurking in the C translation. Otherwise, it
+is possible to save the structure drawing to a PNG file by using
+the <b>Save</b> or <b>Save As</b> items in the File menu.</p>
+<p>Starting with version 2.1, xnec2c can save the structure display
+as a data file for the "gnuplot" plotting program. This is done by
+using the <b>File->Save As gnuplot</b> menu item, to open a
+file chooser dialog. If only the stem of the file name is given,
+xnec2c will automatically add the .gplot extension. Plotting in
+gnuplot is done with the "splot <filename> with lines"
+command, although the plot can be enhanced with some of the style
+etc commands available in gnuplot.</p>
+<p>The View menu allows opening of other output data display
+windows and selection of various options:<br>
+<br clear="all">
+The <b>Radiation Pattern</b> menu item opens the <a href=
+"#RadiationWindow">Radiation Pattern window</a> so that the Gain
+pattern or the Near E/H fields can be calculated and displayed.<br>
+The <b>Frequency Data</b> item opens the <a href=
+"#FrequencyWindow">Frequency Data Plots window</a> which allows the
+plotting of various frequency-related data against the frequency
+range specified in the FR command. It also allows quick selection
+of the current frequency and recalculation of data by clicking on
+the plots drawing area.<br>
+The <b>Polarization</b> sub menu allows the selection of different
+polarizations for which many data items are calculated (e.g. gain,
+F/B ratio etc). The selection is global, e.g. it effects all
+relevant data that are drawn or displayed in other windows.<br>
+The <b>Common Projection</b> item couples the projection (viewing
+angle) parameters of the Structure display in the Main window and
+the Gain or E/H field display in the <a href=
+"#RadiationWindow">Radiation pattern</a> window so that both move
+in step. Similarly, the <b>Common Frequency</b> menu item couples
+the Frequency entry/display spin buttons in the same windows so
+that displayed data are for the same frequency.</p>
+<p><b><a name="RadiationWindow" id="RadiationWindow">The Radiation
+Pattern window:</a></b><br>
+<img src="images/radiation.png" width="681" height="738" border="0"
+hspace="10" vspace="10" alt="Radiation Pattern" align="left"> On
+the top row of widgets, this window has the same Viewer angle
+selection buttons and spin button displays as the <a href=
+"#MainWindow">Main window</a>. The two buttons at the middle right
+(<b>Gain</b> and <b>E/H</b>) select either the Gain or the Near
+Electric/Magnetic Field pattern display. Provided there are at
+least two steps in the theta and one in the phi angle as specified
+in the Radiation Pattern (RP) command, the Gain pattern will be
+calculated and drawn. The E/H field will be properly drawn if there
+are at least two points specified in the NE or NH commands. The
+Frequency Loop control buttons at the far right can be used to
+Start, Pause and Reset the loop.</p>
+<p>The <b>View</b> menu, in addition to the <b>Common
+Projection</b> and <b>Common Frequency</b> check buttons, provides
+sub-menus for selecting <b>Polarization</b> type, <b>Gain
+Scaling</b> and the <b>Near Field</b> data to be drawn. The
+selection of polarization type affects the Gain pattern, the
+displayed Viewer gain and the value of max and min gain as shown to
+the left and right of the color code bar. The selection of gain
+scaling only affects the form of the Gain pattern drawing:
+<b>Linear Power</b> is the most realistic, since the distance from
+the origin of each point in the gain pattern is proportional to the
+radiated power density, as is the color code (red for max gain and
+magenta for min gain). A disadvantage of this scaling is the
+inadequate representation of side lobes since they are usually
+significantly weaker than the main beam. <b>Linear Voltage</b> is
+better in this respect since the position of points in the gain
+pattern is proportional to Electric field strength and hence
+follows a square root law. <b>ARRL Style</b> follows a form of
+logarithmic scaling suggested by the American Radio Relay League,
+e.g. exp(0.058267 * gain) where gain is in dB10. Finally
+<b>Logarithmic</b> follows a logarithmic scale with a median of
+40dB.</p>
+<p>When a Near Field (<b>NE</b> or <b>NH</b>) command is included
+in the input file, clicking the <b>E/H</b> button produces a
+drawing of the near Electric and/or Magnetic fields. By selecting
+the <b>Near Field->Poynting Vector</b> menu item the Poynting
+vector is also drawn. These fields are depicted by lines of fixed
+length in the direction of the relevant (E/H/Poynting) vector at
+each point in the drawing. The field strength is depicted by the
+color of the lines as using the line length for this purpose makes
+most lines too small to be useful. The drawing of the Near E or H
+Fields can be enabled or disabled by the <b>Near Field->Near E
+Field</b> and <b>Near Field->Near H Field</b> menu items.</p>
+<p>The <b>Near Field->Animate Dialog</b> menu item opens a
+dialog box for setting the parameters and starting an Animation of
+the near field pattern. The <b>Steps/Cycle</b> spin button allows
+the setting of the number of angular steps around a cycle of the
+excitation input. The default is 36 and it results in angular steps
+of 10 degrees. The <b>Animate Frequency</b> spin button specifies a
+fictitious (slowed down) excitation frequency for which the
+animation is performed. The default is 1.0 Hz. Clicking the
+<b>Apply</b> button starts an animation of the near fields using
+the specified parameters. The <b>OK</b> button does like wise but
+it closes the animation dialog, while <b>Cancel</b> stops the
+animation.</p>
+<p>The <b>Total Field</b> sub-menu allows the selection of drawing
+either the <b>Peak</b> value or a "time-frozen" <b>Snapshot</b> of
+the instantaneous value of the total Near Field E/H vectors. The
+Snapshot values are calculated as the vector sum of the X, Y, Z
+components of the E/H field and the Peak values are calculated
+using the formula NEC4 uses to print the Peak field values.</p>
+<p>The <b>Overlay Structure</b> menu item enables the drawing of
+the structure in the radiation pattern drawing area when the Near
+Field pattern is selected for drawing. This makes it easier to
+understand the scale and extend of the Near Field patterns around
+the structure. The color scheme for the structure becomes white
+when Overlay is enabled, unless it is overridden by either the
+Current or Charge distribution being enabled by the relevant
+buttons in the <a href="#MainWindow">Main window.</a></p>
+<p>In the second row of widgets, the <b>Color Code</b> bar shows
+either the max and min values of Gain in the radiation pattern or
+the maximum value of the field strength in the near E/H field
+pattern. (Of course only one value can be shown, the precedence
+being E field, H field or Poynting field strength, depending on
+which of these is enabled in the <b>View->Near Field</b> sub
+menu). The <b>Text Entry</b> widget at the right of the color bar
+shows gain in the direction of the viewer (perpendicular to
+screen), while the <b>Frequency Spin button</b> following it shows
+the current frequency in MHz for which data is displayed. It can
+also be used to enter a new frequency in the same manner as in the
+<a href="#MainWindow">Main window.</a> The <b>Redo Check box</b>
+enables re-calculation and display of data when the frequency value
+changes, while the button to its right causes same when clicked by
+the user, but only if a new frequency has been entered.</p>
+<p>Currently the Gain pattern is drawn as a transparent wire frame,
+with each line segment colored according to the average value of
+gain associated with the two points it joins. The pattern can be
+"dragged" with the mouse pointer to rotate or tilt it and it can
+also be positioned using either the <b>X, Y, Z or Default</b>
+(right arrow) buttons. The <b>Rotate</b> and <b>Incline</b> spin
+buttons can also be used to accurately position the Gain pattern in
+the window. The <b>label</b> in the drawing area's frame gives
+information on what is on display and also the type of polarization
+or gain scaling.</p>
+<p>Starting with version 2.1, the radiation pattern display can be
+zoomed in or out by using the mouse wheel or the Zoom controls
+(Zoom % spin wheel and the +/-/1 buttons) and it can also be moved
+around by dragging with the right mouse button 2.</p>
+<p>Both the Gain and Near Field patterns can be saved as PNG image
+files by using the <b>File->Save</b> or <b>File->Save As</b>
+menu items. The Save option will save the drawings with a suitable
+default file name which includes a serial number, so that
+consecutive Saves do not overwrite files, but please note that when
+xnec2c is restarted the serial numbers are reset so that
+overwriting will occur if the same input file is opened.</p>
+<p>Starting with version 2.1, xnec2c can save the radiation pattern
+and near E/H field display as a data file for the "gnuplot"
+plotting program. This is done by using the <b>File->Save As
+gnuplot</b> menu item, to open a file chooser dialog. If only the
+stem of the filename is given, xnec2c will automatically add the
+.gplot extension. Plotting in gnuplot is done with the "splot
+<filename> with lines" command, although the plot can be
+enhanced with some of the style etc commands available in
+gnuplot.</p>
+<br clear="all">
+<p><b><a name="FrequencyWindow" id="FrequencyWindow">Frequency Data
+Plots window:</a></b><br>
+<img src="images/freq_plots.png" width="623" height="734" border=
+"0" hspace="10" vspace="10" alt="Frequency Plots" align="left">The
+Frequency Data Plots window is the main display of frequency
+related data such as maximum gain, VSWR, input impedance etc. Most
+data can be plotted against frequency and some are displayed in
+text entry widgets. It is also a convenient way to quickly enter a
+new current frequency by clicking on the graph drawing area.</p>
+<p>The following applies to all graphs plotted in this window: When
+a graph of two quantities against frequency is plotted (e.g real
+and imaginary parts of input impedance), then one quantity is
+plotted in magenta color and its scale is at the left vertical side
+of the bounding box. The second quantity is plotted in cyan color
+and its scale is at the right side while a short descriptive title
+is printed in yellow at the top horizontal side. The graph bounding
+box is in white and the scale grid lines are in light gray. When
+only a single quantity is plotted against frequency, it is plotted
+in magenta color and the scale is at the left side of the bounding
+box.</p>
+<p>Once graph plotting is complete (e.g. the frequency loop is
+done), clicking on the graph drawing area with button 1 (left mouse
+button) will produce a vertical green line in the graph bounding
+box, marking the new current frequency and triggering a
+re-calculation of all frequency-related data. Also, displays and
+drawings in all open windows (assuming the Redo check boxes are
+ticked active) will be refreshed to present the new data. Clicking
+on the drawing area with button 3 (right button) sets the frequency
+to the nearest frequency loop step value, as marked by the little
+boxes or diamonds on the graphs. However, all the displayed
+frequency-related data are still recalculated and refreshed e.g.
+buffered values are not used. Clicking with button 2 (middle
+button) cancels the green frequency-marking line.</p>
+<p>The top row of widgets in this window has at its right buttons
+to select data to be plotted against frequency. These are:<br>
+<b>Max Gain:</b> Maximum gain and front-to-back ratio at each
+frequency step.<br>
+<b>Dir:</b> The direction of maximum gain, e.g. the radiation angle
+relative to the xy plane (90-theta) and the phi angle as defined in
+NEC2.<br>
+<b>Viewer:</b> The gain in the viewer's direction, e.g.
+perpendicular to the screen.<br>
+<b>VSWR @ Zo:</b> The VSWR for the Zo value in the <b>Impedance
+Spin button</b> (default 50 Ohm).<br>
+<b>Zr/Zi:</b> The real and imaginary parts of the input
+impedance.<br>
+<b>Zm/Zph:</b> The scalar magnitude and phase of the input
+impedance.<br>
+<b>The View->Net Gain</b> menu item changes the second plotted
+quantity to the Net Gain of the array. This was added after a
+feature request for xnec2c.</p>
+<p>The Frequency Loop control buttons at the top right can be use
+to Start, Pause or Reset the loop. As the loop progresses, more
+data will be presented in the graphs and in the text entry widgets
+above the graph drawing area. These widgets display the current
+frequency in MHz, the maximum gain in the radiation pattern for
+that frequency, the VSWR for the Zo value in the spin button above
+and the real and imaginary parts of the input impedance.</p>
+<p>The <b>File->Save</b> and <b>File->Save As</b> menu items
+can be used to save the graphs in the drawing area as PNG image
+files, with a default file name or one of the user's choice
+respectively. The <b>View->Polarization</b> sub-menu can be used
+to select the wave polarization type for which data is calculated
+and presented. When Viewer gain plotting is enabled, the graph will
+be re-drawn when the structure projection is changed by the various
+means described earlier (dragging by mouse pointer, Rotate/Incline
+spin buttons etc).</p>
+<p>Starting with version 2.1, xnec2c can save the frequency
+dependent functions as a data file for the "gnuplot" plotting
+program. This is done by using the <b>File->Save As gnuplot</b>
+menu item, to open a file chooser dialog. If only the stem of the
+filename is given, xnec2c will automatically add the .gplot
+extension. Plotting in gnuplot is done with the "plot
+<filename> with lines" command, although the plot can be
+enhanced with some of the style etc commands available in
+gnuplot.</p>
+<br clear="all">
+<p><b><a name="Nec2Treeview" id="Nec2Treeview">NEC2 Input File
+Editor:</a></b><br>
+<img src="images/nec2_edit.png" width="664" height="739" border="0"
+hspace="10" vspace="10" alt="Nec2 Editor" align="left"> Xnec2c has
+a built-in NEC2 input file editor to make the edit/save/execute
+cycle easier and quicker. The main editor window opens from either
+the File->New or File->Edit menu items of the <a href=
+"#MainWindow">Main window</a>. The File->New menu item opens the
+editor with some default rows ("cards") that amount to a free space
+vertical dipole which serves as a simple example. The File->Edit
+menu is used to edit a NEC2 input file that is already open in
+xnec2c.</p>
+<p>The main NEC2 input file editor can be used to directly edit
+rows if desired and indeed this is the only method available for
+editing Comments. The editor though has several dedicated
+sub-editors for each of the type of card that is indicated in the
+Buttons above the Geometry and Commands Tree Views. The dedicated
+editor windows open when these buttons are clicked (to add a new
+row) or when a selected row is right-clicked by the user with the
+mouse.</p>
+<p><b>Main Editor Description:</b><br>
+The Main NEC2 Editor window is divided into three Tree View areas,
+one for editing Comments, one for editing Geometry and one for
+Control Commands. Each tree view has editable rows divided into
+cells that correspond to NEC2 input file's card columns e.g. Card
+Name (CM) - Comment Text or Card Name (GW) - Wire Data (I1 I2 F1 F2
+F3 F4 F5 F6 F7) etc. Each row can be edited by selecting it with a
+mouse click and then clicking on a cell. This requires detailed
+knowledge of the format of each of the NEC2 input file "cards" and
+so this method is only useful for editing comments.</p>
+<p>The main editor is controlled by the top row of buttons: The Add
+button inserts a new blank row in whatever tree view has been
+selected by a mouse click. The Remove button deletes a row that was
+selected by a mouse click and the Clear button deletes all rows in
+a selected tree view and clears it. The Save As button opens a file
+selector dialog for saving the data in the Editor to a NEC2 input
+file. The Save button writes data in the Editor to an already open
+input file. The Apply check button, when checked, signals xnec2c to
+reload the edited input file for execution.</p>
+<p>Note: In xnec2c versions earlier than version 2.0-beta, due to
+the complex file opening process followed by NEC2 (many data sanity
+checks and initializations etc), reloading the input file resulted
+in all open windows (radiation pattern, frequency plots) to be
+closed. This was always an awkward situation and slowed down work
+in the NEC2 input file editor. As of xnec2c version 2.0-beta, the
+user interface as well as a fair amount of code in xnec2c, have
+been modified so that as far as possible, when an edited NEC2 file
+is saved and reloaded, or another NEC2 file is opened, xnec2c will
+not close open Radiation Pattern or Frequency Plot windows and will
+not completely reset internally. This allows the user to edit a
+NEC2 file in the Editor window and, after saving, to be presented
+with the new calculations on the structure being modeled.</p>
+<p>Finally the Revert button reloads the last saved state of the
+editor from the input file, to reduce the effort needed to recover
+from a big mistake like clearing a tree view accidentally!</p>
+<br clear="all">
+<p><b>Sample Dedicated Geometry Editor Description:</b><br>
+<img src="images/wire.png" width="558" height="280" border="0"
+hspace="10" vspace="10" alt="Wire Editor" align="left"><b>Wire
+Geometry Editor:</b> This is one of the dedicated "card" or row
+editors, for creating or editing wire geometry. It will appear when
+the "Wire" button in the "Edit Geometry Data" frame is clicked or
+when a selected Wire row is right-clicked with the mouse. In the
+former case, a blank "GW" row will be added to the Geometry tree
+view which can then be filled by entering wire geometry data in the
+Editor and clicking Apply or OK. (in the latter case the editor is
+closed). The "Tapered Wire" check button in the upper left corner
+opens an additional frame for entering wire taper data and adds a
+blank "GC" row to the tree view.</p>
+<p>To make things easier, the Wire editor has spin buttons to
+specify Length Taper and Diameter Taper separately to hide the need
+for calculating the actual beginning and end diameters. Also the
+"Segs % lambda" spin button indicates the wire segment length as a
+percentage of smallest wavelength and can be use to set the needed
+number of segments for each wire to maintain a uniform relative
+segment length for all wires. <b>Please note</b> that this function
+will only work if the Frequency (FR) card is specified in the
+Commands tree view <i>and</i> all the data is saved to file and
+read by xnec2c, so that frequency data is valid in xnec2c's
+buffers. <b>Please also note</b> that all dedicated editors require
+wire diameter to be specified but then convert this to radius when
+entering to the Main editor and saving to file (NEC2 requires wire
+radius to be specified).</p>
+<p>Three geometry Editors (wire, helix, arc) have a spin button to
+specify wire conductivity in Siemens/meter. When the spin button
+value is greater than zero, the Editor will enter an LD card in the
+Commands tree view to specify a type 5 (wire conductivity) loading.
+This will result in all segments with tag number equal to that in
+the Editor to be loaded with the specified resistivity. Please note
+that Deleting the GW row in the Geometry tree view will not remove
+the LD loading row in the Commands tree view.</p>
+<p>All editors (except for the "GE" card) have the following
+buttons along the bottom of the window: "New" inserts a new blank
+row in the tree view after entering edited data into the current
+row. "Delete Card" removes the current row (card) and closes the
+editor window. "Apply" enters edited data into the current row.
+"OK" enters edited data into the current row and closes the editor
+window. <b>Please note</b> that the "GE" row is entered
+automatically by the first editor used, if the tree view is
+cleared, and there is no button for it in the Geometry frame. But
+there is a dedicated editor for it which opens with a right-click
+on the (selected) GE row and <i>it should be used</i> to specify
+the presence of Ground (GN command etc).</p>
+<br clear="all">
+<p><b>Sample Dedicated Control Editor:</b><br>
+<img src="images/excitation.png" width="687" height="412" border=
+"0" hspace="10" vspace="10" alt="Excitation Editor" align=
+"left"><b>Excitation Command Editor:</b> The Excitation Command
+Editor opens when the "Excitation" button in the "Edit Control
+Commands" frame is clicked or when a selected "EX" row is
+right-clicked with the mouse. The excitation type is selected by
+activating the appropriate radio button whereby some labels over
+the data input spin buttons will change to indicate their purpose.
+The print control check buttons specify additional data to be
+printed to the output file but please remember that xnec2c does not
+produce an output file. The buttons in the bottom row of the
+Command Editors function in the same way as the Wire editor
+described above.</p>
+<p><b><a name="InputFile" id="InputFile">6. Input File
+Considerations:</a></b><br>
+Since xnec2c is interactive, it will not initiate calculations
+without a prompt from the user. For this reason certain NEC2
+commands that normally cause execution (e.g. RP, XQ etc) are read
+in but not acted upon. Any data in the lines of these commands are
+saved for use when the user requests output data calculation and
+display, via buttons and menu items in the GUI. Also, since xnec2c
+was designed to visualize output data graphically, certain types of
+output data requests are not supported (e.g. the surface wave
+pattern option (I1=1) of the RP command etc). An error message
+dialog will hopefully appear to inform the user of unsupported
+commands or options. Here is a list of commands or command options
+not supported by xnec2c:</p>
+<p><b>GF:</b> Read Numerical Green's Function: Relevant code has
+been removed in nec2c since this type of solution is obsolete.<br>
+<b>WG:</b> Write Numerical Green's Function: Relevant code has been
+removed in nec2c since this type of solution is obsolete.<br>
+<b>NX:</b> Next Structure Data: Relevant code has been removed
+since xnec2c cannot operate in batch mode.<br>
+<b>PQ, PT, CP:</b> These commands affect printed output and have no
+effect on data presented by xnec2c in graphical form. Since version
+1.0 xnec2c does not print results to file.<br>
+<b>SOMNEC:</b> The separate SOMNEC code has been incorporated in
+nec2c and hence in xnec2c also.<br>
+<b>EX:</b> When Incident Wave or Elementary Current Source
+Excitation is specified, xnec2c can only calculate and render the
+re-radiated field, produced by the current induced onto the
+structure. Only the initial values of the theta and phi angles are
+used and no stepping of these angles is performed. Therefore it is
+better to specify only one step for theta and phi in the EX
+card.<br>
+<b>RP:</b> The surface wave option (I1=1) is not supported.</p>
+<p><b><a name="OutputFile" id="OutputFile">7. Output File
+Considerations:</a></b><br>
+Printing of results to an output file has been removed starting
+from version 1.0, since xnec2c works in a way that does not allow
+printing compatible with the NEC2 format. If printing to file is
+needed then it is better to use the original NEC2 program, to avoid
+bugs that may still be lurking in the C translation.</p>
+<p><b><a name="Version" id="Version">8. Version
+History:</a></b></p>
+<p><b>Version 0.1:</b> First version with ability to draw a
+color-coded wire frame Radiation Pattern (Near and Far Field),
+Graphs of various Frequency dependent data (Gain, VSWR, Impedance
+etc) and the Structure (Wires/Patches), including a color coded
+Current or Charge distribution.</p>
+<p><b>Version 0.2:</b> Incorporated some changes to the GUI (the
+Glade-generated design) since after upgrading to GTK+ 2.8.9, the
+geometry of the windows (the position and extend of buttons/entry
+widgets) changed a little. Also fixed some bugs in the GUI code to
+handle unusual sequences of user actions correctly.</p>
+<p><b>Version 0.3:</b> Added the ability to stop the frequency loop
+by clicking on the frequency display spin buttons and to restart it
+by toggling the "Gain" or "E/H" buttons in the Radiation Pattern
+window.</p>
+<p><b>Version 0.4b:</b> Added a NEC2 input file editor that makes
+the edit/save/reload/execute cycle easier and quicker.</p>
+<p><b>Version 0.5b:</b>Fixed a bug that caused segmentation faults
+when only one wire segment was present in the structure. This is
+not a case that will normally exist but the seg fault had to be
+fixed.</p>
+<p><b>Version 0.6b:</b> Fixed a bug inherited from NEC2: If no
+geometry cards are present (only a GE card) then there is division
+by zero in conect(). NEC2 seems to accept the lack of geometry
+cards, this is now an error condition in xnec2c. Reduced the max
+value specification of the Capacitance spin button in the Loading
+card editor, from 1.0e+12 to 1.0e+9 (pF) since the higher value is
+beyond the range of the "long" type in 32 bit systems. Modified the
+behavior of some card Editors to make them more user friendly.</p>
+<p><b>Version 0.7b:</b> Fixed a bug in the co-ordinate translation
+(Move) editor and edited the code in the GW card editor so that the
+wire diameter does not change when the New button is clicked.</p>
+<p><b>Version 0.8b:</b> Fixed a serious bug that caused
+segmentation faults and crashes in structures that have a wire in
+contact with a patch. The subph() routine divides this patch into 3
+or 4 sub-patches so the total number of patches increases. There
+was no provision to reallocate and initialize buffers used in
+rendering patches in the structure display window. Other minor bugs
+were also fixed and the example NEC2 files were also checked and
+edited when needed.</p>
+<p><b>Version 0.9b:</b> Fixed a few bugs mainly in the NEC2 editor
+code and also changed the code of all individual Geometry and
+Command editors, so that edited data are set in the main NEC2
+editor's tree views when another Geometry or Command card (tree
+view row) is selected for editing.</p>
+<p>Implemented a work round around a serious bug which I could not
+trace, since it now seems to be outside my code: When the zint() or
+fbar() functions are called, they seem to corrupt xnec2c's memory
+allocation when they return. This corruption manifests itself as
+NAN values appearing in calculations so I modified these functions
+to return their computed value via a pointer in the argument list.
+I also changed the function declaration from complex long double to
+void as it seems this bug is related to functions of the former
+type declaration, returning a value.</p>
+<p><b>Version 1.0b:</b> In this version xnec2c has been re-worked
+extensively to make it multi-threading and to streamline its
+operation to some extend. Many bugs created by these changes, and
+others that already existed have been fixed, and the user interface
+has also changed somewhat. The example input files have also been
+checked and some mistakes in them have been corrected. This is now
+the first version 1.0 beta release for public testing.</p>
+<p><b>Version 1.0b3:</b> Added setlocale(LC_NUMERIC, "C"); to the
+main() function, so that in locales where commas are used in
+decimal numbers xnec2c can read data correctly (suggested by Joop
+Stakenborg). Some minor changes to the user interface were also
+made to allow the NEC2 editor window to fit in displays with
+shorter heights.</p>
+<p><b>Version 1.0b4:</b> After a bug report from Juha Vierinen I
+changed some "sprintf" commands to "snprintf" to avoid buffer
+overruns.</p>
+<p><b>Version 1.0b5:</b> Following on the above changes, I revised
+all similar situations in xnec2c's source and modified all
+"sprintf" commands to "snprintf" just in case, as I could not
+replicate the bug so could not test for other similar problems. I
+also fixed a bug in the "save" and "save as" handler, to avoid
+false attempts by xnec2c to save structure and radiation
+pattern/frequency plots pixmaps when a save of the NEC2 editor data
+failed for some reason.</p>
+<p><b>Version 1.0:</b> After several months with no bug reports or
+feature requests, I am sticking my neck out and releasing xnec2c as
+version 1.0. This version incorporates the last two feature request
+I received from users:<br>
+The "Cancel" button on card editors has been replaces with a
+"Delete Card" button, which deletes the selected "card" (row in the
+NEC2 editor window).<br>
+A "Net Gain" menu item has been added to the View menu of the
+Frequency Plots window to replace the second plotted quantity with
+the Net Gain of the antenna.</p>
+<p><b>Version 1.1:</b> I spoke too soon! A segfault bug has been
+reported that occurs when Maximum Admittance Matrix Asymmetry
+printing is requested in the EX card. Although this is not
+supported in xnec2c, it still produces a segmentation fault because
+the "ipnt" buffer is not allocated in the netwk() function in
+network.c</p>
+<p><b>Version 1.2:</b> Made the page size of spin buttons 0 to make
+setting of spin button values compatible with GTK 2.4</p>
+<p><b>Version 1.3:</b> After an inquiry about using incident field
+excitation, which was not implemented in previous versions, I
+removed the restrictions in excitation to allow plotting the
+re-radiated pattern from a structure excited by incident field or
+elementary current source. However, the calculations are carried
+out only for one set of angle-of-incidence angles, e.g. there is no
+stepping of the theta and phi angles. This would require much more
+complex changes to xnec2c and I am not currently able to do
+this.</p>
+<p><b>Version 1.4:</b> Applied a patch supplied by Tom Beierlein,
+DL1JBE, to fix crashing of xnec2c 1.3 on long input file names
+(> 80 characters).</p>
+<p><b>Version 1.5:</b> Changed the handling of command line
+arguments so that the input file name may be specified without the
+use of the -i option. In this case xnec2c will take the last
+argument to be the input file name, but only if it has the .nec
+extension.<br clear="all">
+Got rid of some variables that were set but not used, according to
+warnings given by gcc.<br clear="all">
+Applied a patch supplied by Rik van Riel to allow the calculation
+of front to back ratios when the antenna is modeled over
+ground.</p>
+<p><b>Version 1.6:</b> I received another bug report from Rik van
+Riel: The patch applied above did not help, as somehow the buggy
+code got duplicated below the bug fix, reproducing the same error
+in the calculation of front-to-back ratio! Hopefully fixed this
+time.</p>
+<p><b>Version 2.0-beta:</b> I received a bug report from David
+Binderman regarding an array bounds violation, which he found by
+compiling xnec2c with the -D_FORTIFY_SOURCE gcc flag. I fixed this
+bug and also tested xnec2c source code using cppcheck.<br clear=
+"all">
+I decided it was about time I modify the xnec2c user interface so
+that it will, as far as possible, allow the user to save and
+re-open NEC2 files in the Editor window, without closing the
+Radiation Pattern and/or the Frequency Plots windows. This will
+significantly speed up work on editing NEC2 files and also make
+xnec2c usage less awkward. However, many bugs were introduced and
+fixed during this re-write of xnec2c, so users are advised to be
+watchful of possible bugs that got away and to report them for
+fixing.</p>
+<p><b>Version 2.1-beta:</b> I have introduced many changes in this
+version, so I am releasing it again as a public beta version for
+testing and bug reports:<br clear="all">
+After a bug report by David J. Singer, I changed all declarations
+of variables that are used in memory allocations, from int to
+size_t. This error was in the nec2c code from the beginning but
+apparently it only showed up when extremely large memory
+allocations are requested in nec2c and xnec2c.<br clear="all">
+I have replaced all the (deprecated) GDK drawing primitives with
+equivalent Cairo graphics equivalents (e.g. replaced
+gdk_draw_line() with cairo_line_to()) since Cairo provides for
+nicer anti-aliased drawing.<br clear="all">
+After a feature request by David J. Singer and friend Richard, I
+have added code to save data of the structure display, radiation
+patterns and frequency plots into file, in a format suitable for
+the "gnuplot" plotting program.</p>
+<p><b>Version 2.1:</b> Patched a problem in the graph plotting
+routines that caused xnec2c to crash with a division by zero fault.
+This can happen when e.g. a single-wire structure is specified and
+a plot of gain vs frequency is requested, for a polarization that
+is at 90 deg to the wire, e.g. requesting gain plot for horizontal
+polarization for a vertical wire. Since there is no radiation in
+the horizontal plane of a vertical wire, the values of gain given
+to the plotting routines are all the same so the vertical scale
+drawing routines crash xnec2c. Please note that although xnec2c
+will now not crash as above, the plots will be jumbled and
+meaningless.</p>
+<p><b>Version 2.2-beta:</b> I made extensive modifications to the
+source code to silence a large number of warnings generated by the
+LLVM clang compiler when used with the -Weverything option. These
+were mostly cases of implicit conversions between variable types,
+like int to char or uint to int etc. I have also updated the basic
+files of the GNU Autotools build system, to be compatible with the
+current version of these tools at the time of writing (February
+2013).</p>
+<p><b>Version 2.3-beta:</b> Fixed a bug in the
+cell_edited_callback() function that caused segmentation fault
+crashes when a cell in the input file editor was edited directly by
+the user.</p>
+<p><b>Version 2.4:</b> I submitted xnec2c (and nec2c) for scanning
+to the <a href="https://scan.coverity.com/" name="coverity" id=
+"coverity">Coverity</a> source code audit website, which produced a
+list of no less than 57 issues to be fixed! Most of them were not
+bugs that affected calculations but possibly two, both in the
+Somnec code, one in function rom1() and one in gshank() likely
+could have caused errors in the relevant calculations.
+Unfortunately the Fortran source of Somnec (as well as that of the
+NEC2) is very difficult to read so I cannot say with certainty if
+this was so.</p>
+<p><b>Version 2.5:</b> After a bug report by Jean Collin, I made
+some changes to the input file parser code in input.c, to properly
+identify tabs in the input file.</p>
+<p><b>Version 2.6:</b> After a bug report by Lucjan SQ9VPA, I
+changed the case of the signal handler that deals with SIGCHLD so
+that it doesn't cause xnec2c to exit when the SIGCHLD signal does
+not originate from child processes created by xnec2c. It appears
+that in some Linux installations a SIGCHLD signal is sent to xnec2c
+even if it is not running forked, e.g. the -j option is not used
+in the command line.</p>
+<p><b>Version 2.7:</b> After a bug report by Tim, WJ5Q, I fixed
+a bug that was preventing the creation of an LD card of type 5
+(LDTYP=5) when wire conductivity (S/m) was specified in the GW
+card (Wire) editor. The same bug was present in the GH (Helix)
+card editor and it was also fixed. I added code so that the 
+wire conductivity for GW, GA and GH cards can be read from the
+relevant LD card and shown in the Conductivity (S/m) spin button.</p>
+<p>After all these changes I checked the xnec2c source code using
+the Coverity Scan service and I fixed an out-of-bounds read error
+that was reported by the scanner, in the plot_freqdat.c file.</p>
+<p><b>Version 2.8:</b> Fixed a bug in the GN card editor function
+which caused xnec2c to save the GN card parameters in the .nec
+antenna description file without clearing the number of radials
+to zero. This resulted in the GN card editor window to open with
+confusing and incorrect defaults for the radial screen, when
+the Reflection Coefficient Approximation method was selected
+for specifying ground parameters.</p>
+<p>Also fixed some bugs (missing variable initializations) in
+the Ground Parameters calculation functions which resulted in
+incorrect Radiation Pattern calculations. This would happen if
+a .nec file, with Perfect Ground (iperf = 1) specified in the
+GN card, was opened after a .nec file, with a Radial Ground
+Screen specified in the GN card, was processed.<p/>
+<p><b>Version 2.9:</b> After a request by the Debian maintainer
+of xnec2c, I added a rudimentary man page he sent me and
+corrected some spelling errors (arbitary to arbitrary).<p/>
+<p><b>Version 3.0:</b> I have modified the NEC2 file parser so
+that it can read the file with both the '.' and ',' decimal point
+characters. This is necessary to make xnec2c compatible with
+different locales. I also fixed a resource (memory) leak, reported
+by valgrind, in the xyz axes drawing routine.<p/>
+<p><b><a name="Bugs" id="Bugs">9. Bugs and Inadequacies:</a></b><br>
+Xnec2c is based on nec2c, my translation to C of the original
+FORTRAN NEC2 code. Any bugs discovered in nec2c will affect xnec2c
+as well and they will have to be fixed. In addition, changing the
+flow logic of nec2c, from a non-interactive batch-processing
+command line tool to a GUI-based interactive application, was
+rather complex and introduced many bugs that were fixed, but it is
+always possible that a combination of some input file with an
+untested sequence of user actions may trigger a hidden bug. Such a
+case in fact did appear and it was traced to a bug in the original
+NEC2 code. This has been fixed by G. Burke and the fix has been
+incorporated in nec2c and xnec2c. See the NEC2-bug.txt file for
+details.</p>
+<p>When xnec2c was made multi-threading, a lot of bugs appeared and
+were fixed but again there may be some that have not showed up. One
+condition that did appear a couple of times was xnec2c getting
+blocked in a select() call, waiting for a child to write to a pipe.
+This apparently happened because I was testing a very minimal input
+file and the child processes seemed to write to the pipes before
+the parent process dropped into select(). If this seems to happen,
+do not enable multi-threading (don't use the -j option) for very
+simple jobs.</p>
+<p>A known inadequacy of xnec2c is the slowness of the animation of
+displayed drawings, e.g. the structure itself, the radiation
+pattern, near fields pattern etc. Specifically, dragging these
+drawings with the mouse to rotate or incline them seems very heavy
+on processor loading, and with most structures the movement is
+jerky. This is my first attempt at animated wire frame drawings and
+I lack experience with GTK2 in this field, so I probably went about
+this the wrong way. I am open to any suggestions that may solve
+this problem! -;)</p>
+<p><b><a name="Acknowledgement" id="Acknowledgement">10.
+Acknowledgment:</a></b><br>
+Some of the code in xnec2c is based on Pieter-Tjerk de Boer's
+"xnecview" application, which visualizes NEC2's input and output
+files. The general 'look and feel" of xnec2c was also influenced by
+the same application.</p>
+<p><b>Author:</b> Neoklis Kyriazis (Ham Radio call: 5B4AZ)<br>
+<br>
+September 20 2005</p>
+</body>
+</html>
diff --git a/examples/10-30m_bipyramid.nec b/examples/10-30m_bipyramid.nec
new file mode 100644
index 0000000..c1167f3
--- /dev/null
+++ b/examples/10-30m_bipyramid.nec
@@ -0,0 +1,18 @@
+CM --- NEC2 Input File created by xnec2c 1.0-beta ---
+CM Skeleton bi-pyramid antenna for 10-30 MHz
+CE --- End Comments ---
+GW     1    18  2.40000E+00  0.00000E+00  2.90000E+00  0.00000E+00  0.00000E+00  2.00000E-01  3.00000E-03
+GW     2    18  2.40000E+00  0.00000E+00  2.90000E+00  0.00000E+00  0.00000E+00  5.60000E+00  3.00000E-03
+GW     3    12  2.40000E+00  0.00000E+00  2.90000E+00  0.00000E+00  0.00000E+00  2.90000E+00  7.50000E-03
+GR     0     4  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     5    12  0.00000E+00  0.00000E+00  2.90000E+00  0.00000E+00  0.00000E+00  2.00000E-01  1.50000E-02
+GW     6    12  0.00000E+00  0.00000E+00  2.90000E+00  0.00000E+00  0.00000E+00  5.60000E+00  1.50000E-02
+GW     7     1  0.00000E+00  0.00000E+00  2.00000E-01  0.00000E+00  0.00000E+00  0.00000E+00  1.50000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     7     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    41     0      0  1.00000E+01  5.00000E-01  3.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0    10     1     10 -4.50000E+00  0.00000E+00  5.00000E-01  1.00000E+00  0.00000E+00  1.00000E+00
+RP     4    19    37     0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+GN     0    32     0      0  1.20000E+01  1.00000E-02  7.50000E+00  4.00000E-03  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/10-30m_sphere.nec b/examples/10-30m_sphere.nec
new file mode 100644
index 0000000..3afde25
--- /dev/null
+++ b/examples/10-30m_sphere.nec
@@ -0,0 +1,18 @@
+CM --- NEC2 Input File created by xnec2c 0.6-beta ---
+CM Skeleton spherical broadband vertical for 10-30 MHz
+CM Average ground with radial wire screen
+CE --- End Comments ---
+GA     1    38  2.50000E+00 -9.00000E+01  9.00000E+01  7.50000E-03  0.00000E+00  0.00000E+00  0.00000E+00
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  2.70000E+00  1.00000E+00
+GW     2    12  0.00000E+00  0.00000E+00  2.70000E+00  2.50000E+00  0.00000E+00  2.70000E+00  1.25000E-02
+GR     0     4  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     3    24  0.00000E+00  0.00000E+00  2.00000E-01  0.00000E+00  0.00000E+00  5.20000E+00  1.25000E-02
+GW     4     1  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  2.00000E-01  1.25000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     4     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    41     0      0  1.00000E+01  5.00000E-01  3.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+GN     0    32     0      0  1.20000E+01  5.00000E-03  7.00000E+00  3.00000E-03  0.00000E+00  0.00000E+00
+NE     0     1     1      1  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0    20     1     15 -4.75000E+00  0.00000E+00  2.50000E-01  5.00000E-01  0.00000E+00  5.00000E-01
+RP     4    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/10-30m_vert.nec b/examples/10-30m_vert.nec
new file mode 100644
index 0000000..1067412
--- /dev/null
+++ b/examples/10-30m_vert.nec
@@ -0,0 +1,19 @@
+CM Skeleton Cage broad-band vertical 10-30 MHz
+CM Average ground with radial wire screen and cliff
+CE --- End Comments ---
+GW     1     5  1.20000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  7.50000E-03
+GM     0     2  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  2.40000E+00  0.00000E+00
+GW     2    20  1.20000E+00  0.00000E+00  0.00000E+00  1.20000E+00  0.00000E+00  4.80000E+00  3.00000E-03
+GR     0     4  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     3    20  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  4.80000E+00  1.25000E-02
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  5.00000E-01  0.00000E+00
+GW     4     2  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  5.00000E-01  1.25000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     4     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  1.00000E+01  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     0    32     0      0  1.30000E+01  5.00000E-03  7.00000E+00  3.00000E-03  0.00000E+00  0.00000E+00
+GD     0     0     0      0  1.20000E+01  5.00000E-03  1.00000E+01  4.00000E+00  0.00000E+00  0.00000E+00
+NE     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     1    20     15  0.00000E+00 -4.75000E+00  5.00000E-01  0.00000E+00  5.00000E-01  5.00000E-01
+RP     6    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/10-80m_G5RV.nec b/examples/10-80m_G5RV.nec
new file mode 100644
index 0000000..7a097c3
--- /dev/null
+++ b/examples/10-80m_G5RV.nec
@@ -0,0 +1,12 @@
+CM --- NEC2 Input File created by xnec2c-1.5 ---
+CM G5RV antenna for 10 - 80m
+CE --- End Comments ---
+GW     1    61  1.55500E+01  0.00000E+00  9.65000E+00 -1.55500E+01  0.00000E+00  9.65000E+00  2.00000E-03
+GW     2     1  2.00000E-01  0.00000E+00  2.00000E-01 -2.00000E-01  0.00000E+00  2.00000E-01  1.50000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     2     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    55     0      0  3.00000E+00  5.00000E-01  3.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37      0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+TL     1    31     2      1  4.50000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     2     0     0      0  1.20000E+01  1.00000E-02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/10-80m_Inverted-L.nec b/examples/10-80m_Inverted-L.nec
new file mode 100644
index 0000000..d30eafd
--- /dev/null
+++ b/examples/10-80m_Inverted-L.nec
@@ -0,0 +1,11 @@
+CM --- NEC2 Input File created by xnec2c-1.6 ---
+CM Inverted L antenna for 10 - 80m
+CE --- End Comments ---
+GW     1    21  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  9.00000E+00  2.00000E-03
+GW     2    62  0.00000E+00  0.00000E+00  9.00000E+00  2.50000E+01  0.00000E+00  9.00000E+00  2.00000E-03
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    55     0      0  3.00000E+00  5.00000E-01  3.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37      0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+GN     0     4     0      0  1.20000E+01  5.00000E-03  8.00000E+00  5.00000E-03  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/10-80m_windom.nec b/examples/10-80m_windom.nec
new file mode 100644
index 0000000..f6efc39
--- /dev/null
+++ b/examples/10-80m_windom.nec
@@ -0,0 +1,12 @@
+CM --- NEC2 Input File created by xnec2c-1.6 ---
+CM Windom antenna for 10 - 80m
+CE --- End Comments ---
+GW     1    16  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  8.00000E+00  2.00000E-03
+GW     2    27  0.00000E+00  0.00000E+00  8.00000E+00  1.36000E+01  0.00000E+00  8.00000E+00  2.00000E-03
+GW     3    13  0.00000E+00  0.00000E+00  8.00000E+00 -6.80000E+00  0.00000E+00  8.00000E+00  2.00000E-03
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    55     0      0  3.00000E+00  5.00000E-01  3.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37      0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+GN     0     4     0      0  1.20000E+01  1.00000E-02  8.00000E+00  5.00000E-03  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/137MHz_turnstile-sloped.nec b/examples/137MHz_turnstile-sloped.nec
new file mode 100644
index 0000000..e3cc1cb
--- /dev/null
+++ b/examples/137MHz_turnstile-sloped.nec
@@ -0,0 +1,17 @@
+CM R.H. cicular polarized turnstile for 137 MHz
+CE End Comments
+GW     1    24  0.00000E+00 -4.90000E-01  1.00000E-01  0.00000E+00  4.90000E-01  1.00000E-01  6.00000E-03
+GW     2    24 -4.85000E-01  0.00000E+00  1.00000E-01  4.85000E-01  0.00000E+00  1.00000E-01  6.00000E-03
+GW     3    12  0.00000E+00  1.00000E-02  5.00000E-01  3.30000E-01  1.00000E-02  1.63000E-01  6.00000E-03
+GW     4    12  0.00000E+00 -1.00000E-02  5.00000E-01 -3.30000E-01 -1.00000E-02  1.63000E-01  6.00000E-03
+GW     5    12  0.00000E+00 -3.57000E-01  1.57000E-01  0.00000E+00 -1.00000E-02  5.00000E-01  6.00000E-03
+GW     6    12  0.00000E+00  1.00000E-02  5.00000E-01  0.00000E+00  3.57000E-01  1.57000E-01  6.00000E-03
+GW     7     1  0.00000E+00  1.00000E-02  5.00000E-01  0.00000E+00 -1.00000E-02  5.00000E-01  1.25000E-02
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     7     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    11     0      0  1.36000E+02  2.00000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+LD     5     0     0      0  3.70000E+07  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0    16     1     16 -7.50000E-01  0.00000E+00 -4.50000E-01  1.00000E-01  0.00000E+00  1.00000E-01
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/137MHz_turnstile.nec b/examples/137MHz_turnstile.nec
new file mode 100644
index 0000000..cc787d4
--- /dev/null
+++ b/examples/137MHz_turnstile.nec
@@ -0,0 +1,16 @@
+CM Turnstile antenna RH elliptical polarization for 137 MHz
+CE End Comments
+GW     1    24  0.00000E+00  5.20000E-01  1.05450E-01  0.00000E+00 -5.20000E-01  1.05450E-01  6.00000E-03
+GW     2    24 -5.20000E-01  0.00000E+00  1.05450E-01  5.20000E-01  0.00000E+00  1.05450E-01  6.00000E-03
+GW     3    12 -5.15000E-01  1.00000E-02  4.21000E-01  0.00000E+00  1.00000E-02  4.21000E-01  6.00000E-03
+GW     4    12  0.00000E+00 -1.00000E-02  4.21000E-01  5.15000E-01 -1.00000E-02  4.21000E-01  6.00000E-03
+GW     5    11  0.00000E+00 -4.76000E-01  4.21000E-01  0.00000E+00 -1.00000E-02  4.21000E-01  6.00000E-03
+GW     6    11  0.00000E+00  1.00000E-02  4.21000E-01  0.00000E+00  4.76000E-01  4.21000E-01  6.00000E-03
+GW     7     1  0.00000E+00  1.00000E-02  4.21000E-01  0.00000E+00 -1.00000E-02  4.21000E-01  6.00000E-03
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     7     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    11     0      0  1.37000E+02  1.00000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0    16     1     16 -1.50000E+00  0.00000E+00 -9.00000E-01  2.00000E-01  0.00000E+00  2.00000E-01
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/13cm_Yagi.nec b/examples/13cm_Yagi.nec
new file mode 100644
index 0000000..2af4c5a
--- /dev/null
+++ b/examples/13cm_Yagi.nec
@@ -0,0 +1,20 @@
+CM --- NEC2 Input File created by xnec2c-1.6 ---
+CM Yagi antenna for 2.4 GHz
+CE --- End Comments ---
+GW     1    23  0.00000E+00  0.00000E+00 -2.62500E-02  0.00000E+00  0.00000E+00  2.62500E-02  1.50000E-03
+GW     2    23 -1.30000E-02  0.00000E+00 -2.87500E-02 -1.30000E-02  0.00000E+00  2.87500E-02  1.50000E-03
+GW     3    21  1.20000E-02  0.00000E+00 -2.48000E-02  1.20000E-02  0.00000E+00  2.48000E-02  1.50000E-03
+GW     4    20  3.18000E-02  0.00000E+00 -2.44000E-02  3.18000E-02  0.00000E+00  2.44000E-02  1.50000E-03
+GW     5    20  5.93000E-02  0.00000E+00 -2.39000E-02  5.93000E-02  0.00000E+00  2.39000E-02  1.50000E-03
+GW     6    20  8.93000E-02  0.00000E+00 -2.35000E-02  8.93000E-02  0.00000E+00  2.35000E-02  1.50000E-03
+GW     7    20  1.24000E-01  0.00000E+00 -2.32500E-02  1.24000E-01  0.00000E+00  2.32500E-02  1.50000E-03
+GW     8    20  1.61000E-01  0.00000E+00 -2.31000E-02  1.61000E-01  0.00000E+00  2.31000E-02  1.50000E-03
+GW     9    20  2.00000E-01  0.00000E+00 -2.28500E-02  2.00000E-01  0.00000E+00  2.28500E-02  1.50000E-03
+GW    10    20  2.40000E-01  0.00000E+00 -2.28500E-02  2.40000E-01  0.00000E+00  2.28500E-02  1.50000E-03
+GW    11    20  2.80000E-01  0.00000E+00 -2.28500E-02  2.80000E-01  0.00000E+00  2.28500E-02  1.50000E-03
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00 -1.35000E-01  0.00000E+00  0.00000E+00  0.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1    12      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    41     0      0  2.00000E+03  2.00000E+01  2.80000E+03  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37      0  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/13cm_corner_reflector.nec b/examples/13cm_corner_reflector.nec
new file mode 100644
index 0000000..83b6745
--- /dev/null
+++ b/examples/13cm_corner_reflector.nec
@@ -0,0 +1,14 @@
+CM --- NEC2 Input File created by xnec2c-1.4 ---
+CM Corner reflector for 2.4 GHz
+CE --- End Comments ---
+GW     1    13  1.00000E-02  0.00000E+00  2.25000E-02  1.00000E-02  0.00000E+00 -2.25000E-02  1.50000E-03
+GM     0    12  0.00000E+00  0.00000E+00  0.00000E+00  2.00000E-02  0.00000E+00  0.00000E+00  1.00000E+00
+GW     2    13  0.00000E+00  1.00000E-02  2.25000E-02  0.00000E+00  1.00000E-02 -2.25000E-02  1.50000E-03
+GM     0    12  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  2.00000E-02  0.00000E+00  2.00000E+00
+GW     3    15  6.00000E-02  6.00000E-02  3.00000E-02  6.00000E-02  6.00000E-02 -3.00000E-02  1.50000E-03
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00 -1.00000E-01 -1.00000E-01  0.00000E+00  0.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     3     8      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  2.00000E+03  5.00000E+01  3.00000E+03  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37      0  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/13cm_helix+screen.nec b/examples/13cm_helix+screen.nec
new file mode 100644
index 0000000..d4ba7d7
--- /dev/null
+++ b/examples/13cm_helix+screen.nec
@@ -0,0 +1,17 @@
+CM  Helix and screen reflector for 2400 MHz
+CE End Comments
+GH     1   507  3.34700E-02  5.30000E-01  2.15900E-02  2.15900E-02  2.15900E-02  2.15900E-02  1.50000E-03
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.50600E-02  0.00000E+00
+GW     2     7  0.00000E+00  0.00000E+00  0.00000E+00  2.15800E-02  0.00000E+00  1.50600E-02  1.50000E-03
+GW     3    10  4.00000E-02  5.00000E-02  0.00000E+00  4.00000E-02 -5.00000E-02  0.00000E+00  1.50000E-03
+GM     0     8  0.00000E+00  0.00000E+00  0.00000E+00 -1.00000E-02  0.00000E+00  0.00000E+00  3.00000E+00
+GW     4    10  5.00000E-02  4.00000E-02  0.00000E+00 -5.00000E-02  4.00000E-02  0.00000E+00  1.50000E-03
+GM     0     8  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00 -1.00000E-02  0.00000E+00  4.00000E+00
+GM     0     0  9.00000E+01  0.00000E+00  9.00000E+01 -2.51000E-01  0.00000E+00  0.00000E+00  0.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     2     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    31     0      0  2.30000E+03  1.00000E+01  2.60000E+03  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     1    20     1     17  7.50000E-02  0.00000E+00 -8.00000E+01  7.50000E-02  0.00000E+00  1.00000E+01
+RP     0    37    73   1000  0.00000E+00  0.00000E+00  5.00000E+00  5.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/15m_delta-loop.nec b/examples/15m_delta-loop.nec
new file mode 100644
index 0000000..27499de
--- /dev/null
+++ b/examples/15m_delta-loop.nec
@@ -0,0 +1,18 @@
+CM --- NEC2 Input File created by xnec2c 1.0-beta ---
+CM 3 Element Delta Loop beam for 15m
+CM NOTE: This input file uses the modified GS command available
+CM in xnec2c, where scaling is specified for a range of tag
+CM numbers. It is NOT compatible with the standard NEC2 or its
+CM translation to C, nec2c. BEWARE!
+CE --- End Comments ---
+GW     1    17  0.00000E+00  2.49360E+00  1.43968E+00  0.00000E+00 -2.49360E+00  1.43968E+00  1.00000E-02
+GW     2    17 -3.00000E+00  2.49360E+00  1.43968E+00 -3.00000E+00 -2.49360E+00  1.43968E+00  1.00000E-02
+GS     2     2  1.03000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     3    17  2.50000E+00  2.49360E+00  1.43968E+00  2.50000E+00 -2.49360E+00  1.43968E+00  1.00000E-02
+GS     3     3  9.80000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GM     0     2  1.20000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1     9      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  2.00000E+01  1.00000E-01  2.20000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/1MHz_3x_helicone.nec b/examples/1MHz_3x_helicone.nec
new file mode 100644
index 0000000..f641754
--- /dev/null
+++ b/examples/1MHz_3x_helicone.nec
@@ -0,0 +1,18 @@
+CM Top-loaded helical vertical for 1.0 MHz, over perfect ground.
+CM Three helices are used in parallel to raise the input impedance
+CM to near 50 Ohms. The top hat is conical to add to radiation.
+CE End Comments
+GW     1    20  0.00000E+00  0.00000E+00  1.35000E+01  1.07000E+01  0.00000E+00  1.90000E+01  3.00000E-02
+GW     1     7  1.07000E+01  0.00000E+00  1.90000E+01  9.88550E+00  4.09470E+00  1.90000E+01  3.00000E-02
+GR     0    16  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GH     2   120  1.30000E+00  1.30000E+01  1.20000E+00  1.20000E+00  1.20000E+00  1.20000E+00  3.00000E-02
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00 -3.00000E+00  0.00000E+00  0.00000E+00  2.00000E+00
+GW     3     3 -1.80000E+00  0.00000E+00  1.30000E+01  0.00000E+00  0.00000E+00  1.30000E+01  3.00000E-02
+GM     0     2  0.00000E+00  0.00000E+00  1.20000E+02  0.00000E+00  0.00000E+00  0.00000E+00  2.00000E+00
+GW     4     1  0.00000E+00  0.00000E+00  1.30000E+01  0.00000E+00  0.00000E+00  1.35000E+01  5.00000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     1     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    41     0      0  9.00000E-01  5.00000E-03  1.10000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     2     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/1MHz_3x_helisphere.nec b/examples/1MHz_3x_helisphere.nec
new file mode 100644
index 0000000..0c7cb4c
--- /dev/null
+++ b/examples/1MHz_3x_helisphere.nec
@@ -0,0 +1,18 @@
+CM Top-loaded helical vertical for 1.0 MHz, over perfect ground.
+CM Three helices are used in parallel to raise the input impedance
+CM to near 50 Ohms. The top hat is spherical to add to radiation.
+CE End Comments
+GA     1    32  7.00000E+00 -9.00000E+01  9.00000E+01  3.00000E-02  2.52150E-01  0.00000E+00  0.00000E+00
+GR     0    16  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.78000E+01  1.00000E+00
+GH     2   120  1.03000E+00  1.03000E+01  1.15000E+00  1.15000E+00  1.15000E+00  1.15000E+00  3.00000E-02
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00 -3.00000E+00  0.00000E+00  0.00000E+00  2.00000E+00
+GW     3     3 -1.85000E+00  0.00000E+00  1.03000E+01  0.00000E+00  0.00000E+00  1.03000E+01  3.00000E-02
+GM     0     2  0.00000E+00  0.00000E+00  1.20000E+02  0.00000E+00  0.00000E+00  0.00000E+00  2.00000E+00
+GW     4     1  0.00000E+00  0.00000E+00  1.03000E+01  0.00000E+00  0.00000E+00  1.08000E+01  5.00000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     1     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     2     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+FR     0    41     0      0  9.00000E-01  5.00000E-03  1.10000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/1MHz_4x_helisphere.nec b/examples/1MHz_4x_helisphere.nec
new file mode 100644
index 0000000..1f05633
--- /dev/null
+++ b/examples/1MHz_4x_helisphere.nec
@@ -0,0 +1,17 @@
+CM Top-loaded helical vertical for 1.0 MHz, over perfect ground. Four
+CM co-axial helices are used in parallel to raise the input impedance
+CM to near 50 Ohms. The top hat is spherical to add to radiation.
+CE End Comments
+GA     1    20  5.00000E+00 -9.00000E+01  9.00000E+01  3.00000E-02  2.88171E-01  0.00000E+00  0.00000E+00
+GR     0    16  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.37000E+01  1.00000E+00
+GH     2    80  1.02500E+00  8.20000E+00  1.16500E+00  1.16500E+00  1.16500E+00  1.16500E+00  3.00000E-02
+GW     3     2  0.00000E+00  0.00000E+00  8.20000E+00  1.16500E+00  0.00000E+00  8.20000E+00  3.00000E-02
+GM     0     3  0.00000E+00  0.00000E+00  9.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  2.00000E+00
+GW     4     1  0.00000E+00  0.00000E+00  8.20000E+00  0.00000E+00  0.00000E+00  8.70000E+00  5.00000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     0     0     0     0  1.20000E+01  5.00000E-03  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     2     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+FR     0    21     0      0  9.80000E-01  2.00000E-03  1.02000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/1MHz_helivert.nec b/examples/1MHz_helivert.nec
new file mode 100644
index 0000000..4ca5256
--- /dev/null
+++ b/examples/1MHz_helivert.nec
@@ -0,0 +1,18 @@
+CM  Top-loaded helical vertical for 1.0 MHz, over perfect ground.
+CM  The input impedance is such that a 16:1 quadrifilar toroid
+CM  transformer should raise it to 50 Ohms.
+CE End Comments
+GW     1     3  0.00000E+00  0.00000E+00  1.32000E+01  5.99500E+00  0.00000E+00  1.32000E+01  3.00000E-02
+GW     1     1  5.99500E+00  0.00000E+00  1.32000E+01  5.53800E+00  2.29100E+00  1.32000E+01  3.00000E-02
+GR     0    16  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     1     1  1.00000E+00  0.00000E+00  1.30000E+01  0.00000E+00  0.00000E+00  1.32000E+01  3.00000E-02
+GH     2    80  1.30000E+00  1.30000E+01  1.00000E+00  1.00000E+00  1.00000E+00  1.00000E+00  3.00000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     1     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  9.80000E-01  2.00000E-03  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     2     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+LD     5     0     0      0  3.70000E+07  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0     1    20     15  0.00000E+00 -1.42500E+01  1.50000E+00  0.00000E+00  1.50000E+00  1.50000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/1MHz_tower.nec b/examples/1MHz_tower.nec
new file mode 100644
index 0000000..297dbf0
--- /dev/null
+++ b/examples/1MHz_tower.nec
@@ -0,0 +1,31 @@
+CM Top-loaded tower for 1.0 MHz, over perfect ground.
+CM Each leg is loaded by an inductance to ground.
+CM Tower is fed at one of the loaded legs.
+CE End Comments
+GW     1     1  1.24900E+00  0.00000E+00  1.24900E+00  0.00000E+00  1.24900E+00  1.24900E+00  5.00000E-02
+GW     1     1  1.24900E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.24900E+00  1.24900E+00  5.00000E-02
+GM     0     8  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.24900E+00  0.00000E+00
+GW     1     6  1.24900E+00  0.00000E+00  0.00000E+00  1.24900E+00  0.00000E+00  1.12400E+01  5.00000E-02
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.24900E+00  0.00000E+00
+GW     2     4  8.92500E+00 -1.83600E+00  1.24900E+01  1.24900E+00  0.00000E+00  1.24900E+01  5.00000E-02
+GW     2     4  8.92500E+00  1.83600E+00  1.24900E+01  1.24900E+00  0.00000E+00  1.24900E+01  5.00000E-02
+GW     2     4  7.39500E+00 -4.95300E+00  1.24900E+01  1.24900E+00  0.00000E+00  1.24900E+01  5.00000E-02
+GW     2     4  7.39500E+00  4.95300E+00  1.24900E+01  1.24900E+00  0.00000E+00  1.24900E+01  5.00000E-02
+GW     2     1  1.24900E+00  0.00000E+00  1.24900E+00  0.00000E+00  1.24900E+00  1.24900E+00  5.00000E-02
+GW     3     1  1.24900E+00  0.00000E+00  0.00000E+00  1.24900E+00  0.00000E+00  1.24900E+00  5.00000E-02
+GS     0     0  1.25000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GR     3     4  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     1     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EK     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  9.80000E-01  2.00000E-03  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     3     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+LD     5     0     0      0  3.70000E+07  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+LD     0     3     1      1  0.00000E+00  8.50000E-05  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+LD     0     6     1      1  0.00000E+00  8.50000E-05  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+LD     0     9     1      1  0.00000E+00  8.50000E-05  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+LD     0    12     1      1  0.00000E+00  8.50000E-05  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0     1    20     15  0.00000E+00 -1.90000E+01  2.00000E+00  0.00000E+00  2.00000E+00  2.00000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/20-40m_ground_plane.nec b/examples/20-40m_ground_plane.nec
new file mode 100644
index 0000000..abdbe7e
--- /dev/null
+++ b/examples/20-40m_ground_plane.nec
@@ -0,0 +1,13 @@
+CM Dual band base-loaded 7 & 14 MHz Ground Plane.
+CM Infinite perfect ground
+CE End Comments
+GW     1    20  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.30000E+01  2.50000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     1     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    19     0      0  6.00000E+00  5.00000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+LD     0     1     1      1  0.00000E+00  4.80000E-06  6.20000E-11  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0     1    20     15  0.00000E+00 -9.50000E+00  1.00000E+00  0.00000E+00  1.00000E+00  1.00000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/20-40m_vert_circ_cliff.nec b/examples/20-40m_vert_circ_cliff.nec
new file mode 100644
index 0000000..fbb3923
--- /dev/null
+++ b/examples/20-40m_vert_circ_cliff.nec
@@ -0,0 +1,15 @@
+CM Dual band base loaded 7 & 14 MHz Ground Plane.
+CM Finite ground with radials, circular cliff.
+CE End Comments
+GW     1    32  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.31000E+01  2.50000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    19     0      0  6.00000E+00  5.00000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     0    32     0      0  1.20000E+01  5.00000E-02  1.00000E+01  5.00000E-03  0.00000E+00  0.00000E+00
+GD     0     0     0      0  1.00000E+01  3.00000E-03  1.00000E+01  3.00000E+00  0.00000E+00  0.00000E+00
+LD     0     1     1      1  0.00000E+00  4.80000E-06  6.20000E-11  0.00000E+00  0.00000E+00  0.00000E+00
+LD     5     1     0      0  3.70000E+07  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0     1    20     15  0.00000E+00 -9.50000E+00  5.00000E-01  0.00000E+00  1.00000E+00  1.00000E+00
+RP     6    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/20-40m_vert_linear_cliff.nec b/examples/20-40m_vert_linear_cliff.nec
new file mode 100644
index 0000000..d0c295e
--- /dev/null
+++ b/examples/20-40m_vert_linear_cliff.nec
@@ -0,0 +1,15 @@
+CM Dual band base-loaded 7 & 14 MHz Ground Plane.
+CM Finite ground with radials, linear cliff.
+CE End Comments
+GW     1    32  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.31000E+01  2.50000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    19     0      0  6.00000E+00  5.00000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     0    32     0      0  1.20000E+01  5.00000E-02  1.00000E+01  5.00000E-03  0.00000E+00  0.00000E+00
+GD     0     0     0      0  1.00000E+01  3.00000E-03  1.00000E+01  3.00000E+00  0.00000E+00  0.00000E+00
+LD     0     1     1      1  0.00000E+00  4.80000E-06  6.20000E-11  0.00000E+00  0.00000E+00  0.00000E+00
+LD     5     1     0      0  3.70000E+07  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0     1    20     15  0.00000E+00 -9.50000E+00  5.00000E-01  0.00000E+00  1.00000E+00  1.00000E+00
+RP     5    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/20-40m_vert_sommerfeld_cliff.nec b/examples/20-40m_vert_sommerfeld_cliff.nec
new file mode 100644
index 0000000..9f4dc1b
--- /dev/null
+++ b/examples/20-40m_vert_sommerfeld_cliff.nec
@@ -0,0 +1,14 @@
+CM Dual band base loaded 7 & 14 MHz Ground Plane.
+CM Finite ground, no radials, linear cliff, Sommerfeld method.
+CE End Comments
+GW     1    32  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.31000E+01  2.50000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    19     0      0  6.00000E+00  5.00000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     2     0     0      0  1.30000E+01  1.00000E-01  1.00000E+01  1.00000E-01  1.00000E+01  3.00000E+00
+LD     5     1     0      0  3.70000E+07  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+LD     0     1     1      1  0.00000E+00  4.80000E-06  6.10000E-11  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0     1    20     15  0.00000E+00 -9.50000E+00  1.00000E+00  0.00000E+00  1.00000E+00  1.00000E+00
+RP     2    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/20m_car_ant.nec b/examples/20m_car_ant.nec
new file mode 100644
index 0000000..50de1b7
--- /dev/null
+++ b/examples/20m_car_ant.nec
@@ -0,0 +1,212 @@
+CM  14 MHz vertical whip on a car roof
+CE End Comments
+GW     1     9  0.00000E+00  0.00000E+00  0.00000E+00  2.69000E+00  0.00000E+00  0.00000E+00  4.80000E-02
+GW     1     3  2.69000E+00  0.00000E+00  0.00000E+00  2.69000E+00  0.00000E+00  7.90000E-01  4.80000E-02
+GW     1     9  2.69000E+00  0.00000E+00  7.90000E-01  0.00000E+00  0.00000E+00  7.90000E-01  4.80000E-02
+GW     1     3  0.00000E+00  0.00000E+00  7.90000E-01  0.00000E+00  0.00000E+00  0.00000E+00  4.80000E-02
+GW     1     4  2.69000E+00  0.00000E+00  7.90000E-01  3.84000E+00  0.00000E+00  6.70000E-01  4.80000E-02
+GW     1     3  3.84000E+00  0.00000E+00  6.70000E-01  3.84000E+00  0.00000E+00  0.00000E+00  4.80000E-02
+GW     1     4  3.84000E+00  0.00000E+00  0.00000E+00  2.69000E+00  0.00000E+00  0.00000E+00  4.80000E-02
+GW     2     3  3.84000E+00  0.00000E+00  6.70000E-01  3.84000E+00  8.40000E-01  6.70000E-01  4.80000E-02
+GW     2     4  3.84000E+00  8.40000E-01  6.70000E-01  2.69000E+00  8.40000E-01  7.90000E-01  4.80000E-02
+GW     2     3  2.69000E+00  8.40000E-01  7.90000E-01  2.69000E+00  0.00000E+00  7.90000E-01  4.80000E-02
+GW     3     3  3.84000E+00  0.00000E+00  0.00000E+00  3.84000E+00  8.40000E-01  0.00000E+00  4.80000E-02
+GW     3     3  3.84000E+00  8.40000E-01  0.00000E+00  3.84000E+00  8.40000E-01  6.70000E-01  4.80000E-02
+GW     4     6  4.80000E-01  8.40000E-01  1.25000E+00  2.14000E+00  8.40000E-01  1.25000E+00  4.80000E-02
+GW     4     3  2.14000E+00  8.40000E-01  1.25000E+00  2.14000E+00  0.00000E+00  1.25000E+00  4.80000E-02
+GW     4     6  2.14000E+00  0.00000E+00  1.25000E+00  4.80000E-01  0.00000E+00  1.25000E+00  4.80000E-02
+GW     4     3  4.80000E-01  0.00000E+00  1.25000E+00  4.80000E-01  8.40000E-01  1.25000E+00  4.80000E-02
+GW     5     3  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  8.40000E-01  0.00000E+00  4.80000E-02
+GW     5     3  0.00000E+00  8.40000E-01  0.00000E+00  0.00000E+00  8.40000E-01  7.90000E-01  4.80000E-02
+GW     5     3  0.00000E+00  8.40000E-01  7.90000E-01  0.00000E+00  0.00000E+00  7.90000E-01  4.80000E-02
+GW     6     3  0.00000E+00  0.00000E+00  7.90000E-01  4.80000E-01  0.00000E+00  1.25000E+00  4.80000E-02
+GW     7     2  1.40000E+00  0.00000E+00  7.90000E-01  1.40000E+00  0.00000E+00  1.25000E+00  4.80000E-02
+GW     8     3  2.14000E+00  0.00000E+00  1.25000E+00  2.69000E+00  0.00000E+00  7.90000E-01  4.80000E-02
+GW     9     3 -0.00000E+00  1.68000E+00 -0.00000E+00 -0.00000E+00  1.68000E+00  7.90000E-01  4.80000E-02
+GW     9     9 -0.00000E+00  1.68000E+00  7.90000E-01  2.69000E+00  1.68000E+00  7.90000E-01  4.80000E-02
+GW     9     3  2.69000E+00  1.68000E+00  7.90000E-01  2.69000E+00  1.68000E+00 -0.00000E+00  4.80000E-02
+GW     9     9  2.69000E+00  1.68000E+00 -0.00000E+00 -0.00000E+00  1.68000E+00 -0.00000E+00  4.80000E-02
+GW    10     4  2.69000E+00  1.68000E+00 -0.00000E+00  3.84000E+00  1.68000E+00 -0.00000E+00  4.80000E-02
+GW    10     3  3.84000E+00  1.68000E+00 -0.00000E+00  3.84000E+00  1.68000E+00  6.70000E-01  4.80000E-02
+GW    10     4  3.84000E+00  1.68000E+00  6.70000E-01  2.69000E+00  1.68000E+00  7.90000E-01  4.80000E-02
+GW    11     3  2.69000E+00  1.68000E+00  7.90000E-01  2.69000E+00  8.40000E-01  7.90000E-01  4.80000E-02
+GW    11     3  3.84000E+00  8.40000E-01  6.70000E-01  3.84000E+00  1.68000E+00  6.70000E-01  4.80000E-02
+GW    12     3  3.84000E+00  8.40000E-01 -0.00000E+00  3.84000E+00  1.68000E+00 -0.00000E+00  4.80000E-02
+GW    13     3  2.14000E+00  8.40000E-01  1.25000E+00  2.14000E+00  1.68000E+00  1.25000E+00  4.80000E-02
+GW    13     6  2.14000E+00  1.68000E+00  1.25000E+00  4.80000E-01  1.68000E+00  1.25000E+00  4.80000E-02
+GW    13     3  4.80000E-01  1.68000E+00  1.25000E+00  4.80000E-01  8.40000E-01  1.25000E+00  4.80000E-02
+GW    14     3 -0.00000E+00  1.68000E+00 -0.00000E+00 -0.00000E+00  8.40000E-01 -0.00000E+00  4.80000E-02
+GW    14     3 -0.00000E+00  8.40000E-01  7.90000E-01 -0.00000E+00  1.68000E+00  7.90000E-01  4.80000E-02
+GW    15     3 -0.00000E+00  1.68000E+00  7.90000E-01  4.80000E-01  1.68000E+00  1.25000E+00  4.80000E-02
+GW    16     2  1.40000E+00  1.68000E+00  7.90000E-01  1.40000E+00  1.68000E+00  1.25000E+00  4.80000E-02
+GW    17     3  2.14000E+00  1.68000E+00  1.25000E+00  2.69000E+00  1.68000E+00  7.90000E-01  4.80000E-02
+GW     1     1  0.00000E+00  0.00000E+00  2.63000E-01  2.99000E-01  0.00000E+00  2.63000E-01  4.80000E-02
+GW     1     1  2.99000E-01  0.00000E+00  2.63000E-01  5.98000E-01  0.00000E+00  2.63000E-01  4.80000E-02
+GW     1     1  5.98000E-01  0.00000E+00  2.63000E-01  8.97000E-01  0.00000E+00  2.63000E-01  4.80000E-02
+GW     1     1  8.97000E-01  0.00000E+00  2.63000E-01  1.19600E+00  0.00000E+00  2.63000E-01  4.80000E-02
+GW     1     1  1.19600E+00  0.00000E+00  2.63000E-01  1.49400E+00  0.00000E+00  2.63000E-01  4.80000E-02
+GW     1     1  1.49400E+00  0.00000E+00  2.63000E-01  1.79300E+00  0.00000E+00  2.63000E-01  4.80000E-02
+GW     1     1  1.79300E+00  0.00000E+00  2.63000E-01  2.09200E+00  0.00000E+00  2.63000E-01  4.80000E-02
+GW     1     1  2.09200E+00  0.00000E+00  2.63000E-01  2.39100E+00  0.00000E+00  2.63000E-01  4.80000E-02
+GW     1     1  2.39100E+00  0.00000E+00  2.63000E-01  2.69000E+00  0.00000E+00  2.63000E-01  4.80000E-02
+GW     1     1  0.00000E+00  0.00000E+00  5.27000E-01  2.99000E-01  0.00000E+00  5.27000E-01  4.80000E-02
+GW     1     1  2.99000E-01  0.00000E+00  5.27000E-01  5.98000E-01  0.00000E+00  5.27000E-01  4.80000E-02
+GW     1     1  5.98000E-01  0.00000E+00  5.27000E-01  8.97000E-01  0.00000E+00  5.27000E-01  4.80000E-02
+GW     1     1  8.97000E-01  0.00000E+00  5.27000E-01  1.19600E+00  0.00000E+00  5.27000E-01  4.80000E-02
+GW     1     1  1.19600E+00  0.00000E+00  5.27000E-01  1.49400E+00  0.00000E+00  5.27000E-01  4.80000E-02
+GW     1     1  1.49400E+00  0.00000E+00  5.27000E-01  1.79300E+00  0.00000E+00  5.27000E-01  4.80000E-02
+GW     1     1  1.79300E+00  0.00000E+00  5.27000E-01  2.09200E+00  0.00000E+00  5.27000E-01  4.80000E-02
+GW     1     1  2.09200E+00  0.00000E+00  5.27000E-01  2.39100E+00  0.00000E+00  5.27000E-01  4.80000E-02
+GW     1     1  2.39100E+00  0.00000E+00  5.27000E-01  2.69000E+00  0.00000E+00  5.27000E-01  4.80000E-02
+GW     1     3  2.99000E-01  0.00000E+00  0.00000E+00  2.99000E-01  0.00000E+00  7.90000E-01  4.80000E-02
+GW     1     3  5.98000E-01  0.00000E+00  0.00000E+00  5.98000E-01  0.00000E+00  7.90000E-01  4.80000E-02
+GW     1     3  8.97000E-01  0.00000E+00  0.00000E+00  8.97000E-01  0.00000E+00  7.90000E-01  4.80000E-02
+GW     1     3  1.19600E+00  0.00000E+00  0.00000E+00  1.19600E+00  0.00000E+00  7.90000E-01  4.80000E-02
+GW     1     3  1.49400E+00  0.00000E+00  0.00000E+00  1.49400E+00  0.00000E+00  7.90000E-01  4.80000E-02
+GW     1     3  1.79300E+00  0.00000E+00  0.00000E+00  1.79300E+00  0.00000E+00  7.90000E-01  4.80000E-02
+GW     1     3  2.09200E+00  0.00000E+00  0.00000E+00  2.09200E+00  0.00000E+00  7.90000E-01  4.80000E-02
+GW     1     3  2.39100E+00  0.00000E+00  0.00000E+00  2.39100E+00  0.00000E+00  7.90000E-01  4.80000E-02
+GW     1     1  3.84000E+00  0.00000E+00  2.23000E-01  3.55300E+00  0.00000E+00  2.33000E-01  4.80000E-02
+GW     1     1  3.55300E+00  0.00000E+00  2.33000E-01  3.26500E+00  0.00000E+00  2.43000E-01  4.80000E-02
+GW     1     1  3.26500E+00  0.00000E+00  2.43000E-01  2.97800E+00  0.00000E+00  2.53000E-01  4.80000E-02
+GW     1     1  2.97800E+00  0.00000E+00  2.53000E-01  2.69000E+00  0.00000E+00  2.63000E-01  4.80000E-02
+GW     1     1  3.84000E+00  0.00000E+00  4.47000E-01  3.55300E+00  0.00000E+00  4.67000E-01  4.80000E-02
+GW     1     1  3.55300E+00  0.00000E+00  4.67000E-01  3.26500E+00  0.00000E+00  4.87000E-01  4.80000E-02
+GW     1     1  3.26500E+00  0.00000E+00  4.87000E-01  2.97800E+00  0.00000E+00  5.07000E-01  4.80000E-02
+GW     1     1  2.97800E+00  0.00000E+00  5.07000E-01  2.69000E+00  0.00000E+00  5.27000E-01  4.80000E-02
+GW     1     3  3.55300E+00  0.00000E+00  0.00000E+00  3.55300E+00  0.00000E+00  7.00000E-01  4.80000E-02
+GW     1     3  3.26500E+00  0.00000E+00  0.00000E+00  3.26500E+00  0.00000E+00  7.30000E-01  4.80000E-02
+GW     1     3  2.97800E+00  0.00000E+00  0.00000E+00  2.97800E+00  0.00000E+00  7.60000E-01  4.80000E-02
+GW     2     1  2.69000E+00  2.80000E-01  7.90000E-01  2.97800E+00  2.80000E-01  7.60000E-01  4.80000E-02
+GW     2     1  2.97800E+00  2.80000E-01  7.60000E-01  3.26500E+00  2.80000E-01  7.30000E-01  4.80000E-02
+GW     2     1  3.26500E+00  2.80000E-01  7.30000E-01  3.55300E+00  2.80000E-01  7.00000E-01  4.80000E-02
+GW     2     1  3.55300E+00  2.80000E-01  7.00000E-01  3.84000E+00  2.80000E-01  6.70000E-01  4.80000E-02
+GW     2     1  2.69000E+00  5.60000E-01  7.90000E-01  2.97800E+00  5.60000E-01  7.60000E-01  4.80000E-02
+GW     2     1  2.97800E+00  5.60000E-01  7.60000E-01  3.26500E+00  5.60000E-01  7.30000E-01  4.80000E-02
+GW     2     1  3.26500E+00  5.60000E-01  7.30000E-01  3.55300E+00  5.60000E-01  7.00000E-01  4.80000E-02
+GW     2     1  3.55300E+00  5.60000E-01  7.00000E-01  3.84000E+00  5.60000E-01  6.70000E-01  4.80000E-02
+GW     2     3  2.97800E+00  0.00000E+00  7.60000E-01  2.97800E+00  8.40000E-01  7.60000E-01  4.80000E-02
+GW     2     3  3.26500E+00  0.00000E+00  7.30000E-01  3.26500E+00  8.40000E-01  7.30000E-01  4.80000E-02
+GW     2     3  3.55300E+00  0.00000E+00  7.00000E-01  3.55300E+00  8.40000E-01  7.00000E-01  4.80000E-02
+GW     3     1  3.84000E+00  0.00000E+00  2.23000E-01  3.84000E+00  2.80000E-01  2.23000E-01  4.80000E-02
+GW     3     1  3.84000E+00  2.80000E-01  2.23000E-01  3.84000E+00  5.60000E-01  2.23000E-01  4.80000E-02
+GW     3     1  3.84000E+00  5.60000E-01  2.23000E-01  3.84000E+00  8.40000E-01  2.23000E-01  4.80000E-02
+GW     3     1  3.84000E+00  0.00000E+00  4.47000E-01  3.84000E+00  2.80000E-01  4.47000E-01  4.80000E-02
+GW     3     1  3.84000E+00  2.80000E-01  4.47000E-01  3.84000E+00  5.60000E-01  4.47000E-01  4.80000E-02
+GW     3     1  3.84000E+00  5.60000E-01  4.47000E-01  3.84000E+00  8.40000E-01  4.47000E-01  4.80000E-02
+GW     3     3  3.84000E+00  2.80000E-01  0.00000E+00  3.84000E+00  2.80000E-01  6.70000E-01  4.80000E-02
+GW     3     3  3.84000E+00  5.60000E-01  0.00000E+00  3.84000E+00  5.60000E-01  6.70000E-01  4.80000E-02
+GW     4     1  4.80000E-01  5.60000E-01  1.25000E+00  7.57000E-01  5.60000E-01  1.25000E+00  4.80000E-02
+GW     4     1  7.57000E-01  5.60000E-01  1.25000E+00  1.03300E+00  5.60000E-01  1.25000E+00  4.80000E-02
+GW     4     1  1.03300E+00  5.60000E-01  1.25000E+00  1.31000E+00  5.60000E-01  1.25000E+00  4.80000E-02
+GW     4     1  1.31000E+00  5.60000E-01  1.25000E+00  1.58700E+00  5.60000E-01  1.25000E+00  4.80000E-02
+GW     4     1  1.58700E+00  5.60000E-01  1.25000E+00  1.86300E+00  5.60000E-01  1.25000E+00  4.80000E-02
+GW     4     1  1.86300E+00  5.60000E-01  1.25000E+00  2.14000E+00  5.60000E-01  1.25000E+00  4.80000E-02
+GW     4     1  4.80000E-01  2.80000E-01  1.25000E+00  7.57000E-01  2.80000E-01  1.25000E+00  4.80000E-02
+GW     4     1  7.57000E-01  2.80000E-01  1.25000E+00  1.03300E+00  2.80000E-01  1.25000E+00  4.80000E-02
+GW     4     1  1.03300E+00  2.80000E-01  1.25000E+00  1.31000E+00  2.80000E-01  1.25000E+00  4.80000E-02
+GW     4     1  1.31000E+00  2.80000E-01  1.25000E+00  1.58700E+00  2.80000E-01  1.25000E+00  4.80000E-02
+GW     4     1  1.58700E+00  2.80000E-01  1.25000E+00  1.86300E+00  2.80000E-01  1.25000E+00  4.80000E-02
+GW     4     1  1.86300E+00  2.80000E-01  1.25000E+00  2.14000E+00  2.80000E-01  1.25000E+00  4.80000E-02
+GW     4     3  7.57000E-01  8.40000E-01  1.25000E+00  7.57000E-01  0.00000E+00  1.25000E+00  4.80000E-02
+GW     4     3  1.03300E+00  8.40000E-01  1.25000E+00  1.03300E+00  0.00000E+00  1.25000E+00  4.80000E-02
+GW     4     3  1.31000E+00  8.40000E-01  1.25000E+00  1.31000E+00  0.00000E+00  1.25000E+00  4.80000E-02
+GW     4     3  1.58700E+00  8.40000E-01  1.25000E+00  1.58700E+00  0.00000E+00  1.25000E+00  4.80000E-02
+GW     4     3  1.86300E+00  8.40000E-01  1.25000E+00  1.86300E+00  0.00000E+00  1.25000E+00  4.80000E-02
+GW     5     1  0.00000E+00  0.00000E+00  2.63000E-01  0.00000E+00  2.80000E-01  2.63000E-01  4.80000E-02
+GW     5     1  0.00000E+00  2.80000E-01  2.63000E-01  0.00000E+00  5.60000E-01  2.63000E-01  4.80000E-02
+GW     5     1  0.00000E+00  5.60000E-01  2.63000E-01  0.00000E+00  8.40000E-01  2.63000E-01  4.80000E-02
+GW     5     1  0.00000E+00  0.00000E+00  5.27000E-01  0.00000E+00  2.80000E-01  5.27000E-01  4.80000E-02
+GW     5     1  0.00000E+00  2.80000E-01  5.27000E-01  0.00000E+00  5.60000E-01  5.27000E-01  4.80000E-02
+GW     5     1  0.00000E+00  5.60000E-01  5.27000E-01  0.00000E+00  8.40000E-01  5.27000E-01  4.80000E-02
+GW     5     3  0.00000E+00  2.80000E-01  0.00000E+00  0.00000E+00  2.80000E-01  7.90000E-01  4.80000E-02
+GW     5     3  0.00000E+00  5.60000E-01  0.00000E+00  0.00000E+00  5.60000E-01  7.90000E-01  4.80000E-02
+GW     9     1 -0.00000E+00  1.68000E+00  5.27000E-01  2.99000E-01  1.68000E+00  5.27000E-01  4.80000E-02
+GW     9     1  2.99000E-01  1.68000E+00  5.27000E-01  5.98000E-01  1.68000E+00  5.27000E-01  4.80000E-02
+GW     9     1  5.98000E-01  1.68000E+00  5.27000E-01  8.97000E-01  1.68000E+00  5.27000E-01  4.80000E-02
+GW     9     1  8.97000E-01  1.68000E+00  5.27000E-01  1.19600E+00  1.68000E+00  5.27000E-01  4.80000E-02
+GW     9     1  1.19600E+00  1.68000E+00  5.27000E-01  1.49400E+00  1.68000E+00  5.27000E-01  4.80000E-02
+GW     9     1  1.49400E+00  1.68000E+00  5.27000E-01  1.79300E+00  1.68000E+00  5.27000E-01  4.80000E-02
+GW     9     1  1.79300E+00  1.68000E+00  5.27000E-01  2.09200E+00  1.68000E+00  5.27000E-01  4.80000E-02
+GW     9     1  2.09200E+00  1.68000E+00  5.27000E-01  2.39100E+00  1.68000E+00  5.27000E-01  4.80000E-02
+GW     9     1  2.39100E+00  1.68000E+00  5.27000E-01  2.69000E+00  1.68000E+00  5.27000E-01  4.80000E-02
+GW     9     1 -0.00000E+00  1.68000E+00  2.63000E-01  2.99000E-01  1.68000E+00  2.63000E-01  4.80000E-02
+GW     9     1  2.99000E-01  1.68000E+00  2.63000E-01  5.98000E-01  1.68000E+00  2.63000E-01  4.80000E-02
+GW     9     1  5.98000E-01  1.68000E+00  2.63000E-01  8.97000E-01  1.68000E+00  2.63000E-01  4.80000E-02
+GW     9     1  8.97000E-01  1.68000E+00  2.63000E-01  1.19600E+00  1.68000E+00  2.63000E-01  4.80000E-02
+GW     9     1  1.19600E+00  1.68000E+00  2.63000E-01  1.49400E+00  1.68000E+00  2.63000E-01  4.80000E-02
+GW     9     1  1.49400E+00  1.68000E+00  2.63000E-01  1.79300E+00  1.68000E+00  2.63000E-01  4.80000E-02
+GW     9     1  1.79300E+00  1.68000E+00  2.63000E-01  2.09200E+00  1.68000E+00  2.63000E-01  4.80000E-02
+GW     9     1  2.09200E+00  1.68000E+00  2.63000E-01  2.39100E+00  1.68000E+00  2.63000E-01  4.80000E-02
+GW     9     1  2.39100E+00  1.68000E+00  2.63000E-01  2.69000E+00  1.68000E+00  2.63000E-01  4.80000E-02
+GW     9     3  2.99000E-01  1.68000E+00  7.90000E-01  2.99000E-01  1.68000E+00 -0.00000E+00  4.80000E-02
+GW     9     3  5.98000E-01  1.68000E+00  7.90000E-01  5.98000E-01  1.68000E+00 -0.00000E+00  4.80000E-02
+GW     9     3  8.97000E-01  1.68000E+00  7.90000E-01  8.97000E-01  1.68000E+00 -0.00000E+00  4.80000E-02
+GW     9     3  1.19600E+00  1.68000E+00  7.90000E-01  1.19600E+00  1.68000E+00 -0.00000E+00  4.80000E-02
+GW     9     3  1.49400E+00  1.68000E+00  7.90000E-01  1.49400E+00  1.68000E+00 -0.00000E+00  4.80000E-02
+GW     9     3  1.79300E+00  1.68000E+00  7.90000E-01  1.79300E+00  1.68000E+00 -0.00000E+00  4.80000E-02
+GW     9     3  2.09200E+00  1.68000E+00  7.90000E-01  2.09200E+00  1.68000E+00 -0.00000E+00  4.80000E-02
+GW     9     3  2.39100E+00  1.68000E+00  7.90000E-01  2.39100E+00  1.68000E+00 -0.00000E+00  4.80000E-02
+GW    10     1  2.69000E+00  1.68000E+00  2.63000E-01  2.97800E+00  1.68000E+00  2.53000E-01  4.80000E-02
+GW    10     1  2.97800E+00  1.68000E+00  2.53000E-01  3.26500E+00  1.68000E+00  2.43000E-01  4.80000E-02
+GW    10     1  3.26500E+00  1.68000E+00  2.43000E-01  3.55300E+00  1.68000E+00  2.33000E-01  4.80000E-02
+GW    10     1  3.55300E+00  1.68000E+00  2.33000E-01  3.84000E+00  1.68000E+00  2.23000E-01  4.80000E-02
+GW    10     1  2.69000E+00  1.68000E+00  5.27000E-01  2.97800E+00  1.68000E+00  5.07000E-01  4.80000E-02
+GW    10     1  2.97800E+00  1.68000E+00  5.07000E-01  3.26500E+00  1.68000E+00  4.87000E-01  4.80000E-02
+GW    10     1  3.26500E+00  1.68000E+00  4.87000E-01  3.55300E+00  1.68000E+00  4.67000E-01  4.80000E-02
+GW    10     1  3.55300E+00  1.68000E+00  4.67000E-01  3.84000E+00  1.68000E+00  4.47000E-01  4.80000E-02
+GW    10     3  2.97800E+00  1.68000E+00 -0.00000E+00  2.97800E+00  1.68000E+00  7.60000E-01  4.80000E-02
+GW    10     3  3.26500E+00  1.68000E+00 -0.00000E+00  3.26500E+00  1.68000E+00  7.30000E-01  4.80000E-02
+GW    10     3  3.55300E+00  1.68000E+00 -0.00000E+00  3.55300E+00  1.68000E+00  7.00000E-01  4.80000E-02
+GW    11     1  3.84000E+00  1.40000E+00  6.70000E-01  3.55300E+00  1.40000E+00  7.00000E-01  4.80000E-02
+GW    11     1  3.55300E+00  1.40000E+00  7.00000E-01  3.26500E+00  1.40000E+00  7.30000E-01  4.80000E-02
+GW    11     1  3.26500E+00  1.40000E+00  7.30000E-01  2.97800E+00  1.40000E+00  7.60000E-01  4.80000E-02
+GW    11     1  2.97800E+00  1.40000E+00  7.60000E-01  2.69000E+00  1.40000E+00  7.90000E-01  4.80000E-02
+GW    11     1  3.84000E+00  1.12000E+00  6.70000E-01  3.55300E+00  1.12000E+00  7.00000E-01  4.80000E-02
+GW    11     1  3.55300E+00  1.12000E+00  7.00000E-01  3.26500E+00  1.12000E+00  7.30000E-01  4.80000E-02
+GW    11     1  3.26500E+00  1.12000E+00  7.30000E-01  2.97800E+00  1.12000E+00  7.60000E-01  4.80000E-02
+GW    11     1  2.97800E+00  1.12000E+00  7.60000E-01  2.69000E+00  1.12000E+00  7.90000E-01  4.80000E-02
+GW    11     3  3.55300E+00  1.68000E+00  7.00000E-01  3.55300E+00  8.40000E-01  7.00000E-01  4.80000E-02
+GW    11     3  3.26500E+00  1.68000E+00  7.30000E-01  3.26500E+00  8.40000E-01  7.30000E-01  4.80000E-02
+GW    11     3  2.97800E+00  1.68000E+00  7.60000E-01  2.97800E+00  8.40000E-01  7.60000E-01  4.80000E-02
+GW    12     1  3.84000E+00  8.40000E-01  2.23000E-01  3.84000E+00  1.12000E+00  2.23000E-01  4.80000E-02
+GW    12     1  3.84000E+00  1.12000E+00  2.23000E-01  3.84000E+00  1.40000E+00  2.23000E-01  4.80000E-02
+GW    12     1  3.84000E+00  1.40000E+00  2.23000E-01  3.84000E+00  1.68000E+00  2.23000E-01  4.80000E-02
+GW    12     1  3.84000E+00  8.40000E-01  4.47000E-01  3.84000E+00  1.12000E+00  4.47000E-01  4.80000E-02
+GW    12     1  3.84000E+00  1.12000E+00  4.47000E-01  3.84000E+00  1.40000E+00  4.47000E-01  4.80000E-02
+GW    12     1  3.84000E+00  1.40000E+00  4.47000E-01  3.84000E+00  1.68000E+00  4.47000E-01  4.80000E-02
+GW    12     3  3.84000E+00  1.12000E+00 -0.00000E+00  3.84000E+00  1.12000E+00  6.70000E-01  4.80000E-02
+GW    12     3  3.84000E+00  1.40000E+00 -0.00000E+00  3.84000E+00  1.40000E+00  6.70000E-01  4.80000E-02
+GW    13     1  4.80000E-01  1.12000E+00  1.25000E+00  7.57000E-01  1.12000E+00  1.25000E+00  4.80000E-02
+GW    13     1  7.57000E-01  1.12000E+00  1.25000E+00  1.03300E+00  1.12000E+00  1.25000E+00  4.80000E-02
+GW    13     1  1.03300E+00  1.12000E+00  1.25000E+00  1.31000E+00  1.12000E+00  1.25000E+00  4.80000E-02
+GW    13     1  1.31000E+00  1.12000E+00  1.25000E+00  1.58700E+00  1.12000E+00  1.25000E+00  4.80000E-02
+GW    13     1  1.58700E+00  1.12000E+00  1.25000E+00  1.86300E+00  1.12000E+00  1.25000E+00  4.80000E-02
+GW    13     1  1.86300E+00  1.12000E+00  1.25000E+00  2.14000E+00  1.12000E+00  1.25000E+00  4.80000E-02
+GW    13     1  4.80000E-01  1.40000E+00  1.25000E+00  7.57000E-01  1.40000E+00  1.25000E+00  4.80000E-02
+GW    13     1  7.57000E-01  1.40000E+00  1.25000E+00  1.03300E+00  1.40000E+00  1.25000E+00  4.80000E-02
+GW    13     1  1.03300E+00  1.40000E+00  1.25000E+00  1.31000E+00  1.40000E+00  1.25000E+00  4.80000E-02
+GW    13     1  1.31000E+00  1.40000E+00  1.25000E+00  1.58700E+00  1.40000E+00  1.25000E+00  4.80000E-02
+GW    13     1  1.58700E+00  1.40000E+00  1.25000E+00  1.86300E+00  1.40000E+00  1.25000E+00  4.80000E-02
+GW    13     1  1.86300E+00  1.40000E+00  1.25000E+00  2.14000E+00  1.40000E+00  1.25000E+00  4.80000E-02
+GW    13     3  7.57000E-01  8.40000E-01  1.25000E+00  7.57000E-01  1.68000E+00  1.25000E+00  4.80000E-02
+GW    13     3  1.03300E+00  8.40000E-01  1.25000E+00  1.03300E+00  1.68000E+00  1.25000E+00  4.80000E-02
+GW    13     3  1.31000E+00  8.40000E-01  1.25000E+00  1.31000E+00  1.68000E+00  1.25000E+00  4.80000E-02
+GW    13     3  1.58700E+00  8.40000E-01  1.25000E+00  1.58700E+00  1.68000E+00  1.25000E+00  4.80000E-02
+GW    13     3  1.86300E+00  8.40000E-01  1.25000E+00  1.86300E+00  1.68000E+00  1.25000E+00  4.80000E-02
+GW    14     1 -0.00000E+00  1.68000E+00  2.63000E-01 -0.00000E+00  1.40000E+00  2.63000E-01  4.80000E-02
+GW    14     1 -0.00000E+00  1.40000E+00  2.63000E-01 -0.00000E+00  1.12000E+00  2.63000E-01  4.80000E-02
+GW    14     1 -0.00000E+00  1.12000E+00  2.63000E-01 -0.00000E+00  8.40000E-01  2.63000E-01  4.80000E-02
+GW    14     1 -0.00000E+00  1.68000E+00  5.27000E-01 -0.00000E+00  1.40000E+00  5.27000E-01  4.80000E-02
+GW    14     1 -0.00000E+00  1.40000E+00  5.27000E-01 -0.00000E+00  1.12000E+00  5.27000E-01  4.80000E-02
+GW    14     1 -0.00000E+00  1.12000E+00  5.27000E-01 -0.00000E+00  8.40000E-01  5.27000E-01  4.80000E-02
+GW    14     3 -0.00000E+00  1.40000E+00 -0.00000E+00 -0.00000E+00  1.40000E+00  7.90000E-01  4.80000E-02
+GW    14     3 -0.00000E+00  1.12000E+00 -0.00000E+00 -0.00000E+00  1.12000E+00  7.90000E-01  4.80000E-02
+GW    18    13  1.31000E+00  8.40000E-01  1.25000E+00  1.31000E+00  8.40000E-01  6.70000E+00  5.00000E-03
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    11     0      0  1.30000E+01  2.00000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0    18     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0     1    16     10  1.31000E+00 -6.60000E+00  5.00000E-01  0.00000E+00  1.00000E+00  1.00000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/20m_quad.nec b/examples/20m_quad.nec
new file mode 100644
index 0000000..3fe6de2
--- /dev/null
+++ b/examples/20m_quad.nec
@@ -0,0 +1,18 @@
+CM --- NEC2 Input File created by xnec2c 1.0-beta ---
+CM 3 Element Quad for 14 MHz
+CM NOTE: This input file uses the modified GS command available
+CM in xnec2c, where scaling is specified for a range of tag numbers.
+CM It is NOT compatible with the standard NEC2 or its translation
+CM to C, nec2c. BEWARE!
+CE --- End Comments ---
+GW     1    13  0.00000E+00  2.72000E+00 -2.72000E+00  0.00000E+00  2.72000E+00  2.72000E+00  2.00000E-03
+GW     2    13 -4.00000E+00  2.72000E+00 -2.72000E+00 -4.00000E+00  2.72000E+00  2.72000E+00  2.00000E-03
+GS     2     2  1.02000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     3    13  3.00000E+00  2.72000E+00 -2.72000E+00  3.00000E+00  2.72000E+00  2.72000E+00  2.00000E-03
+GS     3     3  9.80000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GM     0     3  9.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1    46      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    19     0      0  1.36000E+01  5.00000E-02  1.45000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/23cm_helix+radials.nec b/examples/23cm_helix+radials.nec
new file mode 100644
index 0000000..03c0c4a
--- /dev/null
+++ b/examples/23cm_helix+radials.nec
@@ -0,0 +1,16 @@
+CM  Helix and radial reflector for 1296 MHz
+CE End Comments
+GW     2    10  0.00000E+00  0.00000E+00  0.00000E+00  4.50000E-02  0.00000E+00  0.00000E+00  3.00000E-03
+GR     0     8  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00 -3.00000E-02  0.00000E+00
+GH     1   478  6.70000E-02  1.00000E+00  4.30000E-02  4.30000E-02  4.30000E-02  4.30000E-02  3.00000E-03
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  3.00000E-02  0.00000E+00
+GW     3     7  0.00000E+00  0.00000E+00  0.00000E+00  4.30000E-02  0.00000E+00  3.00000E-02  3.00000E-03
+GM     0     0  9.00000E+01  0.00000E+00  9.00000E+01 -5.00000E-01  0.00000E+00  0.00000E+00  0.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     3     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    11     0      0  1.20000E+03  2.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     1    20     1     17  7.50000E-02  0.00000E+00 -8.00000E+01  7.50000E-02  0.00000E+00  1.00000E+01
+RP     0    37    73   1000  0.00000E+00  0.00000E+00  5.00000E+00  5.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/23cm_helix+screen.nec b/examples/23cm_helix+screen.nec
new file mode 100644
index 0000000..b070195
--- /dev/null
+++ b/examples/23cm_helix+screen.nec
@@ -0,0 +1,17 @@
+CM  Helix and screen reflector for 1296 MHz
+CE End Comments
+GH     1   478  6.70000E-02  1.00000E+00  4.30000E-02  4.30000E-02  4.30000E-02  4.30000E-02  3.00000E-03
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  3.00000E-02  0.00000E+00
+GW     2     7  0.00000E+00  0.00000E+00  0.00000E+00  4.30000E-02  0.00000E+00  3.00000E-02  3.00000E-03
+GW     3    10  8.00000E-02  1.00000E-01  0.00000E+00  8.00000E-02 -1.00000E-01  0.00000E+00  3.00000E-03
+GM     0     8  0.00000E+00  0.00000E+00  0.00000E+00 -2.00000E-02  0.00000E+00  0.00000E+00  3.00000E+00
+GW     4    10  1.00000E-01  8.00000E-02  0.00000E+00 -1.00000E-01  8.00000E-02  0.00000E+00  3.00000E-03
+GM     0     8  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00 -2.00000E-02  0.00000E+00  4.00000E+00
+GM     0     0  9.00000E+01  0.00000E+00  9.00000E+01 -5.00000E-01  0.00000E+00  0.00000E+00  0.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     2     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    11     0      0  1.20000E+03  2.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     1    20     1     17  7.50000E-02  0.00000E+00 -8.00000E+01  7.50000E-02  0.00000E+00  1.00000E+01
+RP     0    37    73   1000  0.00000E+00  0.00000E+00  5.00000E+00  5.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/2m_1:4l-gp_on_pole.nec b/examples/2m_1:4l-gp_on_pole.nec
new file mode 100644
index 0000000..f4e1ffb
--- /dev/null
+++ b/examples/2m_1:4l-gp_on_pole.nec
@@ -0,0 +1,14 @@
+CM --- NEC2 Input File created by xnec2c 1.0-beta ---
+CM Ground Plane for 2m mounted on a 3m pole
+CM It just shows where your RF goes with such a setup ;-)
+CE --- End Comments ---
+GW     1    13  0.00000E+00  0.00000E+00  0.00000E+00 -3.40000E-01  0.00000E+00 -3.40000E-01  7.50000E-03
+GR     0     4  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     2    13  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  4.80000E-01  7.50000E-03
+GW     3    75  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00 -3.00000E+00  2.50000E-02
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.25000E+00  0.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     2     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  1.40000E+02  5.00000E-01  1.50000E+02  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    37    73      0  0.00000E+00  0.00000E+00  5.00000E+00  5.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/2m_5:8l-gp_on_pole.nec b/examples/2m_5:8l-gp_on_pole.nec
new file mode 100644
index 0000000..0c48e5f
--- /dev/null
+++ b/examples/2m_5:8l-gp_on_pole.nec
@@ -0,0 +1,15 @@
+CM --- NEC2 Input File created by xnec2c 1.0-beta ---
+CM 5/8 lambda Ground Plane for 2m mounted on a 3m pole
+CM It just shows where your RF goes with such a setup ;-)
+CE --- End Comments ---
+GW     1    11  0.00000E+00  0.00000E+00  0.00000E+00  4.80000E-01  0.00000E+00  0.00000E+00  7.50000E-03
+GR     0     4  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     2    32  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.28000E+00  7.50000E-03
+GW     3    75  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00 -3.00000E+00  2.50000E-02
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.25000E+00  0.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     2     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  1.40000E+02  5.00000E-01  1.50000E+02  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37      0  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
+LD     1     2     1      1  1.00000E+06  1.50000E-07  1.00000E-12  0.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/2m_EME_ant.nec b/examples/2m_EME_ant.nec
new file mode 100644
index 0000000..4b1d8ca
--- /dev/null
+++ b/examples/2m_EME_ant.nec
@@ -0,0 +1,23 @@
+CM --- NEC2 Input File created by xnec2c-2.0-beta ---
+CM EME antenna for 2m, with extended double Zeppelin driven element
+CM and reflector. Director is traditional Yagi sized in length.
+CM Feeding is done with a balanced line harness, not shown here.
+CE --- End Comments ---
+GW     1    55  1.39500E+00  0.00000E+00  0.00000E+00 -1.39500E+00  0.00000E+00  0.00000E+00  7.50000E-03
+GW     2    61  1.52500E+00 -2.60000E-01  0.00000E+00 -1.52500E+00 -2.60000E-01  0.00000E+00  7.50000E-03
+GW     3    17  4.20000E-01  2.50000E-01  0.00000E+00 -4.20000E-01  2.50000E-01  0.00000E+00  7.50000E-03
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00 -2.05000E+00  0.00000E+00 -2.40000E+00  0.00000E+00
+GM     3     3  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.60000E+00  0.00000E+00
+GM    12     1  0.00000E+00  0.00000E+00  0.00000E+00  4.10000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1    28      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     4    28      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     7    28      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0    10    28      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0    13    28      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0    16    28      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0    19    28      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0    22    28      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    11     0      0  1.44000E+02  2.00000E-01  1.46000E+02  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    73    37      0  0.00000E+00  0.00000E+00  2.50000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/2m_bigwheel.nec b/examples/2m_bigwheel.nec
new file mode 100644
index 0000000..c5034a2
--- /dev/null
+++ b/examples/2m_bigwheel.nec
@@ -0,0 +1,17 @@
+CM --- NEC2 Input File created by xnec2c 0.9-beta ---
+CM Big Wheel horizontally polarized omni antenna for 2m
+CE --- End Comments ---
+GA     1    21  6.65000E-01  0.00000E+00  7.00000E+01  3.00000E-03  2.06474E+00  0.00000E+00  0.00000E+00
+GM     0     0  9.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     2    17  0.00000E+00  0.00000E+00  1.00000E-02  6.65000E-01  0.00000E+00  0.00000E+00  3.00000E-03
+GM     0     0  0.00000E+00  0.00000E+00  7.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     3    17  0.00000E+00  0.00000E+00 -1.00000E-02  6.65000E-01  0.00000E+00  0.00000E+00  3.00000E-03
+GR     0     4  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     4     1  0.00000E+00  0.00000E+00 -1.00000E-02  0.00000E+00  0.00000E+00  1.00000E-02  3.00000E-03
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     4     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  1.44000E+02  2.00000E-01  1.48000E+02  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0    15     1     15 -1.40000E+00  0.00000E+00 -1.40000E+00  2.00000E-01  0.00000E+00  2.00000E-01
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/2m_halo_stack.nec b/examples/2m_halo_stack.nec
new file mode 100644
index 0000000..2c39cbe
--- /dev/null
+++ b/examples/2m_halo_stack.nec
@@ -0,0 +1,15 @@
+CM --- NEC2 Input File created by xnec2c-2.0-beta ---
+CM A stack of two halo antennas for 2m. Note that the 
+CM circumference of the halos is .625l, not 0.5l
+CE --- End Comments ---
+GA     1    31  1.95000E-01  2.00000E+00  3.58000E+02  3.00000E-03  1.95551E+00  0.00000E+00  0.00000E+00
+GM     0     0  9.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  7.00000E-01  0.00000E+00
+GX     1     1  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     3     1 -1.97000E-01 -2.00000E-02  0.00000E+00 -1.97000E-01  2.00000E-02  0.00000E+00  3.00000E-03
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     3     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     1    16     3      1  6.00000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     2    16     3      1  6.00000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  1.40000E+02  5.00000E-01  1.50000E+02  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    37    37      0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/2m_sqr_halo.nec b/examples/2m_sqr_halo.nec
new file mode 100644
index 0000000..c926c27
--- /dev/null
+++ b/examples/2m_sqr_halo.nec
@@ -0,0 +1,12 @@
+CM --- NEC2 Input File created by xnec2c-2.0-beta ---
+CM A square halo antenna for 2m. Circumference is 0.625l
+CE --- End Comments ---
+GW     1     7 -1.62000E-01  1.62000E-01  0.00000E+00  1.62000E-01  1.62000E-01  0.00000E+00  6.00000E-03
+GM     1     2  0.00000E+00  0.00000E+00  9.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     4     4  1.62000E-01  1.62000E-01  0.00000E+00  1.62000E-01  1.00000E-02  0.00000E+00  6.00000E-03
+GW     5     4  1.62000E-01 -1.62000E-01  0.00000E+00  1.62000E-01 -1.00000E-02  0.00000E+00  6.00000E-03
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     2     4      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  1.40000E+02  5.00000E-01  1.50000E+02  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    37    37      0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/2m_sqr_halo_stack.nec b/examples/2m_sqr_halo_stack.nec
new file mode 100644
index 0000000..ce116b0
--- /dev/null
+++ b/examples/2m_sqr_halo_stack.nec
@@ -0,0 +1,17 @@
+CM --- NEC2 Input File created by xnec2c-2.0-beta ---
+CM A stack of two square halos for 2m. Circumference is 0.625l
+CE --- End Comments ---
+GW     1     7 -1.62000E-01  1.62000E-01  0.00000E+00  1.62000E-01  1.62000E-01  0.00000E+00  6.00000E-03
+GM     1     2  0.00000E+00  0.00000E+00  9.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     4     4  1.62000E-01  1.62000E-01  0.00000E+00  1.62000E-01  1.00000E-02  0.00000E+00  6.00000E-03
+GW     5     4  1.62000E-01 -1.62000E-01  0.00000E+00  1.62000E-01 -1.00000E-02  0.00000E+00  6.00000E-03
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  6.00000E-01  0.00000E+00
+GX     6     1  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW    13     1 -1.62000E-01 -2.00000E-02  0.00000E+00 -1.62000E-01  2.00000E-02  0.00000E+00  6.00000E-03
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0    13     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  1.40000E+02  5.00000E-01  1.50000E+02  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    37    37      0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+TL    13     1     2      4  3.00000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL    13     1     8      4  3.00000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/2m_xpol_omni.nec b/examples/2m_xpol_omni.nec
new file mode 100644
index 0000000..b5ab17a
--- /dev/null
+++ b/examples/2m_xpol_omni.nec
@@ -0,0 +1,12 @@
+CM Cross-polarized omni-directional antenna for 144 MHz
+CE --- End Comments ---
+GW     1    20  0.00000E+00  0.00000E+00  2.00000E-02  6.92700E-01  2.51900E-01  2.61800E-01  3.00000E-03
+GW     2    20  0.00000E+00  0.00000E+00 -2.00000E-02  6.92700E-01 -2.51900E-01 -2.61800E-01  3.00000E-03
+GW     3    20  6.92700E-01  2.51900E-01  2.61800E-01  6.92700E-01 -2.51900E-01 -2.61800E-01  3.00000E-03
+GR     3     4  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW    13     1  0.00000E+00  0.00000E+00 -2.00000E-02  0.00000E+00  0.00000E+00  2.00000E-02  3.00000E-03
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0    13     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  1.44000E+02  1.00000E-01  1.46000E+02  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/2m_xpol_omni_stack.nec b/examples/2m_xpol_omni_stack.nec
new file mode 100644
index 0000000..5d34eed
--- /dev/null
+++ b/examples/2m_xpol_omni_stack.nec
@@ -0,0 +1,17 @@
+CM Vertically-stacked omni-directional RH-polarized anrtenna for 2m
+CE End Comments
+GW     1    20  0.00000E+00  0.00000E+00  2.00000E-02  6.92700E-01  2.51900E-01  2.61800E-01  3.00000E-03
+GW     2    20  0.00000E+00  0.00000E+00 -2.00000E-02  6.92700E-01 -2.51900E-01 -2.61800E-01  3.00000E-03
+GW     3    20  6.92700E-01  2.51900E-01  2.61800E-01  6.92700E-01 -2.51900E-01 -2.61800E-01  3.00000E-03
+GR     3     4  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW    13     1  0.00000E+00  0.00000E+00 -2.00000E-02  0.00000E+00  0.00000E+00  2.00000E-02  3.00000E-03
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00 -7.50000E-01  0.00000E+00
+GM    13     1  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.50000E+00  0.00000E+00
+GW    27     1  0.00000E+00  2.00000E-02  0.00000E+00  0.00000E+00 -2.00000E-02  0.00000E+00  1.00000E-02
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0    27     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL    13     1    27      1  5.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL    27     1    26      1  5.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  1.40000E+02  5.00000E-01  1.50000E+02  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37  1000  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/2m_yagi.nec b/examples/2m_yagi.nec
new file mode 100644
index 0000000..6250952
--- /dev/null
+++ b/examples/2m_yagi.nec
@@ -0,0 +1,17 @@
+CM  Yagi for 145 MHz
+CE End Comments
+GW     1    25  0.00000E+00  5.09000E-01  0.00000E+00  0.00000E+00 -5.09000E-01  0.00000E+00  5.00000E-03
+GW     2    25  4.00000E-01  4.84000E-01  0.00000E+00  4.00000E-01 -4.84000E-01  0.00000E+00  5.00000E-03
+GW     3    22  7.00000E-01  4.59000E-01  0.00000E+00  7.00000E-01 -4.59000E-01  0.00000E+00  5.00000E-03
+GW     4    22  1.10000E+00  4.50000E-01  0.00000E+00  1.10000E+00 -4.50000E-01  0.00000E+00  5.00000E-03
+GW     5    22  1.50000E+00  4.40000E-01  0.00000E+00  1.50000E+00 -4.40000E-01  0.00000E+00  5.00000E-03
+GW     6    21  1.90000E+00  4.30000E-01  0.00000E+00  1.90000E+00 -4.30000E-01  0.00000E+00  5.00000E-03
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00 -1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  1.40000E+02  5.00000E-01  1.50000E+02  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     2    13      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+LD     5     0     0      0  3.70000E+07  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0    20    15      1 -1.40000E+00 -1.40000E+00  5.00000E-02  2.00000E-01  2.00000E-01  0.00000E+00
+RP     0    37    73   1000  0.00000E+00  0.00000E+00  5.00000E+00  5.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/30-80m_inv_L.nec b/examples/30-80m_inv_L.nec
new file mode 100644
index 0000000..31fc3cd
--- /dev/null
+++ b/examples/30-80m_inv_L.nec
@@ -0,0 +1,10 @@
+CM --- NEC2 Input File created by xnec2c 2.4 ---
+CE --- End Comments ---
+GW     1    31  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.68000E+01  1.50000E-03
+GW     2    18  0.00000E+00  0.00000E+00  1.68000E+01  9.00000E+00  0.00000E+00  1.68000E+01  1.50000E-03
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    46     0      0  3.00000E+00  2.00000E-01  1.20000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+GN     1     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37      0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/35-55MHz_logper.nec b/examples/35-55MHz_logper.nec
new file mode 100644
index 0000000..fc3214d
--- /dev/null
+++ b/examples/35-55MHz_logper.nec
@@ -0,0 +1,35 @@
+CM  12 ELEMENT LOG PERIODIC ANTENNA IN FREE SPACE.
+CM  78 SEGMENTS. SIGMA=D/L RECEIVING AND TRANS. PATTERNS.
+CM  DIPOLE LENGTH TO DIAMETER RATIO=150.
+CM  TAU=0.93, SIGMA=0.70, BOOM IMPEDANCE=50. OHMS.
+CE End Comments
+GW     1     9  0.00000E+00 -1.00000E+00  0.00000E+00  0.00000E+00  1.00000E+00  0.00000E+00  7.00000E-03
+GW     2     9 -7.53000E-01 -1.07500E+00  0.00000E+00 -7.53000E-01  1.07500E+00  0.00000E+00  7.00000E-03
+GW     3     9 -1.56200E+00 -1.15600E+00  0.00000E+00 -1.56200E+00  1.15600E+00  0.00000E+00  8.00000E-03
+GW     4    11 -2.43200E+00 -1.24300E+00  0.00000E+00 -2.43200E+00  1.24300E+00  0.00000E+00  8.00000E-03
+GW     5    11 -3.36800E+00 -1.33700E+00  0.00000E+00 -3.36800E+00  1.33700E+00  0.00000E+00  9.00000E-03
+GW     6    11 -4.37400E+00 -1.43700E+00  0.00000E+00 -4.37400E+00  1.43700E+00  0.00000E+00  1.00000E-02
+GW     7    13 -5.45600E+00 -1.54600E+00  0.00000E+00 -5.45600E+00  1.54600E+00  0.00000E+00  1.00000E-02
+GW     8    13 -6.62000E+00 -1.66200E+00  0.00000E+00 -6.62000E+00  1.66200E+00  0.00000E+00  1.10000E-02
+GW     9    15 -7.87000E+00 -1.78700E+00  0.00000E+00 -7.87000E+00  1.78700E+00  0.00000E+00  1.20000E-02
+GW    10    15 -9.21600E+00 -1.92100E+00  0.00000E+00 -9.21600E+00  1.92100E+00  0.00000E+00  1.30000E-02
+GW    11    17 -1.06600E+01 -2.06600E+00  0.00000E+00 -1.06600E+01  2.06600E+00  0.00000E+00  1.40000E-02
+GW    12    17 -1.22200E+01 -2.22200E+00  0.00000E+00 -1.22200E+01  2.22200E+00  0.00000E+00  1.50000E-02
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  6.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  3.50000E+01  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+LD     5     0     0      0  3.70000E+07  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     1     5     2      5 -5.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     2     5     3      5 -5.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     3     5     4      6 -5.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     4     6     5      6 -5.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     5     6     6      6 -5.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     6     6     7      7 -5.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     7     7     8      7 -5.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     8     7     9      8 -5.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     9     8    10      8 -5.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL    10     8    11      9 -5.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL    11     9    12      9 -5.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  2.00000E-02  0.00000E+00
+EX     0     1     5      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/40m-moxon.nec b/examples/40m-moxon.nec
new file mode 100644
index 0000000..f869152
--- /dev/null
+++ b/examples/40m-moxon.nec
@@ -0,0 +1,19 @@
+CM --- NEC2 Input File created by xnec2c-1.2 ---
+CM Moxon antenna for 40m
+CE --- End Comments ---
+GW     1    19  2.56000E+00  0.00000E+00  2.00000E+00  2.56000E+00  0.00000E+00  1.74000E+01  1.50000E-03
+GW     2     3  2.56000E+00  0.00000E+00  2.00000E+00  1.80000E-01  0.00000E+00  2.00000E+00  1.50000E-03
+GW     3     3  2.56000E+00  0.00000E+00  1.74000E+01  1.80000E-01  0.00000E+00  1.74000E+01  1.50000E-03
+GW     4     1  1.80000E-01  0.00000E+00  9.50000E+00  1.80000E-01  0.00000E+00  9.90000E+00  1.50000E-02
+GR    10     3  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     4     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     1    10     4      1  5.00000E+01  6.20000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL    11    10    14      1  5.00000E+01  6.20000E+00  0.00000E+00  0.00000E+00  1.00000E+04  0.00000E+00
+TL    21    10    24      1  5.00000E+01  6.20000E+00  0.00000E+00  0.00000E+00  1.00000E+04  0.00000E+00
+FR     0    21     0      0  6.80000E+00  2.00000E-02  7.20000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0    10     1     10 -1.35000E+00  0.00000E+00 -1.35000E+00  3.00000E-01  0.00000E+00  3.00000E-01
+RP     0    19    37     10  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+GN     2     0     0      0  1.20000E+01  2.00000E-03  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/6-17m_bipyramid.nec b/examples/6-17m_bipyramid.nec
new file mode 100644
index 0000000..c90d9d0
--- /dev/null
+++ b/examples/6-17m_bipyramid.nec
@@ -0,0 +1,19 @@
+CM --- NEC2 Input File created by xnec2c 1.0-beta ---
+CM Skeleton bi-pyramid antenna for 14-52 MHz
+CE --- End Comments ---
+GW     1    18  1.34400E+00  0.00000E+00  1.62400E+00  0.00000E+00  0.00000E+00  1.12000E-01  3.00000E-03
+GW     2    18  1.34400E+00  0.00000E+00  1.62400E+00  0.00000E+00  0.00000E+00  3.13600E+00  3.00000E-03
+GW     3    12  1.34400E+00  0.00000E+00  1.62400E+00  0.00000E+00  0.00000E+00  1.62400E+00  7.50000E-03
+GW     4    17  1.34400E+00  0.00000E+00  1.62400E+00  0.00000E+00  1.34400E+00  1.62400E+00  3.00000E-03
+GR     0     4  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     5    13  0.00000E+00  0.00000E+00  1.62400E+00  0.00000E+00  0.00000E+00  1.12000E-01  1.50000E-02
+GW     6    13  0.00000E+00  0.00000E+00  1.62400E+00  0.00000E+00  0.00000E+00  3.13600E+00  1.50000E-02
+GW     7     1  0.00000E+00  0.00000E+00  1.12000E-01  0.00000E+00  0.00000E+00  0.00000E+00  1.50000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     7     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    41     0      0  1.40000E+01  1.00000E+00  5.40000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0    10     1     10 -4.50000E+00  0.00000E+00  5.00000E-01  1.00000E+00  0.00000E+00  1.00000E+00
+RP     4    19    37      0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+GN     1     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/6-20m_inv_cone.nec b/examples/6-20m_inv_cone.nec
new file mode 100644
index 0000000..d2d9414
--- /dev/null
+++ b/examples/6-20m_inv_cone.nec
@@ -0,0 +1,15 @@
+CM --- NEC2 Input File created by xnec2c 1.0-beta ---
+CM Skeleton bi-pyramid antenna for 14-52 MHz
+CE --- End Comments ---
+GW     1    25  0.00000E+00  0.00000E+00  1.12000E-01  1.06000E+00  0.00000E+00  3.00000E+00  3.00000E-03
+GW     2     9  5.30000E-01  9.17980E-01  3.00000E+00  1.06000E+00  0.00000E+00  3.00000E+00  3.00000E-03
+GW     3     9  0.00000E+00  0.00000E+00  3.00000E+00  1.06000E+00  0.00000E+00  3.00000E+00  3.00000E-03
+GR     0     6  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     4     1  0.00000E+00  0.00000E+00  1.12000E-01  0.00000E+00  0.00000E+00  0.00000E+00  1.25000E-02
+GW     5    25  0.00000E+00  0.00000E+00  1.12000E-01  0.00000E+00  0.00000E+00  3.00000E+00  1.25000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     4     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    39     0      0  1.40000E+01  1.00000E+00  5.20000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+RP     4    19    37      0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+GN     1     0     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/6m_big-square_stack.nec b/examples/6m_big-square_stack.nec
new file mode 100644
index 0000000..f26696f
--- /dev/null
+++ b/examples/6m_big-square_stack.nec
@@ -0,0 +1,20 @@
+CM --- NEC2 Input File created by xnec2c 0.9-beta ---
+CM Big Square horizontally polarized omni antenna for 2m
+CE --- End Comments ---
+GW     1    16  0.00000E+00  0.00000E+00  5.00000E-02  1.75800E+00  0.00000E+00  0.00000E+00  6.00000E-03
+GM     0     0  0.00000E+00  0.00000E+00  8.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     2    16  0.00000E+00  0.00000E+00 -5.00000E-02  1.75800E+00  0.00000E+00  0.00000E+00  6.00000E-03
+GW     3    20  3.05300E-01  1.73800E+00  0.00000E+00  1.75800E+00  0.00000E+00  0.00000E+00  6.00000E-03
+GR     0     4  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     4     1  0.00000E+00  0.00000E+00 -5.00000E-02  0.00000E+00  0.00000E+00  5.00000E-02  6.00000E-03
+GM     4     1  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  3.00000E+00  0.00000E+00
+GW     9     1  5.00000E-02  0.00000E+00  1.50000E+00 -5.00000E-02  0.00000E+00  1.50000E+00  6.00000E-03
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  3.00000E+00  0.00000E+00
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     9     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     9     1     4      1  4.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     9     1     8      1  4.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  4.50000E+01  5.00000E-01  5.50000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+GN     0     0     0      0  1.20000E+01  1.00000E-02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/6m_bigwheel-stack.nec b/examples/6m_bigwheel-stack.nec
new file mode 100644
index 0000000..44ad45e
--- /dev/null
+++ b/examples/6m_bigwheel-stack.nec
@@ -0,0 +1,21 @@
+CM --- NEC2 Input File created by xnec2c 0.9-beta ---
+CM Big Wheel horizontally polarized omni antenna for 2m
+CE --- End Comments ---
+GA     1    21  1.85000E+00  0.00000E+00  7.00000E+01  6.00000E-03  1.97451E+00  0.00000E+00  0.00000E+00
+GM     0     0  9.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     2    17  0.00000E+00  0.00000E+00  5.00000E-02  1.85000E+00  0.00000E+00  0.00000E+00  6.00000E-03
+GM     0     0  0.00000E+00  0.00000E+00  7.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     3    17  0.00000E+00  0.00000E+00 -5.00000E-02  1.85000E+00  0.00000E+00  0.00000E+00  6.00000E-03
+GR     0     4  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW     4     1  0.00000E+00  0.00000E+00 -5.00000E-02  0.00000E+00  0.00000E+00  5.00000E-02  6.00000E-03
+GM     4     1  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  3.00000E+00  0.00000E+00
+GW     9     1  5.00000E-02  0.00000E+00  1.50000E+00 -5.00000E-02  0.00000E+00  1.50000E+00  6.00000E-03
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  3.00000E+00  0.00000E+00
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     9     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     9     1     4      1  5.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+TL     9     1     8      1  5.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  4.50000E+01  5.00000E-01  5.50000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+GN     0     0     0      0  1.20000E+01  1.00000E-02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/70cm_collinear.nec b/examples/70cm_collinear.nec
new file mode 100644
index 0000000..cfd6f0b
--- /dev/null
+++ b/examples/70cm_collinear.nec
@@ -0,0 +1,26 @@
+CM  432 MHz stacked Extended Double Zeppelin with two
+CM  reflectors and directors mounted on driven elements
+CE End Comments
+GW     1    21  0.00000E+00 -2.31000E-01  3.42000E-01  0.00000E+00  2.31000E-01  3.42000E-01  7.50000E-03
+GW     2     7  0.00000E+00 -3.85000E-01  3.42000E-01  0.00000E+00 -2.31000E-01  3.42000E-01  7.50000E-03
+GW     3     7  0.00000E+00  3.85000E-01  3.42000E-01  0.00000E+00  2.31000E-01  3.42000E-01  7.50000E-03
+GW     4     6 -1.80000E-01 -2.31000E-01  3.42000E-01  0.00000E+00 -2.31000E-01  3.42000E-01  5.00000E-03
+GW     5     6 -1.80000E-01  2.31000E-01  3.42000E-01  0.00000E+00  2.31000E-01  3.42000E-01  5.00000E-03
+GW     6     6  0.00000E+00 -2.31000E-01  3.42000E-01  1.00000E-01 -2.31000E-01  3.42000E-01  5.00000E-03
+GW     7     6  0.00000E+00  2.31000E-01  3.42000E-01  1.00000E-01  2.31000E-01  3.42000E-01  5.00000E-03
+GW     8     7 -1.80000E-01 -3.87000E-01  3.42000E-01 -1.80000E-01 -2.31000E-01  3.42000E-01  3.00000E-03
+GW     9     7 -1.80000E-01 -2.31000E-01  3.42000E-01 -1.80000E-01 -7.50000E-02  3.42000E-01  3.00000E-03
+GW    10     7 -1.80000E-01  3.87000E-01  3.42000E-01 -1.80000E-01  2.31000E-01  3.42000E-01  3.00000E-03
+GW    11     7 -1.80000E-01  2.31000E-01  3.42000E-01 -1.80000E-01  7.50000E-02  3.42000E-01  3.00000E-03
+GW    12     7  1.00000E-01 -3.77000E-01  3.42000E-01  1.00000E-01 -2.31000E-01  3.42000E-01  3.00000E-03
+GW    13     7  1.00000E-01 -2.31000E-01  3.42000E-01  1.00000E-01 -8.50000E-02  3.42000E-01  3.00000E-03
+GW    14     7  1.00000E-01  3.77000E-01  3.42000E-01  1.00000E-01  2.31000E-01  3.42000E-01  3.00000E-03
+GW    15     7  1.00000E-01  2.31000E-01  3.42000E-01  1.00000E-01  8.50000E-02  3.42000E-01  3.00000E-03
+GX    15     1  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EK     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1    11      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0    16    11      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    31     0      0  4.20000E+02  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    37    73   1000  0.00000E+00  0.00000E+00  5.00000E+00  5.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/80m_zepp.nec b/examples/80m_zepp.nec
new file mode 100644
index 0000000..a48588a
--- /dev/null
+++ b/examples/80m_zepp.nec
@@ -0,0 +1,12 @@
+CM --- NEC2 Input File created by xnec2c 1.1-beta ---
+CM Balloon Vertical for 80m. 1/2 wave fed with 1/4 wave feeder.
+CE --- End Comments ---
+GW     1    27  0.00000E+00  0.00000E+00  2.00000E+01  0.00000E+00  0.00000E+00  6.05000E+01  1.50000E-03
+GW     2     1 -2.00000E-01  0.00000E+00  5.00000E-01  2.00000E-01  0.00000E+00  5.00000E-01  1.50000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     2     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    21     0      0  3.00000E+00  5.00000E-02  4.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37      0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+TL     1     1     2      1  4.50000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     2     0     0      0  1.20000E+01  5.00000E-03  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/T12m-H24m.nec b/examples/T12m-H24m.nec
new file mode 100644
index 0000000..10e5195
--- /dev/null
+++ b/examples/T12m-H24m.nec
@@ -0,0 +1,15 @@
+CM --- NEC2 Input File created by xnec2c 2.4 ---
+CE --- End Comments ---
+GW     2     1  0.00000E+00  6.00000E+00  2.40000E+01  1.50000E+00  6.00000E+00  2.40000E+01  2.50000E-03
+GX     0   100  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GM     0     2  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00 -6.00000E+00  0.00000E+00  2.00000E+00
+GW     3     6 -1.50000E+00  0.00000E+00  2.40000E+01 -1.50000E+00  6.00000E+00  2.40000E+01  2.50000E-03
+GM     0     1  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00 -6.00000E+00  0.00000E+00  3.00000E+00
+GM     0     2  0.00000E+00  0.00000E+00  0.00000E+00  1.50000E+00  0.00000E+00  0.00000E+00  3.00000E+00
+GW     1    12  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  2.40000E+01  2.50000E-03
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     0    16     0      0  1.20000E+01  1.00000E-02  2.00000E+01  5.00000E-03  0.00000E+00  0.00000E+00
+FR     0    21     0      0  1.00000E+00  5.00000E-02  2.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37      0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/T20m-H18m.nec b/examples/T20m-H18m.nec
new file mode 100644
index 0000000..1f78cec
--- /dev/null
+++ b/examples/T20m-H18m.nec
@@ -0,0 +1,16 @@
+CM --- NEC2 Input File created by xnec2c 2.4 ---
+CM T antenna for the high end of the MW band
+CE --- End Comments ---
+GW     2     1  0.00000E+00  1.00000E+01  1.80000E+01  1.50000E+00  1.00000E+01  1.80000E+01  2.50000E-03
+GX     0   100  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GM     0     2  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00 -1.00000E+01  0.00000E+00  2.00000E+00
+GW     3     6 -1.50000E+00  0.00000E+00  1.80000E+01 -1.50000E+00  1.00000E+01  1.80000E+01  2.50000E-03
+GM     0     1  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00 -1.00000E+01  0.00000E+00  3.00000E+00
+GM     0     2  0.00000E+00  0.00000E+00  0.00000E+00  1.50000E+00  0.00000E+00  0.00000E+00  3.00000E+00
+GW     1    12  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.80000E+01  2.50000E-03
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     0    16     0     0  1.20000E+01  1.00000E-02  2.00000E+01  5.00000E-03  0.00000E+00  0.00000E+00
+FR     0    21     0      0  1.00000E+00  5.00000E-02  2.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37      0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/airplane.nec b/examples/airplane.nec
new file mode 100644
index 0000000..5d5800e
--- /dev/null
+++ b/examples/airplane.nec
@@ -0,0 +1,264 @@
+CM Jet plane with trailing wire antenna
+CE End Comments
+GW     1     1  7.69703E+00 -3.05237E-01  1.51819E+00  7.69703E+00  7.00000E-06  1.51819E+00  1.00000E-02
+GW     2     1  1.28670E+01  1.66028E-01  2.99715E+00  1.28695E+01  0.00000E+00  2.99701E+00  1.00000E-02
+GW     3     1  1.69070E+01  0.00000E+00  2.77578E+00  1.28670E+01  1.66030E-01  2.99715E+00  1.00000E-02
+GW     4     1  1.50463E+01  2.06341E-01  2.77500E+00  1.69070E+01  0.00000E+00  2.77578E+00  1.00000E-02
+GW     5     1  1.69070E+01  0.00000E+00  2.77578E+00  1.28722E+01  4.47423E-01  2.41615E+00  1.00000E-02
+GW     6     1  1.69070E+01  0.00000E+00  2.77578E+00  1.28473E+01  1.39100E-01  2.09967E+00  1.00000E-02
+GW     7     1  1.28473E+01  1.39100E-01  2.09967E+00  1.28473E+01 -1.39100E-01  2.09967E+00  1.00000E-02
+GW     8     1  1.12287E+01  2.33350E-01  3.08692E+00  1.12287E+01 -2.33350E-01  3.08692E+00  1.00000E-02
+GW     9     1  1.12345E+01  1.91124E-01  1.91759E+00  1.12345E+01 -1.91124E-01  1.91759E+00  1.00000E-02
+GW    10     1  9.52535E+00  3.03356E-01  3.18025E+00  9.52535E+00 -3.03356E-01  3.18025E+00  1.00000E-02
+GW    11     1  7.69648E+00  3.78515E-01  3.28047E+00  7.69648E+00 -3.78515E-01  3.28047E+00  1.00000E-02
+GW    12     1  9.52806E+00 -2.46171E-01  1.72492E+00  9.52806E+00  2.46171E-01  1.72492E+00  1.00000E-02
+GW    13     1  6.30906E+00 -3.50010E-01  1.36149E+00  6.30906E+00  3.50010E-01  1.36149E+00  1.00000E-02
+GW    14     1  6.30472E+00  3.78515E-01  3.47929E+00  6.30472E+00 -3.78515E-01  3.47929E+00  1.00000E-02
+GW    15     1  5.42155E+00 -3.78515E-01  3.60546E+00  5.42155E+00  3.78515E-01  3.60546E+00  1.00000E-02
+GW    16     2  4.16367E+00 -3.78510E-01  3.78515E+00  4.16367E+00  3.78510E-01  3.78515E+00  1.00000E-02
+GW    17     1  5.42539E+00  3.78515E-01  1.26172E+00  5.42539E+00 -3.78515E-01  1.26172E+00  1.00000E-02
+GW    18     1  4.16367E+00 -3.78515E-01  1.26172E+00  4.16367E+00  3.78515E-01  1.26172E+00  1.00000E-02
+GW    19     1  2.77578E+00 -3.15430E-01  3.65898E+00  2.77578E+00  3.15430E-01  3.65898E+00  1.00000E-02
+GW    20     1  3.40664E+00  3.78515E-01  1.26172E+00  3.40664E+00 -3.78515E-01  1.26172E+00  1.00000E-02
+GW    21     1  2.08183E+00  2.52344E-01  1.38789E+00  2.08183E+00 -2.52344E-01  1.38789E+00  1.00000E-02
+GW    22     1  7.57031E-01  1.26172E-01  1.51406E+00  7.57031E-01 -1.26172E-01  1.51406E+00  1.00000E-02
+GW    23     1  1.76641E+00 -2.52344E-01  3.02812E+00  1.76641E+00  2.52344E-01  3.02812E+00  1.00000E-02
+GW    24     1  7.57031E-01  1.89258E-01  2.77578E+00  7.57031E-01 -1.89258E-01  2.77578E+00  1.00000E-02
+GW    25     1  0.00000E+00  1.26172E-01  2.01875E+00  0.00000E+00 -1.26172E-01  2.01875E+00  1.00000E-02
+GW    26     1  1.69070E+01  0.00000E+00  2.77578E+00  1.28722E+01 -4.47423E-01  2.41615E+00  1.00000E-02
+GW    27     1  1.69070E+01  0.00000E+00  2.77578E+00  1.28473E+01 -1.39100E-01  2.09967E+00  1.00000E-02
+GW    28     1  1.28722E+01 -4.47423E-01  2.41615E+00  1.28795E+01 -4.46618E-01  2.77409E+00  1.00000E-02
+GW    29     1  1.12180E+01 -6.30859E-01  2.26871E+00  1.12180E+01 -6.30859E-01  2.77339E+00  1.00000E-02
+GW    30     1  9.52599E+00 -7.17719E-01  2.78449E+00  9.52619E+00 -7.17708E-01  2.14953E+00  1.00000E-02
+GW    31     1  7.69637E+00 -8.11639E-01  2.79649E+00  7.69912E+00 -8.11498E-01  2.02082E+00  1.00000E-02
+GW    32     1  6.30227E+00 -8.83203E-01  2.80563E+00  6.30227E+00 -8.83203E-01  1.92243E+00  1.00000E-02
+GW    33     1  5.42575E+00 -8.83203E-01  1.90898E+00  5.42580E+00 -8.44875E-01  2.80628E+00  1.00000E-02
+GW    34     1  4.15950E+00 -8.83203E-01  1.88957E+00  4.16009E+00 -8.12425E-01  2.80627E+00  1.00000E-02
+GW    35     1  3.21862E+00 -8.83203E-01  2.57677E+00  3.21778E+00 -8.83203E-01  1.87512E+00  1.00000E-02
+GW    36     1  6.30228E-01 -6.30859E-01  2.29931E+00  7.57031E-01 -1.89258E-01  2.77578E+00  1.00000E-02
+GW    37     1  2.01673E+00 -8.83203E-01  2.48757E+00  6.30228E-01 -6.30859E-01  2.29931E+00  1.00000E-02
+GW    38     1  2.01673E+00 -8.83203E-01  1.85671E+00  2.01673E+00 -8.83203E-01  2.48757E+00  1.00000E-02
+GW    39     1  0.00000E+00 -1.26172E-01  2.01875E+00  7.57031E-01 -1.89258E-01  2.77578E+00  1.00000E-02
+GW    40     1  4.15950E+00 -8.83203E-01  1.88957E+00  5.42575E+00 -8.83203E-01  1.90898E+00  1.00000E-02
+GW    41     1  5.42539E+00 -3.78515E-01  1.26172E+00  4.16367E+00 -3.78515E-01  1.26172E+00  1.00000E-02
+GW    42     1  4.16367E+00 -3.78515E-01  1.26172E+00  4.15950E+00 -8.83203E-01  1.88957E+00  1.00000E-02
+GW    43     1  3.40664E+00 -3.78515E-01  1.26172E+00  3.21778E+00 -8.83203E-01  1.87512E+00  1.00000E-02
+GW    44     1  2.01673E+00 -8.83203E-01  1.85671E+00  2.08183E+00 -2.52344E-01  1.38789E+00  1.00000E-02
+GW    45     1  7.57031E-01 -1.26172E-01  1.51406E+00  6.30228E-01 -6.30859E-01  1.92080E+00  1.00000E-02
+GW    46     1  7.57031E-01 -1.26172E-01  1.51406E+00  0.00000E+00 -1.26172E-01  2.01875E+00  1.00000E-02
+GW    47     1  3.40664E+00 -3.78515E-01  1.26172E+00  2.08183E+00 -2.52344E-01  1.38789E+00  1.00000E-02
+GW    48     1  3.40664E+00 -3.78515E-01  1.26172E+00  4.16367E+00 -3.78515E-01  1.26172E+00  1.00000E-02
+GW    49     1  2.08183E+00 -2.52344E-01  1.38789E+00  7.57031E-01 -1.26172E-01  1.51406E+00  1.00000E-02
+GW    50     1  6.30228E-01 -6.30859E-01  2.29931E+00  6.30228E-01 -6.30859E-01  1.92080E+00  1.00000E-02
+GW    51     1  6.30228E-01 -6.30859E-01  1.92080E+00  0.00000E+00 -1.26172E-01  2.01875E+00  1.00000E-02
+GW    52     1  6.30228E-01 -6.30859E-01  1.92080E+00  2.01673E+00 -8.83203E-01  1.85671E+00  1.00000E-02
+GW    53     1  3.21778E+00 -8.83203E-01  1.87512E+00  2.01673E+00 -8.83203E-01  1.85671E+00  1.00000E-02
+GW    54     1  3.21778E+00 -8.83203E-01  1.87512E+00  4.15950E+00 -8.83203E-01  1.88957E+00  1.00000E-02
+GW    55     1  0.00000E+00 -1.26172E-01  2.01875E+00  6.30228E-01 -6.30859E-01  2.29931E+00  1.00000E-02
+GW    56     1  7.69703E+00 -3.05237E-01  1.51819E+00  9.52806E+00 -2.46171E-01  1.72492E+00  1.00000E-02
+GW    57     1  7.69912E+00 -8.11498E-01  2.02082E+00  7.69703E+00 -3.05237E-01  1.51819E+00  1.00000E-02
+GW    58     1  6.30906E+00 -3.50010E-01  1.36149E+00  6.30227E+00 -8.83203E-01  1.92243E+00  1.00000E-02
+GW    59     1  5.42575E+00 -8.83203E-01  1.90898E+00  5.42539E+00 -3.78515E-01  1.26172E+00  1.00000E-02
+GW    60     1  5.42539E+00 -3.78515E-01  1.26172E+00  6.30906E+00 -3.50010E-01  1.36149E+00  1.00000E-02
+GW    61     1  7.69703E+00 -3.05237E-01  1.51819E+00  6.30906E+00 -3.50010E-01  1.36149E+00  1.00000E-02
+GW    62     1  1.12345E+01 -1.91124E-01  1.91759E+00  1.28473E+01 -1.39100E-01  2.09967E+00  1.00000E-02
+GW    63     1  1.12345E+01 -1.91124E-01  1.91759E+00  1.12180E+01 -6.30859E-01  2.26871E+00  1.00000E-02
+GW    64     1  9.52619E+00 -7.17708E-01  2.14953E+00  9.52806E+00 -2.46171E-01  1.72492E+00  1.00000E-02
+GW    65     1  6.30227E+00 -8.83203E-01  1.92243E+00  7.69912E+00 -8.11498E-01  2.02082E+00  1.00000E-02
+GW    66     1  1.12345E+01 -1.91124E-01  1.91759E+00  9.52806E+00 -2.46171E-01  1.72492E+00  1.00000E-02
+GW    67     1  6.30227E+00 -8.83203E-01  1.92243E+00  5.42575E+00 -8.83203E-01  1.90898E+00  1.00000E-02
+GW    68     1  9.52619E+00 -7.17708E-01  2.14953E+00  1.12180E+01 -6.30859E-01  2.26871E+00  1.00000E-02
+GW    69     1  7.69912E+00 -8.11498E-01  2.02082E+00  9.52619E+00 -7.17708E-01  2.14953E+00  1.00000E-02
+GW    70     1  1.28473E+01 -1.39100E-01  2.09967E+00  1.28722E+01 -4.47423E-01  2.41615E+00  1.00000E-02
+GW    71     1  1.28722E+01 -4.47423E-01  2.41615E+00  1.12180E+01 -6.30859E-01  2.26871E+00  1.00000E-02
+GW    72     1  1.49548E+01  0.00000E+00  4.14230E+00  1.50144E+01  0.00000E+00  5.26811E+00  1.00000E-02
+GW    73     1  1.65740E+01  0.00000E+00  4.15788E+00  1.62762E+01  0.00000E+00  5.39428E+00  1.00000E-02
+GW    74     1  1.39420E+01  0.00000E+00  4.13256E+00  1.50144E+01  0.00000E+00  5.26811E+00  1.00000E-02
+GW    75     1  5.41486E+00 -3.08670E+00  2.80627E+00  4.16009E+00 -8.12425E-01  2.80627E+00  1.00000E-02
+GW    76     1  5.42580E+00 -8.44875E-01  2.80628E+00  4.16009E+00 -8.12425E-01  2.80627E+00  1.00000E-02
+GW    77     1  5.42155E+00 -3.78515E-01  3.60546E+00  4.16367E+00 -3.78515E-01  3.78515E+00  1.00000E-02
+GW    78     1  4.16009E+00 -8.12425E-01  2.80627E+00  4.16367E+00 -3.78515E-01  3.78515E+00  1.00000E-02
+GW    79     1  1.76641E+00 -2.52344E-01  3.02812E+00  2.77578E+00 -3.15430E-01  3.65898E+00  1.00000E-02
+GW    80     1  2.01673E+00 -8.83203E-01  2.48757E+00  1.76641E+00 -2.52344E-01  3.02812E+00  1.00000E-02
+GW    81     1  7.57031E-01 -1.89258E-01  2.77578E+00  1.76641E+00 -2.52344E-01  3.02812E+00  1.00000E-02
+GW    82     1  3.21862E+00 -8.83203E-01  2.57677E+00  4.16009E+00 -8.12425E-01  2.80627E+00  1.00000E-02
+GW    83     1  2.01673E+00 -8.83203E-01  2.48757E+00  3.21862E+00 -8.83203E-01  2.57677E+00  1.00000E-02
+GW    84     1  4.16367E+00 -3.78515E-01  3.78515E+00  2.77578E+00 -3.15430E-01  3.65898E+00  1.00000E-02
+GW    85     1  1.48883E+01  0.00000E+00  2.88640E+00  1.49548E+01  0.00000E+00  4.14230E+00  1.00000E-02
+GW    86     1  1.65740E+01  0.00000E+00  4.15788E+00  1.69070E+01  0.00000E+00  2.77578E+00  1.00000E-02
+GW    87     1  1.28695E+01  0.00000E+00  2.99701E+00  1.39420E+01  0.00000E+00  4.13256E+00  1.00000E-02
+GW    88     1  7.69648E+00 -3.78515E-01  3.28047E+00  6.30472E+00 -3.78515E-01  3.47929E+00  1.00000E-02
+GW    89     1  6.30227E+00 -8.83203E-01  2.80563E+00  6.30472E+00 -3.78515E-01  3.47929E+00  1.00000E-02
+GW    90     1  5.42580E+00 -8.44875E-01  2.80628E+00  5.42155E+00 -3.78515E-01  3.60546E+00  1.00000E-02
+GW    91     1  1.48883E+01  0.00000E+00  2.88640E+00  1.69070E+01  0.00000E+00  2.77578E+00  1.00000E-02
+GW    92     1  1.50463E+01 -2.06341E-01  2.77500E+00  1.69070E+01  0.00000E+00  2.77578E+00  1.00000E-02
+GW    93     1  1.69070E+01  0.00000E+00  2.77578E+00  1.28670E+01 -1.66028E-01  2.99715E+00  1.00000E-02
+GW    94     1  1.28695E+01  0.00000E+00  2.99701E+00  1.48883E+01  0.00000E+00  2.88640E+00  1.00000E-02
+GW    95     1  1.28795E+01 -4.46618E-01  2.77409E+00  1.28670E+01 -1.66028E-01  2.99715E+00  1.00000E-02
+GW    96     1  1.12180E+01 -6.30859E-01  2.77339E+00  1.12287E+01 -2.33354E-01  3.08692E+00  1.00000E-02
+GW    97     1  9.52535E+00 -3.03356E-01  3.18025E+00  9.52599E+00 -7.17719E-01  2.78449E+00  1.00000E-02
+GW    98     1  7.69637E+00 -8.11639E-01  2.79649E+00  7.69648E+00 -3.78515E-01  3.28047E+00  1.00000E-02
+GW    99     1  1.12180E+01 -6.30859E-01  2.77339E+00  9.52599E+00 -7.17719E-01  2.78449E+00  1.00000E-02
+GW   100     1  9.06729E+00 -4.67431E+00  2.80627E+00  9.05992E+00 -7.19190E+00  2.80627E+00  1.00000E-02
+GW   101     1  9.53716E+00 -7.19454E+00  2.80627E+00  9.06729E+00 -4.67431E+00  2.80627E+00  1.00000E-02
+GW   102     1  7.67558E+00 -7.18425E+00  2.80627E+00  6.28484E+00 -4.66354E+00  2.80627E+00  1.00000E-02
+GW   103     1  7.68384E+00 -4.65068E+00  2.80238E+00  7.67558E+00 -7.18425E+00  2.80627E+00  1.00000E-02
+GW   104     1  9.05718E+00 -8.13039E+00  2.80627E+00  9.71165E+00 -8.13039E+00  2.80627E+00  1.00000E-02
+GW   105     1  9.05992E+00 -7.19190E+00  2.80627E+00  9.53716E+00 -7.19454E+00  2.80627E+00  1.00000E-02
+GW   106     1  9.05992E+00 -7.19190E+00  2.80627E+00  9.05718E+00 -8.13039E+00  2.80627E+00  1.00000E-02
+GW   107     1  8.19758E+00 -8.13039E+00  2.80627E+00  7.67558E+00 -7.18425E+00  2.80627E+00  1.00000E-02
+GW   108     1  7.67558E+00 -7.18425E+00  2.80627E+00  9.05992E+00 -7.19190E+00  2.80627E+00  1.00000E-02
+GW   109     1  8.19758E+00 -8.13039E+00  2.80627E+00  9.05718E+00 -8.13039E+00  2.80627E+00  1.00000E-02
+GW   110     1  9.71165E+00 -8.13039E+00  2.80627E+00  9.53716E+00 -7.19454E+00  2.80627E+00  1.00000E-02
+GW   111     1  7.68384E+00 -4.65068E+00  2.80238E+00  6.28484E+00 -4.66354E+00  2.80627E+00  1.00000E-02
+GW   112     1  7.68891E+00 -3.09598E+00  2.79999E+00  6.32782E+00 -3.08619E+00  2.80627E+00  1.00000E-02
+GW   113     1  6.30227E+00 -8.83203E-01  2.80563E+00  7.69637E+00 -8.11639E-01  2.79649E+00  1.00000E-02
+GW   114     1  6.30227E+00 -8.83203E-01  2.80563E+00  6.32782E+00 -3.08619E+00  2.80627E+00  1.00000E-02
+GW   115     1  5.42580E+00 -8.44875E-01  2.80628E+00  5.41486E+00 -3.08670E+00  2.80627E+00  1.00000E-02
+GW   116     1  6.32782E+00 -3.08619E+00  2.80627E+00  5.41486E+00 -3.08670E+00  2.80627E+00  1.00000E-02
+GW   117     1  5.41486E+00 -3.08670E+00  2.80627E+00  6.32782E+00 -3.08619E+00  2.80627E+00  1.00000E-02
+GW   118     1  6.28484E+00 -4.66354E+00  2.80627E+00  5.41486E+00 -3.08670E+00  2.80627E+00  1.00000E-02
+GW   119     1  6.32782E+00 -3.08619E+00  2.80627E+00  6.28484E+00 -4.66354E+00  2.80627E+00  1.00000E-02
+GW   120     1  6.30227E+00 -8.83203E-01  2.80563E+00  5.42580E+00 -8.44875E-01  2.80628E+00  1.00000E-02
+GW   121     1  7.69637E+00 -8.11639E-01  2.79649E+00  7.68891E+00 -3.09598E+00  2.79999E+00  1.00000E-02
+GW   122     1  8.77094E+00 -3.08481E+00  2.80627E+00  8.34240E+00 -7.86238E-01  2.80627E+00  1.00000E-02
+GW   123     1  7.68384E+00 -4.65068E+00  2.80238E+00  7.68891E+00 -3.09598E+00  2.79999E+00  1.00000E-02
+GW   124     1  9.06729E+00 -4.67431E+00  2.80627E+00  8.77094E+00 -3.08481E+00  2.80627E+00  1.00000E-02
+GW   125     1  7.68891E+00 -3.09598E+00  2.79999E+00  8.77094E+00 -3.08481E+00  2.80627E+00  1.00000E-02
+GW   126     1  7.68384E+00 -4.65068E+00  2.80238E+00  9.06729E+00 -4.67431E+00  2.80627E+00  1.00000E-02
+GW   127     1  8.34240E+00 -7.86238E-01  2.80627E+00  9.52599E+00 -7.17719E-01  2.78449E+00  1.00000E-02
+GW   128     1  8.34240E+00 -7.86238E-01  2.80627E+00  7.69637E+00 -8.11639E-01  2.79649E+00  1.00000E-02
+GW   129     1  1.40537E+01 -3.16406E-01  2.77458E+00  1.28795E+01 -4.46618E-01  2.77409E+00  1.00000E-02
+GW   130     1  1.28795E+01 -4.46618E-01  2.77409E+00  1.36790E+01 -1.64590E+00  2.77409E+00  1.00000E-02
+GW   131     1  1.12180E+01 -6.30859E-01  2.77339E+00  1.28795E+01 -4.46618E-01  2.77409E+00  1.00000E-02
+GW   132     1  1.53508E+01 -1.65128E+00  2.77454E+00  1.56553E+01 -3.09623E+00  2.77409E+00  1.00000E-02
+GW   133     1  1.46459E+01 -3.09623E+00  2.77409E+00  1.43611E+01 -1.64810E+00  2.77428E+00  1.00000E-02
+GW   134     1  1.36790E+01 -1.64590E+00  2.77409E+00  1.46459E+01 -3.09623E+00  2.77409E+00  1.00000E-02
+GW   135     1  1.46459E+01 -3.09623E+00  2.77409E+00  1.56553E+01 -3.09623E+00  2.77409E+00  1.00000E-02
+GW   136     1  1.53508E+01 -1.65128E+00  2.77454E+00  1.43611E+01 -1.64810E+00  2.77428E+00  1.00000E-02
+GW   137     1  1.40537E+01 -3.16406E-01  2.77458E+00  1.50463E+01 -2.06341E-01  2.77500E+00  1.00000E-02
+GW   138     1  1.43611E+01 -1.64810E+00  2.77428E+00  1.36790E+01 -1.64590E+00  2.77409E+00  1.00000E-02
+GW   139     1  1.43611E+01 -1.64810E+00  2.77428E+00  1.40537E+01 -3.16406E-01  2.77458E+00  1.00000E-02
+GW   140     1  1.53508E+01 -1.65128E+00  2.77454E+00  1.50463E+01 -2.06341E-01  2.77500E+00  1.00000E-02
+GW   141     1  1.12287E+01 -2.33354E-01  3.08692E+00  9.52535E+00 -3.03356E-01  3.18025E+00  1.00000E-02
+GW   142     1  9.52535E+00 -3.03356E-01  3.18025E+00  7.69648E+00 -3.78515E-01  3.28047E+00  1.00000E-02
+GW   143     1  1.12287E+01 -2.33354E-01  3.08692E+00  1.28670E+01 -1.66028E-01  2.99715E+00  1.00000E-02
+GW   144     1  1.28670E+01 -1.66028E-01  2.99715E+00  1.28695E+01  0.00000E+00  2.99701E+00  1.00000E-02
+GW   145     1  1.49548E+01  0.00000E+00  4.14230E+00  1.65740E+01  0.00000E+00  4.15788E+00  1.00000E-02
+GW   146     1  6.30472E+00 -3.78515E-01  3.47929E+00  5.42155E+00 -3.78515E-01  3.60546E+00  1.00000E-02
+GW   147     1  1.49548E+01  0.00000E+00  4.14230E+00  1.39420E+01  0.00000E+00  4.13256E+00  1.00000E-02
+GW   148     1  1.50144E+01  0.00000E+00  5.26811E+00  1.62762E+01  0.00000E+00  5.39428E+00  1.00000E-02
+GW   149     1  1.12180E+01  6.30859E-01  2.26871E+00  1.12180E+01  6.30859E-01  2.77339E+00  1.00000E-02
+GW   150     1  9.52599E+00  7.17719E-01  2.78449E+00  9.52619E+00  7.17708E-01  2.14953E+00  1.00000E-02
+GW   151     1  1.28722E+01  4.47423E-01  2.41615E+00  1.28795E+01  4.46618E-01  2.77409E+00  1.00000E-02
+GW   152     1  2.01673E+00  8.83203E-01  2.48757E+00  6.30228E-01  6.30859E-01  2.29931E+00  1.00000E-02
+GW   153     1  3.21862E+00  8.83203E-01  2.57677E+00  3.21778E+00  8.83203E-01  1.87512E+00  1.00000E-02
+GW   154     1  2.01673E+00  8.83203E-01  1.85671E+00  2.01673E+00  8.83203E-01  2.48757E+00  1.00000E-02
+GW   155     1  6.30227E+00  8.83203E-01  2.80563E+00  6.30227E+00  8.83203E-01  1.92243E+00  1.00000E-02
+GW   156     1  4.15950E+00  8.83203E-01  1.88957E+00  4.16009E+00  8.12425E-01  2.80627E+00  1.00000E-02
+GW   157     1  5.42575E+00  8.83203E-01  1.90898E+00  5.42580E+00  8.44875E-01  2.80628E+00  1.00000E-02
+GW   158     1  0.00000E+00  1.26172E-01  2.01875E+00  7.57031E-01  1.89258E-01  2.77578E+00  1.00000E-02
+GW   159     1  6.30228E-01  6.30859E-01  2.29931E+00  7.57031E-01  1.89258E-01  2.77578E+00  1.00000E-02
+GW   160     1  7.69637E+00  8.11639E-01  2.79649E+00  7.69912E+00  8.11498E-01  2.02082E+00  1.00000E-02
+GW   161     1  4.15950E+00  8.83203E-01  1.88957E+00  5.42575E+00  8.83203E-01  1.90898E+00  1.00000E-02
+GW   162     1  5.42539E+00  3.78515E-01  1.26172E+00  4.16367E+00  3.78515E-01  1.26172E+00  1.00000E-02
+GW   163     1  4.16367E+00  3.78515E-01  1.26172E+00  4.15950E+00  8.83203E-01  1.88957E+00  1.00000E-02
+GW   164     1  7.57031E-01  1.26172E-01  1.51406E+00  0.00000E+00  1.26172E-01  2.01875E+00  1.00000E-02
+GW   165     1  3.40664E+00  3.78515E-01  1.26172E+00  3.21778E+00  8.83203E-01  1.87512E+00  1.00000E-02
+GW   166     1  2.01673E+00  8.83203E-01  1.85671E+00  2.08183E+00  2.52344E-01  1.38789E+00  1.00000E-02
+GW   167     1  7.57031E-01  1.26172E-01  1.51406E+00  6.30228E-01  6.30859E-01  1.92080E+00  1.00000E-02
+GW   168     1  3.40664E+00  3.78515E-01  1.26172E+00  2.08183E+00  2.52344E-01  1.38789E+00  1.00000E-02
+GW   169     1  3.40664E+00  3.78515E-01  1.26172E+00  4.16367E+00  3.78515E-01  1.26172E+00  1.00000E-02
+GW   170     1  2.08183E+00  2.52344E-01  1.38789E+00  7.57031E-01  1.26172E-01  1.51406E+00  1.00000E-02
+GW   171     1  6.30228E-01  6.30859E-01  2.29931E+00  6.30228E-01  6.30859E-01  1.92080E+00  1.00000E-02
+GW   172     1  6.30228E-01  6.30859E-01  1.92080E+00  0.00000E+00  1.26172E-01  2.01875E+00  1.00000E-02
+GW   173     1  6.30228E-01  6.30859E-01  1.92080E+00  2.01673E+00  8.83203E-01  1.85671E+00  1.00000E-02
+GW   174     1  3.21778E+00  8.83203E-01  1.87512E+00  2.01673E+00  8.83203E-01  1.85671E+00  1.00000E-02
+GW   175     1  3.21778E+00  8.83203E-01  1.87512E+00  4.15950E+00  8.83203E-01  1.88957E+00  1.00000E-02
+GW   176     1  0.00000E+00  1.26172E-01  2.01875E+00  6.30228E-01  6.30859E-01  2.29931E+00  1.00000E-02
+GW   177     1  7.69912E+00  8.11498E-01  2.02082E+00  7.69703E+00  3.05237E-01  1.51819E+00  1.00000E-02
+GW   178     1  6.30906E+00  3.50010E-01  1.36149E+00  6.30227E+00  8.83203E-01  1.92243E+00  1.00000E-02
+GW   179     1  5.42575E+00  8.83203E-01  1.90898E+00  5.42539E+00  3.78515E-01  1.26172E+00  1.00000E-02
+GW   180     1  7.69703E+00  3.05237E-01  1.51819E+00  9.52806E+00  2.46171E-01  1.72492E+00  1.00000E-02
+GW   181     1  5.42539E+00  3.78515E-01  1.26172E+00  6.30906E+00  3.50010E-01  1.36149E+00  1.00000E-02
+GW   182     1  7.69703E+00  3.05237E-01  1.51819E+00  6.30906E+00  3.50010E-01  1.36149E+00  1.00000E-02
+GW   183     1  7.69703E+00  3.05237E-01  1.51819E+00  7.69703E+00  7.00000E-06  1.51819E+00  1.00000E-02
+GW   184     1  1.12345E+01  1.91124E-01  1.91759E+00  1.12180E+01  6.30859E-01  2.26871E+00  1.00000E-02
+GW   185     1  1.12345E+01  1.91124E-01  1.91759E+00  1.28473E+01  1.39100E-01  2.09967E+00  1.00000E-02
+GW   186     1  9.52619E+00  7.17708E-01  2.14953E+00  9.52806E+00  2.46171E-01  1.72492E+00  1.00000E-02
+GW   187     1  6.30227E+00  8.83203E-01  1.92243E+00  7.69912E+00  8.11498E-01  2.02082E+00  1.00000E-02
+GW   188     1  1.12345E+01  1.91124E-01  1.91759E+00  9.52806E+00  2.46171E-01  1.72492E+00  1.00000E-02
+GW   189     1  6.30227E+00  8.83203E-01  1.92243E+00  5.42575E+00  8.83203E-01  1.90898E+00  1.00000E-02
+GW   190     1  9.52619E+00  7.17708E-01  2.14953E+00  1.12180E+01  6.30859E-01  2.26871E+00  1.00000E-02
+GW   191     1  7.69912E+00  8.11498E-01  2.02082E+00  9.52619E+00  7.17708E-01  2.14953E+00  1.00000E-02
+GW   192     1  1.28473E+01  1.39100E-01  2.09967E+00  1.28722E+01  4.47423E-01  2.41615E+00  1.00000E-02
+GW   193     1  1.28722E+01  4.47423E-01  2.41615E+00  1.12180E+01  6.30859E-01  2.26871E+00  1.00000E-02
+GW   194     1  5.42155E+00  3.78515E-01  3.60546E+00  4.16367E+00  3.78515E-01  3.78515E+00  1.00000E-02
+GW   195     1  5.42580E+00  8.44875E-01  2.80628E+00  4.16009E+00  8.12425E-01  2.80627E+00  1.00000E-02
+GW   196     1  5.41486E+00  3.08670E+00  2.80627E+00  4.16009E+00  8.12425E-01  2.80627E+00  1.00000E-02
+GW   197     1  4.16009E+00  8.12425E-01  2.80627E+00  4.16367E+00  3.78515E-01  3.78515E+00  1.00000E-02
+GW   198     1  1.76641E+00  2.52344E-01  3.02812E+00  2.77578E+00  3.15430E-01  3.65898E+00  1.00000E-02
+GW   199     1  7.57031E-01  1.89258E-01  2.77578E+00  1.76641E+00  2.52344E-01  3.02812E+00  1.00000E-02
+GW   200     1  2.01673E+00  8.83203E-01  2.48757E+00  1.76641E+00  2.52344E-01  3.02812E+00  1.00000E-02
+GW   201     1  3.21862E+00  8.83203E-01  2.57677E+00  4.16009E+00  8.12425E-01  2.80627E+00  1.00000E-02
+GW   202     1  2.01673E+00  8.83203E-01  2.48757E+00  3.21862E+00  8.83203E-01  2.57677E+00  1.00000E-02
+GW   203     1  4.16367E+00  3.78515E-01  3.78515E+00  2.77578E+00  3.15430E-01  3.65898E+00  1.00000E-02
+GW   204     1  6.30227E+00  8.83203E-01  2.80563E+00  6.30472E+00  3.78515E-01  3.47929E+00  1.00000E-02
+GW   205     1  5.42580E+00  8.44875E-01  2.80628E+00  5.42155E+00  3.78515E-01  3.60546E+00  1.00000E-02
+GW   206     1  7.69648E+00  3.78515E-01  3.28047E+00  6.30472E+00  3.78515E-01  3.47929E+00  1.00000E-02
+GW   207     1  1.28795E+01  4.46618E-01  2.77409E+00  1.28670E+01  1.66028E-01  2.99715E+00  1.00000E-02
+GW   208     1  9.52535E+00  3.03356E-01  3.18025E+00  9.52599E+00  7.17719E-01  2.78449E+00  1.00000E-02
+GW   209     1  1.12180E+01  6.30859E-01  2.77339E+00  1.12287E+01  2.33354E-01  3.08692E+00  1.00000E-02
+GW   210     1  7.69637E+00  8.11639E-01  2.79649E+00  7.69648E+00  3.78515E-01  3.28047E+00  1.00000E-02
+GW   211     1  1.12180E+01  6.30859E-01  2.77339E+00  9.52599E+00  7.17719E-01  2.78449E+00  1.00000E-02
+GW   212     1  7.67607E+00  4.66893E+00  2.80627E+00  7.67558E+00  7.18425E+00  2.80627E+00  1.00000E-02
+GW   213     1  7.67558E+00  7.18425E+00  2.80627E+00  6.28484E+00  4.66354E+00  2.80627E+00  1.00000E-02
+GW   214     1  9.06729E+00  4.67431E+00  2.80627E+00  9.05992E+00  7.19190E+00  2.80627E+00  1.00000E-02
+GW   215     1  9.53716E+00  7.19454E+00  2.80627E+00  9.06729E+00  4.67431E+00  2.80627E+00  1.00000E-02
+GW   216     1  7.69180E+00  3.08542E+00  2.80627E+00  6.28996E+00  3.08621E+00  2.80627E+00  1.00000E-02
+GW   217     1  6.30227E+00  8.83203E-01  2.80563E+00  7.69637E+00  8.11639E-01  2.79649E+00  1.00000E-02
+GW   218     1  6.28484E+00  4.66354E+00  2.80627E+00  7.67607E+00  4.66893E+00  2.80627E+00  1.00000E-02
+GW   219     1  5.42580E+00  8.44875E-01  2.80628E+00  5.41486E+00  3.08670E+00  2.80627E+00  1.00000E-02
+GW   220     1  6.30227E+00  8.83203E-01  2.80563E+00  6.28996E+00  3.08621E+00  2.80627E+00  1.00000E-02
+GW   221     1  6.30227E+00  8.83203E-01  2.80563E+00  5.42580E+00  8.44875E-01  2.80628E+00  1.00000E-02
+GW   222     1  6.28996E+00  3.08621E+00  2.80627E+00  5.41486E+00  3.08670E+00  2.80627E+00  1.00000E-02
+GW   223     1  6.28484E+00  4.66354E+00  2.80627E+00  5.41486E+00  3.08670E+00  2.80627E+00  1.00000E-02
+GW   224     1  6.28996E+00  3.08621E+00  2.80627E+00  6.28484E+00  4.66354E+00  2.80627E+00  1.00000E-02
+GW   225     1  7.69180E+00  3.08542E+00  2.80627E+00  7.69637E+00  8.11639E-01  2.79649E+00  1.00000E-02
+GW   226     1  8.77094E+00  3.08481E+00  2.80627E+00  8.34240E+00  7.86238E-01  2.80627E+00  1.00000E-02
+GW   227     1  8.34240E+00  7.86238E-01  2.80627E+00  9.52599E+00  7.17719E-01  2.78449E+00  1.00000E-02
+GW   228     1  8.34240E+00  7.86238E-01  2.80627E+00  7.69637E+00  8.11639E-01  2.79649E+00  1.00000E-02
+GW   229     1  7.67607E+00  4.66893E+00  2.80627E+00  9.06729E+00  4.67431E+00  2.80627E+00  1.00000E-02
+GW   230     1  7.69180E+00  3.08542E+00  2.80627E+00  7.67607E+00  4.66893E+00  2.80627E+00  1.00000E-02
+GW   231     1  9.06729E+00  4.67431E+00  2.80627E+00  8.77094E+00  3.08481E+00  2.80627E+00  1.00000E-02
+GW   232     1  7.69180E+00  3.08542E+00  2.80627E+00  8.77094E+00  3.08481E+00  2.80627E+00  1.00000E-02
+GW   233     1  9.05992E+00  7.19190E+00  2.80627E+00  9.53716E+00  7.19454E+00  2.80627E+00  1.00000E-02
+GW   234     1  9.05718E+00  8.13039E+00  2.80627E+00  9.71165E+00  8.13039E+00  2.80627E+00  1.00000E-02
+GW   235     1  8.19758E+00  8.13039E+00  2.80627E+00  9.05718E+00  8.13039E+00  2.80627E+00  1.00000E-02
+GW   236     1  9.05992E+00  7.19190E+00  2.80627E+00  9.05718E+00  8.13039E+00  2.80627E+00  1.00000E-02
+GW   237     1  8.19758E+00  8.13039E+00  2.80627E+00  7.67558E+00  7.18425E+00  2.80627E+00  1.00000E-02
+GW   238     1  7.67558E+00  7.18425E+00  2.80627E+00  9.05992E+00  7.19190E+00  2.80627E+00  1.00000E-02
+GW   239     1  9.71165E+00  8.13039E+00  2.80627E+00  9.53716E+00  7.19454E+00  2.80627E+00  1.00000E-02
+GW   240     1  1.28795E+01  4.46618E-01  2.77409E+00  1.36790E+01  1.64590E+00  2.77409E+00  1.00000E-02
+GW   241     1  1.40537E+01  3.16406E-01  2.77458E+00  1.28795E+01  4.46618E-01  2.77409E+00  1.00000E-02
+GW   242     1  1.12180E+01  6.30859E-01  2.77339E+00  1.28795E+01  4.46618E-01  2.77409E+00  1.00000E-02
+GW   243     1  1.36790E+01  1.64590E+00  2.77409E+00  1.46459E+01  3.09623E+00  2.77409E+00  1.00000E-02
+GW   244     1  1.46459E+01  3.09623E+00  2.77409E+00  1.43611E+01  1.64810E+00  2.77428E+00  1.00000E-02
+GW   245     1  1.53508E+01  1.65128E+00  2.77454E+00  1.56553E+01  3.09623E+00  2.77409E+00  1.00000E-02
+GW   246     1  1.40537E+01  3.16406E-01  2.77458E+00  1.50463E+01  2.06341E-01  2.77500E+00  1.00000E-02
+GW   247     1  1.53508E+01  1.65128E+00  2.77454E+00  1.43611E+01  1.64810E+00  2.77428E+00  1.00000E-02
+GW   248     1  1.43611E+01  1.64810E+00  2.77428E+00  1.40537E+01  3.16406E-01  2.77458E+00  1.00000E-02
+GW   249     1  1.43611E+01  1.64810E+00  2.77428E+00  1.36790E+01  1.64590E+00  2.77409E+00  1.00000E-02
+GW   250     1  1.53508E+01  1.65128E+00  2.77454E+00  1.50463E+01  2.06340E-01  2.77500E+00  1.00000E-02
+GW   251     1  1.46459E+01  3.09623E+00  2.77409E+00  1.56553E+01  3.09623E+00  2.77409E+00  1.00000E-02
+GW   252     1  1.12287E+01  2.33354E-01  3.08692E+00  9.52535E+00  3.03356E-01  3.18025E+00  1.00000E-02
+GW   253     1  9.52535E+00  3.03360E-01  3.18025E+00  7.69648E+00  3.78510E-01  3.28047E+00  1.00000E-02
+GW   254     1  1.12287E+01  2.33354E-01  3.08692E+00  1.28670E+01  1.66028E-01  2.99715E+00  1.00000E-02
+GW   255     1  6.30472E+00  3.78515E-01  3.47929E+00  5.42155E+00  3.78515E-01  3.60546E+00  1.00000E-02
+GW   256    16  1.69070E+01  0.00000E+00  2.77578E+00  2.70000E+01  0.00000E+00  2.77578E+00  1.00000E-02
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00 -1.35000E+01  0.00000E+00 -2.00000E+00  0.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    11     0      0  5.00000E+00  5.00000E-01  1.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0   256     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37      0  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/buoy.nec b/examples/buoy.nec
new file mode 100644
index 0000000..fbae9e6
--- /dev/null
+++ b/examples/buoy.nec
@@ -0,0 +1,13 @@
+CM Short vertical antenna over sea as ground (buoy)
+CM Base loaded for resonance around 13.75 MHz
+CE End Comments
+GW     1     6  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  2.20000E+00  2.00000E-02
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    11     0      0  1.00000E+01  5.00000E-01  1.50000E+01  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1     1      0  1.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+LD     0     1     1      1  0.00000E+00  3.85000E-06  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     2     0     0      0  8.00000E+01  4.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0    16     1      8 -7.50000E+00  0.00000E+00  5.00000E-01  1.00000E+00  1.00000E+00  1.00000E+00
+NH     0    16     1      8 -7.50000E+00  0.00000E+00  5.00000E-01  1.00000E+00  1.00000E+00  1.00000E+00
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/conductivity.txt b/examples/conductivity.txt
new file mode 100644
index 0000000..41a7053
--- /dev/null
+++ b/examples/conductivity.txt
@@ -0,0 +1,12 @@
+ |------------------------------------------------|
+ | Material			| Ohm.m @ 20 �C | S/m @ 20 �C |
+ |------------------------------------------------|
+ | Silver			| 1.59�10-8		| 6.30�107    |
+ | Copper			| 1.68�10-8		| 5.96�107    |
+ | Gold				| 2.44�10-8		| 4.10�107    |
+ | Aluminium		| 2.82�10-8		| 3.5�107     |
+ | Iron				| 1.0�10-7		| 1.00�107    |
+ | Titanium			| 4.20�10-7		| 2.38�106    |
+ | Stainless Steel	| 6.9�10-7		| 1.45�106    |
+ | Sea water		| 2�10-1		| 4.8         |
+ |------------------------------------------------|
diff --git a/examples/gray_hoverman.nec b/examples/gray_hoverman.nec
new file mode 100644
index 0000000..d64f049
--- /dev/null
+++ b/examples/gray_hoverman.nec
@@ -0,0 +1,18 @@
+CM --- Gray-Hoverman - Patch Reflector ---
+CE --- End Comments ---
+GW     1    15  2.76500E-01  0.00000E+00  4.03500E-01  1.34500E-01  0.00000E+00  4.03500E-01  2.50000E-03
+GW     2    20  1.34500E-01  0.00000E+00  4.03500E-01  0.00000E+00  0.00000E+00  2.69000E-01  2.50000E-03
+GW     3    20  0.00000E+00  0.00000E+00  2.69000E-01  1.34500E-01  0.00000E+00  1.34500E-01  2.50000E-03
+GW     4    20  1.34500E-01  0.00000E+00  1.34500E-01  0.00000E+00  0.00000E+00  0.00000E+00  2.50000E-03
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  4.00000E-03  0.00000E+00  0.00000E+00  1.00000E+00
+GM     8     1  0.00000E+00  0.00000E+00  1.80000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GM     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  1.00000E-01  0.00000E+00  1.00000E+00
+GX     4     1  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GW    20     1  4.00000E-03  1.00000E-01  0.00000E+00 -4.00000E-03  1.00000E-01  0.00000E+00  2.50000E-03
+SM    16    16  4.00000E-01  0.00000E+00  5.00000E-01  4.00000E-01  0.00000E+00 -5.00000E-01  0.00000E+00
+SC     0     0 -4.00000E-01  0.00000E+00 -5.00000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0    20     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    26     0      0  3.00000E+02  2.00000E+01  8.00000E+02  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    38    73      0  0.00000E+00  0.00000E+00  5.00000E+00  5.00000E+00  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/ground.txt b/examples/ground.txt
new file mode 100644
index 0000000..e017768
--- /dev/null
+++ b/examples/ground.txt
@@ -0,0 +1,21 @@
+
+ Typical values for selected ground types are given below.
+ Typical good ground is low hills with un-forested rich
+ soil or flat wet coastal regions; fair ground is medium
+ hills or forested heavy soil; and typical poor ground
+ includes rocky steep hills, sandy dry coastal regions,
+ and city industrial areas.
+
+ |-------------------------------------------------------------|
+ | Ground type		| Conductivity mhos/m3	| Dielectric Const |	
+ | ------------------------------------------------------------|
+ | Very Dry			|	.0001				|	3              |
+ | Medium Dry		|	.001				|	15             |
+ | Good Ground		|	.01					|	10             |
+ | Wet Ground		|	.01					|	30             |
+ | Poor Ground		|	.001				|	4              |
+ | Sea Ice			|	.001				|	4              |
+ | Polar Ice Cap	|	.0001				|	1              |
+ | Fresh Water		|	.002				|	80             |
+ | Sea Water		|	5.0					|	80             |
+ |-------------------------------------------------------------|
diff --git a/examples/k9ay_5b4az.nec b/examples/k9ay_5b4az.nec
new file mode 100644
index 0000000..90a8c64
--- /dev/null
+++ b/examples/k9ay_5b4az.nec
@@ -0,0 +1,23 @@
+CM --- NEC2 Input File created by xnec2c 1.0-beta ---
+CM K9AY directional small receiving loop 1.8-4.0 MHz.
+CM By connecting two adjacent feed points in parallel,
+CM the radiation pattern can be rotated 45 degrees so
+CM that the antenna can cover eight directions.
+CE --- End Comments ---
+GW     1     8  0.00000E+00  0.00000E+00  8.50000E+00  5.00000E+00  0.00000E+00  1.50000E+00  1.50000E-03
+GW     2     8  0.00000E+00  0.00000E+00  8.50000E+00 -5.00000E+00  0.00000E+00  1.50000E+00  1.50000E-03
+GW     3     5  0.00000E+00  0.00000E+00  0.00000E+00  5.00000E+00  0.00000E+00  1.50000E+00  1.50000E-03
+GW     4     5  0.00000E+00  0.00000E+00  0.00000E+00 -5.00000E+00  0.00000E+00  1.50000E+00  1.50000E-03
+GW     5     8  0.00000E+00  0.00000E+00  8.60000E+00  0.00000E+00  5.00000E+00  1.60000E+00  1.50000E-03
+GW     6     8  0.00000E+00  0.00000E+00  8.60000E+00  0.00000E+00 -5.00000E+00  1.60000E+00  1.50000E-03
+GW     7     5  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  5.00000E+00  1.60000E+00  1.50000E-03
+GW     8     5  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00 -5.00000E+00  1.60000E+00  1.50000E-03
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     4     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     7     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+LD     4     3     1      1  5.60000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+LD     4     8     1      1  5.60000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     2     0     0      0  1.20000E+01  1.00000E-02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    23     0      0  1.80000E+00  1.00000E-01  4.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37      0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/k9ay_orig.nec b/examples/k9ay_orig.nec
new file mode 100644
index 0000000..7e23844
--- /dev/null
+++ b/examples/k9ay_orig.nec
@@ -0,0 +1,13 @@
+CM --- NEC2 Input File created by xnec2c 1.0-beta ---
+CM K9AY directional small receiving loop 1.8-4.0 MHz
+CE --- End Comments ---
+GW     1     8  0.00000E+00  0.00000E+00  8.50000E+00  5.00000E+00  0.00000E+00  1.50000E+00  1.50000E-03
+GW     2     5  0.00000E+00  0.00000E+00  0.00000E+00  5.00000E+00  0.00000E+00  1.50000E+00  1.50000E-03
+GX     2   100  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GE     1     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     4     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+LD     4     2     1      1  4.70000E+02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+GN     2     0     0      0  1.20000E+01  1.00000E-02  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    13     0      0  1.80000E+00  5.00000E-01  8.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+RP     0    19    37      0  0.00000E+00  0.00000E+00  5.00000E+00  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/examples/satellite.nec b/examples/satellite.nec
new file mode 100644
index 0000000..d4af9ae
--- /dev/null
+++ b/examples/satellite.nec
@@ -0,0 +1,21 @@
+CM  CYLINDER WITH ATTACHED WIRES
+CE End Comments
+SP     0     0  1.00000E-01  0.00000E+00  7.33300E-02  0.00000E+00  0.00000E+00  3.84000E-03  0.00000E+00
+SP     0     0  1.00000E-01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  3.84000E-03  0.00000E+00
+SP     0     0  1.00000E-01  0.00000E+00 -7.33300E-02  0.00000E+00  0.00000E+00  3.84000E-03  0.00000E+00
+GM     0     1  0.00000E+00  0.00000E+00  3.00000E+01  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+SP     0     0  6.89000E-02  0.00000E+00  1.10000E-01  9.00000E+01  0.00000E+00  4.48800E-03  0.00000E+00
+SP     0     0  6.89000E-02  0.00000E+00 -1.10000E-01 -9.00000E+01  0.00000E+00  4.48800E-03  0.00000E+00
+GR     0     6  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+SP     0     0  0.00000E+00  0.00000E+00  1.10000E-01  9.00000E+01  0.00000E+00  4.48900E-03  0.00000E+00
+SP     0     0  0.00000E+00  0.00000E+00 -1.10000E-01  9.00000E+01  0.00000E+00  4.48900E-03  0.00000E+00
+GW     1    11  0.00000E+00  0.00000E+00  1.10000E-01  0.00000E+00  0.00000E+00  2.60000E-01  2.00000E-03
+GW     2    11  1.00000E-01  0.00000E+00  0.00000E+00  2.36000E-01  0.00000E+00  0.00000E+00  2.00000E-03
+GE     0     0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+FR     0    26     0      0  4.20000E+02  2.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     2     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+EX     0     1     1      0  1.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NH     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
+NE     0     1    20     20  0.00000E+00 -9.50000E-01 -9.50000E-01  0.00000E+00  1.00000E-01  1.00000E-01
+RP     0    19    37   1000  0.00000E+00  0.00000E+00  1.00000E+01  1.00000E+01  0.00000E+00  0.00000E+00
+EN     0     0     0      0  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00  0.00000E+00
diff --git a/install-sh b/install-sh
new file mode 100755
index 0000000..377bb86
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,527 @@
+#!/bin/sh
+# install - install a program, script, or datafile
+
+scriptversion=2011-11-20.07; # UTC
+
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# 'make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+
+nl='
+'
+IFS=" ""	$nl"
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit=${DOITPROG-}
+if test -z "$doit"; then
+  doit_exec=exec
+else
+  doit_exec=$doit
+fi
+
+# Put in absolute file names if you don't have them in your path;
+# or use environment vars.
+
+chgrpprog=${CHGRPPROG-chgrp}
+chmodprog=${CHMODPROG-chmod}
+chownprog=${CHOWNPROG-chown}
+cmpprog=${CMPPROG-cmp}
+cpprog=${CPPROG-cp}
+mkdirprog=${MKDIRPROG-mkdir}
+mvprog=${MVPROG-mv}
+rmprog=${RMPROG-rm}
+stripprog=${STRIPPROG-strip}
+
+posix_glob='?'
+initialize_posix_glob='
+  test "$posix_glob" != "?" || {
+    if (set -f) 2>/dev/null; then
+      posix_glob=
+    else
+      posix_glob=:
+    fi
+  }
+'
+
+posix_mkdir=
+
+# Desired mode of installed file.
+mode=0755
+
+chgrpcmd=
+chmodcmd=$chmodprog
+chowncmd=
+mvcmd=$mvprog
+rmcmd="$rmprog -f"
+stripcmd=
+
+src=
+dst=
+dir_arg=
+dst_arg=
+
+copy_on_change=false
+no_target_directory=
+
+usage="\
+Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE
+   or: $0 [OPTION]... SRCFILES... DIRECTORY
+   or: $0 [OPTION]... -t DIRECTORY SRCFILES...
+   or: $0 [OPTION]... -d DIRECTORIES...
+
+In the 1st form, copy SRCFILE to DSTFILE.
+In the 2nd and 3rd, copy all SRCFILES to DIRECTORY.
+In the 4th, create DIRECTORIES.
+
+Options:
+     --help     display this help and exit.
+     --version  display version info and exit.
+
+  -c            (ignored)
+  -C            install only if different (preserve the last data modification time)
+  -d            create directories instead of installing files.
+  -g GROUP      $chgrpprog installed files to GROUP.
+  -m MODE       $chmodprog installed files to MODE.
+  -o USER       $chownprog installed files to USER.
+  -s            $stripprog installed files.
+  -t DIRECTORY  install into DIRECTORY.
+  -T            report an error if DSTFILE is a directory.
+
+Environment variables override the default commands:
+  CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
+  RMPROG STRIPPROG
+"
+
+while test $# -ne 0; do
+  case $1 in
+    -c) ;;
+
+    -C) copy_on_change=true;;
+
+    -d) dir_arg=true;;
+
+    -g) chgrpcmd="$chgrpprog $2"
+	shift;;
+
+    --help) echo "$usage"; exit $?;;
+
+    -m) mode=$2
+	case $mode in
+	  *' '* | *'	'* | *'
+'*	  | *'*'* | *'?'* | *'['*)
+	    echo "$0: invalid mode: $mode" >&2
+	    exit 1;;
+	esac
+	shift;;
+
+    -o) chowncmd="$chownprog $2"
+	shift;;
+
+    -s) stripcmd=$stripprog;;
+
+    -t) dst_arg=$2
+	# Protect names problematic for 'test' and other utilities.
+	case $dst_arg in
+	  -* | [=\(\)!]) dst_arg=./$dst_arg;;
+	esac
+	shift;;
+
+    -T) no_target_directory=true;;
+
+    --version) echo "$0 $scriptversion"; exit $?;;
+
+    --)	shift
+	break;;
+
+    -*)	echo "$0: invalid option: $1" >&2
+	exit 1;;
+
+    *)  break;;
+  esac
+  shift
+done
+
+if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then
+  # When -d is used, all remaining arguments are directories to create.
+  # When -t is used, the destination is already specified.
+  # Otherwise, the last argument is the destination.  Remove it from $@.
+  for arg
+  do
+    if test -n "$dst_arg"; then
+      # $@ is not empty: it contains at least $arg.
+      set fnord "$@" "$dst_arg"
+      shift # fnord
+    fi
+    shift # arg
+    dst_arg=$arg
+    # Protect names problematic for 'test' and other utilities.
+    case $dst_arg in
+      -* | [=\(\)!]) dst_arg=./$dst_arg;;
+    esac
+  done
+fi
+
+if test $# -eq 0; then
+  if test -z "$dir_arg"; then
+    echo "$0: no input file specified." >&2
+    exit 1
+  fi
+  # It's OK to call 'install-sh -d' without argument.
+  # This can happen when creating conditional directories.
+  exit 0
+fi
+
+if test -z "$dir_arg"; then
+  do_exit='(exit $ret); exit $ret'
+  trap "ret=129; $do_exit" 1
+  trap "ret=130; $do_exit" 2
+  trap "ret=141; $do_exit" 13
+  trap "ret=143; $do_exit" 15
+
+  # Set umask so as not to create temps with too-generous modes.
+  # However, 'strip' requires both read and write access to temps.
+  case $mode in
+    # Optimize common cases.
+    *644) cp_umask=133;;
+    *755) cp_umask=22;;
+
+    *[0-7])
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw='% 200'
+      fi
+      cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;;
+    *)
+      if test -z "$stripcmd"; then
+	u_plus_rw=
+      else
+	u_plus_rw=,u+rw
+      fi
+      cp_umask=$mode$u_plus_rw;;
+  esac
+fi
+
+for src
+do
+  # Protect names problematic for 'test' and other utilities.
+  case $src in
+    -* | [=\(\)!]) src=./$src;;
+  esac
+
+  if test -n "$dir_arg"; then
+    dst=$src
+    dstdir=$dst
+    test -d "$dstdir"
+    dstdir_status=$?
+  else
+
+    # Waiting for this to be detected by the "$cpprog $src $dsttmp" command
+    # might cause directories to be created, which would be especially bad
+    # if $src (and thus $dsttmp) contains '*'.
+    if test ! -f "$src" && test ! -d "$src"; then
+      echo "$0: $src does not exist." >&2
+      exit 1
+    fi
+
+    if test -z "$dst_arg"; then
+      echo "$0: no destination specified." >&2
+      exit 1
+    fi
+    dst=$dst_arg
+
+    # If destination is a directory, append the input filename; won't work
+    # if double slashes aren't ignored.
+    if test -d "$dst"; then
+      if test -n "$no_target_directory"; then
+	echo "$0: $dst_arg: Is a directory" >&2
+	exit 1
+      fi
+      dstdir=$dst
+      dst=$dstdir/`basename "$src"`
+      dstdir_status=0
+    else
+      # Prefer dirname, but fall back on a substitute if dirname fails.
+      dstdir=`
+	(dirname "$dst") 2>/dev/null ||
+	expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+	     X"$dst" : 'X\(//\)[^/]' \| \
+	     X"$dst" : 'X\(//\)$' \| \
+	     X"$dst" : 'X\(/\)' \| . 2>/dev/null ||
+	echo X"$dst" |
+	    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)[^/].*/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\/\)$/{
+		   s//\1/
+		   q
+		 }
+		 /^X\(\/\).*/{
+		   s//\1/
+		   q
+		 }
+		 s/.*/./; q'
+      `
+
+      test -d "$dstdir"
+      dstdir_status=$?
+    fi
+  fi
+
+  obsolete_mkdir_used=false
+
+  if test $dstdir_status != 0; then
+    case $posix_mkdir in
+      '')
+	# Create intermediate dirs using mode 755 as modified by the umask.
+	# This is like FreeBSD 'install' as of 1997-10-28.
+	umask=`umask`
+	case $stripcmd.$umask in
+	  # Optimize common cases.
+	  *[2367][2367]) mkdir_umask=$umask;;
+	  .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;;
+
+	  *[0-7])
+	    mkdir_umask=`expr $umask + 22 \
+	      - $umask % 100 % 40 + $umask % 20 \
+	      - $umask % 10 % 4 + $umask % 2
+	    `;;
+	  *) mkdir_umask=$umask,go-w;;
+	esac
+
+	# With -d, create the new directory with the user-specified mode.
+	# Otherwise, rely on $mkdir_umask.
+	if test -n "$dir_arg"; then
+	  mkdir_mode=-m$mode
+	else
+	  mkdir_mode=
+	fi
+
+	posix_mkdir=false
+	case $umask in
+	  *[123567][0-7][0-7])
+	    # POSIX mkdir -p sets u+wx bits regardless of umask, which
+	    # is incompatible with FreeBSD 'install' when (umask & 300) != 0.
+	    ;;
+	  *)
+	    tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
+	    trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
+
+	    if (umask $mkdir_umask &&
+		exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1
+	    then
+	      if test -z "$dir_arg" || {
+		   # Check for POSIX incompatibilities with -m.
+		   # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or
+		   # other-writable bit of parent directory when it shouldn't.
+		   # FreeBSD 6.1 mkdir -m -p sets mode of existing directory.
+		   ls_ld_tmpdir=`ls -ld "$tmpdir"`
+		   case $ls_ld_tmpdir in
+		     d????-?r-*) different_mode=700;;
+		     d????-?--*) different_mode=755;;
+		     *) false;;
+		   esac &&
+		   $mkdirprog -m$different_mode -p -- "$tmpdir" && {
+		     ls_ld_tmpdir_1=`ls -ld "$tmpdir"`
+		     test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1"
+		   }
+		 }
+	      then posix_mkdir=:
+	      fi
+	      rmdir "$tmpdir/d" "$tmpdir"
+	    else
+	      # Remove any dirs left behind by ancient mkdir implementations.
+	      rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null
+	    fi
+	    trap '' 0;;
+	esac;;
+    esac
+
+    if
+      $posix_mkdir && (
+	umask $mkdir_umask &&
+	$doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir"
+      )
+    then :
+    else
+
+      # The umask is ridiculous, or mkdir does not conform to POSIX,
+      # or it failed possibly due to a race condition.  Create the
+      # directory the slow way, step by step, checking for races as we go.
+
+      case $dstdir in
+	/*) prefix='/';;
+	[-=\(\)!]*) prefix='./';;
+	*)  prefix='';;
+      esac
+
+      eval "$initialize_posix_glob"
+
+      oIFS=$IFS
+      IFS=/
+      $posix_glob set -f
+      set fnord $dstdir
+      shift
+      $posix_glob set +f
+      IFS=$oIFS
+
+      prefixes=
+
+      for d
+      do
+	test X"$d" = X && continue
+
+	prefix=$prefix$d
+	if test -d "$prefix"; then
+	  prefixes=
+	else
+	  if $posix_mkdir; then
+	    (umask=$mkdir_umask &&
+	     $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break
+	    # Don't fail if two instances are running concurrently.
+	    test -d "$prefix" || exit 1
+	  else
+	    case $prefix in
+	      *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;;
+	      *) qprefix=$prefix;;
+	    esac
+	    prefixes="$prefixes '$qprefix'"
+	  fi
+	fi
+	prefix=$prefix/
+      done
+
+      if test -n "$prefixes"; then
+	# Don't fail if two instances are running concurrently.
+	(umask $mkdir_umask &&
+	 eval "\$doit_exec \$mkdirprog $prefixes") ||
+	  test -d "$dstdir" || exit 1
+	obsolete_mkdir_used=true
+      fi
+    fi
+  fi
+
+  if test -n "$dir_arg"; then
+    { test -z "$chowncmd" || $doit $chowncmd "$dst"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } &&
+    { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false ||
+      test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1
+  else
+
+    # Make a couple of temp file names in the proper directory.
+    dsttmp=$dstdir/_inst.$$_
+    rmtmp=$dstdir/_rm.$$_
+
+    # Trap to clean up those temp files at exit.
+    trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0
+
+    # Copy the file name to the temp name.
+    (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") &&
+
+    # and set any options; do chmod last to preserve setuid bits.
+    #
+    # If any of these fail, we abort the whole thing.  If we want to
+    # ignore errors from any of these, just make sure not to ignore
+    # errors from the above "$doit $cpprog $src $dsttmp" command.
+    #
+    { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } &&
+    { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } &&
+    { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } &&
+    { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } &&
+
+    # If -C, don't bother to copy if it wouldn't change the file.
+    if $copy_on_change &&
+       old=`LC_ALL=C ls -dlL "$dst"	2>/dev/null` &&
+       new=`LC_ALL=C ls -dlL "$dsttmp"	2>/dev/null` &&
+
+       eval "$initialize_posix_glob" &&
+       $posix_glob set -f &&
+       set X $old && old=:$2:$4:$5:$6 &&
+       set X $new && new=:$2:$4:$5:$6 &&
+       $posix_glob set +f &&
+
+       test "$old" = "$new" &&
+       $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1
+    then
+      rm -f "$dsttmp"
+    else
+      # Rename the file to the real destination.
+      $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
+
+      # The rename failed, perhaps because mv can't rename something else
+      # to itself, or perhaps because mv is so ancient that it does not
+      # support -f.
+      {
+	# Now remove or move aside any old file at destination location.
+	# We try this two ways since rm can't unlink itself on some
+	# systems and the destination file might be busy for other
+	# reasons.  In this case, the final cleanup might fail but the new
+	# file should still install successfully.
+	{
+	  test ! -f "$dst" ||
+	  $doit $rmcmd -f "$dst" 2>/dev/null ||
+	  { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
+	    { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+	  } ||
+	  { echo "$0: cannot unlink or rename $dst" >&2
+	    (exit 1); exit 1
+	  }
+	} &&
+
+	# Now rename the file to the real destination.
+	$doit $mvcmd "$dsttmp" "$dst"
+      }
+    fi || exit 1
+
+    trap '' 0
+  fi
+done
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/intltool-extract.in b/intltool-extract.in
new file mode 100644
index 0000000..e69de29
diff --git a/intltool-merge.in b/intltool-merge.in
new file mode 100644
index 0000000..e69de29
diff --git a/intltool-update.in b/intltool-update.in
new file mode 100644
index 0000000..e69de29
diff --git a/missing b/missing
new file mode 100755
index 0000000..db98974
--- /dev/null
+++ b/missing
@@ -0,0 +1,215 @@
+#! /bin/sh
+# Common wrapper for a few potentially missing GNU programs.
+
+scriptversion=2013-10-28.13; # UTC
+
+# Copyright (C) 1996-2013 Free Software Foundation, Inc.
+# Originally written by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# 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, see <http://www.gnu.org/licenses/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try '$0 --help' for more information"
+  exit 1
+fi
+
+case $1 in
+
+  --is-lightweight)
+    # Used by our autoconf macros to check whether the available missing
+    # script is modern enough.
+    exit 0
+    ;;
+
+  --run)
+    # Back-compat with the calling convention used by older automake.
+    shift
+    ;;
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due
+to PROGRAM being missing or too old.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+
+Supported PROGRAM values:
+  aclocal   autoconf  autoheader   autom4te  automake  makeinfo
+  bison     yacc      flex         lex       help2man
+
+Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and
+'g' are ignored when checking the name.
+
+Send bug reports to <bug-automake at gnu.org>."
+    exit $?
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing $scriptversion (GNU Automake)"
+    exit $?
+    ;;
+
+  -*)
+    echo 1>&2 "$0: unknown '$1' option"
+    echo 1>&2 "Try '$0 --help' for more information"
+    exit 1
+    ;;
+
+esac
+
+# Run the given program, remember its exit status.
+"$@"; st=$?
+
+# If it succeeded, we are done.
+test $st -eq 0 && exit 0
+
+# Also exit now if we it failed (or wasn't found), and '--version' was
+# passed; such an option is passed most likely to detect whether the
+# program is present and works.
+case $2 in --version|--help) exit $st;; esac
+
+# Exit code 63 means version mismatch.  This often happens when the user
+# tries to use an ancient version of a tool on a file that requires a
+# minimum version.
+if test $st -eq 63; then
+  msg="probably too old"
+elif test $st -eq 127; then
+  # Program was missing.
+  msg="missing on your system"
+else
+  # Program was found and executed, but failed.  Give up.
+  exit $st
+fi
+
+perl_URL=http://www.perl.org/
+flex_URL=http://flex.sourceforge.net/
+gnu_software_URL=http://www.gnu.org/software
+
+program_details ()
+{
+  case $1 in
+    aclocal|automake)
+      echo "The '$1' program is part of the GNU Automake package:"
+      echo "<$gnu_software_URL/automake>"
+      echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/autoconf>"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+    autoconf|autom4te|autoheader)
+      echo "The '$1' program is part of the GNU Autoconf package:"
+      echo "<$gnu_software_URL/autoconf/>"
+      echo "It also requires GNU m4 and Perl in order to run:"
+      echo "<$gnu_software_URL/m4/>"
+      echo "<$perl_URL>"
+      ;;
+  esac
+}
+
+give_advice ()
+{
+  # Normalize program name to check for.
+  normalized_program=`echo "$1" | sed '
+    s/^gnu-//; t
+    s/^gnu//; t
+    s/^g//; t'`
+
+  printf '%s\n' "'$1' is $msg."
+
+  configure_deps="'configure.ac' or m4 files included by 'configure.ac'"
+  case $normalized_program in
+    autoconf*)
+      echo "You should only need it if you modified 'configure.ac',"
+      echo "or m4 files included by it."
+      program_details 'autoconf'
+      ;;
+    autoheader*)
+      echo "You should only need it if you modified 'acconfig.h' or"
+      echo "$configure_deps."
+      program_details 'autoheader'
+      ;;
+    automake*)
+      echo "You should only need it if you modified 'Makefile.am' or"
+      echo "$configure_deps."
+      program_details 'automake'
+      ;;
+    aclocal*)
+      echo "You should only need it if you modified 'acinclude.m4' or"
+      echo "$configure_deps."
+      program_details 'aclocal'
+      ;;
+   autom4te*)
+      echo "You might have modified some maintainer files that require"
+      echo "the 'autom4te' program to be rebuilt."
+      program_details 'autom4te'
+      ;;
+    bison*|yacc*)
+      echo "You should only need it if you modified a '.y' file."
+      echo "You may want to install the GNU Bison package:"
+      echo "<$gnu_software_URL/bison/>"
+      ;;
+    lex*|flex*)
+      echo "You should only need it if you modified a '.l' file."
+      echo "You may want to install the Fast Lexical Analyzer package:"
+      echo "<$flex_URL>"
+      ;;
+    help2man*)
+      echo "You should only need it if you modified a dependency" \
+           "of a man page."
+      echo "You may want to install the GNU Help2man package:"
+      echo "<$gnu_software_URL/help2man/>"
+    ;;
+    makeinfo*)
+      echo "You should only need it if you modified a '.texi' file, or"
+      echo "any other file indirectly affecting the aspect of the manual."
+      echo "You might want to install the Texinfo package:"
+      echo "<$gnu_software_URL/texinfo/>"
+      echo "The spurious makeinfo call might also be the consequence of"
+      echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might"
+      echo "want to install GNU make:"
+      echo "<$gnu_software_URL/make/>"
+      ;;
+    *)
+      echo "You might have modified some files without having the proper"
+      echo "tools for further handling them.  Check the 'README' file, it"
+      echo "often tells you about the needed prerequisites for installing"
+      echo "this package.  You may also peek at any GNU archive site, in"
+      echo "case some other package contains this missing '$1' program."
+      ;;
+  esac
+}
+
+give_advice "$1" | sed -e '1s/^/WARNING: /' \
+                       -e '2,$s/^/         /' >&2
+
+# Propagate the correct exit status (expected to be 127 for a program
+# not found, 63 for a program that failed due to version mismatch).
+exit $st
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/po/ChangeLog b/po/ChangeLog
new file mode 100644
index 0000000..e69de29
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 0000000..e69de29
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644
index 0000000..06a8cfe
--- /dev/null
+++ b/po/Makefile.in.in
@@ -0,0 +1,222 @@
+# Makefile for program source directory in GNU NLS utilities package.
+# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper at gnu.ai.mit.edu>
+# Copyright (C) 2004-2008 Rodney Dawes <dobey.pwns at gmail.com>
+#
+# This file may be copied and used freely without restrictions.  It may
+# be used in projects which are not available under a GNU Public License,
+# but which still want to provide support for the GNU gettext functionality.
+#
+# - Modified by Owen Taylor <otaylor at redhat.com> to use GETTEXT_PACKAGE
+#   instead of PACKAGE and to look for po2tbl in ./ not in intl/
+#
+# - Modified by jacob berkman <jacob at ximian.com> to install
+#   Makefile.in.in and po2tbl.sed.in for use with glib-gettextize
+#
+# - Modified by Rodney Dawes <dobey.pwns at gmail.com> for use with intltool
+#
+# We have the following line for use by intltoolize:
+# INTLTOOL_MAKEFILE
+
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+top_builddir = @top_builddir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datadir = @datadir@
+datarootdir = @datarootdir@
+libdir = @libdir@
+DATADIRNAME = @DATADIRNAME@
+itlocaledir = $(prefix)/$(DATADIRNAME)/locale
+subdir = po
+install_sh = @install_sh@
+# Automake >= 1.8 provides @mkdir_p at .
+# Until it can be supposed, use the safe fallback:
+mkdir_p = $(install_sh) -d
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+GMSGFMT = @GMSGFMT@
+MSGFMT = @MSGFMT@
+XGETTEXT = @XGETTEXT@
+INTLTOOL_UPDATE = @INTLTOOL_UPDATE@
+INTLTOOL_EXTRACT = @INTLTOOL_EXTRACT@
+MSGMERGE = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist
+GENPOT   = INTLTOOL_EXTRACT="$(INTLTOOL_EXTRACT)" XGETTEXT="$(XGETTEXT)" srcdir=$(srcdir) $(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --pot
+
+ALL_LINGUAS = @ALL_LINGUAS@
+
+PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
+
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
+
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+
+POFILES=$(shell LINGUAS="$(PO_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.po "; done)
+
+DISTFILES = Makefile.in.in POTFILES.in $(POFILES)
+EXTRA_DISTFILES = ChangeLog POTFILES.skip Makevars LINGUAS
+
+POTFILES = \
+# This comment gets stripped out
+
+CATALOGS=$(shell LINGUAS="$(USE_LINGUAS)"; for lang in $$LINGUAS; do printf "$$lang.gmo "; done)
+
+.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:
+	$(INTLTOOL_V_MSGFMT)$(MSGFMT) -o $@ $<
+
+.po.gmo:
+	$(INTLTOOL_V_MSGFMT)file=`echo $* | sed 's,.*/,,'`.gmo \
+	  && rm -f $$file && $(GMSGFMT) -o $$file $<
+
+.po.cat:
+	sed -f ../intl/po2msg.sed < $< > $*.msg \
+	  && rm -f $@ && gencat $@ $*.msg
+
+
+all: all- at USE_NLS@
+
+all-yes: $(CATALOGS)
+all-no:
+
+$(GETTEXT_PACKAGE).pot: $(POTFILES)
+	$(GENPOT)
+
+install: install-data
+install-data: install-data- at USE_NLS@
+install-data-no: all
+install-data-yes: all
+	linguas="$(USE_LINGUAS)"; \
+	for lang in $$linguas; do \
+	  dir=$(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES; \
+	  $(mkdir_p) $$dir; \
+	  if test -r $$lang.gmo; then \
+	    $(INSTALL_DATA) $$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+	    echo "installing $$lang.gmo as $$dir/$(GETTEXT_PACKAGE).mo"; \
+	  else \
+	    $(INSTALL_DATA) $(srcdir)/$$lang.gmo $$dir/$(GETTEXT_PACKAGE).mo; \
+	    echo "installing $(srcdir)/$$lang.gmo as" \
+		 "$$dir/$(GETTEXT_PACKAGE).mo"; \
+	  fi; \
+	  if test -r $$lang.gmo.m; then \
+	    $(INSTALL_DATA) $$lang.gmo.m $$dir/$(GETTEXT_PACKAGE).mo.m; \
+	    echo "installing $$lang.gmo.m as $$dir/$(GETTEXT_PACKAGE).mo.m"; \
+	  else \
+	    if test -r $(srcdir)/$$lang.gmo.m ; then \
+	      $(INSTALL_DATA) $(srcdir)/$$lang.gmo.m \
+		$$dir/$(GETTEXT_PACKAGE).mo.m; \
+	      echo "installing $(srcdir)/$$lang.gmo.m as" \
+		   "$$dir/$(GETTEXT_PACKAGE).mo.m"; \
+	    else \
+	      true; \
+	    fi; \
+	  fi; \
+	done
+
+# Empty stubs to satisfy archaic automake needs
+dvi info ctags tags CTAGS TAGS ID:
+
+# Define this as empty until I found a useful application.
+install-exec installcheck:
+
+uninstall:
+	linguas="$(USE_LINGUAS)"; \
+	for lang in $$linguas; do \
+	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo; \
+	  rm -f $(DESTDIR)$(itlocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE).mo.m; \
+	done
+
+check: all $(GETTEXT_PACKAGE).pot
+	rm -f missing notexist
+	srcdir=$(srcdir) $(INTLTOOL_UPDATE) -m
+	if [ -r missing -o -r notexist ]; then \
+	  exit 1; \
+	fi
+
+mostlyclean:
+	rm -f *.pox $(GETTEXT_PACKAGE).pot *.old.po cat-id-tbl.tmp
+	rm -f .intltool-merge-cache
+
+clean: mostlyclean
+
+distclean: clean
+	rm -f Makefile Makefile.in POTFILES stamp-it
+	rm -f *.mo *.msg *.cat *.cat.m *.gmo
+
+maintainer-clean: distclean
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+	rm -f Makefile.in.in
+
+distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir: $(DISTFILES)
+	dists="$(DISTFILES)"; \
+	extra_dists="$(EXTRA_DISTFILES)"; \
+	for file in $$extra_dists; do \
+	  test -f $(srcdir)/$$file && dists="$$dists $(srcdir)/$$file"; \
+	done; \
+	for file in $$dists; do \
+	  test -f $$file || file="$(srcdir)/$$file"; \
+	  ln $$file $(distdir) 2> /dev/null \
+	    || cp -p $$file $(distdir); \
+	done
+
+update-po: Makefile
+	$(MAKE) $(GETTEXT_PACKAGE).pot
+	tmpdir=`pwd`; \
+	linguas="$(USE_LINGUAS)"; \
+	for lang in $$linguas; do \
+	  echo "$$lang:"; \
+	  result="`$(MSGMERGE) -o $$tmpdir/$$lang.new.po $$lang`"; \
+	  if $$result; then \
+	    if cmp $(srcdir)/$$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+	      rm -f $$tmpdir/$$lang.new.po; \
+            else \
+	      if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+	        :; \
+	      else \
+	        echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+	        rm -f $$tmpdir/$$lang.new.po; \
+	        exit 1; \
+	      fi; \
+	    fi; \
+	  else \
+	    echo "msgmerge for $$lang.gmo failed!"; \
+	    rm -f $$tmpdir/$$lang.new.po; \
+	  fi; \
+	done
+
+Makefile POTFILES: stamp-it
+	@if test ! -f $@; then \
+	  rm -f stamp-it; \
+	  $(MAKE) stamp-it; \
+	fi
+
+stamp-it: Makefile.in.in $(top_builddir)/config.status POTFILES.in
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/Makefile.in CONFIG_HEADERS= CONFIG_LINKS= \
+	       $(SHELL) ./config.status
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/POTFILES.in b/po/POTFILES.in
new file mode 100644
index 0000000..b48df4f
--- /dev/null
+++ b/po/POTFILES.in
@@ -0,0 +1,20 @@
+# List of source files containing translatable strings.
+
+src/main.c
+src/interface.c
+src/calculations.c
+src/callback_func.c
+src/callbacks.c
+src/cmnd_edit.c
+src/draw_radiation.c
+src/geom_edit.c
+src/geometry.c
+src/ground.c
+src/matrix.c
+src/misc.c
+src/nec2_model.c
+src/plot_freqdata.c
+src/radiation.c
+src/support.c
+src/xnec2c.c
+xnec2c.glade
diff --git a/src/Makefile.am b/src/Makefile.am
new file mode 100644
index 0000000..806c3cf
--- /dev/null
+++ b/src/Makefile.am
@@ -0,0 +1,41 @@
+## Process this file with automake to produce Makefile.in
+
+AM_CPPFLAGS = \
+	-DPROGRAMNAME_LOCALEDIR=\""$(PROGRAMNAME_LOCALEDIR)"\" \
+	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	@PACKAGE_CFLAGS@
+
+bin_PROGRAMS = xnec2c
+
+xnec2c_SOURCES = \
+	main.c		 	main.h \
+	support.c	 	support.h \
+	interface.c	 	interface.h \
+	callbacks.c	 	callbacks.h \
+	callback_func.c	callback_func.h \
+	calculations.c	calculations.h \
+	cmnd_edit.c		cmnd_edit.h \
+	geom_edit.c	 	geom_edit.h \
+	gnuplot.c	 	gnuplot.h \
+	draw.c		 	draw.h \
+	draw_structure.c draw_structure.h \
+	draw_radiation.c draw_radiation.h \
+	fields.c	 	fields.h \
+	fork.c	 		fork.h \
+	geometry.c	 	geometry.h \
+	ground.c	 	ground.h \
+	xnec2c.c	 	xnec2c.h \
+	input.c		 	input.h \
+	matrix.c	 	matrix.h \
+	utils.c		 	utils.h \
+	nec2_model.c 	nec2_model.h \
+	network.c	 	network.h \
+	plot_freqdata.c	plot_freqdata.h \
+	radiation.c	 	radiation.h \
+	shared.c	 	shared.h \
+	somnec.c	 	somnec.h \
+	common.h		editors.h
+
+xnec2c_LDADD = @PACKAGE_LIBS@ $(INTLLIBS)
+
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..07d5250
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,659 @@
+# Makefile.in generated by automake 1.14.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994-2013 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.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+ at SET_MAKE@
+
+VPATH = @srcdir@
+am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
+am__make_running_with_option = \
+  case $${target_option-} in \
+      ?) ;; \
+      *) echo "am__make_running_with_option: internal error: invalid" \
+              "target option '$${target_option-}' specified" >&2; \
+         exit 1;; \
+  esac; \
+  has_opt=no; \
+  sane_makeflags=$$MAKEFLAGS; \
+  if $(am__is_gnu_make); then \
+    sane_makeflags=$$MFLAGS; \
+  else \
+    case $$MAKEFLAGS in \
+      *\\[\ \	]*) \
+        bs=\\; \
+        sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
+          | sed "s/$$bs$$bs[$$bs $$bs	]*//g"`;; \
+    esac; \
+  fi; \
+  skip_next=no; \
+  strip_trailopt () \
+  { \
+    flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
+  }; \
+  for flg in $$sane_makeflags; do \
+    test $$skip_next = yes && { skip_next=no; continue; }; \
+    case $$flg in \
+      *=*|--*) continue;; \
+        -*I) strip_trailopt 'I'; skip_next=yes;; \
+      -*I?*) strip_trailopt 'I';; \
+        -*O) strip_trailopt 'O'; skip_next=yes;; \
+      -*O?*) strip_trailopt 'O';; \
+        -*l) strip_trailopt 'l'; skip_next=yes;; \
+      -*l?*) strip_trailopt 'l';; \
+      -[dEDm]) skip_next=yes;; \
+      -[JT]) skip_next=yes;; \
+    esac; \
+    case $$flg in \
+      *$$target_option*) has_opt=yes; break;; \
+    esac; \
+  done; \
+  test $$has_opt = yes
+am__make_dryrun = (target_option=n; $(am__make_running_with_option))
+am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+bin_PROGRAMS = xnec2c$(EXEEXT)
+subdir = src
+DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
+	$(top_srcdir)/depcomp
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+	$(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+am__installdirs = "$(DESTDIR)$(bindir)"
+PROGRAMS = $(bin_PROGRAMS)
+am_xnec2c_OBJECTS = main.$(OBJEXT) support.$(OBJEXT) \
+	interface.$(OBJEXT) callbacks.$(OBJEXT) \
+	callback_func.$(OBJEXT) calculations.$(OBJEXT) \
+	cmnd_edit.$(OBJEXT) geom_edit.$(OBJEXT) gnuplot.$(OBJEXT) \
+	draw.$(OBJEXT) draw_structure.$(OBJEXT) \
+	draw_radiation.$(OBJEXT) fields.$(OBJEXT) fork.$(OBJEXT) \
+	geometry.$(OBJEXT) ground.$(OBJEXT) xnec2c.$(OBJEXT) \
+	input.$(OBJEXT) matrix.$(OBJEXT) utils.$(OBJEXT) \
+	nec2_model.$(OBJEXT) network.$(OBJEXT) plot_freqdata.$(OBJEXT) \
+	radiation.$(OBJEXT) shared.$(OBJEXT) somnec.$(OBJEXT)
+xnec2c_OBJECTS = $(am_xnec2c_OBJECTS)
+am__DEPENDENCIES_1 =
+xnec2c_DEPENDENCIES = $(am__DEPENDENCIES_1)
+AM_V_P = $(am__v_P_ at AM_V@)
+am__v_P_ = $(am__v_P_ at AM_DEFAULT_V@)
+am__v_P_0 = false
+am__v_P_1 = :
+AM_V_GEN = $(am__v_GEN_ at AM_V@)
+am__v_GEN_ = $(am__v_GEN_ at AM_DEFAULT_V@)
+am__v_GEN_0 = @echo "  GEN     " $@;
+am__v_GEN_1 = 
+AM_V_at = $(am__v_at_ at AM_V@)
+am__v_at_ = $(am__v_at_ at AM_DEFAULT_V@)
+am__v_at_0 = @
+am__v_at_1 = 
+DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
+depcomp = $(SHELL) $(top_srcdir)/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_ at AM_V@)
+am__v_CC_ = $(am__v_CC_ at AM_DEFAULT_V@)
+am__v_CC_0 = @echo "  CC      " $@;
+am__v_CC_1 = 
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_ at AM_V@)
+am__v_CCLD_ = $(am__v_CCLD_ at AM_DEFAULT_V@)
+am__v_CCLD_0 = @echo "  CCLD    " $@;
+am__v_CCLD_1 = 
+SOURCES = $(xnec2c_SOURCES)
+DIST_SOURCES = $(xnec2c_SOURCES)
+am__can_run_installinfo = \
+  case $$AM_UPDATE_INFO_DIR in \
+    n|no|NO) false;; \
+    *) (install-info --version) >/dev/null 2>&1;; \
+  esac
+am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
+# Read a list of newline-separated strings from the standard input,
+# and print each of them once, without duplicates.  Input order is
+# *not* preserved.
+am__uniquify_input = $(AWK) '\
+  BEGIN { nonempty = 0; } \
+  { items[$$0] = 1; nonempty = 1; } \
+  END { if (nonempty) { for (i in items) print i; }; } \
+'
+# Make sure the list of sources is unique.  This is necessary because,
+# e.g., the same source file might be shared among _SOURCES variables
+# for different programs/libraries.
+am__define_uniq_tagged_files = \
+  list='$(am__tagged_files)'; \
+  unique=`for i in $$list; do \
+    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+  done | $(am__uniquify_input)`
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALL_LINGUAS = @ALL_LINGUAS@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DATADIRNAME = @DATADIRNAME@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+GREP = @GREP@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INSTOBJEXT = @INSTOBJEXT@
+INTLLIBS = @INTLLIBS@
+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@
+LDFLAGS = @LDFLAGS@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+MSGFMT_OPTS = @MSGFMT_OPTS@
+MSGMERGE = @MSGMERGE@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_CFLAGS = @PACKAGE_CFLAGS@
+PACKAGE_LIBS = @PACKAGE_LIBS@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PKG_CONFIG = @PKG_CONFIG@
+PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
+PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
+POFILES = @POFILES@
+POSUB = @POSUB@
+PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@
+PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@
+PROGRAMNAME_LOCALEDIR = @PROGRAMNAME_LOCALEDIR@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+XGETTEXT = @XGETTEXT@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build_alias = @build_alias@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host_alias = @host_alias@
+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@
+localstatedir = @localstatedir@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AM_CPPFLAGS = \
+	-DPROGRAMNAME_LOCALEDIR=\""$(PROGRAMNAME_LOCALEDIR)"\" \
+	-DPACKAGE_DATA_DIR=\""$(datadir)"\" \
+	-DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \
+	@PACKAGE_CFLAGS@
+
+xnec2c_SOURCES = \
+	main.c		 	main.h \
+	support.c	 	support.h \
+	interface.c	 	interface.h \
+	callbacks.c	 	callbacks.h \
+	callback_func.c	callback_func.h \
+	calculations.c	calculations.h \
+	cmnd_edit.c		cmnd_edit.h \
+	geom_edit.c	 	geom_edit.h \
+	gnuplot.c	 	gnuplot.h \
+	draw.c		 	draw.h \
+	draw_structure.c draw_structure.h \
+	draw_radiation.c draw_radiation.h \
+	fields.c	 	fields.h \
+	fork.c	 		fork.h \
+	geometry.c	 	geometry.h \
+	ground.c	 	ground.h \
+	xnec2c.c	 	xnec2c.h \
+	input.c		 	input.h \
+	matrix.c	 	matrix.h \
+	utils.c		 	utils.h \
+	nec2_model.c 	nec2_model.h \
+	network.c	 	network.h \
+	plot_freqdata.c	plot_freqdata.h \
+	radiation.c	 	radiation.h \
+	shared.c	 	shared.h \
+	somnec.c	 	somnec.h \
+	common.h		editors.h
+
+xnec2c_LDADD = @PACKAGE_LIBS@ $(INTLLIBS)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am  $(am__configure_deps)
+	@for dep in $?; do \
+	  case '$(am__configure_deps)' in \
+	    *$$dep*) \
+	      ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+	        && { if test -f $@; then exit 0; else break; fi; }; \
+	      exit 1;; \
+	  esac; \
+	done; \
+	echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \
+	$(am__cd) $(top_srcdir) && \
+	  $(AUTOMAKE) --gnu src/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+	@case '$?' in \
+	  *config.status*) \
+	    cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+	  *) \
+	    echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+	    cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+	esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
+	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	@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 \
+	  ; then echo "$$p"; echo "$$p"; else :; fi; \
+	done | \
+	sed -e 'p;s,.*/,,;n;h' \
+	    -e 's|.*|.|' \
+	    -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+	sed 'N;N;N;s,\n, ,g' | \
+	$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+	  { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+	    if ($$2 == $$4) files[d] = files[d] " " $$1; \
+	    else { print "f", $$3 "/" $$4, $$1; } } \
+	  END { for (d in files) print "f", d, files[d] }' | \
+	while read type dir files; do \
+	    if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+	    test -z "$$files" || { \
+	      echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+	      $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+	    } \
+	; done
+
+uninstall-binPROGRAMS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+	files=`for p in $$list; do echo "$$p"; done | \
+	  sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+	      -e 's/$$/$(EXEEXT)/' \
+	`; \
+	test -n "$$list" || exit 0; \
+	echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+	cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+
+xnec2c$(EXEEXT): $(xnec2c_OBJECTS) $(xnec2c_DEPENDENCIES) $(EXTRA_xnec2c_DEPENDENCIES) 
+	@rm -f xnec2c$(EXEEXT)
+	$(AM_V_CCLD)$(LINK) $(xnec2c_OBJECTS) $(xnec2c_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT)
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/calculations.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/callback_func.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/callbacks.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cmnd_edit.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/draw.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/draw_radiation.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/draw_structure.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fields.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fork.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/geom_edit.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/geometry.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gnuplot.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ground.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/input.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/interface.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/matrix.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nec2_model.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/network.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/plot_freqdata.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/radiation.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/shared.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/somnec.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/support.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/utils.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xnec2c.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ $<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	$(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
+ at am__fastdepCC_TRUE@	$(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(AM_V_CC at am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+ID: $(am__tagged_files)
+	$(am__define_uniq_tagged_files); mkid -fID $$unique
+tags: tags-am
+TAGS: tags
+
+tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	set x; \
+	here=`pwd`; \
+	$(am__define_uniq_tagged_files); \
+	shift; \
+	if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+	  test -n "$$unique" || unique=$$empty_fix; \
+	  if test $$# -gt 0; then \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      "$$@" $$unique; \
+	  else \
+	    $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	      $$unique; \
+	  fi; \
+	fi
+ctags: ctags-am
+
+CTAGS: ctags
+ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
+	$(am__define_uniq_tagged_files); \
+	test -z "$(CTAGS_ARGS)$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$unique
+
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && $(am__cd) $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) "$$here"
+cscopelist: cscopelist-am
+
+cscopelist-am: $(am__tagged_files)
+	list='$(am__tagged_files)'; \
+	case "$(srcdir)" in \
+	  [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+	  *) sdir=$(subdir)/$(srcdir) ;; \
+	esac; \
+	for i in $$list; do \
+	  if test -f "$$i"; then \
+	    echo "$(subdir)/$$i"; \
+	  else \
+	    echo "$$sdir/$$i"; \
+	  fi; \
+	done >> $(top_builddir)/cscope.files
+
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+	list='$(DISTFILES)'; \
+	  dist_files=`for file in $$list; do echo $$file; done | \
+	  sed -e "s|^$$srcdirstrip/||;t" \
+	      -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+	case $$dist_files in \
+	  */*) $(MKDIR_P) `echo "$$dist_files" | \
+			   sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+			   sort -u` ;; \
+	esac; \
+	for file in $$dist_files; do \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+	    if test -d "$(distdir)/$$file"; then \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+	      find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+	    fi; \
+	    cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+	  else \
+	    test -f "$(distdir)/$$file" \
+	    || cp -p $$d/$$file "$(distdir)/$$file" \
+	    || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-am
+all-am: Makefile $(PROGRAMS)
+installdirs:
+	for dir in "$(DESTDIR)$(bindir)"; do \
+	  test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+	done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+	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:
+
+distclean-generic:
+	-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+	-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+	@echo "This command is intended for maintainers to use"
+	@echo "it deletes files that may require special tools to rebuild."
+clean: clean-am
+
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
+
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
+
+dvi: dvi-am
+
+dvi-am:
+
+html: html-am
+
+html-am:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-am
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-html: install-html-am
+
+install-html-am:
+
+install-info: install-info-am
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-am
+
+install-pdf-am:
+
+install-ps: install-ps-am
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
+
+pdf: pdf-am
+
+pdf-am:
+
+ps: ps-am
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean \
+	clean-binPROGRAMS clean-generic cscopelist-am ctags ctags-am \
+	distclean distclean-compile distclean-generic distclean-tags \
+	distdir dvi dvi-am html html-am info info-am install \
+	install-am install-binPROGRAMS 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 maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
+	ps ps-am tags tags-am uninstall uninstall-am \
+	uninstall-binPROGRAMS
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/src/calculations.c b/src/calculations.c
new file mode 100644
index 0000000..c61780a
--- /dev/null
+++ b/src/calculations.c
@@ -0,0 +1,1408 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/******* Translated to the C language by N. Kyriazis  20 Aug 2003 ******
+ *
+ * Program NEC(input,tape5=input,output,tape11,tape12,tape13,tape14,
+ * tape15,tape16,tape20,tape21)
+ *
+ * Numerical Electromagnetics Code (NEC2)  developed at Lawrence
+ * Livermore lab., Livermore, CA.  (contact G. Burke at 415-422-8414
+ * for problems with the NEC code. For problems with the vax implem-
+ * entation, contact J. Breakall at 415-422-8196 or E. Domning at 415
+ * 422-5936)
+ * file created 4/11/80
+ *
+ *                ***********Notice**********
+ * This computer code material was prepared as an account of work
+ * sponsored by the United States government.  Neither the United
+ * States nor the United States Department Of Energy, nor any of
+ * their employees, nor any of their contractors, subcontractors,
+ * or their employees, makes any warranty, express or implied, or
+ * assumes any legal liability or responsibility for the accuracy,
+ * completeness or usefulness of any information, apparatus, product
+ * or process disclosed, or represents that its use would not infringe
+ * privately-owned rights.
+ *
+ ***********************************************************************/
+
+#include "calculations.h"
+#include "shared.h"
+
+/*-------------------------------------------------------------------*/
+
+/* fill incident field array for charge discontinuity voltage source */
+void qdsrc( int is, complex double v, complex double *e )
+{
+  int i, jx, j, jp1, ipr, ij, i1;
+  double xi, yi, zi, ai, cabi, sabi, salpi, tx, ty, tz;
+  complex double curd, etk, ets, etc;
+
+  is--;
+  i= data.icon1[is];
+  data.icon1[is]=0;
+  tbf( is+1,0);
+  data.icon1[is]= i;
+  dataj.s= data.si[is]*.5;
+  curd= CCJ* v/(( log(2.0 * dataj.s/ data.bi[is])-1.0) *
+	  ( segj.bx[segj.jsno-1] * cos( TP* dataj.s) +
+		segj.cx[segj.jsno-1] * sin( TP* dataj.s))* data.wlam);
+  vsorc.vqds[vsorc.nqds]= v;
+  vsorc.iqds[vsorc.nqds]= is+1;
+  vsorc.nqds++;
+
+  for( jx = 0; jx < segj.jsno; jx++ )
+  {
+	j= segj.jco[jx]-1;
+	jp1 = j+1;
+	dataj.s= data.si[j];
+	dataj.b= data.bi[j];
+	dataj.xj= data.x[j];
+	dataj.yj= data.y[j];
+	dataj.zj= data.z[j];
+	dataj.cabj= data.cab[j];
+	dataj.sabj= data.sab[j];
+	dataj.salpj= data.salp[j];
+
+	if( dataj.iexk != 0)
+	{
+	  ipr= data.icon1[j];
+
+	  if (ipr > PCHCON) dataj.ind1=2;
+	  else if( ipr < 0 )
+	  {
+		ipr= -ipr;
+		ipr--;
+		if( -data.icon1[ipr-1] != jp1 )
+		  dataj.ind1=2;
+		else
+		{
+		  xi= fabs( dataj.cabj* data.cab[ipr]+ dataj.sabj*
+			  data.sab[ipr]+ dataj.salpj* data.salp[ipr]);
+		  if( (xi < 0.999999) ||
+			  (fabs(data.bi[ipr]/dataj.b-1.0) > 1.0e-6) )
+			dataj.ind1=2;
+		  else
+			dataj.ind1=0;
+		}
+	  }  /* if( ipr < 0 ) */
+	  else if( ipr == 0 )
+		dataj.ind1=1;
+	  else /* ipr > 0 */
+	  {
+		ipr--;
+		if( ipr != j )
+		{
+		  if( data.icon2[ipr] != jp1)
+			dataj.ind1=2;
+		  else
+		  {
+			xi= fabs( dataj.cabj* data.cab[ipr]+ dataj.sabj*
+				data.sab[ipr]+ dataj.salpj* data.salp[ipr]);
+			if( (xi < 0.999999) ||
+				(fabs(data.bi[ipr]/dataj.b-1.0) > 1.0e-6) )
+			  dataj.ind1=2;
+			else
+			  dataj.ind1=0;
+		  }
+		} /* if( ipr != j ) */
+		else
+		{
+		  if( (dataj.cabj*dataj.cabj + dataj.sabj*dataj.sabj) > 1.0e-8)
+			dataj.ind1=2;
+		  else
+			dataj.ind1=0;
+		}
+	  } /* else */
+
+	  ipr= data.icon2[j];
+	  if (ipr > PCHCON) dataj.ind2=2;
+	  else if( ipr < 0 )
+	  {
+		ipr = -ipr;
+		ipr--;
+		if( -data.icon2[ipr] != jp1 )
+		  dataj.ind1=2;
+		else
+		{
+		  xi= fabs( dataj.cabj* data.cab[ipr]+ dataj.sabj *
+			  data.sab[ipr]+ dataj.salpj* data.salp[ipr]);
+		  if( (xi < 0.999999) ||
+			  (fabs(data.bi[ipr]/dataj.b-1.0) > 1.0e-6) )
+			dataj.ind1=2;
+		  else
+			dataj.ind1=0;
+		}
+	  } /* if( ipr < 0 ) */
+	  else if( ipr == 0 )
+		dataj.ind2=1;
+	  else /* ipr > 0 */
+	  {
+		ipr--;
+		if( ipr != j )
+		{
+		  if( data.icon1[ipr] != jp1)
+			dataj.ind2=2;
+		  else
+		  {
+			xi= fabs( dataj.cabj* data.cab[ipr]+ dataj.sabj*
+				data.sab[ipr]+ dataj.salpj* data.salp[ipr]);
+			if( (xi < 0.9999990) ||
+				(fabs(data.bi[ipr]/dataj.b-1.0) > 1.0e-6) )
+			  dataj.ind2=2;
+			else
+			  dataj.ind2=0;
+		  }
+		} /* if( ipr != j )*/
+		else
+		{
+		  if( (dataj.cabj* dataj.cabj + dataj.sabj* dataj.sabj) > 1.0e-8)
+			dataj.ind1=2;
+		  else
+			dataj.ind1=0;
+		}
+	  } /* else */
+
+	} /* if( dataj.iexk != 0) */
+
+	for( i = 0; i < data.n; i++ )
+	{
+	  ij= i- j;
+	  xi= data.x[i];
+	  yi= data.y[i];
+	  zi= data.z[i];
+	  ai= data.bi[i];
+	  efld( xi, yi, zi, ai, ij);
+	  cabi= data.cab[i];
+	  sabi= data.sab[i];
+	  salpi= data.salp[i];
+	  etk= dataj.exk* cabi+ dataj.eyk* sabi+ dataj.ezk* salpi;
+	  ets= dataj.exs* cabi+ dataj.eys* sabi+ dataj.ezs* salpi;
+	  etc= dataj.exc* cabi+ dataj.eyc* sabi+ dataj.ezc* salpi;
+	  e[i]= e[i]-( etk* segj.ax[jx] +
+		  ets* segj.bx[jx]+ etc* segj.cx[jx])* curd;
+	}
+
+	if( data.m != 0)
+	{
+	  i1= data.n-1;
+	  for( i = 0; i < data.m; i++ )
+	  {
+		xi= data.px[i];
+		yi= data.py[i];
+		zi= data.pz[i];
+		hsfld( xi, yi, zi, 0.0);
+		i1++;
+		tx= data.t2x[i];
+		ty= data.t2y[i];
+		tz= data.t2z[i];
+		etk= dataj.exk* tx+ dataj.eyk* ty+ dataj.ezk* tz;
+		ets= dataj.exs* tx+ dataj.eys* ty+ dataj.ezs* tz;
+		etc= dataj.exc* tx+ dataj.eyc* ty+ dataj.ezc* tz;
+		e[i1] += ( etk* segj.ax[jx]+ ets* segj.bx[jx]+
+			etc* segj.cx[jx] )* curd* data.psalp[i];
+		i1++;
+		tx= data.t1x[i];
+		ty= data.t1y[i];
+		tz= data.t1z[i];
+		etk= dataj.exk* tx+ dataj.eyk* ty+ dataj.ezk* tz;
+		ets= dataj.exs* tx+ dataj.eys* ty+ dataj.ezs* tz;
+		etc= dataj.exc* tx+ dataj.eyc* ty+ dataj.ezc* tz;
+		e[i1] += ( etk* segj.ax[jx]+ ets* segj.bx[jx]+
+			etc* segj.cx[jx])* curd* data.psalp[i];
+	  }
+
+	} /* if( m != 0) */
+
+	if( zload.nload > 0 )
+	  e[j] += zload.zarray[j]* curd*(segj.ax[jx]+ segj.cx[jx]);
+
+  } /* for( jx = 0; jx < segj.jsno; jx++ ) */
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* cabc computes coefficients of the constant (a), sine (b), and */
+/* cosine (c) terms in the current interpolation functions for the */
+/* current vector cur. */
+void cabc( complex double *curx)
+{
+  int i, is, j, jx, jco1, jco2;
+  double ar, ai, sh;
+  complex double curd, cs1, cs2;
+
+  if( data.n != 0)
+  {
+	for( i = 0; i < data.n; i++ )
+	{
+	  crnt.air[i]=0.0;
+	  crnt.aii[i]=0.0;
+	  crnt.bir[i]=0.0;
+	  crnt.bii[i]=0.0;
+	  crnt.cir[i]=0.0;
+	  crnt.cii[i]=0.0;
+	}
+
+	for( i = 0; i < data.n; i++ )
+	{
+	  ar= creal( curx[i]);
+	  ai= cimag( curx[i]);
+	  tbf( i+1, 1 );
+
+	  for( jx = 0; jx < segj.jsno; jx++ )
+	  {
+		j= segj.jco[jx]-1;
+		crnt.air[j] += segj.ax[jx]* ar;
+		crnt.aii[j] += segj.ax[jx]* ai;
+		crnt.bir[j] += segj.bx[jx]* ar;
+		crnt.bii[j] += segj.bx[jx]* ai;
+		crnt.cir[j] += segj.cx[jx]* ar;
+		crnt.cii[j] += segj.cx[jx]* ai;
+	  }
+
+	} /* for( i = 0; i < n; i++ ) */
+
+	if( vsorc.nqds != 0)
+	{
+	  for( is = 0; is < vsorc.nqds; is++ )
+	  {
+		i= vsorc.iqds[is]-1;
+		jx= data.icon1[i];
+		data.icon1[i]=0;
+		tbf(i+1,0);
+		data.icon1[i]= jx;
+		sh= data.si[i]*.5;
+		curd= CCJ* vsorc.vqds[is]/( (log(2.0* sh/ data.bi[i])-1.0) *
+			(segj.bx[segj.jsno-1]* cos(TP* sh)+ segj.cx[segj.jsno-1] *
+			 sin(TP* sh))* data.wlam );
+		ar= creal( curd);
+		ai= cimag( curd);
+
+		for( jx = 0; jx < segj.jsno; jx++ )
+		{
+		  j= segj.jco[jx]-1;
+		  crnt.air[j]= crnt.air[j]+ segj.ax[jx]* ar;
+		  crnt.aii[j]= crnt.aii[j]+ segj.ax[jx]* ai;
+		  crnt.bir[j]= crnt.bir[j]+ segj.bx[jx]* ar;
+		  crnt.bii[j]= crnt.bii[j]+ segj.bx[jx]* ai;
+		  crnt.cir[j]= crnt.cir[j]+ segj.cx[jx]* ar;
+		  crnt.cii[j]= crnt.cii[j]+ segj.cx[jx]* ai;
+		}
+
+	  } /* for( is = 0; is < vsorc.nqds; is++ ) */
+
+	} /* if( vsorc.nqds != 0) */
+
+	for( i = 0; i < data.n; i++ )
+	  curx[i]= cmplx( crnt.air[i]+crnt.cir[i], crnt.aii[i]+crnt.cii[i] );
+
+  } /* if( n != 0) */
+
+  if( data.m == 0)
+	return;
+
+  /* convert surface currents from */
+  /* t1,t2 components to x,y,z components */
+  jco1= data.np2m;
+  jco2= jco1+ data.m;
+  for( i = 1; i <= data.m; i++ )
+  {
+	jco1 -= 2;
+	jco2 -= 3;
+	cs1= curx[jco1];
+	cs2= curx[jco1+1];
+	curx[jco2]  = cs1* data.t1x[data.m-i]+ cs2* data.t2x[data.m-i];
+	curx[jco2+1]= cs1* data.t1y[data.m-i]+ cs2* data.t2y[data.m-i];
+	curx[jco2+2]= cs1* data.t1z[data.m-i]+ cs2* data.t2z[data.m-i];
+  }
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* function db10 returns db for magnitude (field) */
+double db10( double x )
+{
+  if( x < 1.0e-20 )
+	return( -999.99 );
+
+  return( 10.0 * log10(x) );
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* function db20 returns db for mag**2 (power) i */
+double db20( double x )
+{
+  if( x < 1.0e-20 )
+	return( -999.99 );
+
+  return( 20.0 * log10(x) );
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* intrp uses bivariate cubic interpolation to obtain */
+/* the values of 4 functions at the point (x,y). */
+void intrp( double x, double y, complex double *f1,
+	complex double *f2, complex double *f3, complex double *f4 )
+{
+  static int ix, iy, ixs=-10, iys=-10, igrs=-10, ixeg=0, iyeg=0;
+  static int nxm2, nym2, nxms, nyms, nd, ndp;
+  static int *nda = NULL, *ndpa = NULL;
+  int jump;
+  static double dx = 1.0, dy = 1.0, xs = 0.0, ys = 0.0, xz, yz;
+  double xx, yy;
+  static complex double a[4][4], b[4][4], c[4][4], d[4][4];
+  complex double p1=CPLX_00, p2=CPLX_00, p3=CPLX_00, p4=CPLX_00;
+  complex double fx1, fx2, fx3, fx4;
+  static gboolean first_call = TRUE;
+
+  if( first_call )
+  {
+	first_call = FALSE;
+	size_t mreq = 3*sizeof(int);
+	mem_alloc( (void *)&nda,  mreq, "in calculations.c");
+	mem_alloc( (void *)&ndpa, mreq, "in calculations.c");
+	nda[0] = 11; nda[1] = 17; nda[2] = 9;
+	ndpa[0] = 110; ndpa[1] = 85; ndpa[2] = 72;
+  }
+
+  jump = FALSE;
+  if( (x < xs) || (y < ys) )
+	jump = TRUE;
+  else
+  {
+	ix= (int)(( x- xs)/ dx)+1;
+	iy= (int)(( y- ys)/ dy)+1;
+  }
+
+  /* if point lies in same 4 by 4 point region */
+  /* as previous point, old values are reused. */
+  if( (ix < ixeg) ||
+	  (iy < iyeg) ||
+	  (abs(ix- ixs) >= 2) ||
+	  (abs(iy- iys) >= 2) ||
+	  jump )
+  {
+	int igr, iadd, iadz, i, k;
+
+	/* determine correct grid and grid region */
+	if( x <= ggrid.xsa[1])
+	  igr=0;
+	else
+	{
+	  if( y > ggrid.ysa[2])
+		igr=2;
+	  else
+		igr=1;
+	}
+
+	if( igr != igrs)
+	{
+	  igrs= igr;
+	  dx= ggrid.dxa[igrs];
+	  dy= ggrid.dya[igrs];
+	  xs= ggrid.xsa[igrs];
+	  ys= ggrid.ysa[igrs];
+	  nxm2= ggrid.nxa[igrs]-2;
+	  nym2= ggrid.nya[igrs]-2;
+	  nxms=(( nxm2+1)/3)*3+1;
+	  nyms=(( nym2+1)/3)*3+1;
+	  nd= nda[igrs];
+	  ndp= ndpa[igrs];
+	  ix= (int)(( x- xs)/ dx)+1;
+	  iy= (int)(( y- ys)/ dy)+1;
+
+	} /* if( igr != igrs) */
+
+	ixs=(( ix-1)/3)*3+2;
+	if( ixs < 2)
+	  ixs=2;
+	ixeg=-10000;
+
+	if( ixs > nxm2)
+	{
+	  ixs= nxm2;
+	  ixeg= nxms;
+	}
+
+	iys=(( iy-1)/3)*3+2;
+	if( iys < 2)
+	  iys=2;
+	iyeg=-10000;
+
+	if( iys > nym2)
+	{
+	  iys= nym2;
+	  iyeg= nyms;
+	}
+
+	/* compute coefficients of 4 cubic polynomials in x for */
+	/* the 4 grid values of y for each of the 4 functions */
+	iadz= ixs+( iys-3)* nd- ndp;
+	for( k = 0; k < 4; k++ )
+	{
+	  iadz += ndp;
+	  iadd = iadz;
+
+	  for( i = 0; i < 4; i++ )
+	  {
+		iadd += nd;
+
+		switch( igrs )
+		{
+		  case 0:
+			p1= ggrid.ar1[iadd-2];
+			p2= ggrid.ar1[iadd-1];
+			p3= ggrid.ar1[iadd];
+			p4= ggrid.ar1[iadd+1];
+			break;
+
+		  case 1:
+			p1= ggrid.ar2[iadd-2];
+			p2= ggrid.ar2[iadd-1];
+			p3= ggrid.ar2[iadd];
+			p4= ggrid.ar2[iadd+1];
+			break;
+
+		  case 2:
+			p1= ggrid.ar3[iadd-2];
+			p2= ggrid.ar3[iadd-1];
+			p3= ggrid.ar3[iadd];
+			p4= ggrid.ar3[iadd+1];
+
+		} /* switch( igrs ) */
+
+		a[i][k]=( p4- p1+3.0*( p2- p3))*.1666666667;
+		b[i][k]=( p1-2.0* p2+ p3)*.5;
+		c[i][k]= p3-(2.0* p1+3.0* p2+ p4)*.1666666667;
+		d[i][k]= p2;
+
+	  } /* for( i = 0; i < 4; i++ ) */
+
+	} /* for( k = 0; k < 4; k++ ) */
+
+	xz=( ixs-1)* dx+ xs;
+	yz=( iys-1)* dy+ ys;
+
+  } /* if( (abs(ix- ixs) >= 2) || */
+
+  /* evaluate polymomials in x and use cubic */
+  /* interpolation in y for each of the 4 functions. */
+  xx=( x- xz)/ dx;
+  yy=( y- yz)/ dy;
+  fx1=(( a[0][0]* xx+ b[0][0])* xx+ c[0][0])* xx+ d[0][0];
+  fx2=(( a[1][0]* xx+ b[1][0])* xx+ c[1][0])* xx+ d[1][0];
+  fx3=(( a[2][0]* xx+ b[2][0])* xx+ c[2][0])* xx+ d[2][0];
+  fx4=(( a[3][0]* xx+ b[3][0])* xx+ c[3][0])* xx+ d[3][0];
+  p1= fx4- fx1+3.0*( fx2- fx3);
+  p2=3.0*( fx1-2.0* fx2+ fx3);
+  p3=6.0* fx3-2.0* fx1-3.0* fx2- fx4;
+  *f1=(( p1* yy+ p2)* yy+ p3)* yy*.1666666667+ fx2;
+  fx1=(( a[0][1]* xx+ b[0][1])* xx+ c[0][1])* xx+ d[0][1];
+  fx2=(( a[1][1]* xx+ b[1][1])* xx+ c[1][1])* xx+ d[1][1];
+  fx3=(( a[2][1]* xx+ b[2][1])* xx+ c[2][1])* xx+ d[2][1];
+  fx4=(( a[3][1]* xx+ b[3][1])* xx+ c[3][1])* xx+ d[3][1];
+  p1= fx4- fx1+3.0*( fx2- fx3);
+  p2=3.0*( fx1-2.0* fx2+ fx3);
+  p3=6.0* fx3-2.0* fx1-3.0* fx2- fx4;
+  *f2=(( p1* yy+ p2)* yy+ p3)* yy*.1666666667+ fx2;
+  fx1=(( a[0][2]* xx+ b[0][2])* xx+ c[0][2])* xx+ d[0][2];
+  fx2=(( a[1][2]* xx+ b[1][2])* xx+ c[1][2])* xx+ d[1][2];
+  fx3=(( a[2][2]* xx+ b[2][2])* xx+ c[2][2])* xx+ d[2][2];
+  fx4=(( a[3][2]* xx+ b[3][2])* xx+ c[3][2])* xx+ d[3][2];
+  p1= fx4- fx1+3.0*( fx2- fx3);
+  p2=3.0*( fx1-2.0* fx2+ fx3);
+  p3=6.0* fx3-2.0* fx1-3.0* fx2- fx4;
+  *f3=(( p1* yy+ p2)* yy+ p3)* yy*.1666666667+ fx2;
+  fx1=(( a[0][3]* xx+ b[0][3])* xx+ c[0][3])* xx+ d[0][3];
+  fx2=(( a[1][3]* xx+ b[1][3])* xx+ c[1][3])* xx+ d[1][3];
+  fx3=(( a[2][3]* xx+ b[2][3])* xx+ c[2][3])* xx+ d[2][3];
+  fx4=(( a[3][3]* xx+ b[3][3])* xx+ c[3][3])* xx+ d[3][3];
+  p1= fx4- fx1+3.0*( fx2- fx3);
+  p2=3.0*( fx1-2.0* fx2+ fx3);
+  p3=6.0* fx3-2.0* fx1-3.0* fx2- fx4;
+  *f4=(( p1* yy+ p2)* yy+ p3)* yy*.1666666667+ fx2;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* intx performs numerical integration of exp(jkr)/r by the method of */
+/* variable interval width romberg integration.  the integrand value */
+/* is supplied by subroutine gf. */
+void intx( double el1, double el2, double b,
+	int ij, double *sgr, double *sgi )
+{
+  int ns, nt;
+  int nx = 1, nma = 65536, nts = 4;
+  int flag = TRUE;
+  double z, s, ze, fnm, ep, zend, fns, dz=0.0, zp;
+  double t00r, g1r, g5r=0.0, t00i, g1i, g5i=0.0, t01r, g3r=0.0;
+  double t01i, g3i=0.0, t10r, t10i, te1i, te1r, t02r;
+  double g2r, g4r, t02i, g2i, g4i, t11r, t11i, t20r;
+  double  t20i, te2i, te2r, rx = 1.0e-4, dzot=0.0;
+
+  z= el1;
+  ze= el2;
+  if( ij == 0)
+	ze=0.0;
+  s= ze- z;
+  fnm= nma;
+  ep= s/(10.0* fnm);
+  zend= ze- ep;
+  *sgr=0.0;
+  *sgi=0.0;
+  ns= nx;
+  nt=0;
+  gf( z, &g1r, &g1i);
+
+  while( TRUE )
+  {
+	if( flag )
+	{
+	  fns= ns;
+	  dz= s/ fns;
+	  zp= z+ dz;
+
+	  if( zp > ze)
+	  {
+		dz= ze- z;
+		if( fabs(dz) <= ep)
+		{
+		  /* add contribution of near singularity for diagonal term */
+		  if(ij == 0)
+		  {
+			*sgr=2.0*( *sgr+ log(( sqrt( b* b+ s* s)+ s)/ b));
+			*sgi=2.0* *sgi;
+		  }
+		  return;
+		}
+
+	  } /* if( zp > ze) */
+
+	  dzot= dz*.5;
+	  zp= z+ dzot;
+	  gf( zp, &g3r, &g3i);
+	  zp= z+ dz;
+	  gf( zp, &g5r, &g5i);
+
+	} /* if( flag ) */
+
+	t00r=( g1r+ g5r)* dzot;
+	t00i=( g1i+ g5i)* dzot;
+	t01r=( t00r+ dz* g3r)*0.5;
+	t01i=( t00i+ dz* g3i)*0.5;
+	t10r=(4.0* t01r- t00r)/3.0;
+	t10i=(4.0* t01i- t00i)/3.0;
+
+	/* test convergence of 3 point romberg result. */
+	test( t01r, t10r, &te1r, t01i, t10i, &te1i, 0.0);
+	if( (te1i <= rx) && (te1r <= rx) )
+	{
+	  *sgr= *sgr+ t10r;
+	  *sgi= *sgi+ t10i;
+	  nt += 2;
+
+	  z += dz;
+	  if( z >= zend)
+	  {
+		/* add contribution of near singularity for diagonal term */
+		if(ij == 0)
+		{
+		  *sgr=2.0*( *sgr+ log(( sqrt( b* b+ s* s)+ s)/ b));
+		  *sgi=2.0* *sgi;
+		}
+		return;
+	  }
+
+	  g1r= g5r;
+	  g1i= g5i;
+	  if( nt >= nts)
+		if( ns > nx)
+		{
+		  /* Double step size */
+		  ns= ns/2;
+		  nt=1;
+		}
+	  flag = TRUE;
+	  continue;
+
+	} /* if( (te1i <= rx) && (te1r <= rx) ) */
+
+	zp= z+ dz*0.25;
+	gf( zp, &g2r, &g2i);
+	zp= z+ dz*0.75;
+	gf( zp, &g4r, &g4i);
+	t02r=( t01r+ dzot*( g2r+ g4r))*0.5;
+	t02i=( t01i+ dzot*( g2i+ g4i))*0.5;
+	t11r=(4.0* t02r- t01r)/3.0;
+	t11i=(4.0* t02i- t01i)/3.0;
+	t20r=(16.0* t11r- t10r)/15.0;
+	t20i=(16.0* t11i- t10i)/15.0;
+
+	/* test convergence of 5 point romberg result. */
+	test( t11r, t20r, &te2r, t11i, t20i, &te2i, 0.0);
+	if( (te2i > rx) || (te2r > rx) )
+	{
+	  nt=0;
+	  if( ns >= nma)
+		fprintf( stderr,
+			"xnec2c: step size limited at z= %10.5f\n", z );
+	  else
+	  {
+		/* halve step size */
+		ns= ns*2;
+		fns= ns;
+		dz= s/ fns;
+		dzot= dz*0.5;
+		g5r= g3r;
+		g5i= g3i;
+		g3r= g2r;
+		g3i= g2i;
+
+		flag = FALSE;
+		continue;
+	  }
+
+	} /* if( (te2i > rx) || (te2r > rx) ) */
+
+	*sgr= *sgr+ t20r;
+	*sgi= *sgi+ t20i;
+	nt++;
+
+	z += dz;
+	if( z >= zend)
+	{
+	  /* add contribution of near singularity for diagonal term */
+	  if(ij == 0)
+	  {
+		*sgr=2.0*( *sgr+ log(( sqrt( b* b+ s* s)+ s)/ b));
+		*sgi=2.0* *sgi;
+	  }
+	  return;
+	}
+
+	g1r= g5r;
+	g1i= g5i;
+	if( nt >= nts)
+	  if( ns > nx)
+	  {
+		/* Double step size */
+		ns= ns/2;
+		nt=1;
+	  }
+	flag = TRUE;
+
+  } /* while( TRUE ) */
+
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* returns smallest of two arguments */
+int min( int a, int b )
+{
+  if( a < b )
+	return(a);
+  else
+	return(b);
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* test for convergence in numerical integration */
+void test( double f1r, double f2r, double *tr,
+	double f1i, double f2i, double *ti, double dmin )
+{
+  double den;
+
+  den= fabs( f2r);
+  *tr= fabs( f2i);
+
+  if( den < *tr)
+	den= *tr;
+  if( den < dmin)
+	den= dmin;
+
+  if( den < 1.0e-37)
+  {
+	*tr=0.0;
+	*ti=0.0;
+	return;
+  }
+
+  *tr= fabs(( f1r- f2r)/ den);
+  *ti= fabs(( f1i- f2i)/ den);
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* compute component of basis function i on segment is. */
+  void
+sbf( int i, int is, double *aa, double *bb, double *cc )
+{
+  int ix, jsno, june, jcox, jcoxx, jend, iend, njun1=0, njun2;
+  double d, sig, pp, sdh, cdh, sd, omc;
+  double aj, pm=0, cd, ap, qp, qm, xxi;
+
+  *aa=0.0;
+  *bb=0.0;
+  *cc=0.0;
+  june=0;
+  jsno=0;
+  pp=0.0;
+  ix=i-1;
+
+  jcox= data.icon1[ix];
+  if( jcox > PCHCON)
+	jcox= i;
+
+  jend=-1;
+  iend=-1;
+  sig=-1.0;
+
+  do
+  {
+	if( jcox != 0 )
+	{
+	  if( jcox < 0 )
+		jcox= -jcox;
+	  else
+	  {
+		sig= -sig;
+		jend= -jend;
+	  }
+
+	  jcoxx = jcox-1;
+	  jsno++;
+	  d= PI* data.si[jcoxx];
+	  sdh= sin( d);
+	  cdh= cos( d);
+	  sd=2.0* sdh* cdh;
+
+	  if( d <= 0.015)
+	  {
+		omc=4.0* d* d;
+		omc=((1.3888889e-3* omc -4.1666666667e-2)* omc +.5)* omc;
+	  }
+	  else omc=1.0- cdh* cdh+ sdh* sdh;
+
+	  aj=1.0/( log(1.0/( PI* data.bi[jcoxx]))-.577215664);
+	  pp -= omc/ sd* aj;
+
+	  if( jcox == is)
+	  {
+		*aa= aj/ sd* sig;
+		*bb= aj/(2.0* cdh);
+		*cc= -aj/(2.0* sdh)* sig;
+		june= iend;
+	  }
+
+	  if( jcox != i )
+	  {
+		if( jend != 1)
+		  jcox= data.icon1[jcoxx];
+		else
+		  jcox= data.icon2[jcoxx];
+
+		if( abs(jcox) != i )
+		{
+		  if( jcox == 0 )
+		  {
+			fprintf( stderr,
+				"xnec2c: sbf(): segment connection error for segment %d\n", i );
+			stop( _("Segment connection error in sbf()"), ERR_STOP );
+		  }
+		  else continue;
+		}
+
+	  } /* if( jcox != i ) */
+	  else if( jcox == is)
+		  *bb= -*bb;
+
+	  if( iend == 1) break;
+
+	} /* if( jcox != 0 ) */
+
+	pm= -pp;
+	pp=0.0;
+	njun1= jsno;
+
+	jcox= data.icon2[ix];
+	if( jcox > PCHCON)
+	  jcox= i;
+
+	jend=1;
+	iend=1;
+	sig=-1.0;
+
+  } /* do */
+  while( jcox != 0 );
+
+  njun2= jsno- njun1;
+  d= PI* data.si[ix];
+  sdh= sin( d);
+  cdh= cos( d);
+  sd=2.0* sdh* cdh;
+  cd= cdh* cdh- sdh* sdh;
+
+  if( d <= 0.015)
+  {
+	omc=4.0* d* d;
+	omc=((1.3888889e-3* omc -4.1666666667e-2)* omc +.5)* omc;
+  }
+  else omc=1.0- cd;
+
+  ap=1.0/( log(1.0/( PI* data.bi[ix])) -.577215664);
+  aj= ap;
+
+  if( njun1 == 0)
+  {
+	if( njun2 == 0)
+	{
+	  *aa =-1.0;
+	  qp= PI* data.bi[ix];
+	  xxi= qp* qp;
+	  xxi= qp*(1.0-.5* xxi)/(1.0- xxi);
+	  *cc=1.0/( cdh- xxi* sdh);
+	  return;
+	}
+
+	qp= PI* data.bi[ix];
+	xxi= qp* qp;
+	xxi= qp*(1.0-.5* xxi)/(1.0- xxi);
+	qp=-( omc+ xxi* sd)/( sd*( ap+ xxi* pp)+ cd*( xxi* ap- pp));
+
+	if( june == 1)
+	{
+	  *aa= -*aa* qp;
+	  *bb=  *bb* qp;
+	  *cc= -*cc* qp;
+	  if( i != is)
+		return;
+	}
+
+	*aa -= 1.0;
+	d = cd - xxi * sd;
+	*bb += (sdh + ap * qp * (cdh - xxi * sdh)) / d;
+	*cc += (cdh + ap * qp * (sdh + xxi * cdh)) / d;
+	return;
+
+  } /* if( njun1 == 0) */
+
+  if( njun2 == 0)
+  {
+	qm= PI* data.bi[ix];
+	xxi= qm* qm;
+	xxi= qm*(1.0-.5* xxi)/(1.0- xxi);
+	qm=( omc+ xxi* sd)/( sd*( aj- xxi* pm)+ cd*( pm+ xxi* aj));
+
+	if( june == -1)
+	{
+	  *aa= *aa* qm;
+	  *bb= *bb* qm;
+	  *cc= *cc* qm;
+	  if( i != is)
+		return;
+	}
+
+	*aa -= 1.0;
+	d= cd- xxi* sd;
+	*bb += ( aj* qm*( cdh- xxi* sdh)- sdh)/ d;
+	*cc += ( cdh- aj* qm*( sdh+ xxi* cdh))/ d;
+	return;
+
+  } /* if( njun2 == 0) */
+
+  qp= sd*( pm* pp+ aj* ap)+ cd*( pm* ap- pp* aj);
+  qm=( ap* omc- pp* sd)/ qp;
+  qp=-( aj* omc+ pm* sd)/ qp;
+
+  if( june != 0 )
+  {
+	if( june < 0 )
+	{
+	  *aa= *aa* qm;
+	  *bb= *bb* qm;
+	  *cc= *cc* qm;
+	}
+	else
+	{
+	  *aa= -*aa* qp;
+	  *bb= *bb* qp;
+	  *cc= -*cc* qp;
+	}
+
+	if( i != is)
+	  return;
+
+  } /* if( june != 0 ) */
+
+  *aa -= 1.0;
+  *bb += ( aj* qm+ ap* qp)* sdh/ sd;
+  *cc += ( aj* qm- ap* qp)* cdh/ sd;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* compute basis function i */
+  void
+tbf( int i, int icap )
+{
+  int ix, jcox, jcoxx, jend, iend, njun1=0, njun2, jsnop, jsnox;
+  double pp, sdh, cdh, sd, omc, aj, pm=0, cd, ap, qp, qm, xxi;
+  double d, sig; /*** also global ***/
+
+  segj.jsno=0;
+  pp=0.0;
+  ix = i-1;
+  jcox= data.icon1[ix];
+
+  if( jcox > PCHCON)
+	jcox= i;
+
+  jend=-1;
+  iend=-1;
+  sig=-1.0;
+
+  do
+  {
+	if( jcox != 0 )
+	{
+	  if( jcox < 0 )
+		jcox= -jcox;
+	  else
+	  {
+		sig= -sig;
+		jend= -jend;
+	  }
+
+	  jcoxx = jcox-1;
+	  segj.jsno++;
+	  jsnox = segj.jsno-1;
+	  segj.jco[jsnox]= jcox;
+	  d= PI* data.si[jcoxx];
+	  sdh= sin( d);
+	  cdh= cos( d);
+	  sd=2.0* sdh* cdh;
+
+	  if( d <= 0.015)
+	  {
+		omc=4.0* d* d;
+		omc=((1.3888889e-3* omc-4.1666666667e-2)* omc+.5)* omc;
+	  }
+	  else omc=1.0- cdh* cdh+ sdh* sdh;
+
+	  aj=1.0/( log(1.0/( PI* data.bi[jcoxx]))-.577215664);
+	  pp= pp- omc/ sd* aj;
+	  segj.ax[jsnox]= aj/ sd* sig;
+	  segj.bx[jsnox]= aj/(2.0* cdh);
+	  segj.cx[jsnox]= -aj/(2.0* sdh)* sig;
+
+	  if( jcox != i)
+	  {
+		if( jend == 1)
+		  jcox= data.icon2[jcoxx];
+		else
+		  jcox= data.icon1[jcoxx];
+
+		if( abs(jcox) != i )
+		{
+		  if( jcox != 0 )
+			continue;
+		  else
+		  {
+			fprintf( stderr,
+				"xnec2c: tbf(): segment connection error for segment %5d\n", i );
+			stop( _("Segment connection error in tbf()"), ERR_STOP );
+		  }
+		}
+
+	  } /* if( jcox != i) */
+	  else segj.bx[jsnox] = -segj.bx[jsnox];
+
+	  if( iend == 1) break;
+
+	} /* if( jcox != 0 ) */
+
+	pm= -pp;
+	pp=0.0;
+	njun1= segj.jsno;
+
+	jcox= data.icon2[ix];
+	if( jcox > PCHCON)
+	  jcox= i;
+
+	jend=1;
+	iend=1;
+	sig=-1.0;
+
+  } /* do */
+  while( jcox != 0 );
+
+  njun2= segj.jsno- njun1;
+  jsnop= segj.jsno;
+  segj.jco[jsnop]= i;
+  d= PI* data.si[ix];
+  sdh= sin( d);
+  cdh= cos( d);
+  sd=2.0* sdh* cdh;
+  cd= cdh* cdh- sdh* sdh;
+
+  if( d <= 0.015)
+  {
+	omc=4.0* d* d;
+	omc=((1.3888889e-3* omc-4.1666666667e-2)* omc+.5)* omc;
+  }
+  else omc=1.0- cd;
+
+  ap=1.0/( log(1.0/( PI* data.bi[ix]))-.577215664);
+  aj= ap;
+
+  if( njun1 == 0)
+  {
+	if( njun2 == 0)
+	{
+	  segj.bx[jsnop]=0.0;
+
+	  if( icap == 0)
+		xxi=0.0;
+	  else
+	  {
+		qp= PI* data.bi[ix];
+		xxi= qp* qp;
+		xxi= qp*(1.0-.5* xxi)/(1.0- xxi);
+	  }
+
+	  segj.cx[jsnop]=1.0/( cdh- xxi* sdh);
+	  segj.jsno= jsnop+1;
+	  segj.ax[jsnop]=-1.0;
+	  return;
+
+	} /* if( njun2 == 0) */
+
+	if( icap == 0) xxi=0.0;
+	else
+	{
+	  qp= PI* data.bi[ix];
+	  xxi= qp* qp;
+	  xxi= qp*(1.0-.5* xxi)/(1.0- xxi);
+	}
+
+	qp=-( omc+ xxi* sd)/( sd*( ap+ xxi* pp)+ cd*( xxi* ap- pp));
+	d= cd- xxi* sd;
+	segj.bx[jsnop]=( sdh+ ap* qp*( cdh- xxi* sdh))/ d;
+	segj.cx[jsnop]=( cdh+ ap* qp*( sdh+ xxi* cdh))/ d;
+
+	for( iend = 0; iend < njun2; iend++ )
+	{
+	  segj.ax[iend]= -segj.ax[iend]* qp;
+	  segj.bx[iend]= segj.bx[iend]* qp;
+	  segj.cx[iend]= -segj.cx[iend]* qp;
+	}
+
+	segj.jsno= jsnop+1;
+	segj.ax[jsnop]=-1.0;
+	return;
+
+  } /* if( njun1 == 0) */
+
+  if( njun2 == 0)
+  {
+	if( icap == 0)
+	  xxi=0.0;
+	else
+	{
+	  qm= PI* data.bi[ix];
+	  xxi= qm* qm;
+	  xxi= qm*(1.0-.5* xxi)/(1.0- xxi);
+	}
+
+	qm=( omc+ xxi* sd)/( sd*( aj- xxi* pm)+ cd*( pm+ xxi* aj));
+	d= cd- xxi* sd;
+	segj.bx[jsnop]=( aj* qm*( cdh- xxi* sdh)- sdh)/ d;
+	segj.cx[jsnop]=( cdh- aj* qm*( sdh+ xxi* cdh))/ d;
+
+	for( iend = 0; iend < njun1; iend++ )
+	{
+	  segj.ax[iend]= segj.ax[iend]* qm;
+	  segj.bx[iend]= segj.bx[iend]* qm;
+	  segj.cx[iend]= segj.cx[iend]* qm;
+	}
+
+	segj.jsno= jsnop+1;
+	segj.ax[jsnop]=-1.0;
+	return;
+
+  } /* if( njun2 == 0) */
+
+  qp= sd*( pm* pp+ aj* ap)+ cd*( pm* ap- pp* aj);
+  qm=( ap* omc- pp* sd)/ qp;
+  qp=-( aj* omc+ pm* sd)/ qp;
+  segj.bx[jsnop]=( aj* qm+ ap* qp)* sdh/ sd;
+  segj.cx[jsnop]=( aj* qm- ap* qp)* cdh/ sd;
+
+  for( iend = 0; iend < njun1; iend++ )
+  {
+	segj.ax[iend]= segj.ax[iend]* qm;
+	segj.bx[iend]= segj.bx[iend]* qm;
+	segj.cx[iend]= segj.cx[iend]* qm;
+  }
+
+  jend= njun1;
+  for( iend = jend; iend < segj.jsno; iend++ )
+  {
+	segj.ax[iend]= -segj.ax[iend]* qp;
+	segj.bx[iend]= segj.bx[iend]* qp;
+	segj.cx[iend]= -segj.cx[iend]* qp;
+  }
+
+  segj.jsno= jsnop+1;
+  segj.ax[jsnop]=-1.0;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* compute the components of all basis functions on segment j */
+  void
+trio( int j )
+{
+  int jcox, jcoxx, jsnox, jx, jend=0, iend=0;
+
+  segj.jsno=0;
+  jx = j-1;
+  jcox= data.icon1[jx];
+
+  if( jcox <= PCHCON)
+  {
+	jend=-1;
+	iend=-1;
+  }
+
+  if( (jcox == 0) || (jcox > PCHCON) )
+  {
+	jcox= data.icon2[jx];
+
+	if( jcox <= PCHCON)
+	{
+	  jend=1;
+	  iend=1;
+	}
+
+	if( jcox == 0 || (jcox > PCHCON) )
+	{
+	  jsnox = segj.jsno;
+	  segj.jsno++;
+
+	  /* Allocate to connections buffers */
+	  if( segj.jsno >= segj.maxcon )
+	  {
+		segj.maxcon = segj.jsno +1;
+		size_t mreq = (size_t)segj.maxcon * sizeof(int);
+		mem_realloc( (void *)&segj.jco, mreq, "in calculations.c" );
+		mreq = (size_t)segj.maxcon * sizeof(double);
+		mem_realloc( (void *) &segj.ax, mreq, "in calculations.c" );
+		mem_realloc( (void *) &segj.bx, mreq, "in calculations.c" );
+		mem_realloc( (void *) &segj.cx, mreq, "in calculations.c" );
+	  }
+
+	  sbf( j, j, &segj.ax[jsnox], &segj.bx[jsnox], &segj.cx[jsnox]);
+	  segj.jco[jsnox]= j;
+	  return;
+	}
+
+  } /* if( (jcox == 0) || (jcox > PCHCON) ) */
+
+  do
+  {
+	if( jcox < 0 )
+	  jcox= -jcox;
+	else
+	  jend= -jend;
+	jcoxx = jcox-1;
+
+	if( jcox != j)
+	{
+	  jsnox = segj.jsno;
+	  segj.jsno++;
+
+	  /* Allocate to connections buffers */
+	  if( segj.jsno >= segj.maxcon )
+	  {
+		segj.maxcon = segj.jsno +1;
+		size_t mreq = (size_t)segj.maxcon * sizeof(int);
+		mem_realloc( (void *)&segj.jco, mreq, "in calculations.c" );
+		mreq = (size_t)segj.maxcon * sizeof(double);
+		mem_realloc( (void *) &segj.ax, mreq, "in calculations.c" );
+		mem_realloc( (void *) &segj.bx, mreq, "in calculations.c" );
+		mem_realloc( (void *) &segj.cx, mreq, "in calculations.c" );
+	  }
+
+	  sbf( jcox, j, &segj.ax[jsnox], &segj.bx[jsnox], &segj.cx[jsnox]);
+	  segj.jco[jsnox]= jcox;
+
+	  if( jend != 1)
+		jcox= data.icon1[jcoxx];
+	  else
+		jcox= data.icon2[jcoxx];
+
+	  if( jcox == 0 )
+	  {
+		fprintf( stderr,
+			"xnec2c: trio(): segment connention error for segment %5d\n", j );
+		stop( _("Segment connention error in trio()"), ERR_STOP );
+	  }
+	  else continue;
+
+	} /* if( jcox != j) */
+
+	if( iend == 1)
+	  break;
+
+	jcox= data.icon2[jx];
+
+	if( jcox > PCHCON)
+	  break;
+
+	jend=1;
+	iend=1;
+
+  } /* do */
+  while( jcox != 0 );
+
+  jsnox = segj.jsno;
+  segj.jsno++;
+
+  /* Allocate to connections buffers */
+  if( segj.jsno >= segj.maxcon )
+  {
+	segj.maxcon = segj.jsno +1;
+	size_t mreq = (size_t)segj.maxcon * sizeof(int);
+	mem_realloc( (void *)&segj.jco, mreq, "in calculations.c" );
+	mreq = (size_t)segj.maxcon * sizeof(double);
+	mem_realloc( (void *) &segj.ax, mreq, "in calculations.c" );
+	mem_realloc( (void *) &segj.bx, mreq, "in calculations.c" );
+	mem_realloc( (void *) &segj.cx, mreq, "in calculations.c" );
+  }
+
+  sbf( j, j, &segj.ax[jsnox], &segj.bx[jsnox], &segj.cx[jsnox]);
+  segj.jco[jsnox]= j;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* cang returns the phase angle of a complex number in degrees. */
+double cang( complex double z )
+{
+  return( carg(z)*TD );
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* zint computes the internal impedance of a circular wire */
+  void
+zint( double sigl, double rolam, complex double *zint )
+{
+#define cc1	 ( 6.0e-7     + I*1.9e-6)
+#define cc2	 (-3.4e-6     + I*5.1e-6)
+#define cc3	 (-2.52e-5    + I*0.0)
+#define cc4	 (-9.06e-5    - I*9.01e-5)
+#define cc5	 ( 0.0        - I*9.765e-4)
+#define cc6	 (.0110486    - I*0.0110485)
+#define cc7	 ( 0.0        - I*0.3926991)
+#define cc8	 ( 1.6e-6     - I*3.2e-6)
+#define cc9	 ( 1.17e-5    - I*2.4e-6)
+#define cc10 ( 3.46e-5    + I*3.38e-5)
+#define cc11 ( 5.0e-7     + I*2.452e-4)
+#define cc12 (-1.3813e-3  + I*1.3811e-3)
+#define cc13 (-6.25001e-2 - I*1.0e-7)
+#define cc14 (.7071068    + I*0.7071068)
+#define cn	cc14
+
+#define th(d) ( (((((cc1*(d)+cc2)*(d)+cc3)*(d)+cc4)*(d)+cc5)*(d)+cc6)*(d) + cc7 )
+#define ph(d) ( (((((cc8*(d)+cc9)*(d)+cc10)*(d)+cc11)*(d)+cc12)*(d)+cc13)*(d)+cc14 )
+#define f(d)  ( csqrt(POT/(d))*cexp(-cn*(d)+th(-8.0/x)) )
+#define g(d)  ( cexp(cn*(d)+th(8.0/x))/csqrt(TP*(d)) )
+
+  double x;
+  double tpcmu = 2.368705e+3;
+  double cmotp = 60.0;
+  complex double br1, br2;
+
+  x= sqrt( tpcmu* sigl)* rolam;
+  if( x <= 110.0)
+  {
+	if( x <= 8.0)
+	{
+	  double y, s, ber, bei;
+
+	  y= x/8.0;
+	  y= y* y;
+	  s= y* y;
+
+	  ber=((((((-9.01e-6* s+1.22552e-3)* s-.08349609)* s+ 2.6419140)*
+			  s-32.363456)* s+113.77778)* s-64.0)* s+1.0;
+
+	  bei=((((((1.1346e-4* s-.01103667)* s+.52185615)* s-10.567658)*
+			  s+72.817777)* s-113.77778)* s+16.0)* y;
+
+	  br1= cmplx( ber, bei);
+
+	  ber=(((((((-3.94e-6* s+4.5957e-4)* s-.02609253)* s+ .66047849)*
+				s-6.0681481)* s+14.222222)* s-4.0)* y)* x;
+
+	  bei=((((((4.609e-5* s-3.79386e-3)* s+.14677204)* s- 2.3116751)*
+			  s+11.377778)* s-10.666667)* s+.5)* x;
+
+	  br2= cmplx( ber, bei);
+	  br1= br1/ br2;
+	  *zint= CPLX_01* sqrt( cmotp/sigl )* br1/ rolam;
+
+	} /* if( x <= 8.0) */
+	else
+	{
+	  br2= CPLX_01* f(x)/ PI;
+	  br1= g( x)+ br2;
+	  br2= g( x)* ph(8.0/ x)- br2* ph(-8.0/ x);
+	  br1= br1/ br2;
+	  *zint= CPLX_01* sqrt( cmotp/ sigl)* br1/ rolam;
+	}
+
+  } /* if( x <= 110.0) */
+  else
+  {
+	br1= cmplx(.70710678,-.70710678);
+	*zint= CPLX_01* sqrt( cmotp/ sigl)* br1/ rolam;
+  }
+}
+
+/*-----------------------------------------------------------------------*/
diff --git a/src/calculations.h b/src/calculations.h
new file mode 100644
index 0000000..a9e7d21
--- /dev/null
+++ b/src/calculations.h
@@ -0,0 +1,27 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CALCULATIONS_H
+#define CALCULATIONS_H		1
+
+#include "common.h"
+#include "support.h"
+
+#define	CCJ		(0.0-I*0.01666666667)
+
+#endif
diff --git a/src/callback_func.c b/src/callback_func.c
new file mode 100644
index 0000000..ca260e6
--- /dev/null
+++ b/src/callback_func.c
@@ -0,0 +1,783 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* callback_func.c
+ *
+ * Functions to handle GTK callbacks for xnec2c
+ */
+
+#include "callback_func.h"
+#include "shared.h"
+
+/*-----------------------------------------------------------------------*/
+
+/* Save_Pixmap()
+ *
+ * Saves pixmaps as png files
+ */
+  void
+Save_Pixmap(
+	GdkPixmap *pixmap, int pixmap_width,
+	int pixmap_height, char *filename )
+{
+  GdkPixbuf *pixbuf;
+  GError *error = NULL;
+
+  /* Get image from pixmap */
+  gtk_widget_grab_focus( structure_drawingarea );
+  pixbuf = gdk_pixbuf_get_from_drawable(
+	  NULL, pixmap, gdk_drawable_get_colormap(pixmap),
+	  0, 0, 0, 0, pixmap_width, pixmap_height );
+
+  /* Save image as PNG file */
+  gdk_pixbuf_save( pixbuf, filename, "png", &error, NULL );
+  g_object_unref( pixbuf );
+
+} /* Save_Pixmap() */
+
+/*-----------------------------------------------------------------------*/
+
+/* New_Viewer_Angle()
+ *
+ * Sets parameters for a new viewer angle
+ */
+void
+New_Viewer_Angle(
+	double wr, double wi,
+	GtkSpinButton *wr_spb,
+	GtkSpinButton *wi_spb,
+	projection_parameters_t *params )
+{
+  /* Recalculate projection paramenters */
+  params->Wr = wr;
+  params->Wi = wi;
+  gtk_spin_button_set_value( wr_spb, (gdouble)params->Wr );
+  gtk_spin_button_set_value( wi_spb, (gdouble)params->Wi );
+
+} /* New_Viewer_Angle() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Create_Pixmap()
+ *
+ * Creates or resizes a pixmap after a configure event
+ */
+void
+Create_Pixmap(
+	GdkPixmap **pixmap,
+	int *pixmap_width,
+	int *pixmap_height,
+	GtkWidget *widget,
+	GdkEventConfigure *event,
+	projection_parameters_t *params )
+{
+  /* Create or resize pixmap */
+  if( *pixmap != NULL )
+  {
+	g_object_unref( *pixmap );
+	*pixmap = NULL;
+  }
+
+  *pixmap = gdk_pixmap_new(
+	  widget->window,
+	  event->width,
+	  event->height, -1 );
+  *pixmap_width  = event->width;
+  *pixmap_height = event->height;
+
+  /* Calculate new projection parameters */
+  if( params != NULL )
+	New_Projection_Parameters( *pixmap_width, *pixmap_height, params );
+
+} /* Create_Pixmap() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Motion_Event()
+ *
+ * Handles pointer motion event on drawingareas
+ */
+void
+Motion_Event(
+	GdkEventMotion  *event, projection_parameters_t *params,
+	GtkSpinButton *wr_spb, GtkSpinButton *wi_spb )
+{
+  /* Save previous pointer position */
+  static gdouble x_old = 0, y_old = 0;
+
+  gdouble x = event->x;
+  gdouble y = event->y;
+
+  /* Initialize saved x,y */
+  if( params->reset )
+  {
+	x_old = x;
+	y_old = y;
+	params->reset = FALSE;
+  }
+
+  /* Recalculate projection parameters according to pointer motion.
+   * Setting rotate and incline values to spinbuttons triggers redraw */
+  if( event->state & GDK_BUTTON1_MASK )
+  {
+	params->Wr -= (x - x_old) / 4.0;
+	params->Wi += (y - y_old) / 4.0;
+	gtk_spin_button_set_value( wr_spb, params->Wr );
+	gtk_spin_button_set_value( wi_spb, params->Wi );
+  } /* if( event->state & GDK_BUTTON1_MASK ) */
+  else
+  {
+	params->x_center += x - x_old;
+	params->y_center -= y - y_old;
+
+	if( params->type == STRUCTURE_DRAWINGAREA )
+	  Draw_Structure( structure_drawingarea );
+	if( params->type == RDPATTERN_DRAWINGAREA )
+	  Draw_Radiation( rdpattern_drawingarea );
+  }
+
+  x_old = x;
+  y_old = y;
+
+} /* Motion_Event() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Plot_Select()
+ *
+ * Sets up plotting of requested freq data
+ */
+  void
+Plot_Select( GtkToggleButton *togglebutton, unsigned long long int flag )
+{
+  if( gtk_toggle_button_get_active(togglebutton) )
+  {
+	SetFlag( flag | PLOT_SELECT );
+	calc_data.ngraph++;
+  }
+  else
+  {
+	ClearFlag( flag );
+	calc_data.ngraph--;
+  }
+
+  /* Trigger a redraw of frequency plots drawingarea */
+  if( isFlagSet(PLOT_ENABLED) && isFlagSet(FREQ_LOOP_DONE) )
+	Plot_Frequency_Data();
+
+} /* Plot_Select() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Delete_Event()
+ *
+ * Handles user request to delete a window
+ */
+  void
+Delete_Event( gchar *message )
+{
+  quit_dialog = create_quit_dialog();
+  gtk_widget_show( quit_dialog );
+
+  if( isFlagSet(FREQ_LOOP_RUNNING) )
+  {
+	if( isFlagSet(MAIN_QUIT) )
+	  gtk_label_set_text( GTK_LABEL(lookup_widget(
+			  quit_dialog, "quit_label")),
+		  _("The frequency loop is running\n"\
+			"Really end operation?") );
+	else gtk_label_set_text( GTK_LABEL(lookup_widget(
+			quit_dialog, "quit_label")),
+		_("The frequency loop is running\n"\
+		  "Really close this window?") );
+  }
+  else gtk_label_set_text( GTK_LABEL(lookup_widget(
+		  quit_dialog, "quit_label")), message );
+
+} /* Delete_Event() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Set_Pol_Menuitem()
+ *
+ * Sets the polarization type menuitem to current setting
+ */
+  void
+Set_Pol_Menuitem( GtkMenuItem *menuitem )
+{
+  gchar *pol_menu[NUM_POL] =
+  {
+	"rdpattern_total",
+	"rdpattern_horizontal",
+	"rdpattern_vertical",
+	"rdpattern_right_hand",
+	"rdpattern_left_hand",
+  };
+
+  gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(lookup_widget(
+		  GTK_WIDGET(menuitem), pol_menu[calc_data.pol_type])), TRUE );
+
+} /* Set_Pol_Menuitem() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Close_Windows()
+ *
+ * Closes some open windows
+ */
+  void
+Close_Windows( void )
+{
+  if( isFlagSet(PLOT_ENABLED) )
+  {
+	gtk_widget_destroy( freqplots_window );
+	gtk_check_menu_item_set_active(
+		GTK_CHECK_MENU_ITEM(lookup_widget(
+			main_window, "main_freqplots")), FALSE );
+  }
+
+  if( isFlagSet(DRAW_ENABLED) )
+  {
+	gtk_widget_destroy( rdpattern_window );
+	gtk_check_menu_item_set_active(
+		GTK_CHECK_MENU_ITEM(lookup_widget(
+			main_window, "main_rdpattern")), FALSE );
+  }
+
+} /* Close_Windows() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Open_Editor()
+ *
+ * Pops up a Editor window on user
+ * right-click on a NEC2 Editor treeview
+ */
+  gboolean
+Open_Editor( GtkTreeView *view )
+{
+  GtkTreeSelection *selection;
+  GtkTreeIter iter;
+  GtkTreeModel *model;
+  gchar *card;
+  size_t s = sizeof( card );
+  GtkWidget *button;
+
+  /* Find the selected treeview row */
+  selection = gtk_tree_view_get_selection( view );
+  if( !gtk_tree_selection_get_selected(selection, &model, &iter) )
+	return( FALSE );
+
+  /* Get the "card" name from first column */
+  gtk_tree_model_get( model, &iter, 0, &card, -1);
+
+  /* Some "cards" have common editors */
+  if( strcmp(card, "GC") == 0 )
+	Strlcpy( card, "GW", s );
+  else if( strcmp(card, "SC") == 0 )
+	Strlcpy( card, "SP", s );
+  else if( strcmp(card, "SM") == 0 )
+	Strlcpy( card, "SP", s );
+  else if( strcmp(card, "NH") == 0 )
+	Strlcpy( card, "NE", s );
+  else if( strcmp(card, "GE") == 0 )
+  {
+	Gend_Editor( EDITOR_EDIT );
+	return( TRUE );
+  } /* EN Not editable */
+  else if( strcmp(card, "EN") == 0 )
+	return( TRUE );
+
+  /* Send a "clicked" signal to the appropriate editor button */
+  card[0] = (gchar)tolower((int)card[0]);
+  card[1] = (gchar)tolower((int)card[1]);
+  button = lookup_widget( GTK_WIDGET(view), card );
+  g_free(card);
+  if( button != NULL )
+	g_signal_emit_by_name( button, "clicked" );
+  else return( FALSE );
+
+  return( TRUE );
+} /* Open_Editor() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Main_Rdpattern_Activate()
+ *
+ * Callback function for the Radiation Pattern draw button
+ */
+  void
+Main_Rdpattern_Activate( gboolean from_menu )
+{
+  /* Show current frequency. The small amount added
+   * allows the value of the spinbutton to change
+   * when the freq loop re-writes the frequency */
+  gtk_spin_button_set_value( rdpattern_frequency,
+	  (gdouble)(calc_data.fmhz + 0.0000001) );
+
+  /* Set E field check menu item */
+  if( fpat.nfeh & NEAR_EFIELD )
+  {
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(rdpattern_window, "rdpattern_e_field")), TRUE );
+	SetFlag( DRAW_EFIELD );
+  }
+  else
+  {
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(rdpattern_window, "rdpattern_e_field")), FALSE );
+	ClearFlag( DRAW_EFIELD );
+  }
+
+  /* Set H field check menu item */
+  if( fpat.nfeh & NEAR_HFIELD )
+  {
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(rdpattern_window, "rdpattern_h_field")), TRUE );
+	SetFlag( DRAW_HFIELD );
+  }
+  else
+  {
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(rdpattern_window, "rdpattern_h_field")), FALSE );
+	ClearFlag( DRAW_HFIELD );
+  }
+
+  /* Set Poynting vector check menu item */
+  if( (fpat.nfeh & NEAR_EHFIELD) == NEAR_EHFIELD )
+  {
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(rdpattern_window, "rdpattern_poynting_vector")), TRUE );
+	SetFlag( DRAW_POYNTING );
+  }
+  else
+  {
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(rdpattern_window, "rdpattern_poynting_vector")), FALSE );
+	ClearFlag( DRAW_POYNTING );
+  }
+
+  /* Set structure overlay in Rad Pattern window */
+  if( isFlagClear(OVERLAY_STRUCT) )
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(rdpattern_window, "rdpattern_overlay_structure")), FALSE );
+  else
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(rdpattern_window, "rdpattern_overlay_structure")), TRUE );
+
+
+  /* Sync common projection spinbuttons */
+  if( isFlagSet(COMMON_PROJECTION) )
+  {
+	gtk_spin_button_set_value(
+		rotate_rdpattern, (gdouble)structure_proj_params.Wr );
+	gtk_spin_button_set_value(
+		incline_rdpattern, (gdouble)structure_proj_params.Wi );
+  }
+
+  /* Redo currents if not reaching this function
+   * from the menu callback (e.g. not user action) */
+  if( !crnt.valid && !from_menu ) Redo_Currents( NULL );
+
+  /* Initialize radiation pattern projection angles */
+  rdpattern_proj_params.Wr =
+	gtk_spin_button_get_value(rotate_rdpattern);
+  rdpattern_proj_params.Wi =
+	gtk_spin_button_get_value(incline_rdpattern);
+  New_Radiation_Projection_Angle();
+
+  /* Enable Gain or E/H field drawing */
+  SetFlag( DRAW_ENABLED );
+
+} /* Main_Rdpattern_Activate() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Main_Freqplots_Activate()
+ *
+ * Callback function for for the main Frequency Plots button
+ */
+  gboolean
+Main_Freqplots_Activate( void )
+{
+  /* No plots for Incident Field and
+   * Elementary Current Source Excitation */
+  if( (fpat.ixtyp != 0) && (fpat.ixtyp != 5) )
+  {
+	stop( _("Not available for Incident Field or\n"\
+		  "Elementary Current Source Excitation.\n"\
+		  "(Excitation Types 1 to 4)"), ERR_OK );
+	return( FALSE );
+  }
+
+  /* Enable freq data graph plotting */
+  calc_data.zo = 50.0;
+  SetFlag( PLOT_ENABLED );
+
+  return( TRUE );
+} /* Main_Freqplots_Activate() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Rdpattern_Gain_Togglebutton_Toggled()
+ *
+ * Callback function for Rad Pattern window Gain button
+ */
+  void
+Rdpattern_Gain_Togglebutton_Toggled( gboolean flag )
+{
+  /* If radiation pattern data do not
+   * allow drawing of radiation pattern */
+  if( isFlagClear(ENABLE_RDPAT) ) return;
+
+  /* Enable or not gain (radiation) pattern plotting */
+  if( flag )
+  {
+	SetFlag( DRAW_GAIN );
+	ClearFlag( DRAW_EHFIELD );
+	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(lookup_widget(
+			rdpattern_window, "rdpattern_eh_togglebutton")), FALSE );
+
+	/* Redraw radiation pattern drawingarea */
+	if( isFlagSet(DRAW_ENABLED) &&
+		isFlagClear(FREQ_LOOP_RUNNING) )
+	{
+	  if( !crnt.valid ) Redo_Currents( NULL );
+	  SetFlag( DRAW_NEW_RDPAT );
+	  Draw_Radiation( rdpattern_drawingarea );
+	}
+
+	Set_Window_Labels();
+  }
+  else
+  {
+	ClearFlag( DRAW_GAIN );
+	/* Clear radiation pattern drawingarea */
+	if( isFlagClear(DRAW_EHFIELD) &&
+		isFlagSet(DRAW_ENABLED) )
+	  Draw_Radiation( rdpattern_drawingarea );
+	Free_Draw_Buffers();
+  }
+
+  return;
+} /* Rdpattern_Gain_Togglebutton_Toggled() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Rdpattern_EH_Togglebutton_Toggled()
+ *
+ * Callback function for Rad Pattern window E/H field button
+ */
+  void
+Rdpattern_EH_Togglebutton_Toggled( gboolean flag )
+{
+  /* If no near EH data */
+  if( !fpat.nfeh ) return;
+
+  /* Enable or not E/H fields plotting */
+  if( flag )
+  {
+	SetFlag( DRAW_EHFIELD );
+	ClearFlag( DRAW_GAIN );
+	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(lookup_widget(
+			rdpattern_window, "rdpattern_gain_togglebutton")), FALSE );
+
+	/* Delegate near field calcuations to child
+	 * processes if forked and near field data valid */
+	if( FORKED )
+	{
+	  Alloc_Nearfield_Buffers(fpat.nrx, fpat.nry, fpat.nrz);
+	  Pass_EH_Flags();
+	}
+
+	/* Redraw radiation pattern drawingarea */
+	if( isFlagSet(DRAW_ENABLED) &&
+		isFlagClear(FREQ_LOOP_RUNNING) )
+	{
+	  if( !near_field.valid ) Redo_Currents(NULL);
+	  Near_Field_Pattern();
+	  SetFlag( DRAW_NEW_EHFIELD );
+	  Draw_Radiation( rdpattern_drawingarea );
+	}
+
+	Set_Window_Labels();
+  }
+  else
+  {
+	ClearFlag( NEAREH_ANIMATE );
+	ClearFlag( DRAW_EHFIELD );
+
+	/* Clear radiation pattern drawingarea */
+	if( isFlagClear(DRAW_GAIN)  &&
+		isFlagSet(DRAW_ENABLED) )
+	  Draw_Radiation( rdpattern_drawingarea );
+
+	/* Disable near field calcuations
+	 * by child processes if forked */
+	Pass_EH_Flags();
+  }
+
+} /* Rdpattern_EH_Togglebutton_Toggled() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Main_Currents_Togglebutton_Toggled()
+ *
+ * Callback function for Main Currents toggle button
+ */
+  void
+Main_Currents_Togglebutton_Toggled( gboolean flag )
+{
+  /* Enable calculation and rendering of structure curents */
+  if( flag )
+  {
+	SetFlag( DRAW_CURRENTS );
+	ClearFlag( DRAW_CHARGES );
+	crnt.newer = 1;
+	Alloc_Crnt_Buffs();
+
+	gtk_toggle_button_set_active(
+		GTK_TOGGLE_BUTTON(lookup_widget(main_window,
+			"main_charges_togglebutton")), FALSE );
+	gtk_label_set_text(
+		GTK_LABEL(lookup_widget(main_window, "struct_label")),
+		_("View Currents") );
+
+	if( !crnt.valid && isFlagClear(FREQ_LOOP_RUNNING) )
+	  Redo_Currents( NULL );
+	else if( crnt.valid )
+	  Draw_Structure( structure_drawingarea );
+
+	if( isFlagSet(OVERLAY_STRUCT) )
+	  Draw_Radiation( rdpattern_drawingarea );
+  }
+  else
+  {
+	ClearFlag( DRAW_CURRENTS );
+	if( isFlagClear(DRAW_CHARGES) )
+	{
+	  /* Redraw structure on screen if frequency loop is not running */
+	  gtk_label_set_text(
+		  GTK_LABEL(lookup_widget(main_window, "struct_label")),
+		  _("View Geometry") );
+	  if( isFlagClear(FREQ_LOOP_RUNNING) )
+		Draw_Structure( structure_drawingarea );
+	  Free_Crnt_Buffs();
+	}
+	if( isFlagSet(OVERLAY_STRUCT) )
+	  Draw_Radiation( rdpattern_drawingarea );
+  }
+} /* Main_Currents_Togglebutton_Toggled() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Main_Charges_Togglebutton_Toggled()
+ *
+ * Callback function for Main Charges toggle button
+ */
+  void
+Main_Charges_Togglebutton_Toggled( gboolean flag )
+{
+  if( flag )
+  {
+	SetFlag( DRAW_CHARGES );
+	ClearFlag( DRAW_CURRENTS );
+	crnt.newer = 1;
+	Alloc_Crnt_Buffs();
+
+	gtk_toggle_button_set_active(
+		GTK_TOGGLE_BUTTON(lookup_widget(main_window,
+			"main_currents_togglebutton")), FALSE );
+	gtk_label_set_text(
+		GTK_LABEL(lookup_widget(main_window, "struct_label")),
+		_("View Charges") );
+
+	if( !crnt.valid && isFlagClear(FREQ_LOOP_RUNNING) )
+	  Redo_Currents( NULL );
+	else if( crnt.valid )
+	  Draw_Structure( structure_drawingarea );
+
+	if( isFlagSet(OVERLAY_STRUCT) )
+	  Draw_Radiation( rdpattern_drawingarea );
+  }
+  else
+  {
+	ClearFlag( DRAW_CHARGES );
+	if( isFlagClear(DRAW_CURRENTS) )
+	{
+	  /* Redraw structure on screen if frequency loop is not running */
+	  gtk_label_set_text(
+		  GTK_LABEL(lookup_widget(main_window, "struct_label")),
+		  _("View Geometry") );
+	  if( isFlagClear(FREQ_LOOP_RUNNING) )
+		Draw_Structure( structure_drawingarea );
+	  Free_Crnt_Buffs();
+	}
+	if( isFlagSet(OVERLAY_STRUCT) )
+	  Draw_Radiation( rdpattern_drawingarea );
+  }
+} /* Main_Charges_Togglebutton_Toggled() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Open_Nec2_Editor()
+ *
+ * Opens NEC2 editor window and fills
+ * tree view according to action flag
+ */
+  void
+Open_Nec2_Editor( int action )
+{
+  nec2_edit_window = create_nec2_editor();
+  gtk_widget_show( nec2_edit_window );
+
+  geom_treeview = GTK_TREE_VIEW(
+	  lookup_widget(nec2_edit_window, "nec2_geom_treeview") );
+  cmnd_treeview = GTK_TREE_VIEW(
+	  lookup_widget(nec2_edit_window, "nec2_cmnd_treeview") );
+
+  Nec2_Input_File_Treeview( action );
+
+  geom_adjustment = gtk_scrolled_window_get_vadjustment(
+	  GTK_SCROLLED_WINDOW(lookup_widget(nec2_edit_window,
+		  "scrolledwindow4")) );
+  cmnd_adjustment = gtk_scrolled_window_get_vadjustment(
+	  GTK_SCROLLED_WINDOW(lookup_widget(nec2_edit_window,
+		  "scrolledwindow3")) );
+} /* Open_Nec2_Editor() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Nec2_Apply_Checkbuton()
+ *
+ * Checks whether the NEC2 editor's "Apply" check button is active
+ */
+
+  gboolean
+Nec2_Apply_Checkbutton( void )
+{
+  return( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
+		  lookup_widget(nec2_edit_window,
+			"nec2_apply_checkbutton" ))) );
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* Gtk_Quit()
+ *
+ * Quits gtk main
+ */
+  void
+Gtk_Quit( void )
+{
+  int i, k;
+
+  Close_File( &input_fp );
+  SetFlag( MAIN_QUIT );
+
+  /* Kill child processes */
+  if( FORKED && !CHILD )
+	while( num_child_procs )
+	{
+	  num_child_procs--;
+	  kill( forked_proc_data[num_child_procs]->child_pid, SIGKILL );
+	}
+
+  /* Kill possibly nested loops */
+  k = (int)gtk_main_level();
+  for( i = 0; i < k; i++ )
+	gtk_main_quit();
+
+} /* Gtk_Quit() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Pass_EH_Flags
+ *
+ * Passes near field related flags to child processes
+ */
+  void
+Pass_EH_Flags( void )
+{
+  char flag;
+  size_t cnt;
+  int idx;
+
+  /* Abort if not forked */
+  if( !FORKED ) return;
+
+  /* Tell child process to calculate near field data */
+  cnt = strlen( fork_commands[EHFIELD] );
+  for( idx = 0; idx < calc_data.num_jobs; idx++ )
+	Write_Pipe( idx, fork_commands[EHFIELD], (ssize_t)cnt, TRUE );
+
+  /* Tell child to set near field flags */
+  flag = 0;
+  if( isFlagSet(DRAW_EHFIELD) )		flag |= 0x01;
+  if( isFlagSet(NEAREH_SNAPSHOT) )	flag |= 0x02;
+  if( isFlagSet(DRAW_EFIELD) )		flag |= 0x04;
+  if( isFlagSet(DRAW_HFIELD) )		flag |= 0x08;
+
+  cnt = sizeof( flag );
+  for( idx = 0; idx < calc_data.num_jobs; idx++ )
+	Write_Pipe( idx, &flag, (ssize_t)cnt, TRUE );
+
+} /* Pass_EH_Flags */
+
+/*-----------------------------------------------------------------------*/
+
+/* Alloc_Crnt_Buffs()
+ *
+ * Allocates memory for current/charge draw buffers
+ */
+  void
+Alloc_Crnt_Buffs( void )
+{
+  /* Patch currents buffer */
+  if( data.m > 0 )
+  {
+	size_t mreq = (size_t)data.m * sizeof( double );
+	mem_realloc( (void *)&ct1m, mreq, "in callback_func.c" );
+	mem_realloc( (void *)&ct2m, mreq, "in callback_func.c" );
+  }
+
+  /* Segment currents buffer */
+  if( data.n > 0 )
+  {
+	size_t mreq = (size_t)data.n * sizeof( double );
+	mem_realloc( (void *)&cmag, mreq, "in callback_func.c" );
+  }
+
+} /* Alloc_Crnt_Buffs() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Free_Crnt_Buffs()
+ *
+ * Frees current/charge draw buffers
+ */
+  void
+Free_Crnt_Buffs( void )
+{
+  free_ptr( (void *)&ct1m );
+  free_ptr( (void *)&ct2m );
+  free_ptr( (void *)&cmag );
+} /* Free_Crnt_Buffs() */
+
+/*-----------------------------------------------------------------------*/
+
diff --git a/src/callback_func.h b/src/callback_func.h
new file mode 100644
index 0000000..238ba4e
--- /dev/null
+++ b/src/callback_func.h
@@ -0,0 +1,31 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CALLBACK_FUNC_H
+#define CALLBACK_FUNC_H		1
+
+#include <ctype.h>
+#include "callbacks.h"
+#include "interface.h"
+#include "support.h"
+#include "editors.h"
+#include "fork.h"
+#include "common.h"
+
+#endif
+
diff --git a/src/callbacks.c b/src/callbacks.c
new file mode 100644
index 0000000..9b2ec1e
--- /dev/null
+++ b/src/callbacks.c
@@ -0,0 +1,3682 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+
+#include "callbacks.h"
+#include "interface.h"
+#include "support.h"
+#include "fork.h"
+#include "xnec2c.h"
+#include "editors.h"
+#include "nec2_model.h"
+#include "shared.h"
+#include <gdk/gdkkeysyms.h>
+
+/* File chooser/select widgets */
+static GtkWidget *file_chooser   = NULL;
+static GtkWidget *file_selection = NULL;
+
+/* Tree view clicked on by user */
+static GtkTreeView *selected_treeview = NULL;
+
+/* Pixmap for saving drawable images */
+static GdkPixmap *saveas_pixmap = NULL;
+static int saveas_pixmap_width, saveas_pixmap_height;
+
+/* Action flag for NEC2 "card" editors */
+static int action = EDITOR_NEW;
+
+/*-----------------------------------------------------------------------*/
+
+  void
+on_main_window_destroy                 (GtkObject       *object,
+										gpointer         user_data)
+{
+  Gtk_Quit();
+}
+
+
+  gboolean
+on_main_window_delete_event            (GtkWidget       *widget,
+										GdkEvent        *event,
+										gpointer         user_data)
+{
+  kill_window = main_window;
+  SetFlag( MAIN_QUIT );
+  Delete_Event( _("Really quit xnec2c?") );
+  return TRUE;
+}
+
+
+  void
+on_new_activate     	              (GtkMenuItem     *menuitem,
+									   gpointer         user_data)
+{
+  /* No save/open file while freq loop is running */
+  if( !Nec2_Save_Warn(
+		_("A new NEC2 input file may not be created\n"\
+		  "while the Frequency Loop is running") ) )
+	return;
+
+  /* Save open file, if any */
+  if( (input_fp != NULL) && (nec2_edit_window != NULL) )
+  {
+	stop( _("Saving already open NEC2 file\n"\
+		  "before opening new default file"), ERR_OK );
+	Save_Nec2_Input_File( nec2_edit_window, infile );
+	infile[0] = '\0';
+  }
+
+  /* Open editor window if needed */
+  if( nec2_edit_window == NULL )
+  {
+	Close_File( &input_fp );
+	infile[0] = '\0';
+	Open_Nec2_Editor( NEC2_EDITOR_NEW );
+  }
+  else Nec2_Input_File_Treeview( NEC2_EDITOR_NEW );
+}
+
+
+  void
+on_open_input_activate     		       (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  /* No save/open file while freq loop is running */
+  if( !Nec2_Save_Warn(
+		_("A new NEC2 input file may not be opened\n"\
+		  "while the Frequency Loop is running")) )
+	return;
+
+  /* Open file chooser to select a NEC2 input file */
+  file_chooser = create_filechooserdialog();
+  gtk_widget_show( file_chooser );
+
+  /* Set filechooser file name to previously selected, if any */
+  if( (strlen(infile) != 0) && (infile[0] == '/') )
+	gtk_file_chooser_set_filename(
+		GTK_FILE_CHOOSER(file_chooser), infile );
+}
+
+
+  void
+on_main_save_activate        (GtkMenuItem     *menuitem,
+							  gpointer         user_data)
+{
+  char saveas[96];
+
+  /* Count number of structure image files saved of geometry,
+   * currents or charges, to avoid over-writing saved files */
+  static int cgm = 0, ccr = 0, cch = 0;
+
+  if( strlen(infile) == 0 )
+	return;
+
+  /* Make the structure image save file name from input file
+   * name. The count of each image type saved is incremented */
+  if( isFlagSet(DRAW_CURRENTS) )
+	snprintf( saveas, 95, "%s-%s_%03d.%s", infile, "current", ++ccr, "png" );
+  else if( isFlagSet(DRAW_CHARGES) )
+	snprintf( saveas, 95, "%s-%s_%03d.%s", infile, "charge", ++cch, "png" );
+  else
+	snprintf( saveas, 95, "%s-%s_%03d.%s", infile, "geometry", ++cgm, "png" );
+  saveas[95] = '\0';
+
+  saveas_pixmap = structure_pixmap;
+  saveas_pixmap_width  = structure_pixmap_width;
+  saveas_pixmap_height = structure_pixmap_height;
+  ClearFlag( ALL_SAVE_FLAGS );
+  SetFlag( IMAGE_SAVE );
+
+  /* Open file selector to specify file  */
+  /* name for saving the structure image */
+  file_selection = create_fileselection();
+  gtk_file_selection_set_filename( GTK_FILE_SELECTION(file_selection), saveas );
+  gtk_widget_show( file_selection );
+}
+
+
+  void
+on_main_save_as_activate               (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  saveas_pixmap = structure_pixmap;
+  saveas_pixmap_width  = structure_pixmap_width;
+  saveas_pixmap_height = structure_pixmap_height;
+  ClearFlag( ALL_SAVE_FLAGS );
+  SetFlag( IMAGE_SAVE );
+
+  /* Open file selector to specify file  */
+  /* name for saving the structure image */
+  file_selection = create_fileselection();
+  gtk_widget_show( file_selection );
+}
+
+
+  void
+on_struct_save_as_gnuplot_activate     (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  /* Open file selector to specify a file
+   * name for saving the rad pattern image */
+  ClearFlag( ALL_SAVE_FLAGS );
+  SetFlag( STRCT_GNUPLOT_SAVE );
+  file_selection = create_fileselection();
+  gtk_widget_show( file_selection );
+}
+
+
+  void
+on_quit_activate                       (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  kill_window = main_window;
+  SetFlag( MAIN_QUIT );
+  Delete_Event( _("Really quit xnec2c?") );
+}
+
+
+  void
+on_main_rdpattern_activate             (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  /* Open radiation pattern rendering window */
+  if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
+  {
+	rdpattern_window = create_rdpattern_window();
+	gtk_widget_show( rdpattern_window );
+	rdpattern_drawingarea = lookup_widget(
+		rdpattern_window, "rdpattern_drawingarea" );
+	rdpattern_motion_handler = g_signal_connect (
+		(gpointer) rdpattern_drawingarea,
+		"motion_notify_event",
+		G_CALLBACK (on_rdpattern_drawingarea_motion_notify_event),
+		NULL);
+	gtk_widget_add_events(
+		GTK_WIDGET(rdpattern_drawingarea),
+		GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK );
+	rotate_rdpattern  = GTK_SPIN_BUTTON(lookup_widget(
+		  rdpattern_window, "rdpattern_rotate_spinbutton"));
+	incline_rdpattern = GTK_SPIN_BUTTON(lookup_widget(
+		  rdpattern_window, "rdpattern_incline_spinbutton"));
+	rdpattern_frequency = GTK_SPIN_BUTTON(lookup_widget(
+		  rdpattern_window, "rdpattern_freq_spinbutton"));
+	rdpattern_zoom_spinbutton = GTK_SPIN_BUTTON(lookup_widget(
+		  rdpattern_window, "rdpattern_zoom_spinbutton"));
+	rdpattern_fstep_entry = GTK_ENTRY(lookup_widget(
+		  rdpattern_window, "rdpattern_fstep_entry")) ;
+
+	Main_Rdpattern_Activate( TRUE );
+  }
+  else if( isFlagSet(DRAW_ENABLED) )
+	  gtk_widget_destroy( rdpattern_window );
+}
+
+
+  void
+on_main_freqplots_activate             (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  /* Open window for plotting frequency
+   * related data (gain, vswr etc) */
+  if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
+  {
+	if( Main_Freqplots_Activate() )
+	{
+	  freqplots_window = create_freqplots_window();
+	  gtk_widget_show( freqplots_window );
+	  freqplots_drawingarea = lookup_widget(
+		  freqplots_window, "freqplots_drawingarea" );
+	  Set_Window_Labels();
+	  calc_data.ngraph = 0;
+	} /* if( Main_Freqplots_Activate() */
+	else gtk_check_menu_item_set_active(
+		GTK_CHECK_MENU_ITEM(menuitem), FALSE );
+  }
+  else if( isFlagSet(PLOT_ENABLED) )
+	gtk_widget_destroy( freqplots_window );
+}
+
+
+  void
+on_rdpattern_total_activate            (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  Set_Polarization( POL_TOTAL );
+}
+
+
+  void
+on_rdpattern_horizontal_activate       (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  Set_Polarization( POL_HORIZ );
+}
+
+
+  void
+on_rdpattern_vertical_activate         (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  Set_Polarization( POL_VERT );
+}
+
+
+  void
+on_rdpattern_right_hand_activate       (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  Set_Polarization( POL_RHCP );
+}
+
+
+  void
+on_rdpattern_left_hand_activate        (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  Set_Polarization( POL_LHCP );
+}
+
+
+  void
+on_common_projection_activate          (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  /* Enable syncing of projection params
+   * for structure and rad pattern drawing */
+  if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
+	SetFlag( COMMON_PROJECTION );
+  else
+	ClearFlag( COMMON_PROJECTION );
+}
+
+
+  void
+on_common_freq_activate                (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  /* Enable syncing of frequency spinbuttons
+   * between main and rad pattern windows */
+  if( gtk_check_menu_item_get_active(
+		GTK_CHECK_MENU_ITEM(menuitem)) )
+	SetFlag( COMMON_FREQUENCY );
+  else
+	ClearFlag( COMMON_FREQUENCY );
+}
+
+
+  void
+on_main_x_axis_clicked                 (GtkButton       *button,
+										gpointer         user_data)
+{
+  /* Recalculate projection paramenters */
+  New_Viewer_Angle( 0.0, 0.0, rotate_structure,
+	  incline_structure, &structure_proj_params );
+}
+
+
+  void
+on_main_y_axis_clicked                 (GtkButton       *button,
+										gpointer         user_data)
+{
+  /* Recalculate projection paramenters */
+  New_Viewer_Angle( 90.0, 0.0, rotate_structure,
+	  incline_structure, &structure_proj_params );
+}
+
+
+  void
+on_main_z_axis_clicked                 (GtkButton       *button,
+										gpointer         user_data)
+{
+  /* Recalculate projection paramenters */
+  New_Viewer_Angle( 0.0, 90.0, rotate_structure,
+	  incline_structure, &structure_proj_params );
+}
+
+
+  void
+on_main_default_view_clicked           (GtkButton       *button,
+										gpointer         user_data)
+{
+  /* Projection at 45 deg rotation and inclination */
+  New_Viewer_Angle( 45.0, 45.0, rotate_structure,
+	  incline_structure, &structure_proj_params );
+}
+
+
+void
+on_main_rotate_spinbutton_value_changed(GtkSpinButton   *spinbutton,
+										gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  /* Get new "rotate" structure angle from spinbutton */
+  structure_proj_params.Wr = gtk_spin_button_get_value(spinbutton);
+  New_Structure_Projection_Angle();
+
+  /* Sync rad pattrern window spinbutton if enabled */
+  if( isFlagSet(DRAW_ENABLED) && isFlagSet(COMMON_PROJECTION) )
+	gtk_spin_button_set_value(
+		rotate_rdpattern, (gdouble)structure_proj_params.Wr );
+}
+
+
+void
+on_main_incline_spinbutton_value_changed( GtkSpinButton   *spinbutton,
+										  gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  /* Get new "incline" structure angle from spinbutton */
+  structure_proj_params.Wi = gtk_spin_button_get_value(spinbutton);
+  New_Structure_Projection_Angle();
+
+  /* Sync rad pattrern window spinbutton if enabled */
+  if( isFlagSet(DRAW_ENABLED) && isFlagSet(COMMON_PROJECTION) )
+	gtk_spin_button_set_value(
+		incline_rdpattern, (gdouble)structure_proj_params.Wi );
+}
+
+
+  void
+on_main_currents_togglebutton_toggled  (GtkToggleButton *togglebutton,
+										gpointer         user_data)
+{
+  /* Enable calculation and rendering of structure curents */
+  Main_Currents_Togglebutton_Toggled(
+	  gtk_toggle_button_get_active(togglebutton) );
+}
+
+
+  void
+on_main_charges_togglebutton_toggled   (GtkToggleButton *togglebutton,
+										gpointer         user_data)
+{
+  /* Enable calculation and rendering of structure charge density */
+  Main_Charges_Togglebutton_Toggled(
+	  gtk_toggle_button_get_active(togglebutton) );
+}
+
+
+gboolean
+on_main_colorcode_drawingarea_expose_event(	GtkWidget       *widget,
+											GdkEventExpose  *event,
+											gpointer         user_data)
+{
+  double red = 0.0, grn = 0.0, blu = 0.0;
+  int idx;
+
+  /* No redraws if new input pending */
+  if( isFlagSet(INPUT_PENDING) )
+	return FALSE;
+
+  cairo_t *cr = gdk_cairo_create( widget-> window );
+
+  /* Draw color-code bar in main window */
+  for( idx = 0; idx < 160; idx++ )
+  {
+	Value_to_Color( &red, &grn, &blu, (double) (8*idx), 1280.0 );
+	cairo_set_source_rgb( cr, red, grn, blu );
+	Cairo_Draw_Line( cr, idx, 0, idx, 28 );
+  }
+
+  cairo_destroy( cr );
+  return TRUE;
+}
+
+
+  void
+on_main_freq_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+										gpointer         user_data)
+{
+  static gdouble fmhz_save = 0.0;
+
+  gtk_spin_button_update( spinbutton );
+
+  /* Frequency spinbutton value changed by frequency loop */
+  if( isFlagSet(FREQ_LOOP_RUNNING) )
+	Draw_Structure( structure_drawingarea );
+  else /* by user */
+  {
+	/* Get freq from spin button, avoid double signal by GTK */
+	gdouble fmhz = (gdouble)gtk_spin_button_get_value(spinbutton);
+	if( (fmhz == fmhz_save) && isFlagClear(PLOT_FREQ_LINE) )
+	  return; /* to avoid double signal by GTK */
+	fmhz_save = fmhz;
+
+	/* If new freq calculations are enabled by
+	 * checkbutton next to freq spinbutton or
+	 * freq line plotting enabled, redo currents */
+	if( isFlagSet(PLOT_FREQ_LINE) ||
+		(isFlagSet(MAIN_NEW_FREQ) &&
+		(isFlagSet(DRAW_CURRENTS) ||
+		isFlagSet(DRAW_CHARGES))) )
+
+	{
+	  /* Recalc currents in structure */
+	  calc_data.fmhz = (double)fmhz;
+	  g_idle_add( Redo_Currents, NULL );
+	}
+
+	/* Sync rad pattern frequency spinbutton */
+	if( isFlagSet(DRAW_ENABLED) 	&&
+		isFlagSet(COMMON_FREQUENCY) &&
+		isFlagSet(MAIN_NEW_FREQ) )
+	  gtk_spin_button_set_value( rdpattern_frequency, fmhz );
+
+  } /* else */
+}
+
+
+void
+on_main_freq_checkbutton_toggled       (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  if( gtk_toggle_button_get_active(togglebutton) )
+	SetFlag(MAIN_NEW_FREQ);
+  else
+	ClearFlag(MAIN_NEW_FREQ);
+}
+
+
+  void
+on_main_new_freq_clicked               (GtkButton       *button,
+										gpointer         user_data)
+{
+  /* Recalculate (and redraw) currents on user command */
+  if( isFlagClear(FREQ_LOOP_RUNNING) )
+  {
+	calc_data.fmhz =
+	  (double)gtk_spin_button_get_value( mainwin_frequency );
+	g_idle_add( Redo_Currents, NULL );
+  }
+}
+
+
+gboolean
+on_structure_drawingarea_configure_event( GtkWidget       *widget,
+										  GdkEventConfigure *event,
+										  gpointer         user_data)
+{
+  /* Create or resize structure drawing pixmap */
+  Create_Pixmap(
+	  &structure_pixmap,
+	  &structure_pixmap_width,
+	  &structure_pixmap_height,
+	  widget, event,
+	  &structure_proj_params );
+  return TRUE;
+}
+
+
+gboolean
+on_structure_drawingarea_motion_notify_event( GtkWidget       *widget,
+											  GdkEventMotion  *event,
+											  gpointer         user_data)
+{
+  Motion_Event( event, &structure_proj_params,
+	  rotate_structure, incline_structure );
+  return TRUE;
+}
+
+
+  gboolean
+on_structure_drawingarea_expose_event  (GtkWidget       *widget,
+										GdkEventExpose  *event,
+										gpointer         user_data)
+{
+  /* No redraws if new input pending */
+  if( isFlagSet(INPUT_PENDING) )
+	return FALSE;
+
+  Draw_Structure( widget );
+  return TRUE;
+}
+
+
+  void
+on_filechooserdialog_response          (GtkDialog       *dialog,
+										gint             response_id,
+										gpointer         user_data)
+{
+  if( response_id == GTK_RESPONSE_OK )
+  {
+	gchar *filename;
+	gboolean new = TRUE;
+
+	/* Save any changes to an open file */
+	Save_Nec2_Input_File( nec2_edit_window, infile );
+
+	/* Get filename of NEC2 input file */
+	filename =
+	  gtk_file_chooser_get_filename( GTK_FILE_CHOOSER(dialog) );
+	Strlcpy( infile, filename, strlen(filename)+1 ); /* For null term. */
+	g_free( filename );
+	gtk_widget_destroy( file_chooser );
+
+	/* Open new file */
+	Open_Input_File( (gpointer)&new );
+  }
+}
+
+
+  void
+on_fileselection_response(  GtkDialog       *dialog,
+							gint             response_id,
+							gpointer         user_data)
+{
+  gchar filename[81];
+  size_t s = sizeof( filename );
+  char *str;
+  gboolean new = FALSE;
+
+  /* User selects a file name to save a pixmap to file */
+  if( response_id == GTK_RESPONSE_OK )
+  {
+	/* Get the "save as" file name */
+	Strlcpy( filename, gtk_file_selection_get_filename(
+		  GTK_FILE_SELECTION(dialog)), s );
+
+	if( isFlagSet(IMAGE_SAVE) )
+	{
+	  /* cat a file extension if not already there */
+	  str = strstr( filename, ".png" );
+	  if( (str == NULL) || (str[4] != '\0') )
+		Strlcat( filename, ".png", s );
+	  Save_Pixmap(
+		  saveas_pixmap, saveas_pixmap_width,
+		  saveas_pixmap_height, filename );
+	}
+	else if( isFlagSet(NEC2_SAVE) )
+	{
+	  /* cat a file extension if not already there */
+	  str = strstr( filename, ".nec" );
+	  if( (str == NULL) || (str[4] != '\0') )
+		Strlcat( filename, ".nec", s );
+
+	  /* Use new file name as input file */
+	  Strlcpy( infile, filename, strlen(filename)+1 );
+	  Save_Nec2_Input_File( nec2_edit_window, filename );
+
+	  /* Re-open NEC2 input file */
+	  if( Nec2_Apply_Checkbutton() )
+		Open_Input_File( (gpointer)&new );
+	}
+	else if( isFlagSet(RDPAT_GNUPLOT_SAVE) )
+	{
+	  /* cat a file extension if not already there */
+	  str = strstr( filename, ".gplot" );
+	  if( (str == NULL) || (str[6] != '\0') )
+		Strlcat( filename, ".gplot", s );
+	  Save_RadPattern_Gnuplot_Data( filename );
+	}
+	else if( isFlagSet(PLOTS_GNUPLOT_SAVE) )
+	{
+	  /* cat a file extension if not already there */
+	  str = strstr( filename, ".gplot" );
+	  if( (str == NULL) || (str[6] != '\0') )
+		Strlcat( filename, ".gplot", s );
+	  Save_FreqPlots_Gnuplot_Data( filename );
+	}
+	else if( isFlagSet(STRCT_GNUPLOT_SAVE) )
+	{
+	  /* cat a file extension if not already there */
+	  str = strstr( filename, ".gplot" );
+	  if( (str == NULL) || (str[6] != '\0') )
+		Strlcat( filename, ".gplot", s );
+	  Save_Struct_Gnuplot_Data( filename );
+	}
+
+	gtk_widget_destroy( file_selection );
+	if( (kill_window == nec2_edit_window) &&
+		(kill_window != NULL) )
+	  gtk_widget_destroy( nec2_edit_window );
+  } /* if( response_id == GTK_RESPONSE_OK ) */
+}
+
+
+  gboolean
+on_freqplots_window_delete_event       (GtkWidget       *widget,
+										GdkEvent        *event,
+										gpointer         user_data)
+{
+  kill_window = freqplots_window;
+  Delete_Event( _("Really close window?") );
+  return TRUE;
+}
+
+
+  void
+on_freqplots_window_destroy            (GtkObject       *object,
+										gpointer         user_data)
+{
+  Plots_Window_Killed();
+}
+
+
+  void
+on_freqplots_save_activate             (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  char saveas[96];
+  static int cnt = 0;
+
+  if( (strlen(infile) == 0) || isFlagClear(PLOT_SELECT) )
+	return;
+
+  /* Make file name from input file name,
+   * to save frequency plots drawing */
+  snprintf( saveas, 95, "%s-%s_%03d.%s", infile, "plots", ++cnt, "png" );
+  saveas[95] = '\0';
+
+  saveas_pixmap = freqplots_pixmap;
+  saveas_pixmap_width  = freqplots_pixmap_width;
+  saveas_pixmap_height = freqplots_pixmap_height;
+  ClearFlag( ALL_SAVE_FLAGS );
+  SetFlag( IMAGE_SAVE );
+
+  /* Open file selector to specify file  */
+  /* name for saving the structure image */
+  file_selection = create_fileselection();
+  gtk_file_selection_set_filename( GTK_FILE_SELECTION(file_selection), saveas );
+  gtk_widget_show( file_selection );
+}
+
+
+  void
+on_freqplots_save_as_activate          (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  saveas_pixmap = freqplots_pixmap;
+  saveas_pixmap_width  = freqplots_pixmap_width;
+  saveas_pixmap_height = freqplots_pixmap_height;
+  ClearFlag( ALL_SAVE_FLAGS );
+  SetFlag( IMAGE_SAVE );
+
+  /* Open file selector to specify a file
+   * name for saving the freq plots image */
+  file_selection = create_fileselection();
+  gtk_widget_show( file_selection );
+}
+
+
+void
+on_freqplots_save_as_gnuplot_activate  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+  /* Open file selector to specify a file
+   * name for saving the rad pattern image */
+  ClearFlag( ALL_SAVE_FLAGS );
+  SetFlag( PLOTS_GNUPLOT_SAVE );
+  file_selection = create_fileselection();
+  gtk_widget_show( file_selection );
+}
+
+
+  void
+on_freqplots_gmax_togglebutton_toggled (GtkToggleButton *togglebutton,
+										gpointer         user_data)
+{
+  /* Enable or not max gain plotting */
+  Plot_Select( togglebutton, PLOT_GMAX );
+}
+
+
+  void
+on_freqplots_gdir_togglebutton_toggled (GtkToggleButton *togglebutton,
+										gpointer         user_data)
+{
+  /* Enable or not gain direction plotting */
+  Plot_Select( togglebutton, PLOT_GAIN_DIR );
+}
+
+
+void
+on_freqplots_gviewer_togglebutton_toggled(GtkToggleButton *togglebutton,
+										  gpointer         user_data)
+{
+  /* Enable or not "gain toward user" plotting */
+  Plot_Select( togglebutton, PLOT_GVIEWER );
+}
+
+
+  void
+on_freqplots_vswr_togglebutton_toggled (GtkToggleButton *togglebutton,
+										gpointer         user_data)
+{
+  /* Enable or not VSWR plotting */
+  Plot_Select( togglebutton, PLOT_VSWR );
+}
+
+
+void
+on_freqplots_zo_spinbutton_value_changed( GtkSpinButton   *spinbutton,
+										  gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  /* Set the value of Z0 used for VSWR calculations */
+  calc_data.zo = gtk_spin_button_get_value(spinbutton);
+  if( isFlagSet(PLOT_ENABLED) )
+	Plot_Frequency_Data();
+}
+
+
+void
+on_freqplots_zrlzim_togglebutton_toggled( GtkToggleButton *togglebutton,
+										  gpointer         user_data)
+{
+  /* Enable or not Z-real/Z-imag plotting */
+  Plot_Select( togglebutton, PLOT_ZREAL_ZIMAG );
+}
+
+
+void
+on_freqplots_zmgzph_togglebutton_toggled( GtkToggleButton *togglebutton,
+										  gpointer         user_data)
+{
+  /* Enable or not Z-mag/Z-phase plotting */
+  Plot_Select( togglebutton, PLOT_ZMAG_ZPHASE );
+}
+
+
+  gboolean
+on_freqplots_drawingarea_expose_event  (GtkWidget       *widget,
+										GdkEventExpose  *event,
+										gpointer         user_data)
+{
+  /* No redraws if new input pending */
+  if( isFlagSet(INPUT_PENDING) )
+	return FALSE;
+
+  /* Enable drawing of freq line */
+  Plot_Frequency_Data();
+  return TRUE;
+}
+
+
+gboolean
+on_freqplots_drawingarea_configure_event( GtkWidget       *widget,
+										  GdkEventConfigure *event,
+										  gpointer         user_data)
+{
+  /* Create or resize pixmap for frequency plots */
+  Create_Pixmap(
+	  &freqplots_pixmap,
+	  &freqplots_pixmap_width,
+	  &freqplots_pixmap_height,
+	  widget, event, NULL );
+  return TRUE;
+}
+
+
+gboolean
+on_freqplots_drawingarea_button_press_event(GtkWidget       *widget,
+											GdkEventButton  *event,
+											gpointer         user_data)
+{
+  Set_Frequency_On_Click( event );
+  return TRUE;
+}
+
+
+  void
+on_rdpattern_window_destroy            (GtkObject       *object,
+										gpointer         user_data)
+{
+  Rdpattern_Window_Killed();
+}
+
+
+  gboolean
+on_rdpattern_window_delete_event       (GtkWidget       *widget,
+										GdkEvent        *event,
+										gpointer         user_data)
+{
+  kill_window = rdpattern_window;
+  Delete_Event( _("Really close window?") );
+  return TRUE;
+}
+
+
+  void
+on_rdpattern_save_activate             (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  char saveas[96];
+  static int cgn = 0, ceh = 0;;
+
+  if( strlen(infile) == 0 )
+	return;
+
+  /* Make the rad pattern save
+   * file name from input name */
+  if( isFlagSet(DRAW_GAIN) )
+	snprintf( saveas, 95, "%s-%s_%03d.%s", infile, "gain", ++cgn, "png" );
+  else if( isFlagSet(DRAW_EHFIELD) )
+	snprintf( saveas, 95, "%s-%s_%03d.%s", infile, "fields", ++ceh, "png" );
+  else return;
+  saveas[95] = '\0';
+
+  saveas_pixmap = rdpattern_pixmap;
+  saveas_pixmap_width  = rdpattern_pixmap_width;
+  saveas_pixmap_height = rdpattern_pixmap_height;
+  ClearFlag( ALL_SAVE_FLAGS );
+  SetFlag( IMAGE_SAVE );
+
+  /* Open file selector to specify file  */
+  /* name for saving the pattern image */
+  file_selection = create_fileselection();
+  gtk_file_selection_set_filename( GTK_FILE_SELECTION(file_selection), saveas );
+  gtk_widget_show( file_selection );
+}
+
+
+  void
+on_rdpattern_save_as_activate          (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  saveas_pixmap = rdpattern_pixmap;
+  saveas_pixmap_width  = rdpattern_pixmap_width;
+  saveas_pixmap_height = rdpattern_pixmap_height;
+  ClearFlag( ALL_SAVE_FLAGS );
+  SetFlag( IMAGE_SAVE );
+
+  /* Open file selector to specify a file
+   * name for saving the rad pattern image */
+  file_selection = create_fileselection();
+  gtk_widget_show( file_selection );
+}
+
+
+void
+on_rdpattern_save_as_gnuplot_activate   (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+  /* Open file selector to specify a file
+   * name for saving the rad pattern image */
+  ClearFlag( ALL_SAVE_FLAGS );
+  SetFlag( RDPAT_GNUPLOT_SAVE );
+  file_selection = create_fileselection();
+  gtk_widget_show( file_selection );
+}
+
+
+void
+on_rdpattern_linear_power_activate     (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
+	Set_Gain_Style( GS_LINP );
+}
+
+
+  void
+on_rdpattern_linear_voltage_activate   (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
+	Set_Gain_Style( GS_LINV );
+}
+
+
+  void
+on_rdpattern_arrl_style_activate       (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
+	Set_Gain_Style( GS_ARRL );
+}
+
+
+  void
+on_rdpattern_logarithmic_activate      (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
+	Set_Gain_Style( GS_LOG );
+}
+
+
+  void
+on_rdpattern_e_field_activate          (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
+	SetFlag( DRAW_EFIELD );
+  else
+	ClearFlag( DRAW_EFIELD );
+  Set_Window_Labels();
+  if( isFlagSet(DRAW_EHFIELD) )
+	Draw_Radiation( rdpattern_drawingarea );
+}
+
+
+  void
+on_rdpattern_h_field_activate          (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
+	SetFlag( DRAW_HFIELD );
+  else
+	ClearFlag( DRAW_HFIELD );
+  Set_Window_Labels();
+  if( isFlagSet(DRAW_EHFIELD) )
+	Draw_Radiation( rdpattern_drawingarea );
+}
+
+
+  void
+on_rdpattern_poynting_vector_activate  (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
+	SetFlag( DRAW_POYNTING );
+  else
+	ClearFlag( DRAW_POYNTING );
+  Set_Window_Labels();
+  if( isFlagSet(DRAW_EHFIELD) )
+	Draw_Radiation( rdpattern_drawingarea );
+}
+
+
+  void
+on_rdpattern_overlay_structure_activate (GtkMenuItem     *menuitem,
+	gpointer         user_data)
+{
+  if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
+	SetFlag( OVERLAY_STRUCT );
+  else
+	ClearFlag( OVERLAY_STRUCT );
+  Draw_Radiation( rdpattern_drawingarea );
+}
+
+
+  void
+on_rdpattern_x_axis_clicked            (GtkButton       *button,
+										gpointer         user_data)
+{
+  /* Recalculate projection paramenters */
+  New_Viewer_Angle( 0.0, 0.0, rotate_rdpattern,
+	  incline_rdpattern, &rdpattern_proj_params );
+}
+
+
+  void
+on_rdpattern_y_axis_clicked            (GtkButton       *button,
+										gpointer         user_data)
+{
+  /* Recalculate projection paramenters */
+  New_Viewer_Angle( 90.0, 0.0, rotate_rdpattern,
+	  incline_rdpattern, &rdpattern_proj_params );
+}
+
+
+  void
+on_rdpattern_z_axis_clicked            (GtkButton       *button,
+										gpointer         user_data)
+{
+  /* Recalculate projection paramenters */
+  New_Viewer_Angle( 0.0, 90.0, rotate_rdpattern,
+	  incline_rdpattern, &rdpattern_proj_params );
+}
+
+
+  void
+on_rdpattern_default_view_clicked      (GtkButton       *button,
+										gpointer         user_data)
+{
+  /* Projection at 45 deg rotation and inclination */
+  New_Viewer_Angle( 45.0, 45.0, rotate_rdpattern,
+	  incline_rdpattern, &rdpattern_proj_params );
+}
+
+
+void
+on_rdpattern_rotate_spinbutton_value_changed(GtkSpinButton   *spinbutton,
+											  gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+
+  /* Get new value of "rotate pattern" angle from spinbutton */
+  rdpattern_proj_params.Wr = gtk_spin_button_get_value(spinbutton);
+  New_Radiation_Projection_Angle();
+
+  /* Sync main window rotate spinbutton */
+  if( isFlagSet(COMMON_PROJECTION) )
+	gtk_spin_button_set_value( GTK_SPIN_BUTTON(lookup_widget(
+			main_window, "main_rotate_spinbutton")),
+		(gdouble)rdpattern_proj_params.Wr );
+}
+
+
+void
+on_rdpattern_incline_spinbutton_value_changed(GtkSpinButton   *spinbutton,
+											  gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+
+  /* Get new value of "incline pattern" angle from spinbutton */
+  rdpattern_proj_params.Wi = gtk_spin_button_get_value(spinbutton);
+  New_Radiation_Projection_Angle();
+
+  /* Sync main window incline spinbutton */
+  if( isFlagSet(COMMON_PROJECTION) )
+	gtk_spin_button_set_value( GTK_SPIN_BUTTON(lookup_widget(
+			main_window, "main_incline_spinbutton")),
+		(gdouble)rdpattern_proj_params.Wi );
+}
+
+
+  void
+on_rdpattern_gain_togglebutton_toggled (GtkToggleButton *togglebutton,
+										gpointer         user_data)
+{
+  Rdpattern_Gain_Togglebutton_Toggled(
+	  gtk_toggle_button_get_active(togglebutton) );
+}
+
+
+  void
+on_rdpattern_eh_togglebutton_toggled   (GtkToggleButton *togglebutton,
+										gpointer         user_data)
+{
+  Rdpattern_EH_Togglebutton_Toggled(
+	  gtk_toggle_button_get_active(togglebutton) );
+}
+
+
+  gboolean
+on_rdpattern_colorcode_drawingarea_expose_event(GtkWidget       *widget,
+												GdkEventExpose  *event,
+												gpointer         user_data)
+{
+  double red = 0.0, grn = 0.0, blu = 0.0;
+  int idx;
+
+  /* No redraws if new input pending */
+  if( isFlagSet(INPUT_PENDING) )
+	return FALSE;
+
+  cairo_t *cr = gdk_cairo_create( widget-> window );
+
+  /* Draw color code bar in rad pattern window */
+  for( idx = 0; idx < 160; idx++ )
+  {
+	Value_to_Color( &red, &grn, &blu, (double) (8*idx), 1280.0 );
+	cairo_set_source_rgb( cr, red, grn, blu );
+	Cairo_Draw_Line( cr, idx, 0, idx, 28 );
+  }
+
+  cairo_destroy( cr );
+  return TRUE;
+}
+
+
+void
+on_rdpattern_freq_spinbutton_value_changed(	GtkSpinButton   *spinbutton,
+											gpointer         user_data)
+{
+  static gdouble fmhz_save = 0.0;
+
+  gtk_spin_button_update( spinbutton );
+
+  /* Frequency spinbutton value changed by frequency loop */
+  if( isFlagSet(FREQ_LOOP_RUNNING) && isFlagSet(DRAW_ENABLED) )
+	Draw_Radiation( rdpattern_drawingarea );
+  else
+  {
+	/* Get freq from spin button, avoid double signal by GTK */
+	gdouble fmhz = (gdouble)gtk_spin_button_get_value(spinbutton);
+	if( fmhz == fmhz_save ) return; /* to avoid double signal by GTK */
+	fmhz_save = fmhz;
+
+	/* If new freq calculations are enabled
+	 * by checkbutton next to freq spinbutton */
+	if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
+			lookup_widget(rdpattern_window,
+			  "rdpattern_freq_checkbutton"))) &&
+		(isFlagSet(DRAW_GAIN) || isFlagSet(DRAW_EHFIELD)) )
+	{
+	  /* Recalc currents in structure and rad pattern */
+	  calc_data.fmhz = (double)fmhz;
+	  g_idle_add( Redo_Radiation_Pattern, NULL );
+	}
+
+	/* Sync main window frequency spinbutton */
+	if( isFlagSet(COMMON_FREQUENCY) )
+	  gtk_spin_button_set_value( mainwin_frequency, fmhz );
+  } /* else */
+}
+
+
+  void
+on_rdpattern_new_freq_clicked          (GtkButton       *button,
+										gpointer         user_data)
+{
+  /* Recalculate and draw rad pattern after user command */
+  if( isFlagClear(FREQ_LOOP_RUNNING) )
+  {
+	calc_data.fmhz =
+	  (double)gtk_spin_button_get_value( rdpattern_frequency );
+	Redo_Radiation_Pattern( NULL );
+  }
+}
+
+
+gboolean
+on_rdpattern_drawingarea_configure_event( GtkWidget       *widget,
+										  GdkEventConfigure *event,
+										  gpointer         user_data)
+{
+  /* Create or resize rad pattern pixmap */
+  Create_Pixmap(
+	  &rdpattern_pixmap,
+	  &rdpattern_pixmap_width,
+	  &rdpattern_pixmap_height,
+	  widget, event,
+	  &rdpattern_proj_params );
+  return TRUE;
+}
+
+
+  gboolean
+on_rdpattern_drawingarea_expose_event  (GtkWidget       *widget,
+										GdkEventExpose  *event,
+										gpointer         user_data)
+{
+  /* No redraws if new input pending */
+  if( isFlagSet(INPUT_PENDING) )
+	return FALSE;
+
+  Draw_Radiation( widget );
+  return TRUE;
+}
+
+
+gboolean
+on_rdpattern_drawingarea_motion_notify_event( GtkWidget       *widget,
+											  GdkEventMotion  *event,
+											  gpointer         user_data)
+{
+  Motion_Event( event, &rdpattern_proj_params,
+	  rotate_rdpattern, incline_rdpattern );
+  return TRUE;
+}
+
+
+  void
+on_quit_cancelbutton_clicked           (GtkButton       *button,
+										gpointer         user_data)
+{
+  gtk_widget_destroy( quit_dialog );
+  ClearFlag( MAIN_QUIT );
+}
+
+
+  void
+on_quit_okbutton_clicked               (GtkButton       *button,
+										gpointer         user_data)
+{
+  if( isFlagSet(FREQ_LOOP_RUNNING) )
+  {
+	if( isFlagSet(MAIN_QUIT) )
+	{
+	  Stop_Frequency_Loop();
+	  gtk_label_set_text( GTK_LABEL(
+			lookup_widget( quit_dialog, "quit_label")),
+		  _("Really quit Xnec2c?") );
+	  ClearFlag( MAIN_QUIT );
+	  return;
+	}
+
+	/* Stop freq loop if only one of plots
+	 * or radiation pattern windows is open */
+	if( (isFlagSet(DRAW_ENABLED) && isFlagClear(PLOT_ENABLED)) ||
+		(isFlagClear(DRAW_ENABLED) && isFlagSet(PLOT_ENABLED)) )
+	  Stop_Frequency_Loop();
+
+  } /* if( isFlagSet(FREQ_LOOP_RUNNING) ) */
+
+  gtk_widget_destroy( quit_dialog );
+  gtk_widget_destroy( kill_window );
+}
+
+
+  void
+main_view_menuitem_activate            (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  /* Sync common projection checkbuttons */
+  if( isFlagSet(COMMON_PROJECTION) )
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(main_window,
+			"common_projection")), TRUE );
+  else
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(main_window,
+			"common_projection")), FALSE );
+
+  /* Sync common frequency checkbuttons */
+  if( isFlagSet(COMMON_FREQUENCY) )
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(main_window,
+			"common_freq")), TRUE );
+  else
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(main_window,
+			"common_freq")), FALSE );
+
+}
+
+
+  void
+main_pol_menu_activate                 (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  Set_Pol_Menuitem( menuitem );
+}
+
+
+  void
+freqplots_pol_menu_activate            (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  Set_Pol_Menuitem( menuitem );
+}
+
+
+  void
+rdpattern_view_menuitem_activate       (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  /* Sync common projection checkbuttons */
+  if( isFlagSet(COMMON_PROJECTION) )
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(rdpattern_window,
+			"common_projection")), TRUE );
+  else
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(rdpattern_window,
+			"common_projection")), FALSE );
+
+  /* Sync common frequency checkbuttons */
+  if( isFlagSet(COMMON_FREQUENCY) )
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(rdpattern_window,
+			"common_freq")), TRUE );
+  else
+	gtk_check_menu_item_set_active( GTK_CHECK_MENU_ITEM(
+		  lookup_widget(rdpattern_window,
+			"common_freq")), FALSE );
+}
+
+
+  void
+rdpattern_pol_menu_activate            (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  Set_Pol_Menuitem( menuitem );
+}
+
+
+  void
+on_filechoser_cancel_clicked           (GtkButton       *button,
+										gpointer         user_data)
+{
+  gtk_widget_destroy( file_chooser );
+}
+
+
+  void
+on_fileselection_cancel_clicked        (GtkButton       *button,
+										gpointer         user_data)
+{
+  gtk_widget_destroy( file_selection );
+}
+
+
+void
+on_near_peak_value_activate            (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
+  {
+	ClearFlag( NEAREH_SNAPSHOT );
+	/* Redraw radiation pattern drawingarea */
+	if( isFlagSet(DRAW_EHFIELD) )
+	{
+	  near_field.valid = 0;
+	  Near_Field_Pattern();
+	  Draw_Radiation( rdpattern_drawingarea );
+	}
+  }
+  else SetFlag( NEAREH_SNAPSHOT );
+
+  /* Reset child near field flags */
+  Pass_EH_Flags();
+}
+
+
+void
+on_near_snapshot_activate              (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  if( gtk_check_menu_item_get_active(
+		GTK_CHECK_MENU_ITEM(menuitem)) )
+  {
+	SetFlag( NEAREH_SNAPSHOT );
+	/* Redraw radiation pattern drawingarea */
+	if( isFlagSet(DRAW_EHFIELD) )
+	{
+	  near_field.valid = 0;
+	  Near_Field_Pattern();
+	  Draw_Radiation( rdpattern_drawingarea );
+	}
+  }
+  else ClearFlag( NEAREH_SNAPSHOT );
+
+  /* Reset child near field flags */
+  Pass_EH_Flags();
+}
+
+
+  void
+on_rdpattern_animate_activate          (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  if( isFlagClear(DRAW_EHFIELD) )
+	return;
+
+  if( animate_dialog == NULL )
+	animate_dialog = create_animate_dialog();
+  gtk_widget_show( animate_dialog );
+}
+
+
+  void
+on_animation_applybutton_clicked       (GtkButton       *button,
+										gpointer         user_data)
+{
+  GtkSpinButton *spinbutton;
+  guint intval;
+  gdouble freq, steps;
+
+  spinbutton = GTK_SPIN_BUTTON( lookup_widget(animate_dialog,
+		"animate_freq_spinbutton") );
+  freq = gtk_spin_button_get_value( spinbutton );
+  spinbutton = GTK_SPIN_BUTTON( lookup_widget(animate_dialog,
+		"animate_steps_spinbutton") );
+  steps = gtk_spin_button_get_value( spinbutton );
+  intval = (guint)(1000.0 / steps / freq);
+  near_field.anim_step = (double)TP / steps;
+
+  SetFlag( NEAREH_ANIMATE );
+  if( anim_tag > 0 )
+	g_source_remove( anim_tag );
+  anim_tag = g_timeout_add( intval, Animate_Near_Field, NULL );
+}
+
+
+  void
+on_animation_cancelbutton_clicked      (GtkButton       *button,
+									  	gpointer         user_data)
+{
+  ClearFlag( NEAREH_ANIMATE );
+  g_source_remove( anim_tag );
+  anim_tag = 0;
+}
+
+
+  void
+on_animation_okbutton_clicked          (GtkButton       *button,
+										gpointer         user_data)
+{
+  GtkSpinButton *spinbutton;
+  guint intval;
+  gdouble freq, steps;
+
+  spinbutton = GTK_SPIN_BUTTON( lookup_widget(animate_dialog,
+		"animate_freq_spinbutton") );
+  freq = gtk_spin_button_get_value( spinbutton );
+  spinbutton = GTK_SPIN_BUTTON( lookup_widget(animate_dialog,
+		"animate_steps_spinbutton") );
+  steps = gtk_spin_button_get_value( spinbutton );
+  intval = (guint)(1000.0 / steps / freq);
+  near_field.anim_step = (double)TP / steps;
+
+  SetFlag( NEAREH_ANIMATE );
+  if( anim_tag > 0 )
+	g_source_remove( anim_tag );
+  anim_tag = g_timeout_add( intval, Animate_Near_Field, NULL );
+
+  gtk_widget_hide( animate_dialog );
+}
+
+
+  void
+on_animate_dialog_destroy              (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  animate_dialog = NULL;
+}
+
+
+void
+on_quit_dialog_destroy                 (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  quit_dialog = NULL;
+}
+
+
+gboolean
+on_error_dialog_delete_event           (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+  return TRUE;
+}
+
+
+  void
+on_nec2_edit_activate                  (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  /* Abort if no open input file */
+  if( input_fp == NULL )
+  {
+	stop( _("No open NEC2 input file"), ERR_OK );
+	return;
+  }
+
+  if( nec2_edit_window == NULL )
+	Open_Nec2_Editor( NEC2_EDITOR_RELOAD );
+}
+
+
+gboolean
+on_nec2_editor_delete_event            (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+  if( isFlagSet(NEC2_EDIT_SAVE) )
+  {
+	/* Open file selector to specify file    */
+	/* name for saving a new NEC2 input file */
+	if( strlen(infile) == 0 )
+	{
+	  file_selection = create_fileselection();
+	  gtk_file_selection_set_filename(
+		  GTK_FILE_SELECTION(file_selection), _("untitled") );
+	  gtk_widget_show( file_selection );
+	  ClearFlag( ALL_SAVE_FLAGS );
+	  ClearFlag( NEC2_EDIT_SAVE );
+	  SetFlag( NEC2_SAVE );
+	  kill_window = nec2_edit_window;
+	  return TRUE;
+	}
+
+	Save_Nec2_Input_File( nec2_edit_window, infile );
+  }
+
+  kill_window = nec2_edit_window;
+  Delete_Event( _("Really close NEC2 Editor?") );
+  return TRUE;
+}
+
+
+void
+on_nec2_editor_destroy                 (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  cmnt_store = NULL,
+  geom_store = NULL,
+  cmnd_store = NULL;
+  nec2_edit_window = NULL;
+  kill_window = NULL;
+}
+
+
+  void
+on_nec2_save_clicked(	GtkButton       *button,
+						gpointer         user_data)
+{
+  gboolean new = FALSE;
+
+  /* No save/open file while freq loop is running */
+  if( !Nec2_Save_Warn(
+		_("NEC2 Editor's data may not be saved\n"\
+		  "while the Frequency Loop is running")) )
+	return;
+
+  /* Open file selector to specify file  */
+  /* name for saving a new NEC2 input file */
+  if( strlen(infile) == 0 )
+  {
+	file_selection = create_fileselection();
+	gtk_file_selection_set_filename(
+		GTK_FILE_SELECTION(file_selection), _("untitled") );
+	gtk_widget_show( file_selection );
+	ClearFlag( ALL_SAVE_FLAGS );
+	SetFlag( NEC2_SAVE );
+	return;
+  }
+
+  /* Save NEC2 editor data */
+  Save_Nec2_Input_File( nec2_edit_window, infile );
+  if( Nec2_Apply_Checkbutton() )
+	Open_Input_File( (gpointer)&new );
+}
+
+
+void
+on_nec2_save_as_clicked                (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  /* No save/open file while freq loop is running */
+  if( !Nec2_Save_Warn(
+		_("NEC2 Editor's data may not be saved\n"\
+		  "while the Frequency Loop is running")) )
+	return;
+
+  /* Open file selector to specify file   */
+  /* name for saving the edited NEC2 file */
+  file_selection = create_fileselection();
+  gtk_file_selection_set_filename(
+	  GTK_FILE_SELECTION(file_selection), _("untitled") );
+  gtk_widget_show( file_selection );
+  ClearFlag( ALL_SAVE_FLAGS );
+  SetFlag( NEC2_SAVE );
+}
+
+
+void
+on_nec2_row_add_clicked                (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  GtkTreeModel *model;
+  GtkTreeSelection *selection;
+  GtkTreeIter iter, sibling;
+  int ncols;
+
+  if( selected_treeview == NULL )
+	return;
+
+  /* Find selected row and add new after */
+  selection = gtk_tree_view_get_selection( selected_treeview );
+  if( ! gtk_tree_selection_get_selected(selection, &model, &sibling) )
+  {
+	/* Empty tree view case */
+	model = gtk_tree_view_get_model( selected_treeview );
+	gtk_list_store_insert( GTK_LIST_STORE(model), &iter, 0 );
+  }
+  else gtk_list_store_insert_after(
+	  GTK_LIST_STORE(model), &iter, &sibling);
+
+  /* Prime columns of new row */
+  ncols = gtk_tree_model_get_n_columns( model );
+  if( ncols == 2 ) /* Comments treeview */
+	gtk_list_store_set(
+		GTK_LIST_STORE(model), &iter, 0, "CM", -1 );
+  else
+  {
+	int idx;
+	for( idx = 0; idx < ncols; idx++ )
+	  gtk_list_store_set(
+		  GTK_LIST_STORE(model), &iter, idx, "--", -1 );
+  }
+}
+
+
+  void
+on_nec2_row_remv_clicked               (GtkButton       *button,
+										gpointer         user_data)
+{
+  GtkTreeModel *model;
+  GtkTreeIter   iter;
+  GtkTreeSelection *selection;
+
+  if( selected_treeview == NULL )
+	return;
+
+  selection = gtk_tree_view_get_selection( selected_treeview );
+  gtk_tree_selection_get_selected( selection, &model, &iter);
+  gtk_list_store_remove( GTK_LIST_STORE(model), &iter );
+  selected_treeview = NULL;
+}
+
+
+void
+on_nec2_treeview_clear_clicked         (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( selected_treeview != NULL )
+	gtk_list_store_clear( GTK_LIST_STORE(
+		  gtk_tree_view_get_model(selected_treeview)) );
+}
+
+
+gboolean
+on_nec2_cmnt_treeview_button_press_event
+                                        (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data)
+{
+  selected_treeview = GTK_TREE_VIEW(widget);
+  if( event->button == 3 )
+	Open_Editor(selected_treeview);
+  return FALSE;
+}
+
+
+gboolean
+on_nec2_geom_treeview_button_press_event
+                                        (GtkWidget       *widget,
+										 GdkEventButton  *event,
+										 gpointer         user_data)
+{
+  selected_treeview = GTK_TREE_VIEW(widget);
+  if( event->button == 3 )
+  {
+	action = EDITOR_EDIT;
+	Open_Editor(selected_treeview);
+	action = EDITOR_NEW;
+  }
+  return FALSE;
+}
+
+
+gboolean
+on_nec2_cmnd_treeview_button_press_event
+                                        (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+										gpointer         user_data)
+{
+  selected_treeview = GTK_TREE_VIEW(widget);
+  if( event->button == 3 )
+  {
+	action = EDITOR_EDIT;
+	Open_Editor( selected_treeview );
+	action = EDITOR_NEW;
+  }
+  return FALSE;
+}
+
+
+  void
+on_nec2_revert_clicked                 (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  /* Open NEC2 input file */
+  Open_File( &input_fp, infile, "r" );
+  Nec2_Input_File_Treeview( NEC2_EDITOR_REVERT );
+}
+
+void on_error_stopbutton_clicked(
+	GtkButton *button, gpointer user_data) __attribute__ ((noreturn));
+void
+on_error_stopbutton_clicked            (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  ClearFlag( ERROR_CONDX );
+  gtk_widget_destroy( error_dialog );
+  gtk_main();
+  exit(0);
+}
+
+
+void
+on_error_okbutton_clicked              (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  ClearFlag( ERROR_CONDX );
+  gtk_widget_destroy( error_dialog );
+}
+
+
+void
+on_error_quitbutton_clicked            (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  gtk_widget_destroy( error_dialog );
+  gtk_widget_destroy( main_window );
+}
+
+
+void
+on_wire_editor_destroy               (GtkObject       *object,
+									  gpointer         user_data)
+{
+  wire_editor = NULL;
+}
+
+
+void
+on_wire_pcl_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Wire_Editor( EDITOR_SEGPC );
+}
+
+
+void
+on_wire_data_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Wire_Editor( EDITOR_DATA );
+}
+
+
+void
+on_wire_tagnum_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Wire_Editor( EDITOR_TAGNUM );
+}
+
+
+void
+on_wire_len_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Wire_Editor( WIRE_EDITOR_WLEN );
+}
+
+
+void
+on_wire_taper_checkbutton_toggled      (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Wire_Editor( WIRE_EDITOR_TAPR );
+}
+
+
+void
+on_wire_rlen_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Wire_Editor( WIRE_EDITOR_RLEN );
+}
+
+
+void
+on_wire_rdia_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Wire_Editor( WIRE_EDITOR_RDIA );
+}
+
+
+void
+on_wire_new_button_clicked              (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Wire_Editor( EDITOR_NEW );
+}
+
+
+void
+on_wire_res_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Wire_Editor( EDITOR_LOAD );
+}
+
+
+void
+on_wire_cancel_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Wire_Editor( EDITOR_CANCEL );
+  gtk_widget_destroy( wire_editor );
+}
+
+
+void
+on_wire_apply_button_clicked            (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Wire_Editor( EDITOR_APPLY );
+}
+
+
+void
+on_wire_ok_button_clicked               (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Wire_Editor( EDITOR_APPLY );
+  gtk_widget_destroy( wire_editor );
+}
+
+
+void
+on_gw_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( wire_editor == NULL )
+  {
+	wire_editor = create_wire_editor();
+	gtk_widget_hide( lookup_widget(wire_editor, "wire_taperframe") );
+	gtk_widget_show( wire_editor );
+  }
+  Wire_Editor( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_ga_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( arc_editor == NULL )
+  {
+	arc_editor = create_arc_editor();
+	gtk_widget_show( arc_editor );
+  }
+  Arc_Editor( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_gh_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( helix_editor == NULL )
+  {
+	helix_editor = create_helix_editor();
+	gtk_widget_show( helix_editor );
+  }
+  Helix_Editor( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_sp_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( patch_editor == NULL )
+  {
+	patch_editor = create_patch_editor();
+	gtk_widget_show( patch_editor );
+  }
+  Patch_Editor( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_gr_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( cylinder_editor == NULL )
+  {
+	cylinder_editor = create_cylinder_editor();
+	gtk_widget_show( cylinder_editor );
+  }
+  Cylinder_Editor( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_gm_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( transform_editor == NULL )
+  {
+	transform_editor = create_transform_editor();
+	gtk_widget_show( transform_editor );
+  }
+  Transform_Editor( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_gx_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( reflect_editor == NULL )
+  {
+	reflect_editor = create_reflect_editor();
+	gtk_widget_show( reflect_editor );
+  }
+  Reflect_Editor( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_gs_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( scale_editor == NULL )
+  {
+	scale_editor = create_scale_editor();
+	gtk_widget_show( scale_editor );
+  }
+  Scale_Editor( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_ex_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( excitation_command == NULL )
+  {
+	excitation_command = create_excitation_command();
+	gtk_widget_show( excitation_command );
+  }
+  Excitation_Command( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_fr_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( frequency_command == NULL )
+  {
+	frequency_command = create_frequency_command();
+	gtk_widget_show( frequency_command );
+  }
+  Frequency_Command( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_gn_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( ground_command == NULL )
+  {
+	ground_command = create_ground_command();
+	gtk_widget_show( ground_command );
+  }
+  Ground_Command( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_gd_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( ground2_command == NULL )
+  {
+	ground2_command = create_ground2_command();
+	gtk_widget_show( ground2_command );
+  }
+  Ground2_Command( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_rp_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( radiation_command == NULL )
+  {
+	radiation_command = create_radiation_command();
+	gtk_widget_show( radiation_command );
+  }
+  Radiation_Command( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_ld_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( loading_command == NULL )
+  {
+	loading_command = create_loading_command();
+	gtk_widget_show( loading_command );
+  }
+  Loading_Command( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_nt_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( network_command == NULL )
+  {
+	network_command = create_network_command();
+	gtk_widget_show( network_command );
+  }
+  Network_Command( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_tl_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( txline_command == NULL )
+  {
+	txline_command = create_txline_command();
+	gtk_widget_show( txline_command );
+  }
+  Txline_Command( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_ne_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( nearfield_command == NULL )
+  {
+	nearfield_command = create_nearfield_command();
+	gtk_widget_show( nearfield_command );
+  }
+  Nearfield_Command( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_ek_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( kernel_command == NULL )
+  {
+	kernel_command = create_kernel_command();
+	gtk_widget_show( kernel_command );
+  }
+  Kernel_Command( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_kh_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( intrange_command == NULL )
+  {
+	intrange_command = create_intrange_command();
+	gtk_widget_show( intrange_command );
+  }
+  Intrange_Command( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_xq_clicked                          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  if( execute_command == NULL )
+  {
+	execute_command = create_execute_command();
+	gtk_widget_show( execute_command );
+  }
+  Execute_Command( action );
+  action = EDITOR_NEW;
+}
+
+
+void
+on_patch_data_spinbutton_value_changed (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Patch_Editor( EDITOR_DATA );
+}
+
+
+void
+on_patch_new_button_clicked             (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Patch_Editor( EDITOR_NEW );
+}
+
+
+void
+on_patch_cancel_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Patch_Editor( EDITOR_CANCEL );
+  gtk_widget_destroy( patch_editor );
+}
+
+
+void
+on_patch_apply_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Patch_Editor( EDITOR_APPLY );
+}
+
+
+void
+on_patch_ok_button_clicked              (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Patch_Editor( EDITOR_APPLY );
+  gtk_widget_destroy( patch_editor );
+}
+
+
+void
+on_patch_editor_destroy              (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  patch_editor = NULL;
+}
+
+
+void
+on_patch_arbitrary_radiobutton_toggled (GtkToggleButton *togglebutton,
+										gpointer         user_data)
+{
+  if( gtk_toggle_button_get_active(togglebutton) )
+	Patch_Editor( PATCH_EDITOR_ARBT );
+  else
+	Patch_Editor( PATCH_EDITOR_SCCD );
+}
+
+
+void
+on_patch_rectangular_radiobutton_toggled
+                                        (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  if( gtk_toggle_button_get_active(togglebutton) )
+	Patch_Editor( PATCH_EDITOR_RECT );
+}
+
+
+void
+on_patch_triangular_radiobutton_toggled
+                                        (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  if( gtk_toggle_button_get_active(togglebutton) )
+	Patch_Editor( PATCH_EDITOR_TRIA );
+}
+
+
+void
+on_patch_quadrilateral_radiobutton_toggled
+                                        (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  if( gtk_toggle_button_get_active(togglebutton) )
+	Patch_Editor( PATCH_EDITOR_QUAD );
+}
+
+
+void
+on_patch_surface_radiobutton_toggled   (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  if( gtk_toggle_button_get_active(togglebutton) )
+	Patch_Editor( PATCH_EDITOR_SURF );
+}
+
+
+void
+on_arc_data_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Arc_Editor( EDITOR_DATA );
+}
+
+
+void
+on_arc_tagnum_spinbutton_value_changed (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Arc_Editor( EDITOR_TAGNUM );
+}
+
+
+void
+on_arc_res_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Arc_Editor( EDITOR_LOAD );
+}
+
+
+void
+on_arc_new_button_clicked               (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Arc_Editor( EDITOR_NEW );
+}
+
+
+void
+on_arc_cancel_button_clicked            (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Arc_Editor( EDITOR_CANCEL );
+  gtk_widget_destroy( arc_editor );
+}
+
+
+void
+on_arc_apply_button_clicked             (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Arc_Editor( EDITOR_APPLY );
+}
+
+
+void
+on_arc_ok_button_clicked                (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Arc_Editor( EDITOR_APPLY );
+  gtk_widget_destroy( arc_editor );
+}
+
+
+void
+on_arc_editor_destroy                  (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  arc_editor = NULL;
+}
+
+
+void
+on_arc_pcl_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Arc_Editor( EDITOR_SEGPC );
+}
+
+
+void
+on_helix_tagnum_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Helix_Editor( EDITOR_TAGNUM );
+}
+
+
+void
+on_helix_pcl_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Helix_Editor( EDITOR_SEGPC );
+}
+
+
+void
+on_helix_nturns_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+ gtk_spin_button_update( spinbutton );
+ Helix_Editor( HELIX_EDITOR_NTURN );
+}
+
+
+void
+on_helix_res_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Helix_Editor( EDITOR_LOAD );
+}
+
+
+  void
+on_helix_lh_checkbutton_toggled        (GtkToggleButton *togglebutton,
+	gpointer         user_data)
+{
+  if( gtk_toggle_button_get_active(togglebutton) )
+	Helix_Editor( HELIX_EDITOR_LH );
+  else
+	Helix_Editor( HELIX_EDITOR_RH );
+}
+
+
+void
+on_helix_data_spinbutton_value_changed (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Helix_Editor( EDITOR_DATA );
+}
+
+
+void
+on_helix_new_button_clicked            (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Helix_Editor( EDITOR_NEW );
+}
+
+
+void
+on_helix_cancel_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Helix_Editor( EDITOR_CANCEL );
+  gtk_widget_destroy( helix_editor );
+}
+
+
+void
+on_helix_apply_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Helix_Editor( EDITOR_APPLY );
+}
+
+
+void
+on_helix_ok_button_clicked             (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Helix_Editor( EDITOR_APPLY );
+  gtk_widget_destroy( helix_editor );
+}
+
+
+void
+on_helix_editor_destroy                (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  helix_editor = NULL;
+}
+
+
+void
+on_helix_linkall_radiobutton_toggled   (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  if( gtk_toggle_button_get_active(togglebutton) )
+	Helix_Editor( HELIX_EDITOR_LINKALL );
+}
+
+
+void
+on_helix_linkzo_radiobutton_toggled    (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  if( gtk_toggle_button_get_active(togglebutton) )
+	Helix_Editor( HELIX_EDITOR_LINKZO );
+}
+
+
+void
+on_helix_linkzhl_radiobutton_toggled   (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  if( gtk_toggle_button_get_active(togglebutton) )
+	Helix_Editor( HELIX_EDITOR_LINKZHL );
+}
+
+
+void
+on_reflect_taginc_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Reflect_Editor( EDITOR_DATA );
+}
+
+
+void
+on_reflect_checkbutton_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Reflect_Editor( REFLECT_EDITOR_TOGGLE );
+}
+
+
+void
+on_reflect_new_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Reflect_Editor( EDITOR_NEW );
+}
+
+
+void
+on_reflect_cancel_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Reflect_Editor( EDITOR_CANCEL );
+  gtk_widget_destroy( reflect_editor );
+}
+
+
+void
+on_reflect_apply_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Reflect_Editor( EDITOR_APPLY );
+}
+
+
+void
+on_reflect_ok_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Reflect_Editor( EDITOR_APPLY );
+  gtk_widget_destroy( reflect_editor );
+}
+
+
+void
+on_reflect_editor_destroy              (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  reflect_editor = NULL;
+}
+
+
+void
+on_scale_editor_destroy                (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  scale_editor = NULL;
+}
+
+
+void
+on_scale_spinbutton_value_changed      (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Scale_Editor( EDITOR_DATA );
+}
+
+
+
+void
+on_scale_new_button_clicked            (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Scale_Editor( EDITOR_NEW );
+}
+
+
+void
+on_scale_cancel_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Scale_Editor( EDITOR_CANCEL );
+  gtk_widget_destroy( scale_editor );
+}
+
+
+void
+on_scale_apply_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Scale_Editor( EDITOR_APPLY );
+}
+
+
+void
+on_scale_ok_button_clicked             (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Scale_Editor( EDITOR_APPLY );
+  gtk_widget_destroy( scale_editor );
+}
+
+
+void
+on_cylinder_taginc_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Cylinder_Editor( EDITOR_DATA );
+}
+
+
+void
+on_cylinder_total_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Cylinder_Editor( EDITOR_DATA );
+}
+
+
+void
+on_cylinder_new_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Cylinder_Editor( EDITOR_NEW );
+}
+
+
+void
+on_cylinder_cancel_button_clicked      (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Cylinder_Editor( EDITOR_CANCEL );
+  gtk_widget_destroy( cylinder_editor );
+}
+
+
+void
+on_cylinder_apply_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Cylinder_Editor( EDITOR_APPLY );
+}
+
+
+void
+on_cylinder_ok_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Cylinder_Editor( EDITOR_APPLY );
+  gtk_widget_destroy( cylinder_editor );
+}
+
+
+void
+on_cylinder_editor_destroy             (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  cylinder_editor = NULL;
+}
+
+
+void
+on_transform_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Transform_Editor( EDITOR_DATA );
+}
+
+
+void
+on_transform_new_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Transform_Editor( EDITOR_NEW );
+}
+
+
+void
+on_transform_cancel_button_clicked     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Transform_Editor( EDITOR_CANCEL );
+  gtk_widget_destroy( transform_editor );
+}
+
+
+void
+on_transform_apply_button_clicked      (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Transform_Editor( EDITOR_APPLY );
+}
+
+
+void
+on_transform_ok_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Transform_Editor( EDITOR_APPLY );
+  gtk_widget_destroy( transform_editor );
+}
+
+
+void
+on_transform_editor_destroy            (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  transform_editor = NULL;
+}
+
+
+
+void
+on_gend_radiobutton_toggled            (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Gend_Editor( EDITOR_RDBUTTON );
+}
+
+
+void
+on_gend_cancel_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Gend_Editor( EDITOR_CANCEL );
+  gtk_widget_destroy( gend_editor );
+}
+
+
+void
+on_gend_apply_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Gend_Editor( EDITOR_APPLY );
+}
+
+
+void
+on_gend_ok_button_clicked              (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Gend_Editor( EDITOR_APPLY );
+  gtk_widget_destroy( gend_editor );
+}
+
+
+void
+on_gend_editor_destroy                 (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  gend_editor = NULL;
+}
+
+
+void
+on_kernel_command_destroy              (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  kernel_command = NULL;
+}
+
+
+void
+on_kernel_checkbutton_toggled          (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Kernel_Command( COMMAND_CKBUTTON );
+}
+
+
+void
+on_kernel_new_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Kernel_Command( EDITOR_NEW );
+}
+
+
+void
+on_kernel_cancel_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Kernel_Command( EDITOR_CANCEL );
+  gtk_widget_destroy( kernel_command );
+}
+
+
+void
+on_kernel_apply_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Kernel_Command( EDITOR_APPLY );
+}
+
+
+void
+on_kernel_ok_button_clicked            (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Kernel_Command( EDITOR_APPLY );
+  gtk_widget_destroy( kernel_command );
+}
+
+
+void
+on_execute_command_destroy             (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  execute_command = NULL;
+}
+
+
+void
+on_execute_radiobutton_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Execute_Command( COMMAND_RDBUTTON );
+}
+
+
+void
+on_execute_new_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Execute_Command( EDITOR_NEW );
+}
+
+
+void
+on_execute_cancel_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Execute_Command( EDITOR_CANCEL );
+  gtk_widget_destroy( execute_command );
+}
+
+
+void
+on_execute_apply_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Execute_Command( EDITOR_APPLY );
+}
+
+
+void
+on_execute_ok_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Execute_Command( EDITOR_APPLY );
+  gtk_widget_destroy( execute_command );
+}
+
+
+void
+on_intrange_command_destroy               (GtkObject       *object,
+		                                  gpointer         user_data)
+{
+  intrange_command = NULL;
+}
+
+
+void
+on_intrange_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Intrange_Command( EDITOR_DATA );
+}
+
+
+void
+on_intrange_new_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Intrange_Command( EDITOR_NEW );
+}
+
+
+void
+on_intrange_cancel_button_clicked      (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Intrange_Command( EDITOR_CANCEL );
+  gtk_widget_destroy( intrange_command );
+}
+
+
+void
+on_intrange_apply_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Intrange_Command( EDITOR_APPLY );
+}
+
+
+void
+on_intrange_ok_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Intrange_Command( EDITOR_APPLY );
+  gtk_widget_destroy( intrange_command );
+}
+
+
+void
+on_ground_command_destroy              (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  ground_command = NULL;
+}
+
+
+void
+on_ground_radiobutton_toggled          (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Ground_Command( COMMAND_RDBUTTON );
+}
+
+
+void
+on_ground_checkbutton_toggled          (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Ground_Command( COMMAND_CKBUTTON );
+}
+
+
+void
+on_ground_spinbutton_value_changed     (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Ground_Command( EDITOR_DATA );
+}
+
+
+void
+on_ground_new_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Ground_Command( EDITOR_NEW );
+}
+
+
+void
+on_ground_cancel_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Ground_Command( EDITOR_CANCEL );
+  gtk_widget_destroy( ground_command );
+}
+
+
+void
+on_ground_apply_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Ground_Command( EDITOR_APPLY );
+}
+
+
+void
+on_ground_ok_button_clicked            (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Ground_Command( EDITOR_APPLY );
+  gtk_widget_destroy( ground_command );
+}
+
+
+void
+on_nearfield_command_destroy             (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  nearfield_command = NULL;
+}
+
+
+
+void
+on_nearfield_nh_checkbutton_toggled    (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Nearfield_Command( NEARFIELD_NH_CKBUTTON );
+}
+
+
+void
+on_nearfield_ne_checkbutton_toggled    (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Nearfield_Command( NEARFIELD_NE_CKBUTTON );
+}
+
+
+void
+on_nearfield_radiobutton_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Nearfield_Command( COMMAND_RDBUTTON );
+}
+
+
+void
+on_nearfield_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Nearfield_Command( EDITOR_DATA );
+}
+
+
+void
+on_nearfield_new_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Nearfield_Command( EDITOR_NEW );
+}
+
+
+void
+on_nearfield_cancel_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Nearfield_Command( EDITOR_CANCEL );
+  gtk_widget_destroy( nearfield_command );
+}
+
+
+void
+on_nearfield_apply_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Nearfield_Command( EDITOR_APPLY );
+}
+
+
+void
+on_nearfield_ok_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Nearfield_Command( EDITOR_APPLY );
+  gtk_widget_destroy( nearfield_command );
+}
+
+
+void
+on_radiation_command_destroy           (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  radiation_command = NULL;
+}
+
+
+void
+on_radiation_radiobutton_toggled       (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Radiation_Command( COMMAND_RDBUTTON );
+}
+
+
+void
+on_radiation_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Radiation_Command( EDITOR_DATA );
+}
+
+
+void
+on_radiation_new_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Radiation_Command( EDITOR_NEW );
+}
+
+
+void
+on_radiation_cancel_button_clicked     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Radiation_Command( EDITOR_CANCEL );
+  gtk_widget_destroy( radiation_command );
+}
+
+
+void
+on_radiation_apply_button_clicked      (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Radiation_Command( EDITOR_APPLY );
+}
+
+
+void
+on_radiation_ok_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Radiation_Command( EDITOR_APPLY );
+  gtk_widget_destroy( radiation_command );
+}
+
+
+void
+on_excitation_command_destroy          (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  excitation_command = NULL;
+}
+
+
+void
+on_excitation_radiobutton_toggled      (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Excitation_Command( COMMAND_RDBUTTON );
+}
+
+
+void
+on_excitation_checkbutton_toggled      (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Excitation_Command( COMMAND_CKBUTTON );
+}
+
+
+void
+on_excitation_spinbutton_value_changed (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Excitation_Command( EDITOR_DATA );
+}
+
+
+void
+on_excitation_new_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Excitation_Command( EDITOR_NEW );
+}
+
+
+void
+on_excitation_cancel_button_clicked    (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Excitation_Command( EDITOR_CANCEL );
+  gtk_widget_destroy( excitation_command );
+}
+
+
+void
+on_excitation_apply_button_clicked     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Excitation_Command( EDITOR_APPLY );
+}
+
+
+void
+on_excitation_ok_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Excitation_Command( EDITOR_APPLY );
+  gtk_widget_destroy( excitation_command );
+}
+
+
+void
+on_frequency_command_destroy           (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  frequency_command = NULL;
+}
+
+
+void
+on_frequency_radiobutton_toggled       (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Frequency_Command( COMMAND_RDBUTTON );
+}
+
+
+void
+on_frequency_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Frequency_Command( EDITOR_DATA );
+}
+
+
+void
+on_frequency_step_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+ gtk_spin_button_update( spinbutton );
+ Frequency_Command( FREQUENCY_EDITOR_FSTEP );
+}
+
+
+void
+on_frequency_new_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Frequency_Command( EDITOR_NEW );
+}
+
+
+void
+on_frequency_cancel_button_clicked     (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Frequency_Command( EDITOR_CANCEL );
+  gtk_widget_destroy( frequency_command );
+}
+
+
+void
+on_frequency_apply_button_clicked      (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Frequency_Command( EDITOR_APPLY );
+}
+
+
+void
+on_frequency_ok_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Frequency_Command( EDITOR_APPLY );
+  gtk_widget_destroy( frequency_command );
+}
+
+
+void
+on_loading_command_destroy             (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  loading_command = NULL;
+}
+
+
+void
+on_loading_radiobutton_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Loading_Command( COMMAND_RDBUTTON );
+}
+
+
+void
+on_loading_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Loading_Command( EDITOR_DATA );
+}
+
+
+void
+on_loading_new_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Loading_Command( EDITOR_NEW );
+}
+
+
+void
+on_loading_cancel_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Loading_Command( EDITOR_CANCEL );
+  gtk_widget_destroy( loading_command );
+}
+
+
+void
+on_loading_apply_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Loading_Command( EDITOR_APPLY );
+}
+
+
+void
+on_loading_ok_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Loading_Command( EDITOR_APPLY );
+  gtk_widget_destroy( loading_command );
+}
+
+
+void
+on_network_command_destroy             (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  network_command = NULL;
+}
+
+
+void
+on_network_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Network_Command( EDITOR_DATA );
+}
+
+
+void
+on_network_new_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Network_Command( EDITOR_NEW );
+}
+
+
+void
+on_network_cancel_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Network_Command( EDITOR_CANCEL );
+  gtk_widget_destroy( network_command );
+}
+
+
+void
+on_network_apply_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Network_Command( EDITOR_APPLY );
+}
+
+
+void
+on_network_ok_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Network_Command( EDITOR_APPLY );
+  gtk_widget_destroy( network_command );
+}
+
+
+void
+on_txline_command_destroy              (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  txline_command = NULL;
+}
+
+
+void
+on_txline_spinbutton_value_changed     (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Txline_Command( EDITOR_DATA );
+}
+
+
+void
+on_txline_new_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Txline_Command( EDITOR_NEW );
+}
+
+
+void
+on_txline_cancel_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Txline_Command( EDITOR_CANCEL );
+  gtk_widget_destroy( txline_command );
+}
+
+
+void
+on_txline_apply_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Txline_Command( EDITOR_APPLY );
+}
+
+
+void
+on_txline_ok_button_clicked            (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Txline_Command( EDITOR_APPLY );
+  gtk_widget_destroy( txline_command );
+}
+
+
+void
+on_txline_checkbutton_toggled          (GtkToggleButton *togglebutton,
+                                        gpointer         user_data)
+{
+  Txline_Command( COMMAND_CKBUTTON );
+}
+
+
+void
+on_ground2_command_destroy             (GtkObject       *object,
+                                        gpointer         user_data)
+{
+  ground2_command = NULL;
+}
+
+
+void
+on_ground2_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_update( spinbutton );
+  Ground2_Command( EDITOR_DATA );
+}
+
+
+void
+on_ground2_new_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Ground2_Command( EDITOR_NEW );
+}
+
+
+void
+on_ground2_cancel_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Ground2_Command( EDITOR_CANCEL );
+  gtk_widget_destroy( ground2_command );
+}
+
+
+void
+on_ground2_apply_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Ground2_Command( EDITOR_APPLY );
+}
+
+
+void
+on_ground2_ok_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  Ground2_Command( EDITOR_APPLY );
+  gtk_widget_destroy( ground2_command );
+}
+
+
+  void
+on_loop_start_clicked                  (GtkButton       *button,
+										gpointer         user_data)
+{
+  Start_Frequency_Loop();
+}
+
+
+  void
+on_loop_pause_clicked                  (GtkButton       *button,
+										gpointer         user_data)
+{
+  if( isFlagSet(FREQ_LOOP_RUNNING) )
+	SetFlag( FREQ_LOOP_STOP );
+}
+
+
+  void
+on_loop_reset_clicked                  (GtkButton       *button,
+										gpointer         user_data)
+{
+  if( isFlagClear(FREQ_LOOP_RUNNING) )
+  {
+	SetFlag( FREQ_LOOP_INIT );
+	ClearFlag( FREQ_LOOP_RUNNING );
+  }
+}
+
+static GtkWidget *aboutdialog = NULL;
+void
+on_about_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data)
+{
+  if( aboutdialog == NULL )
+  {
+	aboutdialog = create_aboutdialog();
+	gtk_widget_show( aboutdialog );
+	gtk_about_dialog_set_program_name(
+		GTK_ABOUT_DIALOG(aboutdialog), PACKAGE );
+	gtk_about_dialog_set_version(
+		GTK_ABOUT_DIALOG(aboutdialog), VERSION );
+  }
+}
+
+
+void
+on_aboutdialog_close                   (GtkDialog       *dialog,
+                                        gpointer         user_data)
+{
+  gtk_widget_destroy( aboutdialog );
+  aboutdialog = NULL;
+}
+
+
+void
+on_aboutdialog_response                (GtkDialog       *dialog,
+                                        gint             response_id,
+                                        gpointer         user_data)
+{
+  gtk_widget_destroy( aboutdialog );
+  aboutdialog = NULL;
+}
+
+
+void
+on_net_gain_activate                   (GtkMenuItem     *menuitem,
+										gpointer         user_data)
+{
+  if( gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM(menuitem)) )
+	SetFlag( PLOT_NETGAIN );
+  else
+	ClearFlag( PLOT_NETGAIN );
+
+  /* Trigger a redraw of frequency plots drawingarea */
+  if( isFlagSet(PLOT_ENABLED) && isFlagSet(FREQ_LOOP_DONE) )
+	Plot_Frequency_Data();
+}
+
+
+gboolean
+on_structure_drawingarea_button_press_event
+                                        (GtkWidget      *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data)
+{
+  structure_proj_params.reset = TRUE;
+  return FALSE;
+}
+
+
+void
+on_structure_zoom_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  structure_proj_params.xy_zoom = gtk_spin_button_get_value( spinbutton );
+  structure_proj_params.xy_zoom /= 100.0;
+  structure_proj_params.xy_scale =
+	structure_proj_params.xy_scale1 * structure_proj_params.xy_zoom;
+
+  /* Trigger a redraw of structure drawingarea */
+  Draw_Structure( structure_drawingarea );
+}
+
+
+void
+on_structure_plus_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  structure_proj_params.xy_zoom =
+	gtk_spin_button_get_value( structure_zoom_spinbutton );
+  structure_proj_params.xy_zoom *= 1.1;
+  gtk_spin_button_set_value(
+	  structure_zoom_spinbutton, structure_proj_params.xy_zoom );
+}
+
+
+void
+on_structure_minus_button_clicked      (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  structure_proj_params.xy_zoom =
+	gtk_spin_button_get_value( structure_zoom_spinbutton );
+  structure_proj_params.xy_zoom /= 1.1;
+  gtk_spin_button_set_value(
+	  structure_zoom_spinbutton, structure_proj_params.xy_zoom );
+}
+
+
+void
+on_structure_one_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_set_value( structure_zoom_spinbutton, 100.0 );
+  structure_proj_params.reset = TRUE;
+  New_Projection_Parameters(
+	  structure_pixmap_width,
+	  structure_pixmap_height,
+	  &structure_proj_params );
+  Draw_Structure( structure_drawingarea );
+}
+
+
+gboolean
+on_rdpattern_drawingarea_button_press_event
+                                        (GtkWidget      *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data)
+{
+  rdpattern_proj_params.reset = TRUE;
+  return FALSE;
+}
+
+
+void
+on_rdpattern_zoom_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data)
+{
+  rdpattern_proj_params.xy_zoom = gtk_spin_button_get_value( spinbutton );
+  rdpattern_proj_params.xy_zoom /= 100.0;
+  rdpattern_proj_params.xy_scale =
+	rdpattern_proj_params.xy_scale1 * rdpattern_proj_params.xy_zoom;
+
+  /* Trigger a redraw of structure drawingarea */
+  Draw_Radiation( rdpattern_drawingarea );
+}
+
+
+void
+on_rdpattern_plus_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  rdpattern_proj_params.xy_zoom =
+	gtk_spin_button_get_value( rdpattern_zoom_spinbutton );
+  rdpattern_proj_params.xy_zoom *= 1.1;
+  gtk_spin_button_set_value(
+	  rdpattern_zoom_spinbutton, rdpattern_proj_params.xy_zoom );
+}
+
+
+void
+on_rdpattern_minus_button_clicked      (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  rdpattern_proj_params.xy_zoom =
+	gtk_spin_button_get_value( rdpattern_zoom_spinbutton );
+  rdpattern_proj_params.xy_zoom /= 1.1;
+  gtk_spin_button_set_value(
+	  rdpattern_zoom_spinbutton, rdpattern_proj_params.xy_zoom );
+}
+
+
+void
+on_rdpattern_one_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data)
+{
+  gtk_spin_button_set_value( rdpattern_zoom_spinbutton, 100.0 );
+  rdpattern_proj_params.reset = TRUE;
+  New_Projection_Parameters(
+	  rdpattern_pixmap_width,
+	  rdpattern_pixmap_height,
+	  &rdpattern_proj_params );
+  Draw_Radiation( rdpattern_drawingarea );
+}
+
+
+gboolean
+on_structure_drawingarea_scroll_event  (GtkWidget       *widget,
+                                        GdkEvent        *event,
+										gpointer         user_data)
+{
+  structure_proj_params.xy_zoom =
+	gtk_spin_button_get_value( structure_zoom_spinbutton );
+  if( event->scroll.direction == GDK_SCROLL_UP )
+	structure_proj_params.xy_zoom *= 1.1;
+  else if( event->scroll.direction == GDK_SCROLL_DOWN )
+	structure_proj_params.xy_zoom /= 1.1;
+  gtk_spin_button_set_value(
+	  structure_zoom_spinbutton, structure_proj_params.xy_zoom );
+  return FALSE;
+}
+
+
+gboolean
+on_rdpattern_drawingarea_scroll_event  (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data)
+{
+  rdpattern_proj_params.xy_zoom =
+	gtk_spin_button_get_value( rdpattern_zoom_spinbutton );
+  if( event->scroll.direction == GDK_SCROLL_UP )
+	rdpattern_proj_params.xy_zoom *= 1.1;
+  else if( event->scroll.direction == GDK_SCROLL_DOWN )
+	rdpattern_proj_params.xy_zoom /= 1.1;
+  gtk_spin_button_set_value(
+	  rdpattern_zoom_spinbutton, rdpattern_proj_params.xy_zoom );
+  return FALSE;
+}
+
diff --git a/src/callbacks.h b/src/callbacks.h
new file mode 100644
index 0000000..e10d979
--- /dev/null
+++ b/src/callbacks.h
@@ -0,0 +1,1301 @@
+#include <gtk/gtk.h>
+
+
+void
+on_main_window_destroy                 (GtkObject       *object,
+                                        gpointer         user_data);
+
+gboolean
+on_main_window_delete_event            (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data);
+
+void
+on_new_activate                        (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_open_input_activate                 (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_nec2_edit_activate                  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_main_save_activate                  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_main_save_as_activate               (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_quit_activate                       (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+main_view_menuitem_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_main_rdpattern_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_main_freqplots_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+main_pol_menu_activate                 (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_total_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_horizontal_activate       (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_vertical_activate         (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_right_hand_activate       (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_left_hand_activate        (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_common_projection_activate          (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_common_freq_activate                (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_about_activate                      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_main_currents_togglebutton_toggled  (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_main_charges_togglebutton_toggled   (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_loop_start_clicked                  (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_loop_pause_clicked                  (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_loop_reset_clicked                  (GtkButton       *button,
+                                        gpointer         user_data);
+
+gboolean
+on_main_colorcode_drawingarea_expose_event
+                                        (GtkWidget       *widget,
+                                        GdkEventExpose  *event,
+                                        gpointer         user_data);
+
+void
+on_main_freq_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_main_freq_checkbutton_toggled       (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_main_new_freq_clicked               (GtkButton       *button,
+                                        gpointer         user_data);
+
+gboolean
+on_structure_drawingarea_configure_event
+                                        (GtkWidget       *widget,
+                                        GdkEventConfigure *event,
+                                        gpointer         user_data);
+
+gboolean
+on_structure_drawingarea_expose_event  (GtkWidget       *widget,
+                                        GdkEventExpose  *event,
+                                        gpointer         user_data);
+
+gboolean
+on_structure_drawingarea_button_press_event
+                                        (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data);
+
+gboolean
+on_structure_drawingarea_motion_notify_event( GtkWidget       *widget,
+                                              GdkEventMotion  *event,
+                                              gpointer         user_data);
+
+void
+on_main_x_axis_clicked                 (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_main_y_axis_clicked                 (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_main_z_axis_clicked                 (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_main_default_view_clicked           (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_main_rotate_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_main_incline_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_structure_zoom_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_structure_plus_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_structure_minus_button_clicked      (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_structure_one_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_filechooserdialog_response          (GtkDialog       *dialog,
+                                        gint             response_id,
+                                        gpointer         user_data);
+
+void
+on_filechoser_cancel_clicked           (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_fileselection_response              (GtkDialog       *dialog,
+                                        gint             response_id,
+                                        gpointer         user_data);
+
+void
+on_fileselection_cancel_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+gboolean
+on_freqplots_window_delete_event       (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data);
+
+void
+on_freqplots_window_destroy            (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_freqplots_save_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_freqplots_save_as_activate          (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+freqplots_pol_menu_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_net_gain_activate                   (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_freqplots_gmax_togglebutton_toggled (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_freqplots_gdir_togglebutton_toggled (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_freqplots_gviewer_togglebutton_toggled
+                                        (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_freqplots_vswr_togglebutton_toggled (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_freqplots_zrlzim_togglebutton_toggled
+                                        (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_freqplots_zmgzph_togglebutton_toggled
+                                        (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_freqplots_zo_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+gboolean
+on_freqplots_drawingarea_expose_event  (GtkWidget       *widget,
+                                        GdkEventExpose  *event,
+                                        gpointer         user_data);
+
+gboolean
+on_freqplots_drawingarea_configure_event
+                                        (GtkWidget       *widget,
+                                        GdkEventConfigure *event,
+                                        gpointer         user_data);
+
+gboolean
+on_freqplots_drawingarea_button_press_event
+                                        (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data);
+
+gboolean
+on_rdpattern_window_delete_event       (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_window_destroy            (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_save_activate             (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_save_as_activate          (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+rdpattern_view_menuitem_activate       (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+rdpattern_pol_menu_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_linear_power_activate     (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_linear_voltage_activate   (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_arrl_style_activate       (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_logarithmic_activate      (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_e_field_activate          (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_h_field_activate          (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_poynting_vector_activate  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_animate_activate          (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_near_peak_value_activate            (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_near_snapshot_activate              (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_gain_togglebutton_toggled (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_eh_togglebutton_toggled   (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+gboolean
+on_rdpattern_colorcode_drawingarea_expose_event
+                                        (GtkWidget       *widget,
+                                        GdkEventExpose  *event,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_freq_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_new_freq_clicked          (GtkButton       *button,
+                                        gpointer         user_data);
+
+gboolean
+on_rdpattern_drawingarea_configure_event
+                                        (GtkWidget       *widget,
+                                        GdkEventConfigure *event,
+                                        gpointer         user_data);
+
+gboolean
+on_rdpattern_drawingarea_expose_event  (GtkWidget       *widget,
+                                        GdkEventExpose  *event,
+                                        gpointer         user_data);
+
+gboolean
+on_rdpattern_drawingarea_button_press_event
+                                        (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data);
+
+gboolean
+on_rdpattern_drawingarea_motion_notify_event( GtkWidget       *widget,
+                                              GdkEventMotion  *event,
+                                              gpointer         user_data);
+
+void
+on_rdpattern_x_axis_clicked            (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_y_axis_clicked            (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_z_axis_clicked            (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_default_view_clicked      (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_rotate_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_incline_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_zoom_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_plus_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_minus_button_clicked      (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_one_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_quit_dialog_destroy                 (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_quit_cancelbutton_clicked           (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_quit_okbutton_clicked               (GtkButton       *button,
+                                        gpointer         user_data);
+
+gboolean
+on_error_dialog_delete_event           (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data);
+
+void
+on_error_quitbutton_clicked            (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_error_okbutton_clicked              (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_error_stopbutton_clicked            (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_animate_dialog_destroy              (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_animation_applybutton_clicked       (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_animation_cancelbutton_clicked      (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_animation_okbutton_clicked          (GtkButton       *button,
+                                        gpointer         user_data);
+
+gboolean
+on_nec2_editor_delete_event            (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data);
+
+void
+on_nec2_editor_destroy                 (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_nec2_row_add_clicked                (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_nec2_row_remv_clicked               (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_nec2_treeview_clear_clicked         (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_nec2_save_as_clicked                (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_nec2_save_clicked                   (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_nec2_revert_clicked                 (GtkButton       *button,
+                                        gpointer         user_data);
+
+gboolean
+on_nec2_cmnt_treeview_button_press_event
+                                        (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data);
+
+void
+on_gw_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_ga_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_gh_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_sp_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_gr_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_gm_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_gx_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_gs_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+gboolean
+on_nec2_geom_treeview_button_press_event
+                                        (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data);
+
+void
+on_ex_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_fr_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_gn_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_rp_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_ld_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_nt_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_tl_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_ne_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_xq_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_kh_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_ek_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_gd_clicked                          (GtkButton       *button,
+                                        gpointer         user_data);
+
+gboolean
+on_nec2_cmnd_treeview_button_press_event
+                                        (GtkWidget       *widget,
+                                        GdkEventButton  *event,
+                                        gpointer         user_data);
+
+void
+on_wire_editor_destroy                 (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_wire_tagnum_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_wire_data_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_wire_pcl_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_wire_len_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_wire_res_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_wire_taper_checkbutton_toggled      (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_wire_rdia_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_wire_rlen_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_wire_new_button_clicked             (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_wire_cancel_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_wire_apply_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_wire_ok_button_clicked              (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_patch_editor_destroy                (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_patch_arbitrary_radiobutton_toggled  (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_patch_rectangular_radiobutton_toggled
+                                        (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_patch_triangular_radiobutton_toggled
+                                        (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_patch_quadrilateral_radiobutton_toggled
+                                        (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_patch_surface_radiobutton_toggled   (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_patch_data_spinbutton_value_changed (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_patch_new_button_clicked            (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_patch_cancel_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_patch_apply_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_patch_ok_button_clicked             (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_arc_editor_destroy                  (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_arc_data_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_arc_tagnum_spinbutton_value_changed (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_arc_pcl_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_arc_res_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_arc_new_button_clicked              (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_arc_cancel_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_arc_apply_button_clicked            (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_arc_ok_button_clicked               (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_transform_editor_destroy            (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_transform_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_transform_new_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_transform_cancel_button_clicked     (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_transform_apply_button_clicked      (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_transform_ok_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_helix_editor_destroy                (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_helix_tagnum_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_helix_data_spinbutton_value_changed (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_helix_pcl_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_helix_nturns_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_helix_res_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_helix_linkzo_radiobutton_toggled    (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_helix_linkzhl_radiobutton_toggled   (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_helix_linkall_radiobutton_toggled   (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_helix_lh_checkbutton_toggled        (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_helix_new_button_clicked            (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_helix_cancel_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_helix_apply_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_helix_ok_button_clicked             (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_reflect_editor_destroy              (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_reflect_checkbutton_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_reflect_taginc_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_reflect_new_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_reflect_cancel_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_reflect_apply_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_reflect_ok_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_scale_editor_destroy                (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_scale_spinbutton_value_changed      (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_scale_new_button_clicked            (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_scale_cancel_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_scale_apply_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_scale_ok_button_clicked             (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_cylinder_editor_destroy             (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_cylinder_taginc_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_cylinder_total_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_cylinder_new_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_cylinder_cancel_button_clicked      (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_cylinder_apply_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_cylinder_ok_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_kernel_command_destroy              (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_kernel_checkbutton_toggled          (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_kernel_new_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_kernel_cancel_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_kernel_apply_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_kernel_ok_button_clicked            (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_execute_command_destroy             (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_execute_radiobutton_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_execute_new_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_execute_cancel_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_execute_apply_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_execute_ok_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_intrange_command_destroy            (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_intrange_spinbutton_value_changed   (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_intrange_new_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_intrange_cancel_button_clicked      (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_intrange_apply_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_intrange_ok_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_ground_command_destroy              (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_ground_radiobutton_toggled          (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_ground_checkbutton_toggled          (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_ground_spinbutton_value_changed     (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_ground_new_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_ground_cancel_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_ground_apply_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_ground_ok_button_clicked            (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_nearfield_command_destroy           (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_nearfield_nh_checkbutton_toggled    (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_nearfield_ne_checkbutton_toggled    (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_nearfield_radiobutton_toggled       (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_nearfield_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_nearfield_new_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_nearfield_cancel_button_clicked     (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_nearfield_apply_button_clicked      (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_nearfield_ok_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_radiation_command_destroy           (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_radiation_radiobutton_toggled       (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_radiation_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_radiation_new_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_radiation_cancel_button_clicked     (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_radiation_apply_button_clicked      (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_radiation_ok_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_excitation_command_destroy          (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_excitation_radiobutton_toggled      (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_excitation_checkbutton_toggled      (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_excitation_spinbutton_value_changed (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_excitation_new_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_excitation_cancel_button_clicked    (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_excitation_apply_button_clicked     (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_excitation_ok_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_frequency_command_destroy           (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_frequency_radiobutton_toggled       (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_frequency_spinbutton_value_changed  (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_frequency_step_spinbutton_value_changed
+                                        (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_frequency_new_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_frequency_cancel_button_clicked     (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_frequency_apply_button_clicked      (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_frequency_ok_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_loading_command_destroy             (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_loading_radiobutton_toggled         (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_loading_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_loading_new_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_loading_cancel_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_loading_apply_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_loading_ok_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_network_command_destroy             (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_network_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_network_new_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_network_cancel_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_network_apply_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_network_ok_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_txline_command_destroy              (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_txline_spinbutton_value_changed     (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_txline_checkbutton_toggled          (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_txline_new_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_txline_cancel_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_txline_apply_button_clicked         (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_txline_ok_button_clicked            (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_ground2_command_destroy             (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_ground2_spinbutton_value_changed    (GtkSpinButton   *spinbutton,
+                                        gpointer         user_data);
+
+void
+on_ground2_new_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_ground2_cancel_button_clicked       (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_ground2_apply_button_clicked        (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_ground2_ok_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_gend_editor_destroy                 (GtkObject       *object,
+                                        gpointer         user_data);
+
+void
+on_gend_radiobutton_toggled            (GtkToggleButton *togglebutton,
+                                        gpointer         user_data);
+
+void
+on_gend_cancel_button_clicked          (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_gend_apply_button_clicked           (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_gend_ok_button_clicked              (GtkButton       *button,
+                                        gpointer         user_data);
+
+void
+on_aboutdialog_close                   (GtkDialog       *dialog,
+                                        gpointer         user_data);
+
+void
+on_aboutdialog_response                (GtkDialog       *dialog,
+                                        gint             response_id,
+                                        gpointer         user_data);
+
+gboolean
+on_structure_drawingarea_scroll_event  (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data);
+
+gboolean
+on_rdpattern_drawingarea_scroll_event  (GtkWidget       *widget,
+                                        GdkEvent        *event,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_overlay_structure_activate
+                                        (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_rdpattern_save_as_gnuplot_activate  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_freqplots_save_as_gnuplot_activate  (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
+
+void
+on_struct_save_as_gnuplot_activate     (GtkMenuItem     *menuitem,
+                                        gpointer         user_data);
diff --git a/src/cmnd_edit.c b/src/cmnd_edit.c
new file mode 100644
index 0000000..3fb42aa
--- /dev/null
+++ b/src/cmnd_edit.c
@@ -0,0 +1,2805 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* comnd_edit.c
+ *
+ * NEC2 command editing functions for xnec2c
+ */
+
+#include "cmnd_edit.h"
+#include "shared.h"
+
+/*------------------------------------------------------------------------*/
+
+/* Excitation_Command()
+ *
+ * Edits the Excitation command (EX card) parameters
+ */
+
+  void
+Excitation_Command( int action )
+{
+  /* For looking up spinbuttons/toggles */
+  GtkSpinButton   *spin;
+  GtkToggleButton *toggle;
+
+  /* Spinbutton labels */
+  #define EX_LABELS 8
+  static gchar *labels[EX_LABELS] =
+  {
+	"excitation_i2_label",
+	"excitation_i3_label",
+	"excitation_f1_label",
+	"excitation_f2_label",
+	"excitation_f3_label",
+	"excitation_f4_label",
+	"excitation_f5_label",
+	"excitation_f6_label"
+  };
+
+  /* For reading/writing to EX row */
+  static GtkTreeIter iter_ex;
+
+  int idx, idi, idf;
+
+  /* Integer data (I1-I4) */
+  static gint iv[4] = { 0, 0, 0, 0 };
+
+  /* Float data (F1-F6) */
+  static gdouble fv[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+
+  /* Command radio buttons */
+  #define EX_TYPRDBTN 6
+
+  /* Excitation type */
+  static gchar *typrdbtn[EX_TYPRDBTN] =
+  {
+	"excitation_i10_radiobutton",
+	"excitation_i11_radiobutton",
+	"excitation_i12_radiobutton",
+	"excitation_i13_radiobutton",
+	"excitation_i14_radiobutton",
+	"excitation_i15_radiobutton"
+  };
+
+  /* Command data spinbuttons */
+  static gchar *ispin[2] =
+  {
+	"excitation_i2_spinbutton",
+	"excitation_i3_spinbutton"
+  };
+  static gchar *fspin[6] =
+  {
+	"excitation_f1_spinbutton",
+	"excitation_f2_spinbutton",
+	"excitation_f3_spinbutton",
+	"excitation_f4_spinbutton",
+	"excitation_f5_spinbutton",
+	"excitation_f6_spinbutton"
+  };
+
+  /* Card (row) name */
+  gchar name[3];
+
+  static gboolean
+	label = TRUE,  /* Enable setting of spinbutton labels */
+	save  = FALSE, /* Enable saving of editor data */
+	busy  = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, excitation_command) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	Set_Command_Data( cmnd_store, &iter_ex, iv, fv );
+	save  = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New excitation row to create */
+	  /* Insert a default EN card if list is empty */
+	  Insert_EN_Card( cmnd_store, &iter_ex );
+
+	  /* Insert a new blank EX row after a selected row,
+	   * if any, otherwise before the last (EN) row */
+	  Insert_Blank_Command_Row(
+		  cmnd_treeview, cmnd_store, &iter_ex, "EX" );
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  cmnd_adjustment, cmnd_adjustment->upper );
+	  break;
+
+	case EDITOR_EDIT: /* Edit a command row (EX card) */
+	  /* Get selected row */
+	  Get_Selected_Row(
+		  cmnd_treeview, cmnd_store, &iter_ex, name );
+
+	  /* Get data from command editor */
+	  Get_Command_Data( cmnd_store, &iter_ex, iv, fv );
+
+	  /* Write int data to the command editor */
+	  for( idi = SPIN_COL_I2; idi <= SPIN_COL_I3; idi++ )
+	  {
+		spin = GTK_SPIN_BUTTON( lookup_widget(
+			  excitation_command, ispin[idi - SPIN_COL_I2]) );
+		gtk_spin_button_set_value( spin, iv[idi] );
+	  }
+
+	  /* Write float data to the command editor */
+	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
+	  {
+		spin = GTK_SPIN_BUTTON( lookup_widget(
+			  excitation_command, fspin[idf]) );
+		gtk_spin_button_set_value( spin, fv[idf] );
+	  }
+
+	  /* Set radio buttons */
+	  toggle = GTK_TOGGLE_BUTTON(
+		  lookup_widget(excitation_command,
+			typrdbtn[iv[SPIN_COL_I1]]) );
+	  gtk_toggle_button_set_active( toggle, TRUE );
+
+	  /* Set check buttons */
+	  toggle = GTK_TOGGLE_BUTTON(
+		  lookup_widget(excitation_command,
+			"excitation_i419_checkbutton") );
+	  if( iv[SPIN_COL_I4] & 0x0a )
+		gtk_toggle_button_set_active( toggle, TRUE );
+	  else
+		gtk_toggle_button_set_active( toggle, FALSE );
+
+	  toggle = GTK_TOGGLE_BUTTON(
+		  lookup_widget(excitation_command,
+			"excitation_i420_checkbutton") );
+	  if( iv[SPIN_COL_I4] & 0x01 )
+		gtk_toggle_button_set_active( toggle, TRUE );
+	  else
+		gtk_toggle_button_set_active( toggle, FALSE );
+
+	  label = TRUE;
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel excitation editor */
+	  /* Remove card(s) */
+	  Remove_Row( cmnd_store, &iter_ex );
+	  save = busy = FALSE;
+	  return;
+
+	case COMMAND_RDBUTTON: /* Radio button toggled in editor window */
+	  /* Find active excitation type radio button */
+	  for( idx = 0; idx < EX_TYPRDBTN; idx++ )
+	  {
+		toggle = GTK_TOGGLE_BUTTON(
+			lookup_widget(excitation_command, typrdbtn[idx]) );
+		if( gtk_toggle_button_get_active(toggle) )
+		  break;
+	  }
+	  iv[SPIN_COL_I1] = idx;
+
+	  label = save = TRUE;
+	  break;
+
+	case COMMAND_CKBUTTON: /* Check button toggled in editor window */
+	  /* Find active print control check button
+	   * (matrix asymmetry and segment impedance) */
+	  toggle = GTK_TOGGLE_BUTTON(
+		  lookup_widget(excitation_command,
+			"excitation_i419_checkbutton") );
+	  if( gtk_toggle_button_get_active(toggle) )
+		iv[SPIN_COL_I4] = 10;
+	  else
+		iv[SPIN_COL_I4] = 0;
+
+	  toggle = GTK_TOGGLE_BUTTON(
+		  lookup_widget(excitation_command,
+			"excitation_i420_checkbutton") );
+	  if( gtk_toggle_button_get_active(toggle) )
+		iv[SPIN_COL_I4] += 1;
+
+	  save = TRUE;
+	  break;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Read int data from the command editor */
+  for( idi = SPIN_COL_I2; idi <= SPIN_COL_I3; idi++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(
+		  excitation_command, ispin[idi - SPIN_COL_I2]) );
+	iv[idi] = gtk_spin_button_get_value_as_int( spin );
+  }
+
+  /* Read float data from the command editor */
+  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(
+		  excitation_command, fspin[idf]) );
+	fv[idf] = gtk_spin_button_get_value( spin );
+  }
+
+  /* Set spin button labels */
+  if( label )
+  {
+	switch( iv[SPIN_COL_I1] ) /* Excitation type */
+	{
+	  case 0: case 5: /* Voltage source */
+		{
+		  gchar *text[EX_LABELS] =
+		  {
+			_("Tag Number"),
+			_("Segment Number"),
+			_("Voltage Real Part"),
+			_("Voltage Imaginary Part"),
+			_("Normalization Factor"),
+			_("  ** NOT USED **"),
+			_("  ** NOT USED **"),
+			_("  ** NOT USED **"),
+		  };
+
+		  /* Clear unused spin buttons */
+		  for( idf = SPIN_COL_F4; idf <= SPIN_COL_F6; idf++ )
+		  {
+			spin = GTK_SPIN_BUTTON(
+				lookup_widget(excitation_command, fspin[idf]) );
+			gtk_spin_button_set_value( spin, 0 );
+		  }
+		  Set_Labels( excitation_command, labels, text, EX_LABELS );
+		}
+		break;
+
+	  case 1: case 2: case 3: /* Incident wave */
+		{
+		  gchar *text[EX_LABELS] =
+		  {
+			_("Num of Theta Angles"),
+			_("Num of Phi Angles"),
+			_("Theta Angle (deg)"),
+			_("Phi Angle (deg)"),
+			_("Eta Angle (deg)"),
+			_("Theta Increment (deg)"),
+			_("Phi Increment (deg)"),
+			_("Minor/Major Axis")
+		  };
+
+		  Set_Labels( excitation_command, labels, text, EX_LABELS );
+		}
+		break;
+
+	  case 4: /* Current source */
+		{
+		  gchar *text[EX_LABELS] =
+		  {
+			_("  ** NOT USED **"),
+			_("  ** NOT USED **"),
+			_("X Position (m)"),
+			_("Y Position (m)"),
+			_("Z Position (m)"),
+			_("alpha Angle (deg)"),
+			_("beta Angle (deg)"),
+			_("Current Moment (A.m)")
+		  };
+
+		  /* Clear unused spin buttons */
+		  for( idx = 0; idx < 2; idx++ )
+		  {
+			spin = GTK_SPIN_BUTTON(
+				lookup_widget(excitation_command, ispin[idx]) );
+			gtk_spin_button_set_value( spin, 0 );
+		  }
+		  Set_Labels( excitation_command, labels, text, EX_LABELS );
+		}
+
+		label = FALSE;
+	} /* switch( iv[SPIN_COL_I1] ) */
+  } /* if( label ) */
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Excitation_Command() */
+
+/*------------------------------------------------------------------------*/
+
+/* Frequency_Command()
+ *
+ * Edits the Frequency command (FR card) parameters
+ */
+
+  void
+Frequency_Command( int action )
+{
+  /* For looking up spinbuttons */
+  GtkSpinButton *spin;
+
+  /* For reading/writing to FR row */
+  static GtkTreeIter iter_fr;
+
+  int idf;
+
+  /* Integer data (I1-I4) */
+  static gint iv[4] = { 0, 0, 0, 0 };
+
+  /* Float data (F1-F6) */
+  static gdouble
+	fv[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+
+  /* Command data spinbuttons */
+  static gchar *fspin[3] =
+  {
+	"frequency_start_spinbutton",
+	"frequency_step_spinbutton",
+	"frequency_end_spinbutton"
+  };
+
+  /* Card (row) name */
+  gchar name[3];
+
+  static gboolean
+	save  = FALSE, /* Enable saving of editor data */
+    fstep = FALSE, /* Set frequency step to editor */
+    busy  = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, frequency_command) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	Set_Command_Data( cmnd_store, &iter_fr, iv, fv );
+	save  = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Read int data from the command editor */
+  spin = GTK_SPIN_BUTTON( lookup_widget(
+		frequency_command, "frequency_num_spinbutton") );
+  iv[SPIN_COL_I2] = gtk_spin_button_get_value_as_int( spin );
+
+  /* Read float data from the command editor */
+  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F3; idf++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(
+		  frequency_command, fspin[idf]) );
+	fv[idf] = gtk_spin_button_get_value( spin );
+  }
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New frequency row to create */
+	  /* Insert a default EN card if list is empty */
+	  Insert_EN_Card( cmnd_store, &iter_fr );
+
+	  /* Insert a new blank FR row after a selected row,
+	   * if any, otherwise before the last (EN) row */
+	  Insert_Blank_Command_Row(
+		  cmnd_treeview, cmnd_store, &iter_fr, "FR" );
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  cmnd_adjustment, cmnd_adjustment->upper );
+	  break;
+
+	case EDITOR_EDIT: /* Edit a command row (FR card) */
+	  /* Get selected row */
+	  Get_Selected_Row( cmnd_treeview, cmnd_store, &iter_fr, name );
+
+	  /* Get data from command editor */
+	  Get_Command_Data( cmnd_store, &iter_fr, iv, fv );
+
+	  /* Write int data to the command editor */
+	  spin = GTK_SPIN_BUTTON( lookup_widget(
+			frequency_command, "frequency_num_spinbutton") );
+	  gtk_spin_button_set_value( spin, iv[SPIN_COL_I2] );
+
+	  /* Write float data to the command editor */
+	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F2; idf++ )
+	  {
+		spin = GTK_SPIN_BUTTON(
+			lookup_widget(frequency_command, fspin[idf]) );
+		gtk_spin_button_set_value( spin, fv[idf] );
+	  }
+
+	  /* Calculate and set end freq to editor */
+	  if( iv[SPIN_COL_I2] > 1 )
+	  {
+		if( iv[SPIN_COL_I1] == 0 ) /* Additive stepping */
+		  fv[SPIN_COL_F3] = fv[SPIN_COL_F1] +
+			fv[SPIN_COL_F2]*(gdouble)(iv[SPIN_COL_I2]-1);
+		else /* Multiplicative stepping */
+		  fv[SPIN_COL_F3] = fv[SPIN_COL_F1]*pow( fv[SPIN_COL_F2],
+			  (gdouble)(iv[SPIN_COL_I2]-1) );
+
+		spin = GTK_SPIN_BUTTON(
+			lookup_widget(frequency_command, fspin[SPIN_COL_F3]) );
+		gtk_spin_button_set_value( spin, fv[SPIN_COL_F3] );
+	  } /* if( iv[SPIN_COL_I2] > 1 ) */
+
+	  /* Set stepping type radio button */
+	  if( iv[SPIN_COL_I1] == 0 )
+		gtk_toggle_button_set_active(
+			GTK_TOGGLE_BUTTON(lookup_widget(
+				frequency_command,
+				"frequency_add_radiobutton")), TRUE );
+	  else
+		gtk_toggle_button_set_active(
+			GTK_TOGGLE_BUTTON(lookup_widget(
+				frequency_command,
+				"frequency_mul_radiobutton")), TRUE );
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel frequency editor */
+	  /* Remove card(s) */
+	  Remove_Row( cmnd_store, &iter_fr );
+	  save = busy = FALSE;
+	  return;
+
+	case COMMAND_RDBUTTON: /* Radio button toggled in editor window */
+	  /* Set frequency stepping type */
+	  if( gtk_toggle_button_get_active(
+			GTK_TOGGLE_BUTTON(lookup_widget(
+				frequency_command,
+				"frequency_add_radiobutton"))) )
+		iv[SPIN_COL_I1] = 0;
+	  else
+		iv[SPIN_COL_I1] = 1;
+	  save = TRUE;
+	  break;
+
+	case FREQUENCY_EDITOR_FSTEP: /* Frequency step changed */
+	  fstep = FALSE;
+
+	  if( iv[SPIN_COL_I1] == 0 ) /* Additive stepping */
+		iv[SPIN_COL_I2] = (gint)((fv[SPIN_COL_F3] -
+			  fv[SPIN_COL_F1])/fv[SPIN_COL_F2]) + 1;
+	  else /* Multiplicative stepping */
+		iv[SPIN_COL_I2] = (gint)(log(fv[SPIN_COL_F3] /
+			  fv[SPIN_COL_F1])/log(fv[SPIN_COL_F2])) + 1;
+
+	  spin = GTK_SPIN_BUTTON( lookup_widget(
+			frequency_command, "frequency_num_spinbutton") );
+	  gtk_spin_button_set_value( spin, iv[SPIN_COL_I2] );
+	  save = TRUE;
+	  break;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Calculate and set freq step to editor */
+  if( fstep && (iv[SPIN_COL_I2] > 1 ))
+  {
+	if( iv[SPIN_COL_I1] == 0 ) /* Additive stepping */
+	  fv[SPIN_COL_F2] = (fv[SPIN_COL_F3]-fv[SPIN_COL_F1]) /
+		(gdouble)(iv[SPIN_COL_I2]-1);
+	else /* Multiplicative stepping */
+	  fv[SPIN_COL_F2] = pow(fv[SPIN_COL_F3]/fv[SPIN_COL_F1],
+		  1.0/(gdouble)(iv[SPIN_COL_I2]-1));
+
+	spin = GTK_SPIN_BUTTON(
+		lookup_widget(frequency_command, fspin[SPIN_COL_F2]) );
+	gtk_spin_button_set_value( spin, fv[SPIN_COL_F2] );
+  } /* if( fstep ) */
+  else fstep = TRUE;
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Frequency_Command() */
+
+/*------------------------------------------------------------------------*/
+
+/* Ground_Command()
+ *
+ * Edits the Ground command (GN card) parameters
+ */
+
+  void
+Ground_Command( int action )
+{
+  /* For looking up spinbuttons/togglebuttons */
+  GtkSpinButton   *spin;
+  GtkToggleButton *toggle;
+
+  /* For showing/hiding frames */
+  GtkFrame *frame;
+
+  /* For reading/writing to GN/GD row */
+  static GtkTreeIter iter_gn, iter_gd;
+
+  int idx, idf;
+
+  /* Integer data (I1-I4) */
+  static gint iv[8] = { 1, 0, 0, 0, 0, 0, 0, 0 };
+
+  /* Float data (F1-F6) */
+  static gdouble fv[12];
+
+  /* Command radio buttons */
+  #define GN_RDBTN 4
+  static gchar *rdbutton[GN_RDBTN] =
+  {
+	"ground_null_radiobutton",
+	"ground_refl_radiobutton",
+	"ground_perf_radiobutton",
+	"ground_smfld_radiobutton"
+  };
+
+  /* Command data spinbuttons */
+  static gchar *fspin[8] =
+  {
+	"ground_diel1_spinbutton",
+	"ground_res1_spinbutton",
+	"ground_diel2_spinbutton",
+	"ground_res2_spinbutton",
+	"ground_dist2_spinbutton",
+	"ground_below_spinbutton",
+	"ground_scrnrd_spinbutton",
+	"ground_diam_spinbutton"
+  };
+
+  /* Card (row) name */
+  gchar name[3];
+
+  static gboolean
+	radl = FALSE, /* Radial ground screen present  */
+	scmd = FALSE, /* Second medium present (cliff) */
+	both = FALSE, /* Both above selected */
+	save = FALSE, /* Enable saving of editor data  */
+	show = TRUE,  /* Show/hide frames according to ground type */
+	busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, ground_command) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	Set_Command_Data( cmnd_store, &iter_gn, iv, fv );
+	if( both )
+	  Set_Command_Data( cmnd_store, &iter_gd, &iv[CMND_NUM_ICOLS], &fv[CMND_NUM_FCOLS] );
+	save  = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New ground row to create */
+	  /* Reset to perfect ground */
+	  radl = scmd = both = FALSE;
+	  show = TRUE;
+	  iv[SPIN_COL_I1] = 1;
+	  iv[SPIN_COL_I2] = 0;
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			ground_command, "ground_perf_radiobutton") );
+	  gtk_toggle_button_set_active( toggle, TRUE );
+
+	  /* Insert a default EN card if list is empty */
+	  Insert_EN_Card( cmnd_store, &iter_gn );
+
+	  /* Insert a new blank GN row after a selected row,
+	   * if any, otherwise before the last (EN) row */
+	  Insert_Blank_Command_Row(
+		  cmnd_treeview, cmnd_store, &iter_gn, "GN" );
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  cmnd_adjustment, cmnd_adjustment->upper );
+	  save = TRUE;
+	  break;
+
+	case EDITOR_EDIT:  /* Edit a command row (GN) selected in treeview */
+	  /* Reset flags and check buttons */
+	  radl = scmd = both = FALSE;
+	  show = TRUE;
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			ground_command, "ground_radl_checkbutton") );
+	  gtk_toggle_button_set_active( toggle, FALSE );
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			ground_command, "ground_secmd_checkbutton") );
+	  gtk_toggle_button_set_active( toggle, FALSE );
+
+	  /* Get selected row */
+	  Get_Selected_Row( cmnd_treeview, cmnd_store, &iter_gn, name );
+
+	  /* Get data from command editor */
+	  Get_Command_Data( cmnd_store, &iter_gn, iv, fv );
+
+	  /* Set ground type radio buttons */
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			ground_command, rdbutton[iv[SPIN_COL_I1]+1]) );
+	  gtk_toggle_button_set_active( toggle, TRUE );
+
+	  /* Write 1st ground data to the command editor */
+	  if( (iv[SPIN_COL_I1] != 1) && (iv[SPIN_COL_I1] != -1) )
+		for( idf = SPIN_COL_F1; idf <= SPIN_COL_F2; idf++ )
+		{
+		  spin = GTK_SPIN_BUTTON(
+			  lookup_widget(ground_command, fspin[idf]) );
+		  gtk_spin_button_set_value( spin, fv[idf] );
+		}
+
+	  /* Radial ground screen specified */
+	  if( iv[SPIN_COL_I2] > 0 )
+	  {
+		radl = TRUE;
+
+		/* Radial ground screen check button */
+		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			  ground_command, "ground_radl_checkbutton") );
+		gtk_toggle_button_set_active( toggle, TRUE );
+
+		/* Write num of radials to the command editor */
+		spin = GTK_SPIN_BUTTON( lookup_widget(
+			  ground_command, "ground_nrad_spinbutton") );
+		gtk_spin_button_set_value( spin, iv[SPIN_COL_I2] );
+
+		/* Write radial data to the command editor */
+		for( idf = SPIN_COL_F3; idf <= SPIN_COL_F4; idf++ )
+		{
+		  spin = GTK_SPIN_BUTTON( lookup_widget(
+				ground_command, fspin[idf+4]) );
+		  gtk_spin_button_set_value( spin, fv[idf] );
+		}
+
+		/* Check for a following GD card, read data */
+		iter_gd = iter_gn;
+		if( Check_Card_Name(cmnd_store, &iter_gd, NEXT, "GD") )
+		{
+		  scmd = both = TRUE;
+
+		  /* Write radial data to the command editor */
+		  Get_Command_Data( cmnd_store, &iter_gd,
+			  &iv[CMND_NUM_ICOLS], &fv[CMND_NUM_FCOLS] );
+		  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F4; idf++ )
+		  {
+			spin = GTK_SPIN_BUTTON( lookup_widget(
+				  ground_command, fspin[idf+2]) );
+			gtk_spin_button_set_value(
+				spin, fv[idf+CMND_NUM_FCOLS] );
+		  }
+
+		  /* Set 2nd medium check button */
+		  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+				ground_command, "ground_secmd_checkbutton") );
+		  gtk_toggle_button_set_active( toggle, TRUE );
+
+		} /* if( Check_Card_Name(cmnd_store, &iter_gd, NEXT, "GD") ) */
+	  } /* if( iv[SPIN_COL_I2] > 0 ) */
+	  /* 2nd medium data specified */
+	  else if( (fv[SPIN_COL_F3] > 0) && (fv[SPIN_COL_F4] > 0) )
+	  {
+		scmd = TRUE;
+
+		/* Set 2nd medium check button */
+		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			  ground_command, "ground_secmd_checkbutton") );
+		gtk_toggle_button_set_active( toggle, TRUE );
+
+		/* Write 2nd medium data to command editor */
+		for( idf = SPIN_COL_F3; idf <= SPIN_COL_F6; idf++ )
+		{
+		  spin = GTK_SPIN_BUTTON( lookup_widget(
+				ground_command, fspin[idf]) );
+		  gtk_spin_button_set_value( spin, fv[idf] );
+		}
+
+	  } /* if( (fv[SPIN_COL_F3] > 0) && (fv[SPIN_COL_F4] > 0) ) */
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel ground editor */
+	  /* Remove card(s) */
+	  Remove_Row( cmnd_store, &iter_gn );
+	  if( both )
+		Remove_Row( cmnd_store, &iter_gd );
+	  save = busy = FALSE;
+	  return;
+
+	case COMMAND_RDBUTTON: /* Radio button toggled */
+	  /* Find active radio button */
+	  for( idx = 0; idx < GN_RDBTN; idx++ )
+	  {
+		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			  ground_command, rdbutton[idx]) );
+		if( gtk_toggle_button_get_active(toggle) )
+		  break;
+	  }
+	  iv[SPIN_COL_I1] = idx-1;
+
+	  /* Remove GD card if it exists for perfect or null ground */
+	  if( (iv[SPIN_COL_I1] == 1) || (iv[SPIN_COL_I1] == -1) )
+	  {
+		if( both )
+		  Remove_Row( cmnd_store, &iter_gd );
+
+		/* Set toggle buttons as needed */
+		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			  ground_command, "ground_radl_checkbutton") );
+		gtk_toggle_button_set_active( toggle, FALSE );
+		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			  ground_command, "ground_secmd_checkbutton") );
+		gtk_toggle_button_set_active( toggle, FALSE );
+
+		both = radl = scmd = FALSE;
+		iv[SPIN_COL_I2] = 0;
+	  }
+
+	  save = show = TRUE;
+	  break;
+
+	case COMMAND_CKBUTTON: /* Check button toggled */
+	  /* Get number of radial wires if enabled */
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			ground_command, "ground_radl_checkbutton") );
+	  if( gtk_toggle_button_get_active(toggle) )
+		radl = TRUE;
+	  else
+		radl = FALSE;
+
+	  /* Set 2nd medium flag if enabled */
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			ground_command, "ground_secmd_checkbutton") );
+	  if( gtk_toggle_button_get_active(toggle) )
+		scmd = TRUE;
+	  else
+		scmd = FALSE;
+
+	  /* If both radials & 2nd medium, insert gd card */
+	  if( radl && scmd )
+	  {
+		Insert_Blank_Command_Row(
+			cmnd_treeview, cmnd_store, &iter_gd, "GD" );
+		/* Scroll tree view to bottom */
+		gtk_adjustment_set_value(
+			cmnd_adjustment, cmnd_adjustment->upper );
+		both = TRUE;
+	  }
+	  else
+	  {
+		if( both )
+		  Remove_Row( cmnd_store, &iter_gd );
+		both = FALSE;
+	  }
+
+	  save = show = TRUE;
+	  break;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /*** Calculate ground data ***/
+
+  /* Read num of radials from the command editor */
+  if( radl )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(
+		  ground_command, "ground_nrad_spinbutton") );
+	iv[SPIN_COL_I2] = gtk_spin_button_get_value_as_int( spin );
+  }
+  else iv[SPIN_COL_I2] = 0;
+
+  /*** Read float data from the command editor ***/
+
+  /* Perfect or null ground */
+  if( (iv[SPIN_COL_I1] == 1) || (iv[SPIN_COL_I1] == -1) )
+  {
+	for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
+	  fv[idf] = 0.0;
+	iv[SPIN_COL_I2] = 0;
+  }
+  else /* Finite ground */
+  {
+	/* Read 1st medium rel dielec const & conductivity */
+	for( idf= SPIN_COL_F1; idf <= SPIN_COL_F2; idf++ )
+	{
+	  spin = GTK_SPIN_BUTTON( lookup_widget(
+			ground_command, fspin[idf]) );
+	  fv[idf] = gtk_spin_button_get_value( spin );
+	}
+
+	/* If both radial and 2nd medium, GD card is needed */
+	if( both )
+	{
+	  /* Read radial screen parameters */
+	  for( idf = SPIN_COL_F3; idf <= SPIN_COL_F4; idf++ )
+	  {
+		spin = GTK_SPIN_BUTTON( lookup_widget(
+			  ground_command, fspin[idf+4]) );
+		fv[idf] = gtk_spin_button_get_value( spin );
+	  }
+
+	  /* Set 1st medium & radial screen parameters to GN card */
+	  for( idf = SPIN_COL_F5; idf <= SPIN_COL_F6; idf++ )
+		fv[idf] = 0.0;
+
+	  /* Set 2nd medium parameters to GD card */
+	  for( idf = SPIN_COL_F3; idf <= SPIN_COL_F6; idf++ )
+	  {
+		spin = GTK_SPIN_BUTTON( lookup_widget(
+			  ground_command, fspin[idf]) );
+		fv[idf - SPIN_COL_F3+CMND_NUM_FCOLS] =
+		  gtk_spin_button_get_value( spin );
+	  }
+
+	}
+	else /* Only radial screen or 2nd medium */
+	{
+	  if( radl ) /* If radial ground only specified, read params */
+	  {
+		for( idf = SPIN_COL_F3; idf <= SPIN_COL_F4; idf++ )
+		{
+		  spin = GTK_SPIN_BUTTON( lookup_widget(
+				ground_command, fspin[idf+4]) );
+		  fv[idf] = gtk_spin_button_get_value( spin );
+		}
+		for( idf = SPIN_COL_F5; idf <= SPIN_COL_F6; idf++ )
+		  fv[idf] = 0.0;
+	  } /* if( radl ) */
+	  else if( scmd ) /* If second medium only, read parameters */
+	  {
+		for( idf = SPIN_COL_F3; idf <= SPIN_COL_F6; idf++ )
+		{
+		  spin = GTK_SPIN_BUTTON( lookup_widget(
+				ground_command, fspin[idf]) );
+		  fv[idf] = gtk_spin_button_get_value( spin );
+		}
+	  }
+	  else for( idf = SPIN_COL_F3; idf <= SPIN_COL_F6; idf++ )
+		fv[idf] = 0.0;
+
+	} /* else of if( both ) */
+
+  } /* else (Finite ground) */
+
+  /* Show/hide parts (frames) of editor as needed */
+  if( show )
+  {
+	/* Perfect or no ground */
+	if( (iv[SPIN_COL_I1] == 1) || (iv[SPIN_COL_I1] == -1) )
+	{
+	  /* Show only radio buttons */
+	  frame = GTK_FRAME( lookup_widget(
+			ground_command, "ground_med1_frame") );
+	  gtk_widget_hide( GTK_WIDGET(frame) );
+	  frame = GTK_FRAME( lookup_widget(
+			ground_command, "ground_med2_frame") );
+	  gtk_widget_hide( GTK_WIDGET(frame) );
+	  frame = GTK_FRAME( lookup_widget(
+			ground_command, "ground_radial_frame") );
+	  gtk_widget_hide( GTK_WIDGET(frame) );
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			ground_command, "ground_radl_checkbutton") );
+	  gtk_widget_hide( GTK_WIDGET(toggle) );
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			ground_command, "ground_secmd_checkbutton") );
+	  gtk_widget_hide( GTK_WIDGET(toggle) );
+
+	} /* if( (iv[SPIN_COL_I1] == 1) || (iv[SPIN_COL_I1] == -1) ) */
+
+	if( (iv[SPIN_COL_I1] == 0) || (iv[SPIN_COL_I1] == 2) ) /* Finite ground */
+	{
+	  /* Show check buttons */
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			ground_command, "ground_radl_checkbutton") );
+	  gtk_widget_show( GTK_WIDGET(toggle) );
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			ground_command, "ground_secmd_checkbutton") );
+	  gtk_widget_show( GTK_WIDGET(toggle) );
+
+	  /* Show 1st medium */
+	  frame = GTK_FRAME( lookup_widget(
+			ground_command, "ground_med1_frame") );
+	  gtk_widget_show( GTK_WIDGET(frame) );
+
+	  if( scmd ) /* Show 2nd medium */
+	  {
+		frame = GTK_FRAME( lookup_widget(
+			  ground_command, "ground_med2_frame") );
+		gtk_widget_show( GTK_WIDGET(frame) );
+	  }
+	  else
+	  {
+		frame = GTK_FRAME( lookup_widget(
+			  ground_command, "ground_med2_frame") );
+		gtk_widget_hide( GTK_WIDGET(frame) );
+	  }
+
+	  if( radl ) /* Show radial screen */
+	  {
+		frame = GTK_FRAME( lookup_widget(
+			  ground_command, "ground_radial_frame") );
+		gtk_widget_show( GTK_WIDGET(frame) );
+	  }
+	  else
+	  {
+		frame = GTK_FRAME( lookup_widget(
+			  ground_command, "ground_radial_frame") );
+		gtk_widget_hide( GTK_WIDGET(frame) );
+	  }
+	} /* if( (iv[SPIN_COL_I1] == 0) || (iv[SPIN_COL_I1] == 2) ) */
+
+	gtk_window_resize( GTK_WINDOW(ground_command), 10, 10 );
+  } /* if( show ) */
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Ground_Command() */
+
+/*------------------------------------------------------------------------*/
+
+/* Ground2_Command()
+ *
+ * Edits the 2nd medium Ground command (GD card) parameters
+ */
+
+  void
+Ground2_Command( int action )
+{
+  /* For looking up spinbuttons */
+  GtkSpinButton *spin;
+
+  /* For reading/writing to GD row */
+  static GtkTreeIter iter_gd;
+
+  int idf;
+
+  /* Integer data (I1-I4) */
+  static gint iv[4] = { 0, 0, 0, 0 };
+
+  /* Float data (F1-F6) */
+  static gdouble fv[6];
+
+  /* Command data spinbuttons */
+  static gchar *fspin[4] =
+  {
+	"ground2_diel_spinbutton",
+	"ground2_res_spinbutton",
+	"ground2_dist_spinbutton",
+	"ground2_below_spinbutton",
+  };
+
+  /* Card (row) name */
+  gchar name[3];
+
+  static gboolean
+	save = FALSE, /* Enable saving of editor data  */
+    busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, ground2_command) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	Set_Command_Data( cmnd_store, &iter_gd, iv, fv );
+	save  = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New rad pattern row to create */
+	  /* Insert a default EN card if list is empty */
+	  Insert_EN_Card( cmnd_store, &iter_gd );
+
+	  /* Insert a new blank GD row after a selected row,
+	   * if any, otherwise before the last (EN) row */
+	  Insert_Blank_Command_Row(
+		  cmnd_treeview, cmnd_store, &iter_gd, "GD" );
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  cmnd_adjustment, cmnd_adjustment->upper );
+	  break;
+
+	case EDITOR_EDIT:  /* Edit a command row (GD) */
+	  /* Get selected row */
+	  Get_Selected_Row( cmnd_treeview, cmnd_store, &iter_gd, name );
+
+	  /* Get data from command editor */
+	  Get_Command_Data( cmnd_store, &iter_gd, iv, fv );
+
+	  /* Write float data to the command editor */
+	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F4; idf++ )
+	  {
+		spin = GTK_SPIN_BUTTON( lookup_widget(
+			  ground2_command, fspin[idf]) );
+		gtk_spin_button_set_value( spin, fv[idf] );
+	  }
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel rad pattern editor */
+	  /* Remove card(s) */
+	  Remove_Row( cmnd_store, &iter_gd );
+	  save = busy = FALSE;
+	  return;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  /* Read float data from the command editor */
+	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F4; idf++ )
+	  {
+		spin = GTK_SPIN_BUTTON( lookup_widget(
+			  ground2_command, fspin[idf]) );
+		fv[idf] = gtk_spin_button_get_value( spin );
+	  }
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Ground2_Command() */
+
+/*------------------------------------------------------------------------*/
+
+/* Radiation_Command()
+ *
+ * Edits the Radiation command (RP card) parameters
+ */
+
+  void
+Radiation_Command( int action )
+{
+  /* For looking up spin/togle buttons */
+  GtkSpinButton *spin;
+  GtkToggleButton *toggle;
+
+  /* For reading/writing to RP row */
+  static GtkTreeIter iter_rp;
+
+  int idx, idi, idf, xnda;
+
+  /* Integer data (I1-I4) */
+  static gint iv[4];
+
+  /* Float data (F1-F6) */
+  static gdouble fv[6];
+
+  /* Wave/ground type radio buttons */
+  #define RP_WRDBTN 7
+  static gchar *wrdbtn[RP_WRDBTN] =
+  {
+	"radiation_i10_radiobutton",
+	"radiation_i11_radiobutton",
+	"radiation_i12_radiobutton",
+	"radiation_i13_radiobutton",
+	"radiation_i14_radiobutton",
+	"radiation_i15_radiobutton",
+	"radiation_i16_radiobutton"
+  };
+
+  /* XNDA radio buttons */
+  #define RP_XRDBTN 2
+  static gchar *xrdbtn[RP_XRDBTN] =
+  {
+	"radiation_x0_radiobutton",
+	"radiation_x1_radiobutton"
+  };
+
+  #define RP_NRDBTN 6
+  static gchar *nrdbtn[RP_NRDBTN] =
+  {
+	"radiation_n0_radiobutton",
+	"radiation_n1_radiobutton",
+	"radiation_n2_radiobutton",
+	"radiation_n3_radiobutton",
+	"radiation_n4_radiobutton",
+	"radiation_n5_radiobutton"
+  };
+
+  #define RP_DRDBTN 2
+  static gchar *drdbtn[RP_DRDBTN] =
+  {
+	"radiation_d0_radiobutton",
+	"radiation_d1_radiobutton"
+  };
+
+  #define RP_ARDBTN 3
+  static gchar *ardbtn[RP_ARDBTN] =
+  {
+	"radiation_a0_radiobutton",
+	"radiation_a1_radiobutton",
+	"radiation_a2_radiobutton"
+  };
+
+  /* Command data spinbuttons */
+  static gchar *ispin[2] =
+  {
+	"radiation_i2_spinbutton",
+	"radiation_i3_spinbutton"
+  };
+
+  static gchar *fspin[6] =
+  {
+	"radiation_f1_spinbutton",
+	"radiation_f2_spinbutton",
+	"radiation_f3_spinbutton",
+	"radiation_f4_spinbutton",
+	"radiation_f5_spinbutton",
+	"radiation_f6_spinbutton"
+  };
+
+  /* Labels for I1, F1-F3 & F5 spinuttons */
+  #define RP_LABELS 4
+  static gchar *labels[RP_LABELS] =
+  {
+	"radiation_i1_label",
+	"radiation_f1_label",
+	"radiation_f3_label",
+	"radiation_f5_label"
+  };
+
+  /* Card (row) name */
+  gchar name[3];
+
+  static gboolean
+	norm  = FALSE, /* Indicates normalization is specified */
+    label = TRUE,  /* Enable setting of labels */
+    save  = FALSE, /* Enable saving of editor data */
+    busy  = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, radiation_command) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	Set_Command_Data( cmnd_store, &iter_rp, iv, fv );
+	save  = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New rad pattern row to create */
+	  /* Insert a default EN card if list is empty */
+	  Insert_EN_Card( cmnd_store, &iter_rp );
+
+	  /* Insert a new blank RP row after a selected row,
+	   * if any, otherwise before the last (EN) row */
+	  Insert_Blank_Command_Row(
+		  cmnd_treeview, cmnd_store, &iter_rp, "RP" );
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  cmnd_adjustment, cmnd_adjustment->upper );
+	  label = TRUE;
+	  break;
+
+	case EDITOR_EDIT:  /* Edit a command row (RP) */
+	  /* Get selected row */
+	  Get_Selected_Row( cmnd_treeview, cmnd_store, &iter_rp, name );
+
+	  /* Get data from command editor */
+	  Get_Command_Data( cmnd_store, &iter_rp, iv, fv );
+
+	  /* Set wave type radio buttons */
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			radiation_command, wrdbtn[iv[SPIN_COL_I1]]) );
+	  gtk_toggle_button_set_active( toggle, TRUE );
+
+	  /* Set X radio buttons */
+	  xnda = iv[SPIN_COL_I4];
+	  idx = xnda/1000;
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			radiation_command, xrdbtn[idx]) );
+	  gtk_toggle_button_set_active( toggle, TRUE );
+
+	  /* Set N type radio buttons */
+	  xnda -= idx*1000;
+	  idx = xnda/100;
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			radiation_command, nrdbtn[idx]) );
+	  gtk_toggle_button_set_active( toggle, TRUE );
+
+	  /* Set D type radio buttons */
+	  xnda -= idx*100;
+	  idx = xnda/10;
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			radiation_command, drdbtn[idx]) );
+	  gtk_toggle_button_set_active( toggle, TRUE );
+
+	  /* Set A type radio buttons */
+	  xnda -= idx*10;
+	  idx = xnda;
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			radiation_command, ardbtn[idx]) );
+	  gtk_toggle_button_set_active( toggle, TRUE );
+
+	  /* Write int data to the command editor (i2 & I3) */
+	  for( idi = SPIN_COL_I2; idi <= SPIN_COL_I3; idi++ )
+	  {
+		spin = GTK_SPIN_BUTTON( lookup_widget(
+			  radiation_command, ispin[idi-SPIN_COL_I2]) );
+		gtk_spin_button_set_value( spin, iv[idi] );
+	  }
+
+	  /* Write float data to the command editor */
+	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
+	  {
+		spin = GTK_SPIN_BUTTON( lookup_widget(
+			  radiation_command, fspin[idf]) );
+		gtk_spin_button_set_value( spin, fv[idf] );
+	  }
+	  label = TRUE;
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel rad pattern editor */
+	  /* Remove card(s) */
+	  Remove_Row( cmnd_store, &iter_rp );
+	  save = busy = FALSE;
+	  return;
+
+	case COMMAND_RDBUTTON: /* Radio button toggled */
+	  /* Test wave/ground type radio buttons */
+	  for( idx = 0; idx < RP_WRDBTN; idx++ )
+	  {
+		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			  radiation_command, wrdbtn[idx]) );
+		if( gtk_toggle_button_get_active(toggle) )
+		  break;
+	  }
+	  iv[SPIN_COL_I1] = idx;
+
+	  /* Test XNDA radio buttons */
+	  xnda = 0;
+	  if( iv[SPIN_COL_I1] != 1 ) /* Surface wave, XNDA not used */
+	  {
+		/* X radio buttons */
+		for( idx = 0; idx < RP_XRDBTN; idx++ )
+		{
+		  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+				radiation_command, xrdbtn[idx]) );
+		  if( gtk_toggle_button_get_active(toggle) )
+			break;
+		}
+		xnda += 1000*idx;
+
+		/* N radio buttons */
+		for( idx = 0; idx < RP_NRDBTN; idx++ )
+		{
+		  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+				radiation_command, nrdbtn[idx]) );
+		  if( gtk_toggle_button_get_active(toggle) )
+			break;
+		}
+		xnda += 100*idx;
+		if( idx )
+		  norm = TRUE;
+		else
+		  norm = FALSE;
+
+		/* D radio buttons */
+		for( idx = 0; idx < RP_DRDBTN; idx++ )
+		{
+		  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+				radiation_command, drdbtn[idx]) );
+		  if( gtk_toggle_button_get_active(toggle) )
+			break;
+		}
+		xnda += 10*idx;
+
+		/* A radio buttons */
+		for( idx = 0; idx < RP_ARDBTN; idx++ )
+		{
+		  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+				radiation_command, ardbtn[idx]) );
+		  if( gtk_toggle_button_get_active(toggle) )
+			break;
+		}
+		xnda += idx;
+	  }
+
+	  iv[SPIN_COL_I4] = xnda;
+	  save = label = TRUE;
+	  break;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Read int data from the command editor */
+  for( idi = SPIN_COL_I2; idi <= SPIN_COL_I3; idi++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(
+		  radiation_command, ispin[idi-SPIN_COL_I2]) );
+	iv[idi] = gtk_spin_button_get_value_as_int( spin );
+  }
+  /* Read float data from the command editor */
+  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(
+		  radiation_command, fspin[idf]) );
+	fv[idf] = gtk_spin_button_get_value( spin );
+  }
+
+  /* Set labels according to wave/ground type */
+  if( label )
+  {
+	if( iv[SPIN_COL_I1] == 1 ) /* Space + ground wave case */
+	{
+	  gchar *text[RP_LABELS] =
+	  {
+		_("Points in Z"),
+		_("Initial Z (m)"),
+		_("Increment in Z"),
+		_("Field Point R (m)")
+	  };
+	  Set_Labels( radiation_command, labels, text, RP_LABELS );
+	}
+	else /* All other wave/ground cases */
+	{
+	  gchar *text[RP_LABELS] =
+	  {
+		_("Points in Phi"),
+		_("Initial Theta (deg)"),
+		_("Increment in Theta"),
+		_("R (m) (Optional)")
+	  };
+	  Set_Labels( radiation_command, labels, text, RP_LABELS );
+	}
+
+	/* Set normalization factor label */
+	if( norm )
+	  gtk_label_set_text( GTK_LABEL(lookup_widget(radiation_command,
+			  "radiation_f6_label")), _("Normalization Factor") );
+	else
+	  gtk_label_set_text( GTK_LABEL(lookup_widget(radiation_command,
+			  "radiation_f6_label")), _("** NOT USED **") );
+
+	label = FALSE;
+  } /* if( label ) */
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Radiation_Command() */
+
+/*------------------------------------------------------------------------*/
+
+/* Loading_Command()
+ *
+ * Edits the Loading command (LD card) parameters
+ */
+
+  void
+Loading_Command( int action )
+{
+  /* For looking up spinbuttons/togglebuttons */
+  GtkSpinButton *spin;
+  GtkToggleButton *toggle;
+
+  /* For reading/writing to LD row */
+  static GtkTreeIter iter_ld;
+
+  int idx, idi, idf;
+
+  /* Integer data (I1-I4) */
+  static gint iv[4];
+
+  /* Float data (F1-F6) */
+  static gdouble fv[6];
+
+  /* Labels for F1-F3 spinuttons */
+#define LD_LABELS 3
+  static gchar *labels[LD_LABELS] =
+  {
+	"loading_f1_label",
+	"loading_f2_label",
+	"loading_f3_label"
+  };
+
+  /* Command radio buttons */
+#define LD_RDBTN 7
+  static gchar *rdbutton[7] =
+  {
+	"loading_null_radiobutton",
+	"loading_slrlc_radiobutton",
+	"loading_plrlc_radiobutton",
+	"loading_sdrlc_radiobutton",
+	"loading_pdrlc_radiobutton",
+	"loading_rr_radiobutton",
+	"loading_wcon_radiobutton"
+  };
+
+  /* Command data spinbuttons */
+  static gchar *ispin[3] =
+  {
+	"loading_i2_spinbutton",
+	"loading_i3_spinbutton",
+	"loading_i4_spinbutton"
+  };
+
+  static gchar *fspin[3] =
+  {
+	"loading_f1_spinbutton",
+	"loading_f2_spinbutton",
+	"loading_f3_spinbutton"
+  };
+
+  /* Card (row) name */
+  gchar name[3];
+
+  static gboolean
+	save  = FALSE, /* Enable saving of editor data */
+    label = TRUE,  /* Show/hide frames according to loading type */
+    busy  = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, loading_command) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	Set_Command_Data( cmnd_store, &iter_ld, iv, fv );
+	save  = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New loading row to create */
+	  /* Insert a default EN card if list is empty */
+	  Insert_EN_Card( cmnd_store, &iter_ld );
+
+	  /* Insert a new blank LD row after a selected row,
+	   * if any, otherwise before the last (EN) row */
+	  Insert_Blank_Command_Row(
+		  cmnd_treeview, cmnd_store, &iter_ld, "LD" );
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  cmnd_adjustment, cmnd_adjustment->upper );
+	  label = TRUE;
+	  break;
+
+	case EDITOR_EDIT: /* Edit a command row (LD) selected in treeview */
+	  /* Clear buffers */
+	  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I4; idi++ )
+		iv[idi] = 0;
+	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F3; idf++ )
+		fv[idf] = 0.0;
+
+	  /* Get selected row */
+	  Get_Selected_Row( cmnd_treeview, cmnd_store, &iter_ld, name );
+
+	  /* Get data from command editor */
+	  Get_Command_Data( cmnd_store, &iter_ld, iv, fv );
+
+	  /* Lumped/Distributed loading, convert parameters to right units */
+	  if( (iv[SPIN_COL_I1] >= 0) && (iv[SPIN_COL_I1] <= 3) )
+	  {
+		fv[SPIN_COL_F2] /= 1.0E-6;  /* Convert H to uH */
+		fv[SPIN_COL_F3] /= 1.0E-12; /* Convert F to pF */
+	  }
+
+	  /* Write int data to the command editor */
+	  for( idi = SPIN_COL_I2; idi <= SPIN_COL_I4; idi++ )
+	  {
+		spin = GTK_SPIN_BUTTON( lookup_widget(
+			  loading_command, ispin[idi-SPIN_COL_I2]) );
+		gtk_spin_button_set_value( spin, iv[idi] );
+	  }
+
+	  /* Write float data to the command editor */
+	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F3; idf++ )
+	  {
+		spin = GTK_SPIN_BUTTON( lookup_widget(
+			  loading_command, fspin[idf]) );
+		gtk_spin_button_set_value( spin, fv[idf] );
+	  }
+
+	  /* Set active radio button */
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			loading_command, rdbutton[iv[SPIN_COL_I1]+1]) );
+	  gtk_toggle_button_set_active( toggle, TRUE );
+
+	  label = TRUE;
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel loading editor */
+	  /* Remove card(s) */
+	  Remove_Row( cmnd_store, &iter_ld );
+	  save = busy = FALSE;
+	  return;
+
+	case COMMAND_RDBUTTON: /* Radio button toggled */
+	  /* Find active radio button */
+	  for( idx = 0; idx < LD_RDBTN; idx++ )
+	  {
+		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			  loading_command, rdbutton[idx]) );
+		if( gtk_toggle_button_get_active(toggle) )
+		  break;
+	  }
+	  iv[SPIN_COL_I1] = idx-1;
+	  save = label = TRUE;
+	  break;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Change labels and calculate loading
+   * values according to loading type */
+  if( label )
+  {
+	gtk_widget_show( GTK_WIDGET(lookup_widget(
+			loading_command, "loading_frame")) );
+
+	switch( iv[SPIN_COL_I1] ) /* Loading type */
+	{
+	  case -1: /* Short all loads */
+		gtk_widget_hide( GTK_WIDGET(lookup_widget(
+				loading_command, "loading_frame")) );
+		gtk_window_resize( GTK_WINDOW(loading_command), 10, 10 );
+		break;
+
+	  case 0: case 1: /* Lumped loading */
+		{
+		  gchar *text[LD_LABELS] =
+		  {
+			_("Resistance Ohm"),
+			_("Inductance uH"),
+			_("Capacitance pF")
+		  };
+		  Set_Labels( loading_command, labels, text, LD_LABELS );
+		}
+		break;
+
+	  case 2: case 3: /* Distributed loading */
+		{
+		  gchar *text[LD_LABELS] =
+		  {
+			_("Resistance Ohm/m"),
+			_("Inductance uH/m"),
+			_("Capacitance pF/m")
+		  };
+		  Set_Labels( loading_command, labels, text, LD_LABELS );
+		}
+		break;
+
+	  case 4: /* Impedance */
+		{
+		  gchar *text[LD_LABELS] =
+		  {
+			_("Resistance Ohm"),
+			_("Reactance Ohm"),
+			_("  ** NOT USED **")
+		  };
+		  Set_Labels( loading_command, labels, text, LD_LABELS );
+		}
+		break;
+
+	  case 5: /* Wire conductivity */
+		{
+		  gchar *text[LD_LABELS] =
+		  {
+			_("Conductivity S/m"),
+			_("  ** NOT USED **"),
+			_("  ** NOT USED **")
+		  };
+		  Set_Labels( loading_command, labels, text, LD_LABELS );
+		}
+
+	} /* switch( iv[SPIN_COL_I1] ) */
+
+	label = FALSE;
+  } /* if( label ) */
+
+  /* Read int data from the command editor */
+  for( idi = SPIN_COL_I2; idi <= SPIN_COL_I4; idi++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(
+		  loading_command, ispin[idi-SPIN_COL_I2]) );
+	iv[idi] = gtk_spin_button_get_value_as_int( spin );
+  }
+
+  /* Read float data from the command editor */
+  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F3; idf++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(
+		  loading_command, fspin[idf]) );
+	fv[idf] = gtk_spin_button_get_value( spin );
+  }
+
+  /* Clear or convert parameters to right units for NEC2 */
+  switch( iv[SPIN_COL_I1] ) /* Loading type */
+  {
+	case -1: /* Short all loads */
+	  for( idi = SPIN_COL_I2; idi <= SPIN_COL_I4; idi++ )
+		iv[idi] = 0;
+	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F3; idf++ )
+		fv[idf] = 0.0;
+	  break;
+
+	case 0: case 1: case 2: case 3: /* Lumped/Distributed loading */
+	  fv[SPIN_COL_F2] *= 1.0E-6;  /* Convert uH to H */
+	  fv[SPIN_COL_F3] *= 1.0E-12; /* Convert pF to F */
+	  break;
+
+	case 4: /* Impedance R+X, clear F3 */
+	  fv[ SPIN_COL_F3] = 0.0;
+	  break;
+
+	case 5: /* Wire conductivity, clear F2 & F3 */
+	  fv[SPIN_COL_F2] = 0.0;
+	  fv[SPIN_COL_F3] = 0.0;
+
+  } /* switch( iv[SPIN_COL_I1] ) */
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Loading_Command() */
+
+/*------------------------------------------------------------------------*/
+
+/* Network_Command()
+ *
+ * Edits the Network command (NT card) parameters
+ */
+
+  void
+Network_Command( int action )
+{
+  /* For looking up spinbuttons */
+  GtkSpinButton *spin;
+
+  /* For reading/writing to NT row */
+  static GtkTreeIter iter_nt;
+
+  int idi, idf;
+
+  /* Integer data (I1-I4) */
+  static gint iv[4];
+
+  /* Float data (F1-F6) */
+  static gdouble fv[6];
+
+  /* Command data spinbuttons */
+  static gchar *ispin[4] =
+  {
+	"network_i1_spinbutton",
+	"network_i2_spinbutton",
+	"network_i3_spinbutton",
+	"network_i4_spinbutton"
+  };
+
+  static gchar *fspin[6] =
+  {
+	"network_f1_spinbutton",
+	"network_f2_spinbutton",
+	"network_f3_spinbutton",
+	"network_f4_spinbutton",
+	"network_f5_spinbutton",
+	"network_f6_spinbutton"
+  };
+
+  /* Card (row) name */
+  gchar name[3];
+
+  static gboolean
+	save = FALSE, /* Enable saving of editor data */
+	busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, network_command) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	Set_Command_Data( cmnd_store, &iter_nt, iv, fv );
+	save  = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New network row to create */
+	  /* Insert a default EN card if list is empty */
+	  Insert_EN_Card( cmnd_store, &iter_nt );
+
+	  /* Insert a new blank NT row after a selected row,
+	   * if any, otherwise before the last (EN) row */
+	  Insert_Blank_Command_Row(
+		  cmnd_treeview, cmnd_store, &iter_nt, "NT" );
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  cmnd_adjustment, cmnd_adjustment->upper );
+	  break;
+
+	case EDITOR_EDIT:  /* Edit a command row (NT) selected in treeview */
+	  /* Get selected row */
+	  Get_Selected_Row( cmnd_treeview, cmnd_store, &iter_nt, name );
+
+	  /* Get data from command editor */
+	  Get_Command_Data( cmnd_store, &iter_nt, iv, fv );
+
+	  /* Write int data to the command editor */
+	  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I4; idi++ )
+	  {
+		spin = GTK_SPIN_BUTTON(
+			lookup_widget(network_command, ispin[idi]) );
+		gtk_spin_button_set_value( spin, iv[idi] );
+	  }
+
+	  /* Write float data to the command editor */
+	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
+	  {
+		spin = GTK_SPIN_BUTTON(
+			lookup_widget(network_command, fspin[idf]) );
+		gtk_spin_button_set_value( spin, fv[idf] );
+	  }
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel Network editor */
+	  /* Remove card(s) */
+	  Remove_Row( cmnd_store, &iter_nt );
+	  save = busy = FALSE;
+	  return;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Read int data from the command editor */
+  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I4; idi++ )
+  {
+	spin = GTK_SPIN_BUTTON(
+		lookup_widget(network_command, ispin[idi]) );
+	iv[idi] = gtk_spin_button_get_value_as_int( spin );
+  }
+
+  /* Read float data from the command editor */
+  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
+  {
+	spin = GTK_SPIN_BUTTON(
+		lookup_widget(network_command, fspin[idf]) );
+	fv[idf] = gtk_spin_button_get_value( spin );
+  }
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Network_Command() */
+
+/*------------------------------------------------------------------------*/
+
+/* Txline_Command()
+ *
+ * Edits the Transmission Line command (TL card) parameters
+ */
+
+  void
+Txline_Command( int action )
+{
+  /* For looking up spinbuttons */
+  GtkSpinButton *spin;
+
+  /* For reading/writing to TL row */
+  static GtkTreeIter iter_tl;
+
+  int idi, idf;
+
+  /* Integer data (I1-I4) */
+  static gint iv[4];
+
+  /* Float data (F1-F6) */
+  static gdouble fv[6];
+
+  /* Command data spinbuttons */
+  static gchar *ispin[4] =
+  {
+	"txline_i1_spinbutton",
+	"txline_i2_spinbutton",
+	"txline_i3_spinbutton",
+	"txline_i4_spinbutton"
+  };
+
+  static gchar *fspin[6] =
+  {
+	"txline_f1_spinbutton",
+	"txline_f2_spinbutton",
+	"txline_f3_spinbutton",
+	"txline_f4_spinbutton",
+	"txline_f5_spinbutton",
+	"txline_f6_spinbutton"
+  };
+
+  /* Card (row) name */
+  gchar name[3];
+
+  static gboolean
+	crossed = FALSE, /* Crossed transmission line */
+	save = FALSE,	 /* Enable saving of editor data */
+	busy = FALSE;	 /* Block callbacks. Must be a better way to do this? */
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, txline_command) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	Set_Command_Data( cmnd_store, &iter_tl, iv, fv );
+	save = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New transmission line row to create */
+	  /* Insert a default EN card if list is empty */
+	  Insert_EN_Card( cmnd_store, &iter_tl );
+
+	  /* Insert a new blank TL row after a selected row,
+	   * if any, otherwise before the last (EN) row */
+	  Insert_Blank_Command_Row(
+		  cmnd_treeview, cmnd_store, &iter_tl, "TL" );
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  cmnd_adjustment, cmnd_adjustment->upper );
+	  break;
+
+	case EDITOR_EDIT:  /* Edit a command row (TL) selected in treeview */
+	  /* Get selected row */
+	  Get_Selected_Row( cmnd_treeview, cmnd_store, &iter_tl, name );
+
+	  /* Get data from command editor */
+	  Get_Command_Data( cmnd_store, &iter_tl, iv, fv );
+
+	  /* Set crossed txline checkbutton */
+	  if( fv[SPIN_COL_F1] < 0.0 )
+	  {
+		fv[SPIN_COL_F1] = -fv[SPIN_COL_F1];
+		crossed = TRUE;
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(
+				txline_command, "txline_crossed_checkbutton")), TRUE);
+	  }
+	  else
+	  {
+		crossed = FALSE;
+		gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(lookup_widget(
+				txline_command, "txline_crossed_checkbutton")), FALSE);
+	  }
+
+	  /* Write int data to the command editor */
+	  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I4; idi++ )
+	  {
+		spin = GTK_SPIN_BUTTON( lookup_widget(
+			  txline_command, ispin[idi]) );
+		gtk_spin_button_set_value( spin, iv[idi] );
+	  }
+
+	  /* Write float data to the command editor */
+	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
+	  {
+		spin = GTK_SPIN_BUTTON( lookup_widget(
+			  txline_command, fspin[idf]) );
+		gtk_spin_button_set_value( spin, fv[idf] );
+	  }
+
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel transmission line editor */
+	  /* Remove card(s) */
+	  Remove_Row( cmnd_store, &iter_tl );
+	  save = busy = FALSE;
+	  return;
+
+	case COMMAND_CKBUTTON: /* Check button toggled */
+	  if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
+			  lookup_widget(txline_command,
+				"txline_crossed_checkbutton"))) )
+		crossed = TRUE;
+	  else
+		crossed = FALSE;
+	  save = TRUE;
+	  break;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Read int data from the command editor */
+  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I4; idi++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(
+		  txline_command, ispin[idi]) );
+	iv[idi] = gtk_spin_button_get_value_as_int( spin );
+  }
+
+  /* Read float data from the command editor */
+  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(
+		  txline_command, fspin[idf]) );
+	fv[idf] = gtk_spin_button_get_value( spin );
+  }
+  if( crossed )
+	fv[SPIN_COL_F1] = -fv[SPIN_COL_F1];
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Txline_Command() */
+
+/*------------------------------------------------------------------------*/
+
+/* Nearfield_Command()
+ *
+ * Edits the Nearfield command (NE/NF card) parameters
+ */
+
+  void
+Nearfield_Command( int action )
+{
+  /* For looking up spin/toggle buttons */
+  GtkSpinButton   *spin;
+  GtkToggleButton *toggle;
+
+  /* For reading/writing to NE/NH row */
+  static GtkTreeIter
+	iter_ne,
+	iter_nh;
+
+  int idi, idf;
+
+  /* Integer data (I1-I4) */
+  static gint iv[4];
+
+  /* Float data (F1-F6) */
+  static gdouble fv[6];
+
+  /* Near field editor labels */
+#define NF_LABELS 9
+  static gchar *labels[NF_LABELS] =
+  {
+	"nearfield_i1_label",
+	"nearfield_i2_label",
+	"nearfield_i3_label",
+	"nearfield_f1_label",
+	"nearfield_f2_label",
+	"nearfield_f3_label",
+	"nearfield_f4_label",
+	"nearfield_f5_label",
+	"nearfield_f6_label"
+  };
+
+  /* Command data spinbuttons */
+  static gchar *ispin[3] =
+  {
+	"nearfield_nx_spinbutton",
+	"nearfield_ny_spinbutton",
+	"nearfield_nz_spinbutton"
+  };
+
+  static gchar *fspin[6] =
+  {
+	"nearfield_f1_spinbutton",
+	"nearfield_f2_spinbutton",
+	"nearfield_f3_spinbutton",
+	"nearfield_f4_spinbutton",
+	"nearfield_f5_spinbutton",
+	"nearfield_f6_spinbutton"
+  };
+
+  /* Card (row) name */
+  gchar name[3];
+
+  static gboolean
+	label = TRUE,  /* Change spin button labels */
+	nref  = TRUE,  /* Near E field enabled */
+	nrhf  = FALSE, /* Near H field enabled */
+	save  = FALSE, /* Enable saving of editor data */
+	busy  = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up(&busy, nearfield_command) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	if( nref )
+	  Set_Command_Data( cmnd_store, &iter_ne, iv, fv );
+	if( nrhf )
+	  Set_Command_Data( cmnd_store, &iter_nh, iv, fv );
+	save = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New near field row to create */
+	  /* Insert a default EN card if list is empty */
+	  Insert_EN_Card( cmnd_store, &iter_ne );
+
+	  /* Insert a new blank NE row after a selected row,
+	   * if any, otherwise before the last (EN) row */
+	  Insert_Blank_Command_Row(
+		  cmnd_treeview, cmnd_store, &iter_ne, "NE" );
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  cmnd_adjustment, cmnd_adjustment->upper );
+	  label = TRUE;
+	  break;
+
+	case EDITOR_EDIT:  /* Edit a command row (NE/NH) */
+	  /* Get selected row */
+	  Get_Selected_Row( cmnd_treeview, cmnd_store, &iter_ne, name );
+	  iter_nh = iter_ne;
+
+	  /* Get data from command editor */
+	  Get_Command_Data( cmnd_store, &iter_ne, iv, fv );
+
+	  /* Write int data to the command editor */
+	  for( idi = SPIN_COL_I2; idi <= SPIN_COL_I4; idi++ )
+	  {
+		spin = GTK_SPIN_BUTTON( lookup_widget(
+			  nearfield_command, ispin[idi-SPIN_COL_I2]) );
+		gtk_spin_button_set_value( spin, iv[idi] );
+	  }
+
+	  /* Write float data to the command editor */
+	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
+	  {
+		spin = GTK_SPIN_BUTTON( lookup_widget(
+			  nearfield_command, fspin[idf]) );
+		gtk_spin_button_set_value( spin, fv[idf] );
+	  }
+
+	  /* Set radio buttons */
+	  if( iv[SPIN_COL_I1] == 0 ) /* Rectangular coordinates */
+	  {
+		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			  nearfield_command, "nearfield_rect_radiobutton") );
+		gtk_toggle_button_set_active( toggle, TRUE );
+	  }
+	  else
+	  {
+		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			  nearfield_command, "nearfield_sph_radiobutton") );
+		gtk_toggle_button_set_active( toggle, TRUE );
+	  }
+
+	  /* Set check buttons */
+	  if( strcmp(name, "NE") == 0 )
+	  {
+		nref = TRUE; nrhf = FALSE;
+		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			  nearfield_command, "nearfield_ne_checkbutton") );
+		gtk_toggle_button_set_active( toggle, TRUE );
+
+		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			  nearfield_command, "nearfield_nh_checkbutton") );
+		gtk_toggle_button_set_active( toggle, FALSE );
+	  }
+
+	  if( strcmp(name, "NH") == 0 )
+	  {
+		nrhf = TRUE; nref = FALSE;
+		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			  nearfield_command, "nearfield_nh_checkbutton") );
+		gtk_toggle_button_set_active( toggle, TRUE );
+
+		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			  nearfield_command, "nearfield_ne_checkbutton") );
+		gtk_toggle_button_set_active( toggle, FALSE );
+	  }
+
+	  label = TRUE;
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel near field editor */
+	  /* Remove card(s) */
+	  if( nref )
+		Remove_Row( cmnd_store, &iter_ne );
+	  if( nrhf )
+		Remove_Row( cmnd_store, &iter_nh );
+	  save = busy = FALSE;
+	  return;
+
+	case NEARFIELD_NE_CKBUTTON: /* E-field check button toggled */
+	  /* Test E field check button */
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			nearfield_command, "nearfield_ne_checkbutton") );
+	  if( gtk_toggle_button_get_active(toggle) )
+	  {
+		nref = TRUE;
+		Insert_Blank_Command_Row(
+			cmnd_treeview, cmnd_store, &iter_ne, "NE" );
+	  }
+	  else
+	  {
+		nref = FALSE;
+		Remove_Row( cmnd_store, &iter_ne );
+	  }
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  cmnd_adjustment, cmnd_adjustment->upper );
+	  save = TRUE;
+	  break;
+
+	case NEARFIELD_NH_CKBUTTON: /* H-field check button toggled */
+	  /* Test H field check button */
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			nearfield_command, "nearfield_nh_checkbutton") );
+	  if( gtk_toggle_button_get_active(toggle) )
+	  {
+		nrhf = TRUE;
+		Insert_Blank_Command_Row(
+			cmnd_treeview, cmnd_store, &iter_nh, "NH" );
+	  }
+	  else
+	  {
+		nrhf = FALSE;
+		Remove_Row( cmnd_store, &iter_nh );
+	  }
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  cmnd_adjustment, cmnd_adjustment->upper );
+	  save = TRUE;
+	  break;
+
+	case COMMAND_RDBUTTON: /* Radio button toggled */
+	  /* Test rectangular coordinates radio button */
+	  toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			nearfield_command, "nearfield_rect_radiobutton") );
+	  if( gtk_toggle_button_get_active(toggle) )
+		iv[SPIN_COL_I1] = 0; /* Rectangular */
+	  else
+		iv[SPIN_COL_I1] = 1; /* Spherical */
+	  save = label = TRUE;
+	  break;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Set labels according to coordinate type */
+  if( label )
+  {
+	if( iv[SPIN_COL_I1] == 0 ) /* Rectangular coordinates */
+	{
+	  gchar *text[NF_LABELS] =
+	  {
+		_("Points in X-axis"),
+		_("Points in Y-axis"),
+		_("Points in Z-axis"),
+		_("First Point X (m)"),
+		_("First Point Y (m)"),
+		_("First Point Z (m)"),
+		_("Increment in X (m)"),
+		_("Increment in Y (m)"),
+		_("Increment in Z (m)")
+	  };
+	  Set_Labels( nearfield_command, labels, text, NF_LABELS );
+	}
+	else /* Spherical coordinates */
+	{
+	  gchar *text[NF_LABELS] =
+	  {
+		_("Points along R"),
+		_("Points along Phi"),
+		_("Points along Theta"),
+		_("First Point R (m)"),
+		_("First Point Phi"),
+		_("First Point Theta"),
+		_("Increment in R (m)"),
+		_("Increment in Phi"),
+		_("Increment in Theta")
+	  };
+	  Set_Labels( nearfield_command, labels, text, NF_LABELS );
+	  label = FALSE;
+	}
+
+  } /* if( label ) */
+
+  /* Read int data from the command editor */
+  for( idi = SPIN_COL_I2; idi <= SPIN_COL_I4; idi++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(
+		  nearfield_command, ispin[idi-SPIN_COL_I2]) );
+	iv[idi] = gtk_spin_button_get_value_as_int( spin );
+  }
+
+  /* Read float data from the command editor */
+  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(
+		  nearfield_command, fspin[idf]) );
+	fv[idf] = gtk_spin_button_get_value( spin );
+  }
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Nearfield_Command() */
+
+/*------------------------------------------------------------------------*/
+
+/* Kernel_Command()
+ *
+ * Edits the Kernel command (EK card) parameters
+ */
+
+  void
+Kernel_Command( int action )
+{
+  /* For testing check button */
+  GtkCheckButton *ckbutton;
+
+  /* For reading/writing to EK row */
+  static GtkTreeIter iter_ek;
+
+  /* Thin wire kernel status */
+  static int ek = 0;
+  gchar sek[6];
+  gchar *sv;
+
+  /* Card (row) name */
+  gchar name[3];
+
+  static gboolean
+	save = FALSE, /* Enable saving of editor data */
+	busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+  int idc;
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, kernel_command) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	/* Set EK card data */
+	if( gtk_list_store_iter_is_valid(cmnd_store, &iter_ek) )
+	{
+	  /* Set extended kernel data */
+	  snprintf( sek, 6, "%5d", ek );
+	  gtk_list_store_set(
+		  cmnd_store, &iter_ek, CMND_COL_I1, sek, -1 );
+
+	  /* Clear row to 0 */
+	  for( idc = CMND_COL_I2; idc <= CMND_COL_F6; idc++ )
+		gtk_list_store_set( cmnd_store, &iter_ek, idc, "0", -1 );
+	}
+	save = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New kernel row to create */
+	  /* Insert a default EN card if list is empty */
+	  Insert_EN_Card( cmnd_store, &iter_ek );
+
+	  /* Insert a new blank EK row after a selected row,
+	   * if any, otherwise before the last (EN) row */
+	  Insert_Blank_Command_Row(
+		  cmnd_treeview, cmnd_store, &iter_ek, "EK" );
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  cmnd_adjustment, cmnd_adjustment->upper );
+	  save = TRUE;
+	  break;
+
+	case EDITOR_EDIT:  /* Edit a command row (EK) */
+	  /* Get selected row */
+	  Get_Selected_Row(
+		  cmnd_treeview, cmnd_store, &iter_ek, name );
+
+	  /* Get data from command editor */
+	  if( gtk_list_store_iter_is_valid(cmnd_store, &iter_ek) )
+	  {
+		gtk_tree_model_get(
+			GTK_TREE_MODEL(cmnd_store),
+			&iter_ek, CMND_COL_I1, &sv, -1);
+		ek = atoi(sv);
+		g_free(sv);
+	  }
+
+	  /* Set the kernel check button */
+	  ckbutton = GTK_CHECK_BUTTON(lookup_widget(
+			kernel_command, "kernel_checkbutton") );
+	  if( ek == 0 )
+		gtk_toggle_button_set_active(
+			GTK_TOGGLE_BUTTON(ckbutton), TRUE );
+	  else
+		gtk_toggle_button_set_active(
+			GTK_TOGGLE_BUTTON(ckbutton), FALSE );
+
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel kernel editor */
+	  /* Remove card(s) */
+	  Remove_Row( cmnd_store, &iter_ek );
+	  save = busy = FALSE;
+	  return;
+
+	case COMMAND_CKBUTTON: /* Some check button changed in editor window */
+	  /* Set kernel status according to checkbutton */
+	  ckbutton = GTK_CHECK_BUTTON(lookup_widget(
+			kernel_command, "kernel_checkbutton") );
+	  if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ckbutton)) )
+		ek = 0;
+	  else
+		ek = -1;
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Kernel_Command() */
+
+/*------------------------------------------------------------------------*/
+
+/* Intrange_Command()
+ *
+ * Edits the Interaction Approx Range command (KH card) parameters
+ */
+
+  void
+Intrange_Command( int action )
+{
+  /* For looking up spinbuttons */
+  GtkSpinButton *spin;
+
+  /* For reading/writing to KH row */
+  static GtkTreeIter iter_kh;
+  gchar *sv;
+
+  /* Interaction Approx range */
+  static gdouble kh;
+  static gchar skh[13];
+
+  /* Card (row) name */
+  gchar name[3];
+
+  static gboolean
+	save = FALSE, /* Enable saving of editor data */
+	busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+  int idc;
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, intrange_command) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	/* Set KH card data */
+	if( gtk_list_store_iter_is_valid(cmnd_store, &iter_kh) )
+	{
+	  /* Clear row to 0 */
+	  for( idc = CMND_COL_I1; idc <= CMND_COL_F6; idc++ )
+		gtk_list_store_set(
+			cmnd_store, &iter_kh, idc, "0", -1 );
+
+	  /* Set range data */
+	  gtk_list_store_set(
+		  cmnd_store, &iter_kh, CMND_COL_F1, skh, -1 );
+	}
+	save = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New inter approx range row to create */
+	  /* Insert a default EN card if list is empty */
+	  Insert_EN_Card( cmnd_store, &iter_kh );
+
+	  /* Insert a new blank KH row after a selected row,
+	   * if any, otherwise before the last (EN) row */
+	  Insert_Blank_Command_Row(
+		  cmnd_treeview, cmnd_store, &iter_kh, "KH" );
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  cmnd_adjustment, cmnd_adjustment->upper );
+	  break;
+
+	case EDITOR_EDIT:  /* Edit a command row (KH) */
+	  /* Get selected row */
+	  Get_Selected_Row( cmnd_treeview, cmnd_store, &iter_kh, name );
+
+	  /* Get data from command editor */
+	  if( gtk_list_store_iter_is_valid(cmnd_store, &iter_kh) )
+	  {
+		gtk_tree_model_get(
+			GTK_TREE_MODEL(cmnd_store),
+			&iter_kh, CMND_COL_F1, &sv, -1 );
+		kh = Strtod( sv, NULL );
+		g_free(sv);
+	  }
+
+	  /* Set range data to command editor */
+	  spin = GTK_SPIN_BUTTON(lookup_widget(
+			intrange_command, "intrange_wlen_spinbutton") );
+	  gtk_spin_button_set_value( spin, kh );
+
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel inter range editor */
+	  /* Remove card(s) */
+	  Remove_Row( cmnd_store, &iter_kh );
+	  save = busy = FALSE;
+	  return;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Get range data from editor */
+  spin = GTK_SPIN_BUTTON(lookup_widget(
+		intrange_command, "intrange_wlen_spinbutton") );
+  kh = gtk_spin_button_get_value( spin );
+  snprintf( skh, 13, "%12.5e", kh );
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Intrange_Command() */
+
+/*------------------------------------------------------------------------*/
+
+/* Execute_Command()
+ *
+ * Edits the Execute command (XQ card) parameters
+ */
+
+  void
+Execute_Command( int action )
+{
+
+  /* For reading/writing to XQ row */
+  static GtkTreeIter iter_xq;
+  gchar *sv;
+  gchar sxq[6];
+
+  int idx, idc;
+
+  /* Execute command status */
+  static int xq = 0;
+
+  /* Command data radio buttons */
+#define XQ_RDBTN 4
+  static gchar *rdbutton[XQ_RDBTN] =
+  {
+	"execute_none_radiobutton",
+	"execute_xz_radiobutton",
+	"execute_yz_radiobutton",
+	"execute_both_radiobutton"
+  };
+
+  /* Card (row) name */
+  gchar name[3];
+
+  static gboolean
+	save = FALSE, /* Enable saving of editor data */
+	busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, execute_command) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	/* Set XQ card data */
+	if( gtk_list_store_iter_is_valid(cmnd_store, &iter_xq) )
+	{
+	  snprintf( sxq, 6, "%5d", xq );
+	  gtk_list_store_set(
+		  cmnd_store, &iter_xq, CMND_COL_I1, sxq, -1 );
+	  for( idc = CMND_COL_I2; idc <= CMND_COL_F6; idc++ )
+		gtk_list_store_set( cmnd_store, &iter_xq, idc, "0", -1 );
+	}
+	save = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New execute row to create */
+	  /* Insert a default EN card if list is empty */
+	  Insert_EN_Card( cmnd_store, &iter_xq );
+
+	  /* Insert a new blank XQ row after a selected row,
+	   * if any, otherwise before the last (EN) row */
+	  Insert_Blank_Command_Row(
+		  cmnd_treeview, cmnd_store, &iter_xq, "XQ" );
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  cmnd_adjustment, cmnd_adjustment->upper );
+	  save = TRUE;
+	  break;
+
+	case EDITOR_EDIT:  /* Edit a command row (XQ) */
+	  /* Get selected row */
+	  Get_Selected_Row(
+		  cmnd_treeview, cmnd_store, &iter_xq, name );
+
+	  /* Get data from command editor */
+	  if( gtk_list_store_iter_is_valid(cmnd_store, &iter_xq) )
+	  {
+		gtk_tree_model_get(
+			GTK_TREE_MODEL(cmnd_store),
+			&iter_xq, CMND_COL_I1, &sv, -1);
+		xq = atoi(sv);
+		g_free(sv);
+	  }
+
+	  /* Set radio button in command editor */
+	  for( idx = 0; idx < XQ_RDBTN; idx++ )
+		if( xq == idx )
+		{
+		  gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(
+				lookup_widget(execute_command, rdbutton[idx])), TRUE );
+		  break;
+		}
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel execute editor */
+	  /* Remove card(s) */
+	  Remove_Row( cmnd_store, &iter_xq );
+	  save = busy = FALSE;
+	  return;
+
+	case COMMAND_RDBUTTON: /* Radio button toggled */
+	  /* Get active radio button in command editor */
+	  for( idx = 0; idx < XQ_RDBTN; idx++ )
+		if( gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(
+				lookup_widget(execute_command, rdbutton[idx]))) )
+		  break;
+	  xq = idx;
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Execute_Command() */
+
+/*------------------------------------------------------------------------*/
+
+/* Insert_EN_Card()
+ *
+ * Inserts a default EN card if missing
+ */
+
+  void
+Insert_EN_Card( GtkListStore *store, GtkTreeIter *iter )
+{
+  gint idx, idc;
+
+  /* Insert default EN card if list is clear */
+  idx = gtk_tree_model_iter_n_children(
+	  GTK_TREE_MODEL(store), NULL );
+  if( !idx )
+  {
+	gtk_list_store_append( store, iter );
+	gtk_list_store_set( store, iter, CMND_COL_NAME, "EN", -1 );
+	for( idc = CMND_COL_I1; idc < CMND_NUM_COLS; idc++ )
+	  gtk_list_store_set( store, iter, idc, "0", -1 );
+  }
+
+} /* Insert_EN_Card() */
+
+/*------------------------------------------------------------------------*/
+
+/* Get_Command_Data()
+ *
+ * Gets command data from a treeview row
+ */
+
+void
+Get_Command_Data(
+	GtkListStore *store,
+	GtkTreeIter *iter,
+	int *iv, double *fv )
+{
+  gint idc;
+  gchar *sv;
+
+  /* Get data from tree view (I1-I4, F1-F6)*/
+  if( gtk_list_store_iter_is_valid(store, iter) )
+  {
+	for( idc = CMND_COL_I1; idc <= CMND_COL_I4; idc++ )
+	{
+	  gtk_tree_model_get(
+		  GTK_TREE_MODEL(store), iter, idc, &sv, -1);
+	  iv[idc-CMND_COL_I1] = atoi(sv);
+	  g_free(sv);
+	}
+	for( idc = CMND_COL_F1; idc <= CMND_COL_F6; idc++ )
+	{
+	  gtk_tree_model_get(
+		  GTK_TREE_MODEL(store), iter, idc, &sv, -1);
+	  fv[idc-CMND_COL_F1] = Strtod( sv, NULL );
+	  g_free(sv);
+	}
+  }
+  else stop( _("Get_Command_Data(): Error reading\n"\
+		"row data: Invalid list iterator"), ERR_OK );
+
+} /* Get_Command_Data() */
+
+/*------------------------------------------------------------------------*/
+
+/* Set_Command_Data()
+ *
+ * Sets data into a command row
+ */
+
+void
+Set_Command_Data(
+	GtkListStore *store,
+	GtkTreeIter *iter,
+	int *iv, double *fv )
+{
+  gchar str[13];
+  gint idc;
+
+  /* Format and set editor data to treeview (I1-I4 & F1-F6) */
+  if( gtk_list_store_iter_is_valid(store, iter) )
+  {
+	for( idc = CMND_COL_I1; idc <= CMND_COL_I4; idc++ )
+	{
+	  snprintf( str, 6, "%5d", iv[idc-CMND_COL_I1] );
+	  gtk_list_store_set( store, iter, idc, str, -1 );
+	}
+
+	for( idc = CMND_COL_F1; idc <= CMND_COL_F6; idc++ )
+	{
+	  snprintf( str, 13, "%12.5E", fv[idc-CMND_COL_F1] );
+	  gtk_list_store_set( store, iter, idc, str, -1 );
+	}
+  }
+  else stop( _("Set_Command_Data(): Error writing row data\n"\
+		"Please re-select row"), ERR_OK );
+
+  SetFlag( NEC2_EDIT_SAVE );
+
+} /* Set_Command_Data() */
+
+/*------------------------------------------------------------------------*/
+
+/* Insert_Blank_Command_Row()
+ *
+ * Inserts a blank row in a tree view with only its name (GW ... )
+ */
+
+void
+Insert_Blank_Command_Row(
+	GtkTreeView *view, GtkListStore *store,
+	GtkTreeIter *iter, const gchar *name )
+{
+  GtkTreeSelection *selection;
+  gboolean retv;
+  gint n;
+  gchar *str;
+
+  if( nec2_edit_window == NULL )
+	return;
+
+  /* Get selected row, if any */
+  selection = gtk_tree_view_get_selection( view );
+  retv = gtk_tree_selection_get_selected( selection, NULL, iter );
+
+  /* If no selected row, insert new row into list
+   * store before last row, else after the selected row,
+   * but if this is a GE row, then insert before it */
+  if( !retv )
+  {
+	n = gtk_tree_model_iter_n_children(
+		GTK_TREE_MODEL(store), NULL );
+	gtk_tree_model_iter_nth_child(
+		GTK_TREE_MODEL(store), iter, NULL, n-1 );
+	gtk_list_store_insert_before( store, iter, iter );
+  }
+  else
+  {
+	gtk_tree_model_get(
+		GTK_TREE_MODEL(store), iter, CMND_COL_NAME, &str, -1 );
+	if( strcmp(str, "EN") == 0 )
+	  gtk_list_store_insert_before( store, iter, iter );
+	else
+	  gtk_list_store_insert_after( store, iter, iter );
+	g_free(str);
+  }
+
+  gtk_list_store_set( store, iter, CMND_COL_NAME, name, -1 );
+  for( n = CMND_COL_I1; n < CMND_NUM_COLS; n++ )
+	gtk_list_store_set( store, iter, n, "--", -1 );
+  gtk_tree_selection_select_iter( selection, iter );
+
+} /* Insert_Blank_Command_Row() */
+
+/*------------------------------------------------------------------------*/
+
+/* Set_Labels()
+ *
+ * Sets labels in an editor window
+ */
+
+  void
+Set_Labels( GtkWidget *widget, gchar **labels, gchar **text, gint num )
+{
+  int idx;
+  GtkLabel *label;
+
+  for( idx = 0; idx < num; idx++ )
+  {
+	label = GTK_LABEL( lookup_widget(widget, labels[idx]) );
+	gtk_label_set_text( label, text[idx] );
+  }
+
+} /* Set_Labels() */
+
+/*------------------------------------------------------------------------*/
+
diff --git a/src/cmnd_edit.h b/src/cmnd_edit.h
new file mode 100644
index 0000000..1c202a9
--- /dev/null
+++ b/src/cmnd_edit.h
@@ -0,0 +1,28 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef CMND_EDIT_H
+#define CMND_EDIT_H		1
+
+#include "common.h"
+#include "interface.h"
+#include "support.h"
+#include "editors.h"
+
+#endif
+
diff --git a/src/common.h b/src/common.h
new file mode 100644
index 0000000..0aa4bcd
--- /dev/null
+++ b/src/common.h
@@ -0,0 +1,1303 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* xnec2c.h
+ *
+ * Common header file for xnec2c
+ */
+
+#ifndef	COMMON_H
+#define	COMMON_H	1
+
+#include <complex.h>
+#include <stdio.h>
+#include <signal.h>
+#include <math.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <string.h>
+#include <fcntl.h>
+#include <errno.h>
+#include <time.h>
+#include <sys/types.h>
+#include <sys/times.h>
+#include <gtk/gtk.h>
+
+/* commonly used complex constants */
+#define	CPLX_00	(0.0+I*0.0)
+#define	CPLX_01	(0.0+I*1.0)
+#define	CPLX_10	(1.0+I*0.0)
+#define	CPLX_11	(1.0+I*1.0)
+
+/* common constants */
+#define PI		3.141592654
+#define	POT		1.570796327
+#define	TP		6.283185308
+#define	TA		1.745329252E-02
+#define	TD		57.29577951
+#define	ETA		376.73
+#define	CVEL	299.8
+#define	CONST1	(0.0+I*4.771341189)
+#define	CONST4	(0.0+I*188.365)
+#define	SMIN	1.0e-3
+
+#define cmplx(r, i) ((r)+I*(i))
+
+/* Replaces the "10000" limit used to */
+/* identify segment/patch connections */
+#define	PCHCON  100000
+
+/* Max length of a line read from input file */
+#define	LINE_LEN	135
+
+/* Type of projection parameters stuct */
+#define	STRUCTURE_DRAWINGAREA	1
+#define	RDPATTERN_DRAWINGAREA	2
+
+/* Some colors for settinn cairo context */
+#define	WHITE	1.0, 1.0, 1.0
+#define	RED		1.0, 0.0, 0.0
+#define	YELLOW	1.0, 1.0, 0.0
+#define	GREEN	0.0, 1.0, 0.0
+#define	CYAN	0.0, 1.0, 1.0
+#define	BLUE	0.0, 0.0, 1.0
+#define	MAGENTA	1.0, 0.0, 1.0
+#define	GREY	0.5, 0.5, 0.5
+#define	BLACK	0.0, 0.0, 0.0
+
+/* For read/write pipes */
+#define	READ	0
+#define	WRITE	1
+
+/* Response to error dialog box */
+#define ERR_OK		FALSE
+#define ERR_STOP	TRUE
+
+/*** Flow control flags ***/
+/* Freq Loop Control flags */
+#define	FREQ_LOOP_RUNNING	0x0000000000000001ll
+#define	FREQ_LOOP_DONE		0x0000000000000002ll
+#define	FREQ_LOOP_INIT		0x0000000000000004ll
+#define	FREQ_LOOP_STOP		0x0000000000000008ll
+#define	FREQ_LOOP_FLAGS		0x000000000000000Fll
+
+/* Main Window Control flags */
+#define	DRAW_CURRENTS		0x0000000000000010ll
+#define	DRAW_CHARGES		0x0000000000000020ll
+#define	COMMON_PROJECTION	0x0000000000000040ll
+#define	COMMON_FREQUENCY	0x0000000000000080ll
+#define	MAIN_NEW_FREQ		0x0000000000000100ll
+#define	MAIN_QUIT			0x0000000000000200ll
+
+/* Freq Plot Control flags */
+#define	PLOT_ZREAL_ZIMAG	0x0000000000000400ll
+#define	PLOT_VSWR			0x0000000000000800ll
+#define	PLOT_ZMAG_ZPHASE	0x0000000000001000ll
+#define	PLOT_GMAX			0x0000000000002000ll
+#define	PLOT_GVIEWER		0x0000000000004000ll
+#define	PLOT_NETGAIN		0x0000000000008000ll
+#define	PLOT_GAIN_DIR		0x0000000000010000ll
+#define	PLOT_FREQ_LINE		0x0000000000020000ll
+#define	PLOT_SELECT			0x0000000000040000ll
+#define	PLOT_ENABLED		0x0000000000080000ll
+#define	PLOT_QUIT			0x0000000000100000ll
+#define	PLOT_FLAGS			0x00000000001FFC00ll
+
+/* Radiation Pattern Control flags */
+#define	DRAW_GAIN			0x0000000000200000ll
+#define	DRAW_EFIELD			0x0000000000400000ll
+#define	DRAW_HFIELD			0x0000000000800000ll
+#define	DRAW_EHFIELD		0x0000000001000000ll
+#define	DRAW_POYNTING		0x0000000002000000ll
+#define	DRAW_ENABLED		0x0000000004000000ll
+#define	DRAW_QUIT			0x0000000008000000ll
+#define	DRAW_NEW_RDPAT		0x0000000010000000ll
+#define	DRAW_NEW_EHFIELD	0x0000000020000000ll
+#define	OVERLAY_STRUCT		0x0000000040000000ll
+#define	NEAREH_SNAPSHOT		0x0000000080000000ll
+#define	NEAREH_ANIMATE		0x0000000100000000ll
+#define	ENABLE_RDPAT		0x0000000200000000ll
+#define	ENABLE_NEAREH		0x0000000400000000ll
+#define	DRAW_FLAGS			0x00000001FFE00000ll
+#define	RDPAT_FLAGS			0x0000000600000000ll
+
+/* NEC2 editor flags */
+#define	NEC2_EDIT_SAVE		0x0000000800000000ll /* Save NEC2 editor data to a file */
+#define	NEC2_SAVE			0x0000001000000000ll /* Saving to a NEC2 input file */
+
+/* Structure/rad pattern/freq. plots image save */
+#define	IMAGE_SAVE			0x0000002000000000ll
+
+/* Save gnuplot data */
+#define	RDPAT_GNUPLOT_SAVE	0x0000004000000000ll
+#define	PLOTS_GNUPLOT_SAVE	0x0000008000000000ll
+#define	STRCT_GNUPLOT_SAVE	0x0000010000000000ll
+
+/* All filechooser save flags */
+#define	ALL_SAVE_FLAGS		0x000001F000000000ll
+
+/* Other flags */
+#define	ERROR_CONDX			0x0000020000000000ll
+#define	INPUT_PENDING		0x0000040000000000ll
+#define	ENABLE_EXCITN		0x0000080000000000ll
+
+/* Allocation control flags */
+#define	ALLOC_NEAREH_BUFF	0x0000100000000000ll
+#define	ALLOC_RDPAT_BUFF	0x0000200000000000ll
+#define	ALLOC_PNTING_BUFF	0x0000400000000000ll
+
+#define	ALL_FLAGS		    0xffffffffffffffffll
+
+/* Type of near field data requested */
+#define NEAR_EFIELD		0x01
+#define NEAR_HFIELD		0x02
+#define NEAR_EHFIELD	0x03
+
+#define CHILD	isChild()
+
+/* Gain Scaling style */
+enum GAIN_SCALE
+{
+  GS_LINP = 0,
+  GS_LINV,
+  GS_ARRL,
+  GS_LOG,
+  NUM_SCALES
+};
+
+/* Polarization type */
+enum POL_TYPE
+{
+  POL_TOTAL = 0,
+  POL_HORIZ,
+  POL_VERT,
+  POL_RHCP,
+  POL_LHCP,
+  NUM_POL
+};
+
+/*** Structs encapsulating global ("common") variables ***/
+/* common  /crnt/ */
+typedef struct
+{
+  double
+    *air,	/* Ai/lambda, real part */
+    *aii,	/* Ai/lambda, imaginary part */
+    *bir,	/* Bi/lambda, real part */
+    *bii,	/* Bi/lambda, imaginary part */
+    *cir,	/* Ci/lambda, real part */
+    *cii;	/* Ci/lambda, imaginary part */
+
+  complex double *cur; /* Amplitude of basis function */
+
+  char newer; /* New data available */
+  char valid; /* Available data valid */
+
+} crnt_t;
+
+/* common  /data/ (geometry data) */
+typedef struct
+{
+  int
+    n,		/* Number of wire segments */
+    np,		/* Number of wire segments in symmetry cell */
+    m,		/* Number of surface patches */
+    mp,		/* Number of surface patches in symmetry cell */
+    npm,	/* = n+m  */
+    np2m,	/* = n+2m */
+    np3m,	/* = n+3m */
+    ipsym,	/* Symmetry flag */
+    *icon1, /* Segments end 1 connection */
+    *icon2,	/* Segments end 2 connection */
+    *itag;	/* Segments tag number */
+
+  /* Wire segment data */
+  double
+    *x1, *y1, *z1,	/* End 1 coordinates of wire segments */
+    *x2, *y2, *z2,	/* End 2 coordinates of wire segments */
+    *x, *y, *z,		/* Coordinates of segment centers */
+    *si, *bi,		/* Length and radius of segments  */
+    *cab,			/* cos(a)*cos(b) */
+    *sab, 	   		/* cos(a)*sin(b) */
+    *salp,	   		/* Z component - sin(a) */
+
+    /* Surface patch data */
+    *t1x, *t1y, *t1z,	/* Coordinates of t1 vector */
+    *t2x, *t2y, *t2z,	/* Coordinates of t2 vector */
+    *px, *py, *pz,		/* Coordinates of patch center */
+    *pbi,				/* Patch surface area */
+    *psalp,				/* Z component - sin(a) */
+
+    /* Wavelength in meters */
+    wlam;
+
+  /* My addition, for plotting patches */
+  double
+    *px1, *py1, *pz1,
+    *px2, *py2, *pz2;
+
+} data_t;
+
+/* common  /dataj/ */
+typedef struct
+{
+int
+  iexk,
+  ind1,
+  indd1,
+  ind2,
+  indd2,
+  ipgnd;
+
+double
+  s,
+  b,
+  xj,
+  yj,
+  zj,
+  cabj,
+  sabj,
+  salpj,
+  rkh,
+  t1xj,
+  t1yj,
+  t1zj,
+  t2xj,
+  t2yj,
+  t2zj;
+
+complex double
+  exk,
+  eyk,
+  ezk,
+  exs,
+  eys,
+  ezs,
+  exc,
+  eyc,
+  ezc;
+
+} dataj_t;
+
+/* common  /fpat/ */
+typedef struct
+{
+  int
+    near,
+    nfeh,
+    nrx,
+    nry,
+    nrz,
+    nth,
+    nph,
+    ipd,
+    iavp,
+    inor,
+    iax,
+    ixtyp;
+
+  /* xpr6 moved to exec_data_t */
+  double
+    thets,
+    phis,
+    dth,
+    dph,
+    rfld,
+    gnor,
+    clt,
+    cht,
+    epsr2,
+    sig2,
+    pinr,
+    pnlr,
+    ploss,
+    xnr,
+    ynr,
+    znr,
+    dxnr,
+    dynr,
+    dznr;
+
+} fpat_t;
+
+/*common  /ggrid/ */
+typedef struct
+{
+  int
+    *nxa,
+    *nya;
+
+  double
+    *dxa,
+    *dya,
+    *xsa,
+    *ysa;
+
+  complex double
+    epscf,
+    *ar1,
+    *ar2,
+    *ar3;
+
+} ggrid_t;
+
+/* common  /gnd/ */
+typedef struct
+{
+  int
+    ksymp,	/* Ground flag */
+    ifar,	/* Int flag in RP card, for far field calculations */
+    iperf,	/* Type of ground flag */
+    nradl;	/* Number of radials in ground screen */
+
+  double
+    t2,		/* Const for radial wire ground impedance */
+    cl,		/* Distance in wavelengths of cliff edge from origin */
+    ch,		/* Cliff height in wavelengths */
+    scrwl,	/* Wire length in radial ground screen normalized to w/length */
+    scrwr;	/* Radius of wires in screen in wavelengths */
+
+  complex double
+    zrati,	/* Ground medium [Er-js/wE0]^-1/2 */
+    zrati2,	/* As above for 2nd ground medium */
+    t1,		/* Const for radial wire ground impedance */
+    frati;	/* (k1^2-k2^2)/(k1^2+k2^2), k1=w(E0Mu0)^1/2, k1=k2/ZRATI */
+
+} gnd_t;
+
+/* common  /gwav/ */
+typedef struct
+{
+  double
+	r1,	/* Distance from current element to point where field is evaluated  */
+	r2,	/* Distance from image of element to point where field is evaluated */
+	zmh, /* Z-Z', Z is height of field evaluation point */
+	zph; /* Z+Z', Z' is height of current element */
+
+  complex double
+	u,	/* (Er-jS/WE0)^-1/2 */
+	u2,	/* u^2 */
+	xx1, /* G1*exp(jkR1*r[i])  */
+	xx2; /* G2*exp(jkR2*r'[i]) */
+
+} gwav_t;
+
+/* common  /incom/ */
+typedef struct
+{
+  int isnor;
+
+  double
+    xo,
+    yo,
+    zo,
+    sn,
+    xsn,
+    ysn;
+
+} incom_t;
+
+/* common  /matpar/ (matrix parameters) */
+typedef struct
+{
+  int
+    icase,	/* Storage mode of primary matrix */
+    npblk,	/* Num of blocks in first (NBLOKS-1) blocks */
+    nlast,	/* Num of blocks in last block */
+    imat;	/* Storage reserved in CM for primary NGF matrix A */
+
+} matpar_t;
+
+/* common  /netcx/ */
+typedef struct
+{
+  int
+    masym,	/* Matrix symmetry flags */
+    neq,
+    npeq,
+    neq2,
+    nonet,	/* Number of two-port networks */
+    ntsol,	/* "Network equations are solved" flag */
+    nprint,	/* Print control flag */
+    *iseg1,	/* Num of seg to which port 1 of network is connected */
+    *iseg2,	/* Num of seg to which port 2 of network is connected */
+    *ntyp;	/* Type of networks */
+
+  double
+    *x11r,	/* Real and imaginary parts of network impedances */
+    *x11i,
+    *x12r,
+    *x12i,
+    *x22r,
+    *x22i,
+    pin,	/* Total input power from sources */
+    pnls;	/* Power lost in networks */
+
+  complex double zped;
+
+} netcx_t;
+
+/* common  /save/ */
+typedef struct
+{
+  int *ip;	/* Vector of indices of pivot elements used to factor matrix */
+
+  double
+    epsr,		/* Relative dielectric constant of ground */
+    sig,		/* Conductivity of ground */
+    scrwlt,		/* Length of radials in ground screen approximation */
+    scrwrt,		/* Radius of wires in ground screen approximation */
+    fmhz,		/* Saved frequency of operation */
+    last_freq;	/* My addition, Last frequency used in calculations */
+
+  /* My addition, replace xtemp, ytemp etc in freq. loop */
+  double
+    *xtemp,
+    *ytemp,
+    *ztemp,
+    *sitemp,
+    *bitemp;
+
+  double *freq;	/* My addition, frequencies used in freq loop */
+  char *fstep;	/* My addition, freq loop steps that returned results */
+
+} save_t;
+
+/* common  /segj/ */
+typedef struct
+{
+  int
+    *jco,	/* Stores connection data */
+    jsno,	/* Total number of entries in ax, bx, cx */
+    maxcon; /* Max. no. connections */
+
+  double
+    *ax, *bx, *cx; /* Store constants A, B, C used in current expansion */
+
+} segj_t;
+
+/* common  /smat/ */
+typedef struct
+{
+  int nop; /* My addition */
+
+  complex double *ssx;
+
+} smat_t;
+
+/* common  /vsorc/ */
+typedef struct
+{
+  int
+    *isant,	/* Num of segs on which an aplied field source is located */
+    *ivqd,	/* Num of segs on which a current-slope discontinuity source is located */
+    *iqds,	/* Same as above (?) */
+    nsant,	/* Number of applied field voltage sources */
+    nvqd,	/* Number of applied current-slope discontinuity sources */
+    nqds;	/* Same as above (?) */
+
+  complex double
+    *vqd,	/* Voltage of applied-current slope discontinuity sources */
+    *vqds,	/* Same as above (?) */
+    *vsant;	/* Voltages of applied field voltage sources */
+
+} vsorc_t;
+
+/* common  /yparm/ */
+/* CP card support has been dropped */
+
+/* common  /zload/ */
+typedef struct
+{
+  int
+    *ldsegn,	/* My addition, loaded segment numbers */
+    *ldtype,	/* My addition, loading type */
+    nldseg,		/* My addition, number of loaded segs  */
+    nload;		/* Number of loading networks */
+
+  complex double *zarray;	/* = Zi/(Di/lambda) */
+
+} zload_t;
+
+/* Parameters for projecting points on screen */
+typedef struct
+{
+  double
+    Wi,			/* Angle (inclination) of Z axis to Screen, +ve to viewer */
+    Wr,			/* Rotation of X-Y plane around Z axis, +ve clockwise */
+    sin_wi,		/* sin(Wi) */
+    cos_wi,		/* cos(Wi) */
+    sin_wr,		/* sin(Wr) */
+    cos_wr,		/* cos(Wr) */
+    r_max,		/* Max distance from xyz origin of a point in antenna */
+    xy_scale1,	/* Scale factor to fit structure into drawable window */
+    xy_scale,	/* Scale factor incorporating zoom factor */
+	xy_zoom,	/* Structure Zoom factor */
+    x_center,	/* X co-ordinate of xyz axes origin in screen's drawable */
+    y_center;	/* Y co-ordinate of xyz axes origin in screen's drawable */
+
+  int
+    pixmap_width,  /*  Width of drawable's backing pixmap */
+    pixmap_height; /* Height of drawable's backing pixmap */
+
+  char type; /* Type of projection parameters stuct */
+
+  gboolean reset;  /* Reset flag needed in some functions */
+
+} projection_parameters_t;
+
+/* My addition, struct to hold data needed
+ * to execute various calculations requested
+ * by commands like EX, RP, NH, NE etc.
+ */
+typedef struct
+{
+  int
+    *ldtyp,
+    *ldtag,
+    *ldtagf,
+    *ldtagt,
+    nthi,
+    nphi,
+    iexk,
+    iped,
+    ifrq,		/* Frequency specification flag */
+    nfrq,		/* Number of frequency steps */
+    fstep,		/* Frequency step */
+	lastf,		/* Last frequency step */
+    ngraph,		/* Number of graphs to be plotted */
+    pol_type,	/* User-specified Polarization type for plots and patterns */
+	num_jobs;	/* Number of child processes (jobs) to fork */
+
+  double
+    *zlr,
+    *zli,
+    *zlc;
+
+  double
+    xpr1,
+    xpr2,
+    xpr3,
+    xpr4,
+    xpr5,
+    xpr6,
+    rkh,
+    zpnorm,
+    thetis,
+    phiss,
+    fmhz,		/* Frequency in MHz, moved from save_t */
+    delfrq;		/* Frequency step for freq loop */
+
+  double
+	mxfrq,	/* Max frequency in freq loop */
+	zo;		/* Characteristic impedance used in VSWR calcs */
+
+} calc_data_t;
+
+/* Impedance data */
+typedef struct
+{
+  double
+    *zreal,		/* Real part of input impedance */
+    *zimag,		/* Imag part of input impedance */
+    *zmagn,		/* Magnitude of input impedance */
+    *zphase;	/* Phase ang of input impedance */
+
+} impedance_data_t;
+
+/* Radiation pattern data */
+typedef struct
+{
+  double
+    *gtot,			/* Radiation pattern (total gain) buffer */
+    *max_gain,		/* Maximum gain for each polarization type */
+    *min_gain,		/* Minimum gain for each polarization type */
+    *max_gain_tht,	/* Theta angle where maximum gain occurs */
+    *max_gain_phi,	/*   Phi angle where minimum gain occurs */
+    *tilt,			/* Tilt angle of polarization ellipse  */
+    *axrt;			/* Elliptic axial ratio of pol ellipse */
+
+  int
+    *max_gain_idx,	/* Where in rad_pattern.gtot the max value occurs */
+    *min_gain_idx,	/* Where in rad_pattern.gtot the min value occurs */
+    *sens;			/* Polarization sense (vertical, horizontal, elliptic etc) */
+
+} rad_pattern_t;
+
+/* Near E/H field data */
+typedef struct
+{
+  double
+	/* Magnitude and phase of E/H fields */
+	*ex, *ey, *ez, *hx, *hy, *hz,
+	*fex, *fey, *fez, *fhx, *fhy, *fhz,
+  /* Real part of E and H field values */
+    *erx, *ery, *erz, *er,
+    *hrx, *hry, *hrz, *hr;
+
+  /* Max of E/H field values */
+  double
+    max_er, max_hr;
+
+  /* Co-ordinates of field points and
+   * max distance from xyz origin */
+  double
+    *px, *py, *pz, r_max;
+
+  /* Animation step in rads */
+  double anim_step;
+
+  char newer; /* New data available */
+  char valid; /* Available data valid */
+
+} near_field_t;
+
+/* Forked processes data */
+typedef struct
+{
+  pid_t child_pid;			/* Child pid */
+  int pnt2child_pipe[2];	/* Parent-to-child write pipe */
+  int child2pnt_pipe[2];	/* Child-to-parent write pipe */
+  char busy;				/* Child process busy flag */
+  int fstep;				/* Frequency step assigned to child */
+
+  /* File descriptor sets for select() */
+  fd_set read_fds;
+  fd_set write_fds;
+
+} forked_proc_data_t;
+
+/* Function prototypes produced by cproto */
+/* calculations.c */
+void qdsrc(int is, _Complex double v, _Complex double *e);
+void cabc(_Complex double *curx);
+double db10(double x);
+double db20(double x);
+void intrp(double x, double y, _Complex double *f1, _Complex double *f2, _Complex double *f3, _Complex double *f4);
+void intx(double el1, double el2, double b, int ij, double *sgr, double *sgi);
+int min(int a, int b);
+void test(double f1r, double f2r, double *tr, double f1i, double f2i, double *ti, double dmin);
+void sbf(int i, int is, double *aa, double *bb, double *cc);
+void tbf(int i, int icap);
+void trio(int j);
+double cang(_Complex double z);
+void zint(double sigl, double rolam, _Complex double *zint);
+/* callback_func.c */
+void Save_Pixmap(GdkPixmap *pixmap, int pixmap_width, int pixmap_height, char *filename);
+void New_Viewer_Angle(double wr, double wi, GtkSpinButton *wr_spb, GtkSpinButton *wi_spb, projection_parameters_t *params);
+void Create_Pixmap(GdkPixmap **pixmap, int *pixmap_width, int *pixmap_height, GtkWidget *widget, GdkEventConfigure *event, projection_parameters_t *params);
+void Motion_Event(GdkEventMotion *event, projection_parameters_t *params, GtkSpinButton *wr_spb, GtkSpinButton *wi_spb);
+void Plot_Select(GtkToggleButton *togglebutton, unsigned long long int flag);
+void Delete_Event(gchar *message);
+void Set_Pol_Menuitem(GtkMenuItem *menuitem);
+void Close_Windows(void);
+gboolean Open_Editor(GtkTreeView *view);
+void Main_Rdpattern_Activate(gboolean from_menu);
+gboolean Main_Freqplots_Activate(void);
+void Rdpattern_Gain_Togglebutton_Toggled(gboolean flag);
+void Rdpattern_EH_Togglebutton_Toggled(gboolean flag);
+void Main_Currents_Togglebutton_Toggled(gboolean flag);
+void Main_Charges_Togglebutton_Toggled(gboolean flag);
+void Open_Nec2_Editor(int action);
+gboolean Nec2_Apply_Checkbutton(void);
+void Gtk_Quit(void);
+void Pass_EH_Flags(void);
+void Alloc_Crnt_Buffs(void);
+void Free_Crnt_Buffs(void);
+/* callbacks.c */
+void on_main_window_destroy(GtkObject *object, gpointer user_data);
+gboolean on_main_window_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data);
+void on_new_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_open_input_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_main_save_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_main_save_as_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_struct_save_as_gnuplot_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_quit_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_main_rdpattern_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_main_freqplots_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_total_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_horizontal_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_vertical_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_right_hand_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_left_hand_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_common_projection_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_common_freq_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_main_x_axis_clicked(GtkButton *button, gpointer user_data);
+void on_main_y_axis_clicked(GtkButton *button, gpointer user_data);
+void on_main_z_axis_clicked(GtkButton *button, gpointer user_data);
+void on_main_default_view_clicked(GtkButton *button, gpointer user_data);
+void on_main_rotate_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_main_incline_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_main_currents_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_main_charges_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+gboolean on_main_colorcode_drawingarea_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data);
+void on_main_freq_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_main_freq_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_main_new_freq_clicked(GtkButton *button, gpointer user_data);
+gboolean on_structure_drawingarea_configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer user_data);
+gboolean on_structure_drawingarea_motion_notify_event(GtkWidget *widget, GdkEventMotion *event, gpointer user_data);
+gboolean on_structure_drawingarea_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data);
+void on_filechooserdialog_response(GtkDialog *dialog, gint response_id, gpointer user_data);
+void on_fileselection_response(GtkDialog *dialog, gint response_id, gpointer user_data);
+gboolean on_freqplots_window_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data);
+void on_freqplots_window_destroy(GtkObject *object, gpointer user_data);
+void on_freqplots_save_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_freqplots_save_as_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_freqplots_save_as_gnuplot_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_freqplots_gmax_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_freqplots_gdir_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_freqplots_gviewer_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_freqplots_vswr_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_freqplots_zo_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_freqplots_zrlzim_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_freqplots_zmgzph_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+gboolean on_freqplots_drawingarea_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data);
+gboolean on_freqplots_drawingarea_configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer user_data);
+gboolean on_freqplots_drawingarea_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
+void on_rdpattern_window_destroy(GtkObject *object, gpointer user_data);
+gboolean on_rdpattern_window_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data);
+void on_rdpattern_save_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_save_as_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_save_as_gnuplot_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_linear_power_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_linear_voltage_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_arrl_style_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_logarithmic_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_e_field_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_h_field_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_poynting_vector_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_overlay_structure_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_x_axis_clicked(GtkButton *button, gpointer user_data);
+void on_rdpattern_y_axis_clicked(GtkButton *button, gpointer user_data);
+void on_rdpattern_z_axis_clicked(GtkButton *button, gpointer user_data);
+void on_rdpattern_default_view_clicked(GtkButton *button, gpointer user_data);
+void on_rdpattern_rotate_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_rdpattern_incline_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_rdpattern_gain_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_rdpattern_eh_togglebutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+gboolean on_rdpattern_colorcode_drawingarea_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data);
+void on_rdpattern_freq_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_rdpattern_new_freq_clicked(GtkButton *button, gpointer user_data);
+gboolean on_rdpattern_drawingarea_configure_event(GtkWidget *widget, GdkEventConfigure *event, gpointer user_data);
+gboolean on_rdpattern_drawingarea_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data);
+gboolean on_rdpattern_drawingarea_motion_notify_event(GtkWidget *widget, GdkEventMotion *event, gpointer user_data);
+void on_quit_cancelbutton_clicked(GtkButton *button, gpointer user_data);
+void on_quit_okbutton_clicked(GtkButton *button, gpointer user_data);
+void main_view_menuitem_activate(GtkMenuItem *menuitem, gpointer user_data);
+void main_pol_menu_activate(GtkMenuItem *menuitem, gpointer user_data);
+void freqplots_pol_menu_activate(GtkMenuItem *menuitem, gpointer user_data);
+void rdpattern_view_menuitem_activate(GtkMenuItem *menuitem, gpointer user_data);
+void rdpattern_pol_menu_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_filechoser_cancel_clicked(GtkButton *button, gpointer user_data);
+void on_fileselection_cancel_clicked(GtkButton *button, gpointer user_data);
+void on_near_peak_value_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_near_snapshot_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_rdpattern_animate_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_animation_applybutton_clicked(GtkButton *button, gpointer user_data);
+void on_animation_cancelbutton_clicked(GtkButton *button, gpointer user_data);
+void on_animation_okbutton_clicked(GtkButton *button, gpointer user_data);
+void on_animate_dialog_destroy(GtkObject *object, gpointer user_data);
+void on_quit_dialog_destroy(GtkObject *object, gpointer user_data);
+gboolean on_error_dialog_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data);
+void on_nec2_edit_activate(GtkMenuItem *menuitem, gpointer user_data);
+gboolean on_nec2_editor_delete_event(GtkWidget *widget, GdkEvent *event, gpointer user_data);
+void on_nec2_editor_destroy(GtkObject *object, gpointer user_data);
+void on_nec2_save_clicked(GtkButton *button, gpointer user_data);
+void on_nec2_save_as_clicked(GtkButton *button, gpointer user_data);
+void on_nec2_row_add_clicked(GtkButton *button, gpointer user_data);
+void on_nec2_row_remv_clicked(GtkButton *button, gpointer user_data);
+void on_nec2_treeview_clear_clicked(GtkButton *button, gpointer user_data);
+gboolean on_nec2_cmnt_treeview_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
+gboolean on_nec2_geom_treeview_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
+gboolean on_nec2_cmnd_treeview_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
+void on_nec2_revert_clicked(GtkButton *button, gpointer user_data);
+void on_error_stopbutton_clicked(GtkButton *button, gpointer user_data);
+void on_error_okbutton_clicked(GtkButton *button, gpointer user_data);
+void on_error_quitbutton_clicked(GtkButton *button, gpointer user_data);
+void on_wire_editor_destroy(GtkObject *object, gpointer user_data);
+void on_wire_pcl_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_wire_data_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_wire_tagnum_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_wire_len_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_wire_taper_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_wire_rlen_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_wire_rdia_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_wire_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_wire_res_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_wire_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_wire_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_wire_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_gw_clicked(GtkButton *button, gpointer user_data);
+void on_ga_clicked(GtkButton *button, gpointer user_data);
+void on_gh_clicked(GtkButton *button, gpointer user_data);
+void on_sp_clicked(GtkButton *button, gpointer user_data);
+void on_gr_clicked(GtkButton *button, gpointer user_data);
+void on_gm_clicked(GtkButton *button, gpointer user_data);
+void on_gx_clicked(GtkButton *button, gpointer user_data);
+void on_gs_clicked(GtkButton *button, gpointer user_data);
+void on_ex_clicked(GtkButton *button, gpointer user_data);
+void on_fr_clicked(GtkButton *button, gpointer user_data);
+void on_gn_clicked(GtkButton *button, gpointer user_data);
+void on_gd_clicked(GtkButton *button, gpointer user_data);
+void on_rp_clicked(GtkButton *button, gpointer user_data);
+void on_ld_clicked(GtkButton *button, gpointer user_data);
+void on_nt_clicked(GtkButton *button, gpointer user_data);
+void on_tl_clicked(GtkButton *button, gpointer user_data);
+void on_ne_clicked(GtkButton *button, gpointer user_data);
+void on_ek_clicked(GtkButton *button, gpointer user_data);
+void on_kh_clicked(GtkButton *button, gpointer user_data);
+void on_xq_clicked(GtkButton *button, gpointer user_data);
+void on_patch_data_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_patch_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_patch_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_patch_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_patch_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_patch_editor_destroy(GtkObject *object, gpointer user_data);
+void on_patch_arbitrary_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_patch_rectangular_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_patch_triangular_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_patch_quadrilateral_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_patch_surface_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_arc_data_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_arc_tagnum_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_arc_res_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_arc_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_arc_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_arc_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_arc_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_arc_editor_destroy(GtkObject *object, gpointer user_data);
+void on_arc_pcl_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_helix_tagnum_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_helix_pcl_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_helix_nturns_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_helix_res_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_helix_lh_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_helix_data_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_helix_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_helix_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_helix_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_helix_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_helix_editor_destroy(GtkObject *object, gpointer user_data);
+void on_helix_linkall_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_helix_linkzo_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_helix_linkzhl_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_reflect_taginc_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_reflect_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_reflect_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_reflect_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_reflect_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_reflect_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_reflect_editor_destroy(GtkObject *object, gpointer user_data);
+void on_scale_editor_destroy(GtkObject *object, gpointer user_data);
+void on_scale_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_scale_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_scale_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_scale_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_scale_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_cylinder_taginc_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_cylinder_total_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_cylinder_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_cylinder_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_cylinder_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_cylinder_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_cylinder_editor_destroy(GtkObject *object, gpointer user_data);
+void on_transform_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_transform_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_transform_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_transform_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_transform_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_transform_editor_destroy(GtkObject *object, gpointer user_data);
+void on_gend_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_gend_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_gend_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_gend_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_gend_editor_destroy(GtkObject *object, gpointer user_data);
+void on_kernel_command_destroy(GtkObject *object, gpointer user_data);
+void on_kernel_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_kernel_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_kernel_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_kernel_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_kernel_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_execute_command_destroy(GtkObject *object, gpointer user_data);
+void on_execute_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_execute_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_execute_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_execute_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_execute_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_intrange_command_destroy(GtkObject *object, gpointer user_data);
+void on_intrange_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_intrange_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_intrange_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_intrange_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_intrange_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_ground_command_destroy(GtkObject *object, gpointer user_data);
+void on_ground_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_ground_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_ground_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_ground_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_ground_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_ground_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_ground_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_nearfield_command_destroy(GtkObject *object, gpointer user_data);
+void on_nearfield_nh_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_nearfield_ne_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_nearfield_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_nearfield_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_nearfield_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_nearfield_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_nearfield_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_nearfield_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_radiation_command_destroy(GtkObject *object, gpointer user_data);
+void on_radiation_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_radiation_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_radiation_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_radiation_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_radiation_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_radiation_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_excitation_command_destroy(GtkObject *object, gpointer user_data);
+void on_excitation_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_excitation_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_excitation_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_excitation_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_excitation_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_excitation_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_excitation_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_frequency_command_destroy(GtkObject *object, gpointer user_data);
+void on_frequency_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_frequency_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_frequency_step_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_frequency_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_frequency_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_frequency_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_frequency_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_loading_command_destroy(GtkObject *object, gpointer user_data);
+void on_loading_radiobutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_loading_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_loading_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_loading_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_loading_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_loading_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_network_command_destroy(GtkObject *object, gpointer user_data);
+void on_network_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_network_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_network_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_network_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_network_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_txline_command_destroy(GtkObject *object, gpointer user_data);
+void on_txline_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_txline_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_txline_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_txline_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_txline_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_txline_checkbutton_toggled(GtkToggleButton *togglebutton, gpointer user_data);
+void on_ground2_command_destroy(GtkObject *object, gpointer user_data);
+void on_ground2_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_ground2_new_button_clicked(GtkButton *button, gpointer user_data);
+void on_ground2_cancel_button_clicked(GtkButton *button, gpointer user_data);
+void on_ground2_apply_button_clicked(GtkButton *button, gpointer user_data);
+void on_ground2_ok_button_clicked(GtkButton *button, gpointer user_data);
+void on_loop_start_clicked(GtkButton *button, gpointer user_data);
+void on_loop_pause_clicked(GtkButton *button, gpointer user_data);
+void on_loop_reset_clicked(GtkButton *button, gpointer user_data);
+void on_about_activate(GtkMenuItem *menuitem, gpointer user_data);
+void on_aboutdialog_close(GtkDialog *dialog, gpointer user_data);
+void on_aboutdialog_response(GtkDialog *dialog, gint response_id, gpointer user_data);
+void on_net_gain_activate(GtkMenuItem *menuitem, gpointer user_data);
+gboolean on_structure_drawingarea_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
+void on_structure_zoom_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_structure_plus_button_clicked(GtkButton *button, gpointer user_data);
+void on_structure_minus_button_clicked(GtkButton *button, gpointer user_data);
+void on_structure_one_button_clicked(GtkButton *button, gpointer user_data);
+gboolean on_rdpattern_drawingarea_button_press_event(GtkWidget *widget, GdkEventButton *event, gpointer user_data);
+void on_rdpattern_zoom_spinbutton_value_changed(GtkSpinButton *spinbutton, gpointer user_data);
+void on_rdpattern_plus_button_clicked(GtkButton *button, gpointer user_data);
+void on_rdpattern_minus_button_clicked(GtkButton *button, gpointer user_data);
+void on_rdpattern_one_button_clicked(GtkButton *button, gpointer user_data);
+gboolean on_structure_drawingarea_scroll_event(GtkWidget *widget, GdkEvent *event, gpointer user_data);
+gboolean on_rdpattern_drawingarea_scroll_event(GtkWidget *widget, GdkEvent *event, gpointer user_data);
+/* cmnd_edit.c */
+void Excitation_Command(int action);
+void Frequency_Command(int action);
+void Ground_Command(int action);
+void Ground2_Command(int action);
+void Radiation_Command(int action);
+void Loading_Command(int action);
+void Network_Command(int action);
+void Txline_Command(int action);
+void Nearfield_Command(int action);
+void Kernel_Command(int action);
+void Intrange_Command(int action);
+void Execute_Command(int action);
+void Insert_EN_Card(GtkListStore *store, GtkTreeIter *iter);
+void Get_Command_Data(GtkListStore *store, GtkTreeIter *iter, int *iv, double *fv);
+void Set_Command_Data(GtkListStore *store, GtkTreeIter *iter, int *iv, double *fv);
+void Insert_Blank_Command_Row(GtkTreeView *view, GtkListStore *store, GtkTreeIter *iter, const gchar *name);
+void Set_Labels(GtkWidget *widget, gchar **labels, gchar **text, gint num);
+/* draw.c */
+void Set_Gdk_Segment(GdkSegment *segm, projection_parameters_t *params, double x1, double y1, double z1, double x2, double y2, double z2);
+void Project_on_Screen(projection_parameters_t *params, double x, double y, double z, double *xs, double *ys);
+void Project_XYZ_Axes(GdkPixmap *pixmap, projection_parameters_t *params, GdkSegment *segment);
+void Draw_XYZ_Axes(GdkPixmap *pixmap, projection_parameters_t params);
+void New_Projection_Parameters(int width, int height, projection_parameters_t *params);
+void Value_to_Color(double *red, double *grn, double *blu, double val, double max);
+void Cairo_Draw_Polygon(cairo_t *cr, GdkPoint *points, int npoints);
+void Cairo_Draw_Segments(cairo_t *cr, GdkSegment *segm, int nseg);
+void Cairo_Draw_Line(cairo_t *cr, int x1, int y1, int x2, int y2);
+void Cairo_Draw_Lines(cairo_t *cr, GdkPoint *points, int npoints);
+/* draw_radiation.c */
+void Draw_Radiation(GtkWidget *drawingarea);
+void Draw_Radiation_Pattern(void);
+void Draw_Near_Field(void);
+gboolean Animate_Near_Field(gpointer udata);
+double Scale_Gain(double gain, int fstep, int idx);
+double Polarization_Factor(int pol_type, int fstep, int idx);
+void Set_Polarization(int pol);
+void Set_Gain_Style(int gs);
+void New_Radiation_Projection_Angle(void);
+gboolean Redo_Radiation_Pattern(gpointer udata);
+double Viewer_Gain(projection_parameters_t proj_parameters, int fstep);
+void Rdpattern_Window_Killed(void);
+void Set_Window_Labels(void);
+void Alloc_Rdpattern_Buffers(int nfrq, int nth, int nph);
+void Alloc_Nearfield_Buffers(int n1, int n2, int n3);
+void Free_Draw_Buffers(void);
+/* draw_structure.c */
+void Draw_Structure(GtkWidget *drawingarea);
+void New_Wire_Data(void);
+void New_Patch_Data(void);
+void Process_Wire_Segments(void);
+void Process_Surface_Patches(void);
+void Draw_Wire_Segments(GdkSegment *segm, gint nseg);
+void Draw_Surface_Patches(GdkSegment *segm, gint npatch);
+gboolean Redo_Currents(gpointer udata);
+void New_Structure_Projection_Angle(void);
+void Init_Struct_Drawing(void);
+void Show_Viewer_Gain(GtkWidget *window, const char *widget, projection_parameters_t proj_params);
+/* fields.c */
+void efld(double xi, double yi, double zi, double ai, int ij);
+void eksc(double s, double z, double rh, double xk, int ij, _Complex double *ezs, _Complex double *ers, _Complex double *ezc, _Complex double *erc, _Complex double *ezk, _Complex double *erk);
+void ekscx(double bx, double s, double z, double rhx, double xk, int ij, int inx1, int inx2, _Complex double *ezs, _Complex double *ers, _Complex double *ezc, _Complex double *erc, _Complex double *ezk, _Complex double *erk);
+void gf(double zk, double *co, double *si);
+void gh(double zk, double *hr, double *hi);
+void gwave(_Complex double *erv, _Complex double *ezv, _Complex double *erh, _Complex double *ezh, _Complex double *eph);
+void gx(double zz, double rh, double xk, _Complex double *gz, _Complex double *gzp);
+void gxx(double zz, double rh, double a, double a2, double xk, int ira, _Complex double *g1, _Complex double *g1p, _Complex double *g2, _Complex double *g2p, _Complex double *g3, _Complex double *gzp);
+void hfk(double el1, double el2, double rhk, double zpkx, double *sgr, double *sgi);
+void hintg(double xi, double yi, double zi);
+void hsfld(double xi, double yi, double zi, double ai);
+void hsflx(double s, double rh, double zpx, _Complex double *hpk, _Complex double *hps, _Complex double *hpc);
+void nefld(double xob, double yob, double zob, _Complex double *ex, _Complex double *ey, _Complex double *ez);
+void nfpat(int nfeh);
+void nhfld(double xob, double yob, double zob, _Complex double *hx, _Complex double *hy, _Complex double *hz);
+void pcint(double xi, double yi, double zi, double cabi, double sabi, double salpi, _Complex double *e);
+void unere(double xob, double yob, double zob);
+void Near_Field_Total(_Complex double ex, _Complex double ey, _Complex double ez, int nfeh, int idx);
+/* fork.c */
+void Child_Process(int num_child);
+void Child_Input_File(void);
+int Fork_Command(const char *cdstr);
+ssize_t Read_Pipe(int idx, char *str, ssize_t len, gboolean err);
+ssize_t Write_Pipe(int idx, char *str, ssize_t len, gboolean err);
+ssize_t PRead_Pipe(int idx, char *str, ssize_t len, gboolean err);
+void Pass_Freq_Data(void);
+void Get_Freq_Data(int idx, int fstep);
+void Mem_Copy(char *buff, char *var, size_t cnt, gboolean wrt);
+/* geom_edit.c */
+void Wire_Editor(int action);
+void Patch_Editor(int action);
+void Arc_Editor(int action);
+void Helix_Editor(int action);
+void Reflect_Editor(int action);
+void Scale_Editor(int action);
+void Cylinder_Editor(int action);
+void Transform_Editor(int action);
+void Gend_Editor(int action);
+void Insert_GE_Card(GtkListStore *store, GtkTreeIter *iter);
+void Get_Geometry_Data(GtkListStore *store, GtkTreeIter *iter, int *iv, double *fv);
+void Get_Geometry_Int_Data(GtkListStore *store, GtkTreeIter *iter, int *iv);
+void Set_Geometry_Data(GtkListStore *store, GtkTreeIter *iter, int *iv, double *fv);
+void Set_Geometry_Int_Data(GtkListStore *store, GtkTreeIter *iter, int *iv);
+gboolean Check_Card_Name(GtkListStore *store, GtkTreeIter *iter, gboolean next, const gchar *name);
+gboolean Give_Up(int *busy, GtkWidget *widget);
+void Insert_Blank_Geometry_Row(GtkTreeView *view, GtkListStore *store, GtkTreeIter *iter, const gchar *name);
+void Remove_Row(GtkListStore *store, GtkTreeIter *iter);
+gboolean Get_Selected_Row(GtkTreeView *view, GtkListStore *store, GtkTreeIter *iter, gchar *name);
+void Set_Wire_Conductivity(int tag, double s, GtkListStore *store);
+gboolean Get_Wire_Conductivity(int tag, double *s, GtkListStore *store);
+/* geometry.c */
+gboolean arc(int itg, int ns, double rada, double ang1, double ang2, double rad);
+gboolean conect(int ignd);
+void helix(double s, double hl, double a1, double b1, double a2, double b2, double rad, int ns, int itg);
+int isegno(int itagi, int mx);
+gboolean move(double rox, double roy, double roz, double xs, double ys, double zs, int its, int nrpt, int itgi);
+gboolean patch(int nx, int ny, double ax1, double ay1, double az1, double ax2, double ay2, double az2, double ax3, double ay3, double az3, double ax4, double ay4, double az4);
+void subph(int nx, int ny);
+gboolean reflc(int ix, int iy, int iz, int iti, int nop);
+void wire(double xw1, double yw1, double zw1, double xw2, double yw2, double zw2, double rad, double rdel, double rrad, int ns, int itg);
+/* gnuplot.c */
+void Save_FreqPlots_Gnuplot_Data(char *filename);
+void Save_RadPattern_Gnuplot_Data(char *filename);
+void Save_Struct_Gnuplot_Data(char *filename);
+/* ground.c */
+void rom2(double a, double b, _Complex double *sum, double dmin);
+void sflds(double t, _Complex double *e);
+/* input.c */
+gboolean Read_Comments(void);
+gboolean Read_Geometry(void);
+gboolean Read_Commands(void);
+gboolean readmn(char *mn, int *i1, int *i2, int *i3, int *i4, double *f1, double *f2, double *f3, double *f4, double *f5, double *f6);
+gboolean readgm(char *gm, int *i1, int *i2, double *x1, double *y1, double *z1, double *x2, double *y2, double *z2, double *rad);
+gboolean datagn(void);
+gboolean Tag_Seg_Error(int tag, int segs);
+/* interface.c */
+GtkWidget *create_main_window(void);
+GtkWidget *create_filechooserdialog(void);
+GtkWidget *create_fileselection(void);
+GtkWidget *create_freqplots_window(void);
+GtkWidget *create_rdpattern_window(void);
+GtkWidget *create_quit_dialog(void);
+GtkWidget *create_error_dialog(void);
+GtkWidget *create_animate_dialog(void);
+GtkWidget *create_nec2_editor(void);
+GtkWidget *create_wire_editor(void);
+GtkWidget *create_patch_editor(void);
+GtkWidget *create_arc_editor(void);
+GtkWidget *create_transform_editor(void);
+GtkWidget *create_helix_editor(void);
+GtkWidget *create_reflect_editor(void);
+GtkWidget *create_scale_editor(void);
+GtkWidget *create_cylinder_editor(void);
+GtkWidget *create_kernel_command(void);
+GtkWidget *create_execute_command(void);
+GtkWidget *create_intrange_command(void);
+GtkWidget *create_ground_command(void);
+GtkWidget *create_nearfield_command(void);
+GtkWidget *create_radiation_command(void);
+GtkWidget *create_excitation_command(void);
+GtkWidget *create_frequency_command(void);
+GtkWidget *create_loading_command(void);
+GtkWidget *create_network_command(void);
+GtkWidget *create_txline_command(void);
+GtkWidget *create_ground2_command(void);
+GtkWidget *create_gend_editor(void);
+GtkWidget *create_aboutdialog(void);
+/* main.c */
+int main(int argc, char *argv[]);
+gboolean Open_Input_File(gpointer udata);
+gboolean isChild(void);
+/* matrix.c */
+void cmset(int nrow, _Complex double *cmx, double rkhx, int iexkx);
+void cmss(int j1, int j2, int im1, int im2, _Complex double *cmx, int nrow, int itrp);
+void cmsw(int j1, int j2, int i1, int i2, _Complex double *cmx, _Complex double *cw, int ncw, int nrow, int itrp);
+void cmws(int j, int i1, int i2, _Complex double *cmx, int nr, _Complex double *cw, int itrp);
+void cmww(int j, int i1, int i2, _Complex double *cmx, int nr, _Complex double *cw, int nw, int itrp);
+void etmns(double p1, double p2, double p3, double p4, double p5, double p6, int ipr, _Complex double *e);
+void factr(int n, _Complex double *a, int *ip, int ndim);
+void factrs(int np, int nrow, _Complex double *a, int *ip);
+void fblock(int nrow, int ncol, int imax, int ipsym);
+void solve(int n, _Complex double *a, int *ip, _Complex double *b, int ndim);
+void solves(_Complex double *a, int *ip, _Complex double *b, int neq, int nrh, int np, int n, int mp, int m);
+/* nec2_model.c */
+void Nec2_Input_File_Treeview(int action);
+void Create_List_Stores(void);
+void Create_Default_File(void);
+void List_Comments(void);
+void List_Geometry(void);
+void List_Commands(void);
+void Insert_Columns(GtkWidget *window, gchar *treeview, GtkListStore *store, int ncols, char *colname[]);
+void cell_edited_callback(GtkCellRendererText *cell, gchar *path, gchar *new_text, gpointer user_data);
+void Save_Nec2_Input_File(GtkWidget *treeview_window, char *nec2_file);
+void Save_Treeview_Data(GtkTreeView *tree_view, int ncols, FILE *nec2_fp);
+gboolean gtk_tree_model_iter_previous(GtkTreeModel *tree_model, GtkTreeIter *iter);
+/* network.c */
+void netwk(_Complex double *cmx, int *ip, _Complex double *einc);
+void load(int *ldtyp, int *ldtag, int *ldtagf, int *ldtagt, double *zlr, double *zli, double *zlc);
+/* plot_freqdata.c */
+void Plot_Frequency_Data(void);
+void Display_Frequency_Data(void);
+void Draw_Plotting_Frame(gchar **title, GdkRectangle *rect, int nhor, int nvert);
+void Plot_Vertical_Scale(double red, double grn, double blu, int x, int y, int height, double max, double min, int nval);
+void Plot_Horizontal_Scale(double red, double grn, double blu, int x, int y, int width, double max, double min, int nval);
+void Draw_Graph(double red, double grn, double blu, GdkRectangle *rect, double *a, double *b, double amax, double amin, double bmax, double bmin, int nval, int side);
+void Set_Rectangle(GdkRectangle *rect, int x, int y, int w, int h);
+void Fit_to_Scale(double *max, double *min, int *nval);
+void Fit_to_Scale2(double *max1, double *min1, double *max2, double *min2, int *nval);
+void New_Max_Min(double *max, double *min, double sval, int *nval);
+void Plot_Graph2(double *fa, double *fb, double *fc, int nc, char *titles[], int nplt, int posn);
+void Plot_Graph(double *fa, double *fb, int nb, char *titles[], int nplt, int posn);
+void Plots_Window_Killed(void);
+void Set_Frequency_On_Click(GdkEventButton *event);
+/* radiation.c */
+void ffld(double thet, double phi, _Complex double *eth, _Complex double *eph);
+void fflds(double rox, double roy, double roz, _Complex double *scur, _Complex double *ex, _Complex double *ey, _Complex double *ez);
+void gfld(double rho, double phi, double rz, _Complex double *eth, _Complex double *epi, _Complex double *erd, _Complex double ux, int ksymp);
+void rdpat(void);
+/* shared.c */
+/* somnec.c */
+void somnec(double epr, double sig, double fmhz);
+void bessel(_Complex double z, _Complex double *j0, _Complex double *j0p);
+void evlua(_Complex double *erv, _Complex double *ezv, _Complex double *erh, _Complex double *eph);
+void fbar(_Complex double p, _Complex double *fbar);
+void gshank(_Complex double start, _Complex double dela, _Complex double *sum, int nans, _Complex double *seed, int ibk, _Complex double bk, _Complex double delb);
+void hankel(_Complex double z, _Complex double *h0, _Complex double *h0p);
+void lambda(double t, _Complex double *xlam, _Complex double *dxlam);
+void rom1(int n, _Complex double *sum, int nx);
+void saoa(double t, _Complex double *ans);
+/* support.c */
+GtkWidget *lookup_widget(GtkWidget *widget, const gchar *widget_name);
+void add_pixmap_directory(const gchar *directory);
+GtkWidget *create_pixmap(GtkWidget *widget, const gchar *filename);
+GdkPixbuf *create_pixbuf(const gchar *filename);
+void glade_set_atk_action_description(AtkAction *action, const gchar *action_name, const gchar *description);
+/* utils.c */
+void usage(void);
+int stop(char *mesg, int err);
+gboolean Nec2_Save_Warn(const gchar *mesg);
+int Load_Line(char *buff, FILE *pfile);
+void mem_alloc(void **ptr, size_t req, gchar *str);
+void mem_realloc(void **ptr, size_t req, gchar *str);
+void free_ptr(void **ptr);
+gboolean Open_File(FILE **fp, char *fname, const char *mode);
+void Close_File(FILE **fp);
+void Display_Fstep(GtkEntry *entry, int fstep);
+int isFlagSet(unsigned long long int flag);
+int isFlagClear(unsigned long long int flag);
+void SetFlag(unsigned long long int flag);
+void ClearFlag(unsigned long long int flag);
+void ToggleFlag(unsigned long long int flag);
+void SaveFlag(unsigned long long int *flag, unsigned long long int mask);
+void Strlcpy(char *dest, const char *src, size_t n);
+void Strlcat(char *dest, const char *src, size_t n);
+double Strtod(const char *nptr, char **endptr);
+/* xnec2c.c */
+void Frequency_Scale_Geometry(void);
+void Structure_Impedance_Loading(void);
+void Ground_Parameters(void);
+void Set_Interaction_Matrix(void);
+void Set_Excitation(void);
+void Set_Network_Data(void);
+void Power_Loss(void);
+void Radiation_Pattern(void);
+void Near_Field_Pattern(void);
+void New_Frequency(void);
+gboolean Frequency_Loop(gpointer udata);
+gboolean Start_Frequency_Loop(void);
+void Stop_Frequency_Loop(void);
+void Incident_Field_Loop(void);
+
+#endif
diff --git a/src/draw.c b/src/draw.c
new file mode 100644
index 0000000..62f4c58
--- /dev/null
+++ b/src/draw.c
@@ -0,0 +1,322 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/*
+ *  draw.c
+ *
+ *  Drawing routines for xnec2c
+ */
+
+#include "draw.h"
+#include "shared.h"
+
+/*-----------------------------------------------------------------------*/
+
+/* Set_Gdk_Segment()
+ *
+ *  Calculates window x,y co-ordinates of a GdkSegment for
+ *  drawing on Screen. Input data is a line in the xyz frame
+ */
+void
+Set_Gdk_Segment(
+	GdkSegment *segm,
+	projection_parameters_t *params,
+	double x1, double y1, double z1,
+	double x2, double y2, double z2 )
+{
+  double x, y;
+
+  /* Project end 1 of seg in xyz frame to screen frame */
+  Project_on_Screen( params, x1, y1, z1, &x, &y );
+  segm->x1 = (gint)(params->x_center + x*params->xy_scale);
+  segm->y1 = params->pixmap_height -
+	(gint)(params->y_center + y*params->xy_scale);
+
+  /* Project end 2 of seg in xyz frame to screen frame */
+  Project_on_Screen( params, x2, y2, z2, &x, &y );
+  segm->x2 = (gint)(params->x_center + x*params->xy_scale);
+  segm->y2 = params->pixmap_height -
+	(gint)(params->y_center + y*params->xy_scale);
+
+} /* Set_Gdk_Segment() */
+
+/*-----------------------------------------------------------------------*/
+
+/*  Project_on_Screen()
+ *
+ *  Projects a point in the x,y,z co-ordinate
+ *  frame of NEC2 to the x,y frame of the Screen
+ */
+void
+Project_on_Screen(
+	projection_parameters_t *params,
+	double x, double y, double z,
+	double *xs, double *ys )
+{
+  *xs = y*params->cos_wr - x*params->sin_wr;
+  *ys = z*params->cos_wi - params->sin_wi *
+	(x*params->cos_wr + y*params->sin_wr);
+
+} /* Project_on_Screen() */
+
+/*-----------------------------------------------------------------------*/
+
+/*  Project_XYZ_Axes()
+ *
+ *  Sets GdkSegment data to project xyz axes on Screen
+ */
+void
+Project_XYZ_Axes(
+	GdkPixmap *pixmap,
+	projection_parameters_t *params,
+	GdkSegment *segment )
+{
+  double x, y;
+  PangoLayout *layout;
+  GdkSegment *segm = segment;
+
+  /* cairo context */
+  cairo_t *cr = gdk_cairo_create( pixmap );
+  cairo_set_source_rgb( cr, WHITE );
+
+  layout =
+	gtk_widget_create_pango_layout( structure_drawingarea, "x" );
+
+  segm->x1 = (gint)params->x_center;
+  segm->y1 = params->pixmap_height - (gint)(params->y_center);
+  Project_on_Screen( params, params->r_max, 0.0, 0.0, &x, &y );
+  segm->x2 = (gint)(params->x_center + x*params->xy_scale);
+  segm->y2 = params->pixmap_height -
+	(gint)(params->y_center + y*params->xy_scale);
+  cairo_move_to( cr, (double)segm->x2, (double)segm->y2 );
+  pango_cairo_show_layout( cr, layout );
+
+  segm++;
+  segm->x1 = (gint)params->x_center;
+  segm->y1 = params->pixmap_height - (gint)params->y_center;
+  Project_on_Screen( params, 0.0, params->r_max, 0.0, &x, &y );
+  segm->x2 = (gint)(params->x_center + x*params->xy_scale);
+  segm->y2 = params->pixmap_height -
+	(gint)(params->y_center + y*params->xy_scale);
+  pango_layout_set_text( layout, "y", -1 );
+  cairo_move_to( cr, (double)segm->x2, (double)segm->y2 );
+  pango_cairo_show_layout( cr, layout );
+
+  segm++;
+  segm->x1 = (gint)params->x_center;
+  segm->y1 = params->pixmap_height - (gint)params->y_center;
+  Project_on_Screen( params, 0.0, 0.0, params->r_max, &x, &y );
+  segm->x2 = (gint)(params->x_center + x*params->xy_scale);
+  segm->y2 = params->pixmap_height -
+	(gint)(params->y_center + y*params->xy_scale);
+  pango_layout_set_text( layout, " z", -1 );
+  cairo_move_to( cr, (double)segm->x2, (double)segm->y2 );
+  pango_cairo_show_layout( cr, layout );
+  g_object_unref( layout );
+
+  cairo_destroy( cr );
+} /* Project_XYZ_Axes() */
+
+/*-----------------------------------------------------------------------*/
+
+/*  Draw_XYZ_Axes()
+ *
+ *  Draws the xyz axes to Screen
+ */
+  void
+Draw_XYZ_Axes( GdkPixmap *pixmap, projection_parameters_t params )
+{
+  static GdkSegment seg[3];
+  cairo_t *cr = gdk_cairo_create( pixmap );
+  cairo_set_source_rgb( cr, WHITE );
+
+  /* Calcualte Screen co-ordinates of xyz axes */
+  Project_XYZ_Axes( pixmap, &params, seg );
+
+  /* Draw xyz axes */
+  Cairo_Draw_Segments( cr, seg, 3 );
+
+  cairo_destroy( cr );
+} /* Draw_XYZ_Axes() */
+
+/*-----------------------------------------------------------------------*/
+
+/*  New_Projection_Parameters()
+ *
+ *  Calculates values for some projection parameters when
+ *  a new backing pixmap is created after window resize or
+ *  new wire or patch data is entered.
+ */
+void
+New_Projection_Parameters(
+	int width, int height,
+	projection_parameters_t *params )
+{
+  double size2;
+
+  if( width < height )
+	size2 = (double)width/2.0;
+  else
+	size2 = (double)height/2.0;
+
+  /* This defines the center of the drawing areas. For the x co-ordinate
+   * half the size of the drawing area is right (for widths of odd number
+   * of pixels, so that there are even and equal number of pixels either
+   * side of center). But for the y co-ordinate we need to round up as
+   * y is from the top down and the y co-ordinate of center is calculated
+   * from height - y_center and this leads to a 1-pixel error */
+  params->x_center = size2;
+  params->y_center = size2 + 0.5;
+
+  if( params->r_max == 0.0 )
+	params->xy_scale1 = 1.0;
+  else
+	params->xy_scale1 = size2 / params->r_max;
+  params->xy_scale = params->xy_scale1 * params->xy_zoom;
+
+  params->pixmap_width  = width;
+  params->pixmap_height = height;
+
+} /* New_Projection_Parameters() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Value_to_Color()
+ *
+ * Produces an rgb color to represent an
+ * input value relative to a maximum value
+ */
+  void
+Value_to_Color( double *red, double *grn, double *blu, double val, double max )
+{
+  int ival;
+
+  /* Scale val so that normalized ival is 0-1279 */
+  ival = (int)(1279.0 * val / max);
+
+  /* Color hue according to imag value */
+  switch( ival/256 )
+  {
+	case 0: /* 0-255 : magenta to blue */
+	  *red = 255.0 - (double)ival;
+	  *grn = 0.0;
+	  *blu = 255.0;
+	  break;
+
+	case 1: /* 256-511 : blue to cyan */
+	  *red = 0.0;
+	  *grn = (double)ival - 256.0;
+	  *blu = 255.0;
+	  break;
+
+	case 2: /* 512-767 : cyan to green */
+	  *red = 0.0;
+	  *grn = 255.0;
+	  *blu = 767.0 - (double)ival;
+	  break;
+
+	case 3: /* 768-1023 : green to yellow */
+	  *red = (double)ival - 768.0;
+	  *grn = 255.0;
+	  *blu = 0.0;
+	  break;
+
+	case 4: /* 1024-1279 : yellow to red */
+	  *red = 255.0;
+	  *grn = 1279.0 - (double)ival;
+	  *blu = 0.0;
+
+  } /* switch( imag / 256 ) */
+
+  /* Scale values between 0.0-1.0 */
+  *red /= 255.0;
+  *grn /= 255.0;
+  *blu /= 255.0;
+
+} /* Value_to_Color() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Cairo_Draw_Polygon()
+ *
+ * Draws a polygon, given a number of points
+ */
+  void
+Cairo_Draw_Polygon( cairo_t* cr, GdkPoint *points, int npoints )
+{
+  int idx;
+
+  cairo_move_to( cr, (double)points[0].x, (double)points[0].y );
+  for( idx = 1; idx < npoints; idx++ )
+	cairo_line_to( cr, (double)points[idx].x, (double)points[idx].y );
+  cairo_close_path( cr );
+
+} /* Cairo_Draw_Polygon() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Cairo_Draw_Segments()
+ *
+ * Draws a number of line segments
+ */
+  void
+Cairo_Draw_Segments( cairo_t *cr, GdkSegment *segm, int nseg )
+{
+  int idx;
+
+  for( idx = 0; idx < nseg; idx++ )
+  {
+	cairo_move_to( cr, (double)segm[idx].x1, (double)segm[idx].y1 );
+	cairo_line_to( cr, (double)segm[idx].x2, (double)segm[idx].y2 );
+  }
+  cairo_stroke( cr );
+} /* Cairo_Draw_Segments() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Cairo_Draw_Line()
+ *
+ * Draws a line between to x,y co-ordinates
+ */
+  void
+Cairo_Draw_Line( cairo_t *cr, int x1, int y1, int x2, int y2 )
+{
+  cairo_move_to( cr, (double)x1, (double)y1 );
+  cairo_line_to( cr, (double)x2, (double)y2 );
+  cairo_stroke( cr );
+} /* Cairo_Draw_Line() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Cairo_Draw_Lines()
+ *
+ * Draws lines between points
+ */
+  void
+Cairo_Draw_Lines( cairo_t *cr, GdkPoint *points, int npoints )
+{
+  int idx;
+
+  cairo_move_to( cr, (double)points[0].x, (double)points[0].y );
+  for( idx = 1; idx < npoints; idx++ )
+	cairo_line_to( cr, (double)points[idx].x, (double)points[idx].y );
+  cairo_stroke( cr );
+} /* Cairo_Draw_Line() */
+
+/*-----------------------------------------------------------------------*/
+
diff --git a/src/draw.h b/src/draw.h
new file mode 100644
index 0000000..a51ce86
--- /dev/null
+++ b/src/draw.h
@@ -0,0 +1,26 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	DRAW_H
+#define	DRAW_H		1
+
+#include "common.h"
+#include "support.h"
+
+#endif
+
diff --git a/src/draw_radiation.c b/src/draw_radiation.c
new file mode 100644
index 0000000..c5251e6
--- /dev/null
+++ b/src/draw_radiation.c
@@ -0,0 +1,1158 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* draw_radiation.c
+ *
+ * Code for drawing radiation patterns
+ */
+
+#include "draw_radiation.h"
+#include "shared.h"
+
+/* For coloring rad pattern */
+static double *red = NULL, *grn = NULL, *blu = NULL;
+
+/* Buffered points in 3d (xyz) space
+ * forming the radiation pattern */
+static point_3d_t *point_3d = NULL;
+
+/*-----------------------------------------------------------------------*/
+
+/* Draw_Radiation()
+ *
+ * Draws the radiation pattern or near E/H fields
+ */
+  void
+Draw_Radiation( GtkWidget *drawingarea )
+{
+  /* Block motion events */
+  g_signal_handler_block(
+	  (gpointer)drawingarea, rdpattern_motion_handler );
+
+  /* Abort if xnec2c may be quit by user */
+  if( isFlagSet(MAIN_QUIT) || isFlagClear(ENABLE_EXCITN) )
+	return;
+
+  /* Cairo context */
+  cairo_t *cr = gdk_cairo_create( rdpattern_pixmap );
+
+  /* Clear pixmap */
+  cairo_set_source_rgb( cr, BLACK );
+  cairo_rectangle(
+	  cr, 0.0, 0.0,
+	  (double)rdpattern_proj_params.pixmap_width,
+	  (double)rdpattern_proj_params.pixmap_height);
+  cairo_fill( cr );
+
+  /* Draw rad pattern or E/H fields */
+  if( isFlagSet(DRAW_GAIN) )
+	Draw_Radiation_Pattern();
+  else if( isFlagSet(DRAW_EHFIELD) )
+	  Draw_Near_Field();
+
+  /* Render pixmap to screen */
+  gdk_window_set_back_pixmap( drawingarea->window,
+	  rdpattern_pixmap, FALSE );
+  gdk_window_clear( drawingarea->window );
+
+  /* Display frequency step */
+  Display_Fstep( rdpattern_fstep_entry, calc_data.fstep );
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+
+  cairo_destroy( cr );
+
+  /* Unblock motion events */
+  g_signal_handler_unblock(
+	  (gpointer)drawingarea, rdpattern_motion_handler );
+
+} /* Draw_Radiation() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Draw_Radiation_Pattern()
+ *
+ * Draws the radiation pattern as a frame of line
+ * segmants joining the points defined by spherical
+ * co-ordinates theta, phi and r = gain(theta, phi)
+ */
+  void
+Draw_Radiation_Pattern( void )
+{
+  /* Abort if rad pattern cannot be drawn */
+  if( isFlagClear(ENABLE_RDPAT) || (calc_data.fstep < 0) )
+	return;
+
+  /* Line segments to draw on Screen */
+  GdkSegment segm;
+
+  int
+	nth,     /* Theta step count */
+	nph,     /* Phi step count   */
+	col_idx, /* Index to rad pattern color buffers */
+	pts_idx; /* Index to rad pattern 3d-points buffer */
+
+
+  /* Frequency step and polarization type */
+  int fstep, pol;
+
+  /* Theta and phi angles defining a rad pattern point
+   * and distance of its projection from xyz origin */
+  double theta, phi, r, r_min, r_range;
+
+  /* theta and phi step in rads */
+  double dth = (double)fpat.dth * (double)TA;
+  double dph = (double)fpat.dph * (double)TA;
+
+  /* Used to set text in labels */
+  gchar txt[7];
+
+  /* Cairo context */
+  cairo_t *cr = gdk_cairo_create( rdpattern_pixmap );
+
+  fstep = calc_data.fstep;
+  pol   = calc_data.pol_type;
+
+  /* Change drawing if newer rad pattern data */
+  if( isFlagSet(DRAW_NEW_RDPAT) )
+  {
+	size_t mreq = ((size_t)(fpat.nth * fpat.nph)) * sizeof(point_3d_t);
+	mem_realloc( (void *)&point_3d, mreq, "in draw_radiation.c" );
+	mreq = (size_t)((fpat.nth-1) * fpat.nph + (fpat.nph-1) * fpat.nth);
+	mreq *= sizeof(double);
+	mem_realloc( (void *)&red, mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&grn, mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&blu, mreq, "in draw_radiation.c" );
+
+	ClearFlag( DRAW_NEW_RDPAT );
+
+	/* Distance of rdpattern point furthest from xyz origin */
+	rdpattern_proj_params.r_max = Scale_Gain(
+		rad_pattern[fstep].gtot[rad_pattern[fstep].max_gain_idx[pol]],
+		fstep, rad_pattern[fstep].max_gain_idx[pol]);
+
+	/* Distance of rdpattern point nearest to xyz origin */
+	r_min = Scale_Gain(
+		rad_pattern[fstep].gtot[rad_pattern[fstep].min_gain_idx[pol]],
+		fstep, rad_pattern[fstep].min_gain_idx[pol]);
+
+	/* Range of scaled rdpattern gain values */
+	r_range = rdpattern_proj_params.r_max - r_min;
+
+	/* Set radiation pattern projection parametrs */
+	New_Projection_Parameters(
+		rdpattern_pixmap_width,
+		rdpattern_pixmap_height,
+		&rdpattern_proj_params );
+
+	/*** Convert radiation pattern values
+	 * to points in 3d space in x,y,z axis ***/
+	pts_idx = 0;
+	phi = (double)(fpat.phis * TA); /* In rads */
+
+	/* Step phi angle */
+	for( nph = 0; nph < fpat.nph; nph++ )
+	{
+	  theta = (double)(fpat.thets * TA); /* In rads */
+
+	  /* Step theta angle */
+	  for( nth = 0; nth < fpat.nth; nth++ )
+	  {
+		/* Distance of pattern point from the xyz origin */
+		r = Scale_Gain(
+			rad_pattern[fstep].gtot[pts_idx], fstep, pts_idx );
+
+		/* Distance of pattern point from xyz origin */
+		point_3d[pts_idx].r = r;
+
+		/* Distance of point's projection on xyz axis, from origin */
+		point_3d[pts_idx].z = r * cos(theta);
+		r *= sin(theta);
+		point_3d[pts_idx].x = r * cos(phi);
+		point_3d[pts_idx].y = r * sin(phi);
+
+		/* Step theta in rads */
+		theta += dth;
+
+		/* Step 3d points index */
+		pts_idx++;
+	  } /* for( nth = 0; nth < fpat.nth; nth++ ) */
+
+	  /* Step phi in rads */
+	  phi += dph;
+	} /* for( nph = 0; nph < fpat.nph; nph++ ) */
+
+	/* Calculate RGB value for rad pattern seg.
+	 * The average gain value of the two points
+	 * marking each line segment is used here */
+
+	/* Pattern segment color in theta direction */
+	col_idx = pts_idx = 0;
+	for( nph = 0; nph < fpat.nph; nph++ )
+	{
+	  for( nth = 1; nth < fpat.nth; nth++ )
+	  {
+		Value_to_Color(
+			&red[col_idx], &grn[col_idx], &blu[col_idx],
+			(point_3d[pts_idx].r+point_3d[pts_idx+1].r)/2.0-r_min,
+			r_range );
+		col_idx++;
+		pts_idx++;
+
+	  } /* for( nph = 0; nph < fpat.nph; nph++ ) */
+
+	  /* Needed because of "index look-ahead" above */
+	  pts_idx++;
+
+	} /* for( nth = 1; nth < fpat.nth; nth++ ) */
+
+	/* Pattern segment color in phi direction */
+	for( nth = 0; nth < fpat.nth; nth++ )
+	{
+	  pts_idx = nth;
+	  for( nph = 1; nph < fpat.nph; nph++ )
+	  {
+		Value_to_Color(
+			&red[col_idx], &grn[col_idx], &blu[col_idx],
+			(point_3d[pts_idx].r +
+			 point_3d[pts_idx+fpat.nth].r)/2.0-r_min,
+			r_range );
+		col_idx++;
+
+		/* Needed because of "index look-ahead" above */
+		pts_idx += fpat.nth;
+
+	  } /* for( nth = 0; nth < fpat.nth; nth++ ) */
+	} /* for( nph = 1; nph < fpat.nph; nph++ ) */
+
+	/* Show max gain on color code bar */
+	snprintf( txt, 7, "%6f", rad_pattern[fstep].max_gain[pol] );
+	txt[6] = '\0';
+	gtk_label_set_text(
+		GTK_LABEL(lookup_widget(rdpattern_window,
+			"rdpattern_colorcode_maxlabel")), txt );
+
+	/* Show min gain on color code bar */
+	snprintf( txt, 5, "%4f", rad_pattern[fstep].min_gain[pol] );
+	txt[6] = '\0';
+	gtk_label_set_text(
+		GTK_LABEL(lookup_widget(rdpattern_window,
+			"rdpattern_colorcode_minlabel")), txt );
+
+  } /* if( isFlagSet(DRAW_NEWRDPAT) ) ) */
+
+  /* Draw xyz axes to Screen */
+  Draw_XYZ_Axes( rdpattern_pixmap, rdpattern_proj_params );
+
+  /* Overlay structure on Near Field pattern */
+  if( isFlagSet(OVERLAY_STRUCT) )
+  {
+	/* Save structure pixmap and params pointers */
+	GdkPixmap *pixmap = structure_pixmap;
+	projection_parameters_t params = structure_proj_params;
+
+	/* Divert structure drawing to rad pattern area */
+	structure_pixmap = rdpattern_pixmap;
+	structure_proj_params = rdpattern_proj_params;
+	structure_proj_params.r_max = params.r_max;
+	structure_proj_params.xy_scale =
+	  params.xy_scale1 * rdpattern_proj_params.xy_zoom;
+
+	/* Process and draw geometry if enabled */
+	Process_Wire_Segments();
+	Process_Surface_Patches();
+	Draw_Surface_Patches( structure_segs+data.n, data.m );
+	Draw_Wire_Segments( structure_segs, data.n );
+
+	/* Restore structure pixmap and params */
+	structure_pixmap = pixmap;
+	structure_proj_params = params;
+  } /* if( isFlagSet(OVERLAY_STRUCT) ) */
+
+  /*** Draw rad pattern on screen ***/
+  /* Draw segments along theta direction */
+  col_idx = pts_idx = 0;
+  for( nph = 0; nph < fpat.nph; nph++ )
+  {
+	for( nth = 1; nth < fpat.nth; nth++ )
+	{
+	  /* Project line segment to Screen */
+	  Set_Gdk_Segment(
+		  &segm,
+		  &rdpattern_proj_params,
+		  point_3d[pts_idx].x,
+		  point_3d[pts_idx].y,
+		  point_3d[pts_idx].z,
+		  point_3d[pts_idx+1].x,
+		  point_3d[pts_idx+1].y,
+		  point_3d[pts_idx+1].z );
+	  pts_idx++;
+
+	  /* Draw segment */
+	  cairo_set_source_rgb( cr, red[col_idx], grn[col_idx], blu[col_idx] );
+	  Cairo_Draw_Line( cr, segm.x1, segm.y1, segm.x2, segm.y2 );
+	  col_idx++;
+
+	} /* for( nth = 1; nth < fpat.nth; nth++ ) */
+
+	pts_idx++;
+  } /* for( nph = 0; nph < fpat.nph; nph++ ) */
+
+  /* Draw segments along phi direction */
+  for( nth = 0; nth < fpat.nth; nth++ )
+  {
+	pts_idx = nth;
+	for( nph = 1; nph < fpat.nph; nph++ )
+	{
+	  /* Project line segment to Screen */
+	  Set_Gdk_Segment(
+		  &segm,
+		  &rdpattern_proj_params,
+		  point_3d[pts_idx].x,
+		  point_3d[pts_idx].y,
+		  point_3d[pts_idx].z,
+		  point_3d[pts_idx+fpat.nth].x,
+		  point_3d[pts_idx+fpat.nth].y,
+		  point_3d[pts_idx+fpat.nth].z );
+
+	  /* Draw segment */
+	  cairo_set_source_rgb( cr, red[col_idx], grn[col_idx], blu[col_idx] );
+	  Cairo_Draw_Line( cr, segm.x1, segm.y1, segm.x2, segm.y2 );
+	  col_idx++;
+
+	  /* Needed because drawing segments "looks ahead"
+	   * in the 3d points buffer in the above loop */
+	  pts_idx += fpat.nth;
+
+	} /* for( nph = 1; nph < fpat.nph; nph++ ) */
+  } /* for( nth = 0; nth < fpat.nth; nth++ ) */
+
+  /* Show gain in direction of viewer */
+  Show_Viewer_Gain(
+	  rdpattern_window,
+	  "rdpattern_viewer_gain",
+	  rdpattern_proj_params );
+
+  cairo_destroy( cr );
+} /* Draw_Radiation_Pattern() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Draw_Near_Field()
+ *
+ * Draws near E/H fields and Poynting vector
+ */
+  void
+Draw_Near_Field( void )
+{
+  int idx, npts; /* Number of points to plot */
+  double
+	fx, fy, fz,	/* Co-ordinates of "free" end of field lines */
+	fscale;		/* Scale factor for equalizing field line segments */
+
+  /* Scale factor ref, for normalizing field strength values */
+  static double dr;
+
+  /* Co-ordinates of Poynting vectors */
+  static double *pov_x = NULL, *pov_y = NULL;
+  static double *pov_z = NULL, *pov_r = NULL;
+
+  /* Range of Poynting vector values,
+   * its max and min and log of max/min */
+  static double pov_max = 0, max;
+
+  /* Used to set text in labels */
+  gchar txt[9];
+
+  /* Line segments to draw on Screen */
+  GdkSegment segm;
+
+  /* For coloring field lines */
+  double xred = 0.0, xgrn = 0.0, xblu = 0.0;
+
+  /* Abort if drawing a near field pattern is not possible */
+  if( isFlagClear(ENABLE_NEAREH) || !near_field.valid )
+	return;
+
+  /* Cairo context */
+  cairo_t *cr = gdk_cairo_create( rdpattern_pixmap );
+
+  /* Initialize projection parameters */
+  if( isFlagSet(DRAW_NEW_EHFIELD) )
+  {
+	/* Reference for scale factor used in
+	 * normalizing field strength values */
+	if( fpat.near ) /* Spherical co-ordinates */
+	  dr = (double)fpat.dxnr;
+	else /* Rectangular co-ordinates */
+	  dr = sqrt(
+		  (double)fpat.dxnr * (double)fpat.dxnr +
+		  (double)fpat.dynr * (double)fpat.dynr +
+		  (double)fpat.dznr * (double)fpat.dznr )/1.75;
+
+	/* Set radiation pattern projection parametrs */
+	/* Distance of field point furthest from xyz origin */
+	rdpattern_proj_params.r_max = near_field.r_max + dr;
+	New_Projection_Parameters(
+		rdpattern_pixmap_width,
+		rdpattern_pixmap_height,
+		&rdpattern_proj_params );
+
+	ClearFlag( DRAW_NEW_EHFIELD );
+
+  } /* if( isFlagSet( DRAW_NEW_EHFIELD ) */
+
+  /* Draw xyz axes to Screen */
+  Draw_XYZ_Axes( rdpattern_pixmap, rdpattern_proj_params );
+
+  /* Overlay structure on Near Field pattern */
+  if( isFlagSet(OVERLAY_STRUCT) )
+  {
+	/* Save structure pixmap and params pointers */
+	GdkPixmap *pixmap = structure_pixmap;
+	projection_parameters_t params = structure_proj_params;
+
+	/* Divert structure drawing to rad pattern area */
+	structure_pixmap = rdpattern_pixmap;
+	structure_proj_params = rdpattern_proj_params;
+
+	/* Process and draw geometry if enabled */
+	Process_Wire_Segments();
+	Process_Surface_Patches();
+	Draw_Surface_Patches( structure_segs+data.n, data.m );
+	Draw_Wire_Segments( structure_segs, data.n );
+
+	/* Restore structure pixmap and params */
+	structure_pixmap = pixmap;
+	structure_proj_params = params;
+  } /* if( isFlagSet(OVERLAY_STRUCT) ) */
+
+  /* Step thru near field values */
+  npts = fpat.nrx * fpat.nry * fpat.nrz;
+  for( idx = 0; idx < npts; idx++ )
+  {
+	/*** Draw Near E Field ***/
+	if( isFlagSet(DRAW_EFIELD) && (fpat.nfeh & NEAR_EFIELD) )
+	{
+	  /* Set gc attributes for segment */
+	  Value_to_Color( &xred, &xgrn, &xblu,
+		  near_field.er[idx], near_field.max_er );
+
+	  /* Scale factor for each field point, to make
+	   * near field direction lines equal-sized */
+	  fscale = dr / near_field.er[idx];
+
+	  /* Scaled field values are used to set one end of a
+	   * line segment that represents direction of field.
+	   * The other end is set by the field point co-ordinates */
+	  fx = near_field.px[idx] + near_field.erx[idx] * fscale;
+	  fy = near_field.py[idx] + near_field.ery[idx] * fscale;
+	  fz = near_field.pz[idx] + near_field.erz[idx] * fscale;
+
+	  /* Project new line segment of
+	   * phi chain to the Screen */
+	  Set_Gdk_Segment(
+		  &segm, &rdpattern_proj_params,
+		  near_field.px[idx], near_field.py[idx], near_field.pz[idx],
+		  fx, fy, fz );
+
+	  /* Draw segment */
+	  cairo_set_source_rgb( cr, xred, xgrn, xblu );
+	  Cairo_Draw_Line( cr, segm.x1, segm.y1, segm.x2, segm.y2 );
+
+	} /* if( isFlagSet(DRAW_EFIELD) && (fpat.nfeh & NEAR_EFIELD) ) */
+
+	/*** Draw Near H Field ***/
+	if( isFlagSet(DRAW_HFIELD) && (fpat.nfeh & NEAR_HFIELD) )
+	{
+	  /* Set gc attributes for segment */
+	  Value_to_Color( &xred, &xgrn, &xblu,
+		  near_field.hr[idx], near_field.max_hr );
+
+	  /* Scale factor for each field point, to make
+	   * near field direction lines equal-sized */
+	  fscale = dr / near_field.hr[idx];
+
+	  /* Scaled field values are used to set one end of a
+	   * line segment that represents direction of field.
+	   * The other end is set by the field point co-ordinates */
+	  fx = near_field.px[idx] + near_field.hrx[idx] * fscale;
+	  fy = near_field.py[idx] + near_field.hry[idx] * fscale;
+	  fz = near_field.pz[idx] + near_field.hrz[idx] * fscale;
+
+	  /* Project new line segment of
+	   * phi chain to the Screen */
+	  Set_Gdk_Segment(
+		  &segm, &rdpattern_proj_params,
+		  near_field.px[idx], near_field.py[idx], near_field.pz[idx],
+		  fx, fy, fz );
+
+	  /* Draw segment */
+	  cairo_set_source_rgb( cr, xred, xgrn, xblu );
+	  Cairo_Draw_Line( cr, segm.x1, segm.y1, segm.x2, segm.y2 );
+
+	} /* if( isFlagSet(DRAW_HFIELD) && (fpat.nfeh & NEAR_HFIELD) ) */
+
+	/*** Draw Poynting Vector ***/
+	if( isFlagSet(DRAW_POYNTING)  &&
+		(fpat.nfeh & NEAR_EFIELD) &&
+		(fpat.nfeh & NEAR_HFIELD) )
+	{
+	  int ipv; /* Mem request and index */
+
+	  /* Allocate on new near field matrix size */
+	  if( isFlagSet(ALLOC_PNTING_BUFF) )
+	  {
+		size_t mreq = (size_t)npts * sizeof( double );
+		mem_realloc( (void *)&pov_x, mreq, "in draw_radiation.c" );
+		mem_realloc( (void *)&pov_y, mreq, "in draw_radiation.c" );
+		mem_realloc( (void *)&pov_z, mreq, "in draw_radiation.c" );
+		mem_realloc( (void *)&pov_r, mreq, "in draw_radiation.c" );
+		ClearFlag( ALLOC_PNTING_BUFF );
+	  }
+
+	  /* Calculate Poynting vector and its max and min */
+	  pov_max = 0;
+	  for( ipv = 0; ipv < npts; ipv++ )
+	  {
+		pov_x[ipv] =
+		  near_field.ery[ipv] * near_field.hrz[ipv] -
+		  near_field.hry[ipv] * near_field.erz[ipv];
+		pov_y[ipv] =
+		  near_field.erz[ipv] * near_field.hrx[ipv] -
+		  near_field.hrz[ipv] * near_field.erx[ipv];
+		pov_z[ipv] =
+		  near_field.erx[ipv] * near_field.hry[ipv] -
+		  near_field.hrx[ipv] * near_field.ery[ipv];
+		pov_r[ipv] = sqrt(
+			pov_x[ipv] * pov_x[ipv] +
+			pov_y[ipv] * pov_y[ipv] +
+			pov_z[ipv] * pov_z[ipv] );
+		if( pov_max < pov_r[ipv] )
+		  pov_max = pov_r[ipv];
+	  } /* for( ipv = 0; ipv < npts; ipv++ ) */
+
+	  /* Set gc attributes for segment */
+	  Value_to_Color( &xred, &xgrn, &xblu, pov_r[idx], pov_max );
+
+	  /* Scale factor for each field point, to make
+	   * near field direction lines equal-sized */
+	  fscale = dr / pov_r[idx];
+
+	  /* Scaled field values are used to set one end of a
+	   * line segment that represents direction of field.
+	   * The other end is set by the field point co-ordinates */
+	  fx = near_field.px[idx] + pov_x[idx] * fscale;
+	  fy = near_field.py[idx] + pov_y[idx] * fscale;
+	  fz = near_field.pz[idx] + pov_z[idx] * fscale;
+
+	  /* Project new line segment of
+	   * Poynting vector to the Screen */
+	  Set_Gdk_Segment(
+		  &segm,
+		  &rdpattern_proj_params,
+		  near_field.px[idx], near_field.py[idx],
+		  near_field.pz[idx], fx, fy, fz );
+
+	  /* Draw segment */
+	  cairo_set_source_rgb( cr, xred, xgrn, xblu );
+	  Cairo_Draw_Line( cr, segm.x1, segm.y1, segm.x2, segm.y2 );
+
+	} /* if( isFlagSet(DRAW_POYNTING) ) */
+
+  } /* for( idx = 0; idx < npts; idx++ ) */
+
+  if( isFlagSet(NEAREH_ANIMATE) )
+  {
+	cairo_destroy( cr );
+	return;
+  }
+
+  /* Show max field strength on color code bar */
+  if( isFlagSet(DRAW_EFIELD) )
+	max = near_field.max_er;
+  else if( isFlagSet(DRAW_HFIELD) )
+	max = near_field.max_hr;
+  else if( isFlagSet(DRAW_POYNTING) )
+	max = pov_max;
+
+  snprintf( txt, 9, "%8.2E", max );
+  gtk_label_set_text(
+	  GTK_LABEL(lookup_widget(rdpattern_window,
+		  "rdpattern_colorcode_maxlabel")), txt );
+
+  /* Show min field strength on color code bar */
+  gtk_label_set_text(
+	  GTK_LABEL(lookup_widget(rdpattern_window,
+		  "rdpattern_colorcode_minlabel")), "0" );
+
+  cairo_destroy( cr );
+} /* Draw_Near_Field() */
+
+/*-----------------------------------------------------------------------*/
+
+  gboolean
+Animate_Near_Field( gpointer udata )
+{
+  /* omega*t = 2*pi*f*t = Time-varying phase of excitation */
+  static double wt = 0.0;
+  int idx, npts;
+
+  if( isFlagClear(NEAREH_ANIMATE) )
+	return( FALSE );
+
+  /* Number of points in near fields */
+  npts = fpat.nrx * fpat.nry * fpat.nrz;
+  for( idx = 0; idx < npts; idx++ )
+  {
+	if( isFlagSet(DRAW_EFIELD) || isFlagSet(DRAW_POYNTING) )
+	{
+	  /* Real component of complex E field strength */
+	  near_field.erx[idx] = near_field.ex[idx] *
+		cos( wt + near_field.fex[idx] );
+	  near_field.ery[idx] = near_field.ey[idx] *
+		cos( wt + near_field.fey[idx] );
+	  near_field.erz[idx] = near_field.ez[idx] *
+		cos( wt + near_field.fez[idx] );
+	  /* Near total electric field vector */
+	  near_field.er[idx]  = sqrt(
+		  near_field.erx[idx] * near_field.erx[idx] +
+		  near_field.ery[idx] * near_field.ery[idx] +
+		  near_field.erz[idx] * near_field.erz[idx] );
+	  if( near_field.max_er < near_field.er[idx] )
+		near_field.max_er = near_field.er[idx];
+	}
+
+	if( isFlagSet(DRAW_HFIELD) || isFlagSet(DRAW_POYNTING) )
+	{
+	  /* Real component of complex H field strength */
+	  near_field.hrx[idx] = near_field.hx[idx] *
+		cos( wt + near_field.fhx[idx] );
+	  near_field.hry[idx] = near_field.hy[idx] *
+		cos( wt + near_field.fhy[idx] );
+	  near_field.hrz[idx] = near_field.hz[idx] *
+		cos( wt + near_field.fhz[idx] );
+	  /* Near total magnetic field vector*/
+	  near_field.hr[idx]  = sqrt(
+		  near_field.hrx[idx] * near_field.hrx[idx] +
+		  near_field.hry[idx] * near_field.hry[idx] +
+		  near_field.hrz[idx] * near_field.hrz[idx] );
+	  if( near_field.max_hr < near_field.hr[idx] )
+		near_field.max_hr = near_field.hr[idx];
+	}
+
+  } /* for( idx = 0; idx < npts; idx++ ) */
+
+  /* Increment excitation phase, keep < 2pi */
+  wt += near_field.anim_step;
+  if( wt >= (double)TP )
+	wt = 0.0;
+
+  Draw_Radiation( rdpattern_drawingarea );
+
+  return( TRUE );
+
+} /* Animate_Near_Field() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Scale_Gain()
+ *
+ * Scales radiation pattern gain according to selected style
+ * ( ARRL style, logarithmic or linear voltage/power )
+ */
+static int gain_style = GS_LINP;
+
+  double
+Scale_Gain( double gain, int fstep, int idx )
+{
+  /* Scaled rad pattern gain and pol factor */
+  double scaled_rad = 0.0, polf;
+
+  polf = Polarization_Factor( calc_data.pol_type, fstep, idx );
+  if ( polf< 1e-200 ) return( 0.0 );
+
+  gain += 10.0 * log10(polf);
+
+  switch( gain_style )
+  {
+	case GS_LINP:
+	  scaled_rad = pow(10.0, (gain/10.0));
+	  break;
+
+	case GS_LINV:
+	  scaled_rad = pow(10.0, (gain/20.0));
+	  break;
+
+	case GS_ARRL:
+	  scaled_rad = exp( 0.058267 * gain );
+	  break;
+
+	case GS_LOG:
+	  scaled_rad = gain;
+	  if( scaled_rad < -40 )
+		scaled_rad = 0.0;
+	  else
+		scaled_rad = scaled_rad /40.0 + 1.0;
+
+  } /* switch( gain_style ) */
+
+  return( scaled_rad );
+
+} /* Scale_Gain() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Polarization_Factor()
+ *
+ * Calculates polarization factor from axial
+ * ratio and tilt of polarization ellipse
+ */
+  double
+Polarization_Factor( int pol_type, int fstep, int idx )
+{
+  double axrt, axrt2, tilt2, polf = 1.0;
+
+  switch( pol_type )
+  {
+	case POL_TOTAL:
+	  polf = 1.0;
+	  break;
+
+	case POL_HORIZ:
+	  axrt2  = rad_pattern[fstep].axrt[idx];
+	  axrt2 *= axrt2;
+	  tilt2  = sin( rad_pattern[fstep].tilt[idx] );
+	  tilt2 *= tilt2;
+	  polf = (axrt2 + (1.0 - axrt2) * tilt2) / (1.0 + axrt2);
+	  break;
+
+	case POL_VERT:
+	  axrt2  = rad_pattern[fstep].axrt[idx];
+	  axrt2 *= axrt2;
+	  tilt2  = cos( rad_pattern[fstep].tilt[idx] );
+	  tilt2 *= tilt2;
+	  polf = (axrt2 + (1.0 - axrt2) * tilt2) / (1.0 + axrt2);
+	  break;
+
+	case POL_LHCP:
+	  axrt  = rad_pattern[fstep].axrt[idx];
+	  axrt2 = axrt * axrt;
+	  polf  = (1.0 + 2.0 * axrt + axrt2) / 2.0 / (1.0 + axrt2);
+	  break;
+
+	case POL_RHCP:
+	  axrt  = rad_pattern[fstep].axrt[idx];
+	  axrt2 = axrt * axrt;
+	  polf  = (1.0 - 2.0 * axrt + axrt2) / 2.0 / (1.0 + axrt2);
+  }
+
+  return( polf );
+
+} /* Polarization_Factor() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Set_Polarization()
+ *
+ * Sets the polarization type of gain to be plotted
+ */
+
+  void
+Set_Polarization( int pol )
+{
+  calc_data.pol_type = pol;
+
+  Set_Window_Labels();
+
+  /* Trigger a redraw of drawingareas */
+  if( isFlagSet(DRAW_ENABLED) )
+	Draw_Radiation( rdpattern_drawingarea );
+
+  if( isFlagSet(PLOT_ENABLED) )
+	Plot_Frequency_Data();
+
+  /* Show gain in direction of viewer */
+  Show_Viewer_Gain( main_window,
+	  "main_gain_entry", structure_proj_params );
+
+  /* Enable redraw of rad pattern */
+  SetFlag( DRAW_NEW_RDPAT );
+
+} /* Set_Polarization() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Set_Gain_Style()
+ *
+ * Sets the radiation pattern Gain scaling style
+ */
+  void
+Set_Gain_Style( int gs )
+{
+  gain_style = gs;
+
+  Set_Window_Labels();
+
+  /* Trigger a redraw of drawingarea */
+  if( isFlagSet(DRAW_ENABLED) )
+  {
+	/* Enable redraw of rad pattern */
+	SetFlag( DRAW_NEW_RDPAT );
+	Draw_Radiation( rdpattern_drawingarea );
+  }
+
+} /* Set_Gain_Style() */
+
+/*-----------------------------------------------------------------------*/
+
+/*  New_Radiation_Projection_Angle()
+ *
+ *  Calculates new projection parameters when a
+ *  structure projection angle (Wr or Wi) changes
+ */
+  void
+New_Radiation_Projection_Angle(void)
+{
+  /* sin and cos of rad pattern rotation and inclination angles */
+  rdpattern_proj_params.sin_wr = sin(rdpattern_proj_params.Wr/(double)TD);
+  rdpattern_proj_params.cos_wr = cos(rdpattern_proj_params.Wr/(double)TD);
+  rdpattern_proj_params.sin_wi = sin(rdpattern_proj_params.Wi/(double)TD);
+  rdpattern_proj_params.cos_wi = cos(rdpattern_proj_params.Wi/(double)TD);
+
+  /* Trigger a redraw of radiation drawingarea */
+  if( isFlagSet(DRAW_ENABLED) )
+	Draw_Radiation( rdpattern_drawingarea );
+
+  /* Trigger a redraw of plots drawingarea if doing "viewer" gain */
+  if( isFlagSet(PLOT_ENABLED) && isFlagSet(PLOT_GVIEWER) )
+	Plot_Frequency_Data();
+
+} /* New_Radiation_Projection_Angle() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Redo_Radiation_Pattern()
+ *
+ * Refreshes radiation pattern on new frequency in spinbutton
+ */
+  gboolean
+Redo_Radiation_Pattern( gpointer udata )
+{
+  /* Redo radiation pattern for a new frequency. Below
+   * makes calcs use the extra buffer in rad_pattern */
+  calc_data.fstep = calc_data.nfrq;
+  New_Frequency();
+
+  /* Redraw radiation pattern on screen */
+  if( isFlagSet(DRAW_ENABLED) )
+	Draw_Radiation( rdpattern_drawingarea );
+
+  return FALSE;
+
+} /* Redo_Radiation_Pattern() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Viewer_Gain()
+ *
+ * Calculate gain in direction of viewer
+ * (e.g. Perpenticular to the Screen)
+ */
+  double
+Viewer_Gain( projection_parameters_t proj_parameters, int fstep )
+{
+  double phi, gain;
+  int nth, nph, idx;
+
+
+  /* Calculate theta step from proj params */
+  phi = proj_parameters.Wr;
+  if( fpat.dth == 0.0 )
+	nth = 0;
+  else
+  {
+	double theta = fabs( 90.0 - proj_parameters.Wi );
+	if( theta > 180.0 )
+	{
+	  theta = 360.0 - theta;
+	  phi  -= 180.0;
+	}
+	if( (gnd.ksymp == 2) && (theta > 90.01) && (gnd.ifar != 1) )
+	  return( -999.99 );
+	nth = (int)( theta/fpat.dth + 0.5 );
+	if( (nth >= fpat.nth) || (nth < 0) )
+	  nth = fpat.nth-1;
+  }
+
+  /* Calculate phi step from proj params */
+  if( fpat.dph == 0.0 )
+	nph = 0;
+  else
+  {
+	while( phi < 0.0 ) phi += 360.0;
+	nph = (int)( phi/fpat.dph + 0.5 );
+	if( (nph >= fpat.nph) || (nph < 0) )
+	  nph = fpat.nph-1;
+  }
+
+  idx = nth + nph*fpat.nth;
+  gain = rad_pattern[fstep].gtot[idx] +
+		10.0 * log10( Polarization_Factor(calc_data.pol_type, fstep, idx) );
+  if( gain < -999.99 ) gain = -999.99;
+
+  return( gain );
+
+} /* Viewer_Gain() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Rdpattern_Window_Killed()
+ *
+ * Cleans up after the rad pattern window is closed
+ */
+  void
+Rdpattern_Window_Killed( void )
+{
+  if( animate_dialog != NULL )
+  {
+	gtk_widget_destroy( animate_dialog );
+	animate_dialog = NULL;
+	ClearFlag( NEAREH_ANIMATE );
+	g_source_remove( anim_tag );
+	anim_tag = 0;
+  }
+
+  if( isFlagSet(DRAW_ENABLED) )
+  {
+	ClearFlag( DRAW_FLAGS );
+	rdpattern_drawingarea = NULL;
+	rdpattern_window = NULL;
+	Free_Draw_Buffers();
+
+	gtk_check_menu_item_set_active(
+		GTK_CHECK_MENU_ITEM(lookup_widget(
+			main_window, "main_rdpattern")), FALSE );
+  }
+
+} /* Rdpattern_Window_Killed() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Set_Window_Labels()
+ *
+ * Sets radiation pattern window labels
+ * according to what is being drawn.
+ */
+  void
+Set_Window_Labels( void )
+{
+  char *pol_type[NUM_POL] =
+  {
+	_("Total Gain"),
+	_("Horizontal Polarization"),
+	_("Vertical Polarization"),
+	_("RH Circular Polarization"),
+	_("LH Circular Polarization")
+  };
+
+  char *scale[NUM_SCALES] =
+  {
+	_("Linear Power"),
+	_("Linear Voltage"),
+	_("ARRL Scale"),
+	_("Logarithmic Scale")
+  };
+
+  char txt[64];
+  size_t s = sizeof( txt );
+
+  if( isFlagSet(DRAW_ENABLED) )
+  {
+	/* Set window labels */
+	Strlcpy( txt, _("Radiation Patterns"), s );
+	if( isFlagSet(DRAW_GAIN) )
+	{
+	  Strlcpy( txt, _("Radiation Pattern: - "), s );
+	  Strlcat( txt, pol_type[calc_data.pol_type], s );
+	  Strlcat( txt, " - ", s );
+	  Strlcat( txt, scale[gain_style], s );
+	}
+	else if( isFlagSet(DRAW_EHFIELD) )
+	{
+	  Strlcpy( txt, _("Near Fields:"), s );
+	  if( isFlagSet(DRAW_EFIELD) )
+		Strlcat( txt, _(" - E Field"), s );
+	  if( isFlagSet(DRAW_HFIELD) )
+		Strlcat( txt, _(" - H Field"), s );
+	  if( isFlagSet(DRAW_POYNTING) )
+		Strlcat( txt, _(" - Poynting Vector"), s );
+	}
+
+	gtk_label_set_text( GTK_LABEL(lookup_widget(
+			rdpattern_window, "rdpattern_label")), txt );
+
+  } /* if( isFlagSet(DRAW_ENABLED) ) */
+
+  if( isFlagSet(PLOT_ENABLED) )
+  {
+	Strlcpy( txt, _("Frequency Data Plots - "), s );
+	Strlcat( txt, pol_type[calc_data.pol_type], s );
+	gtk_label_set_text( GTK_LABEL(lookup_widget(
+			freqplots_window, "freqplots_label")), txt );
+  }
+
+} /* Set_Window_Labels() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Alloc_Rdpattern_Buffers
+ *
+ * Allocates memory to the radiation pattern buffers
+ */
+  void
+Alloc_Rdpattern_Buffers( int nfrq, int nth, int nph )
+{
+  int idx;
+  size_t mreq;
+  static int last_nfrq = 0;
+
+  /* Free old gain buffers first */
+  for( idx = 0; idx < last_nfrq; idx++ )
+  {
+	free_ptr( (void *)&rad_pattern[idx].gtot );
+	free_ptr( (void *)&rad_pattern[idx].max_gain );
+	free_ptr( (void *)&rad_pattern[idx].min_gain );
+	free_ptr( (void *)&rad_pattern[idx].max_gain_tht );
+	free_ptr( (void *)&rad_pattern[idx].max_gain_phi );
+	free_ptr( (void *)&rad_pattern[idx].max_gain_idx );
+	free_ptr( (void *)&rad_pattern[idx].min_gain_idx );
+	free_ptr( (void *)&rad_pattern[idx].axrt );
+	free_ptr( (void *)&rad_pattern[idx].tilt );
+	free_ptr( (void *)&rad_pattern[idx].sens );
+  }
+  last_nfrq = nfrq;
+
+  /* Allocate rad pattern buffers */
+  mreq = (size_t)nfrq * sizeof(rad_pattern_t);
+  mem_realloc( (void *)&rad_pattern, mreq, "in draw_radiation.c" );
+
+  for( idx = 0; idx < nfrq; idx++ )
+  {
+	/* Memory request for allocs */
+	mreq = (size_t)(nph * nth) * sizeof(double);
+	rad_pattern[idx].gtot = NULL;
+	mem_alloc( (void *)&rad_pattern[idx].gtot, mreq, "in draw_radiation.c" );
+	rad_pattern[idx].axrt = NULL;
+	mem_alloc( (void *)&rad_pattern[idx].axrt, mreq, "in draw_radiation.c" );
+	rad_pattern[idx].tilt = NULL;
+	mem_alloc( (void *)&rad_pattern[idx].tilt, mreq, "in draw_radiation.c" );
+
+	mreq = NUM_POL * sizeof(double);
+	rad_pattern[idx].max_gain = NULL;
+	mem_alloc( (void *)&rad_pattern[idx].max_gain, mreq, "in draw_radiation.c" );
+	rad_pattern[idx].min_gain = NULL;
+	mem_alloc( (void *)&rad_pattern[idx].min_gain, mreq, "in draw_radiation.c" );
+	rad_pattern[idx].max_gain_tht = NULL;
+	mem_alloc( (void *)&rad_pattern[idx].max_gain_tht, mreq, "in draw_radiation.c" );
+	rad_pattern[idx].max_gain_phi = NULL;
+	mem_alloc( (void *)&rad_pattern[idx].max_gain_phi, mreq, "in draw_radiation.c" );
+
+	mreq = NUM_POL * sizeof(int);
+	rad_pattern[idx].max_gain_idx = NULL;
+	mem_alloc( (void *)&rad_pattern[idx].max_gain_idx, mreq, "in draw_radiation.c" );
+	rad_pattern[idx].min_gain_idx = NULL;
+	mem_alloc( (void *)&rad_pattern[idx].min_gain_idx, mreq, "in draw_radiation.c" );
+
+	rad_pattern[idx].sens = NULL;
+	mreq = (size_t)(nph * nth) * sizeof(int);
+	mem_alloc( (void *)&rad_pattern[idx].sens, mreq, "in draw_radiation.c" );
+  }
+
+} /* Alloc_Rdpattern_Buffers() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Alloc_Nearfield_Buffers
+ *
+ * Allocates memory to the radiation pattern buffers
+ */
+  void
+Alloc_Nearfield_Buffers( int n1, int n2, int n3 )
+{
+  size_t mreq;
+
+  if( isFlagClear(ALLOC_NEAREH_BUFF) ) return;
+  ClearFlag( ALLOC_NEAREH_BUFF );
+
+  /* Memory request for allocations */
+  mreq = (size_t)(n1 * n2 * n3) * sizeof( double );
+
+  /* Allocate near field buffers */
+  if( fpat.nfeh & NEAR_EFIELD )
+  {
+	mem_realloc( (void *)&near_field.ex,  mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.ey,  mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.ez,  mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.fex, mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.fey, mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.fez, mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.erx, mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.ery, mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.erz, mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.er,  mreq, "in draw_radiation.c" );
+  }
+
+  if( fpat.nfeh & NEAR_HFIELD )
+  {
+	mem_realloc( (void *)&near_field.hx,  mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.hy,  mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.hz,  mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.fhx, mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.fhy, mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.fhz, mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.hrx, mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.hry, mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.hrz, mreq, "in draw_radiation.c" );
+	mem_realloc( (void *)&near_field.hr,  mreq, "in draw_radiation.c" );
+  }
+
+  mem_realloc( (void *)&near_field.px, mreq, "in draw_radiation.c" );
+  mem_realloc( (void *)&near_field.py, mreq, "in draw_radiation.c" );
+  mem_realloc( (void *)&near_field.pz, mreq, "in draw_radiation.c" );
+
+} /* Alloc_Nearfield_Buffers() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Free_Draw_Buffers()
+ *
+ * Frees the buffers used for drawing
+ */
+  void
+Free_Draw_Buffers( void )
+{
+  free_ptr( (void *)&point_3d );
+  free_ptr( (void *)&red );
+  free_ptr( (void *)&grn );
+  free_ptr( (void *)&blu );
+}
+
+/*-----------------------------------------------------------------------*/
+
diff --git a/src/draw_radiation.h b/src/draw_radiation.h
new file mode 100644
index 0000000..a7066a8
--- /dev/null
+++ b/src/draw_radiation.h
@@ -0,0 +1,34 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef DRAW_RADIATION_H
+#define DRAW_RADIATION_H		1
+
+#include "common.h"
+#include "support.h"
+
+/* Point in 3d xyz axes */
+typedef struct
+{
+  double
+    x, y, z, r;
+
+} point_3d_t;
+
+#endif
+
diff --git a/src/draw_structure.c b/src/draw_structure.c
new file mode 100644
index 0000000..b6a1268
--- /dev/null
+++ b/src/draw_structure.c
@@ -0,0 +1,745 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/*
+ *  draw_structure.c
+ *
+ *  Structure drawing routines for xnec2c
+ */
+
+#include "draw_structure.h"
+#include "shared.h"
+
+/*-----------------------------------------------------------------------*/
+
+/*  Draw_Structure()
+ *
+ *  Draws xyz axes, wire segments and patches
+ */
+  void
+Draw_Structure( GtkWidget *drawingarea )
+{
+  /* Block motion events */
+  g_signal_handler_block
+	( (gpointer)drawingarea, structure_motion_handler );
+
+  /* Abort if xnec2c may be quit by user */
+  if( isFlagSet(MAIN_QUIT) )
+	return;
+
+  /* Cairo context */
+  cairo_t *cr = gdk_cairo_create( structure_pixmap );
+
+  /* Clear pixmap */
+  cairo_set_source_rgb( cr, BLACK );
+  cairo_rectangle(
+	  cr, 0.0, 0.0,
+	  (double)structure_proj_params.pixmap_width,
+	  (double)structure_proj_params.pixmap_height);
+  cairo_fill( cr );
+
+  /* Process and draw geometry if available, else clear screen */
+  Process_Wire_Segments();
+  Process_Surface_Patches();
+  Draw_XYZ_Axes( structure_pixmap, structure_proj_params );
+  Draw_Surface_Patches( structure_segs+data.n, data.m );
+  Draw_Wire_Segments( structure_segs, data.n );
+
+  /* Show gain in direction of viewer */
+  Show_Viewer_Gain( main_window,
+	  "main_gain_entry", structure_proj_params );
+
+  /* Render pixmap to screen */
+  gdk_window_set_back_pixmap(
+	  drawingarea->window, structure_pixmap, FALSE );
+  gdk_window_clear( drawingarea->window );
+
+  /* Reset "new current data" flag */
+  crnt.newer = 0;
+
+  /* Display frequency step */
+  Display_Fstep( structure_fstep_entry, calc_data.fstep );
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+
+  cairo_destroy( cr );
+
+  /* Unblock motion events */
+  g_signal_handler_unblock(
+	  (gpointer)drawingarea, structure_motion_handler );
+
+} /* Draw_Structure() */
+
+/*-----------------------------------------------------------------------*/
+
+/*  New_Wire_Data()
+ *
+ *  Calculates some projection parameters
+ *  when new wire segment data is created
+ */
+  void
+New_Wire_Data( void )
+{
+  /* Abort if no wire data */
+  if( data.n == 0 )	return;
+
+  double
+	r,	   /* Distance of a point from XYZ origin */
+	r_max; /* Maximum value of above */
+
+  int idx;
+
+  /* Find segment end furthest from xyz axes origin */
+  r_max = 0.0;
+  for( idx = 0; idx < data.n; idx++ )
+  {
+	r = sqrt(
+		(double)data.x1[idx] * (double)data.x1[idx] +
+		(double)data.y1[idx] * (double)data.y1[idx] +
+		(double)data.z1[idx] * (double)data.z1[idx] );
+	if( r > r_max )
+	  r_max = r;
+
+	r = sqrt(
+		(double)data.x2[idx] * (double)data.x2[idx] +
+		(double)data.y2[idx] * (double)data.y2[idx] +
+		(double)data.z2[idx] * (double)data.z2[idx] );
+	if( r > r_max )
+	  r_max = r;
+
+  } /* for( idx = 0; idx < data.n; idx++ ) */
+
+  /* Max value of segment r saved if appropriate */
+  if( r_max > structure_proj_params.r_max )
+	structure_proj_params.r_max = r_max;
+
+  /* Redraw structure on screen */
+  New_Projection_Parameters(
+	  structure_pixmap_width,
+	  structure_pixmap_height,
+	  &structure_proj_params );
+
+} /* New_Wire_Data() */
+
+/*-----------------------------------------------------------------------*/
+
+/*  New_Patch_Data()
+ *
+ *  Calculates some projection parameters
+ *  when new surface patch data is created
+ */
+  void
+New_Patch_Data( void )
+{
+  /* Abort if no patch data */
+  if( data.m == 0 )	return;
+
+  double
+	s,			/* Side/2 of a square that will represent a patch  */
+	sx, sy, sz, /* Length of components of s in the X, Y, Z axes */
+	r,			/* Distance of points in patch from XYZ co-ordinates */
+	r_max;		/* Maximum value of above */
+
+  int idx, i;
+  size_t mreq;
+
+  /* Allocate memory for patch line segments */
+  mreq = (size_t)(2 * data.m) * sizeof(double);
+  mem_realloc( (void *)&data.px1, mreq, "in draw_structure.c" );
+  mem_realloc( (void *)&data.py1, mreq, "in draw_structure.c" );
+  mem_realloc( (void *)&data.pz1, mreq, "in draw_structure.c" );
+  mem_realloc( (void *)&data.px2, mreq, "in draw_structure.c" );
+  mem_realloc( (void *)&data.py2, mreq, "in draw_structure.c" );
+  mem_realloc( (void *)&data.pz2, mreq, "in draw_structure.c" );
+
+  /* Find point furthest from xyz axes origin */
+  r_max = 0.0;
+  for( idx = 0; idx < data.m; idx++ )
+  {
+	i = 2 * idx;
+
+	/* Side/2 of square representing a patch (sqrt of patch area) */
+	s = (double)sqrt( data.pbi[idx] ) / 2.0;
+
+	/* Projection of s on xyz components of t1 */
+	sx = s * (double)data.t1x[idx];
+	sy = s * (double)data.t1y[idx];
+	sz = s * (double)data.t1z[idx];
+
+	/* End 1 of line seg parallel to t1 vector */
+	data.px1[i] = (double)data.px[idx] + sx;
+	data.py1[i] = (double)data.py[idx] + sy;
+	data.pz1[i] = (double)data.pz[idx] + sz;
+
+	/* Its distance from XYZ origin */
+	r = sqrt(
+		data.px1[i]*data.px1[i] +
+		data.py1[i]*data.py1[i] +
+		data.pz1[i]*data.pz1[i] );
+	if( r > r_max )
+	  r_max = r;
+
+	/* End 2 of line seg parallel to t1 vector */
+	data.px2[i] = (double)data.px[idx] - sx;
+	data.py2[i] = (double)data.py[idx] - sy;
+	data.pz2[i] = (double)data.pz[idx] - sz;
+
+	/* Its distance from XYZ origin */
+	r = sqrt(
+		data.px2[i]*data.px2[i] +
+		data.py2[i]*data.py2[i] +
+		data.pz2[i]*data.pz2[i] );
+	if( r > r_max )
+	  r_max = r;
+
+	i++;
+
+	/* Projection of s on xyz components of t2 */
+	sx = s * (double)data.t2x[idx];
+	sy = s * (double)data.t2y[idx];
+	sz = s * (double)data.t2z[idx];
+
+	/* End 1 of line parallel to t2 vector */
+	data.px1[i] = (double)data.px[idx] + sx;
+	data.py1[i] = (double)data.py[idx] + sy;
+	data.pz1[i] = (double)data.pz[idx] + sz;
+
+	/* Its distance from XYZ origin */
+	r = sqrt(
+		data.px1[i]*data.px1[i] +
+		data.py1[i]*data.py1[i] +
+		data.pz1[i]*data.pz1[i] );
+	if( r > r_max )
+	  r_max = r;
+
+	/* End 2 of line parallel to t2 vector */
+	data.px2[i] = (double)data.px[idx] - sx;
+	data.py2[i] = (double)data.py[idx] - sy;
+	data.pz2[i] = (double)data.pz[idx] - sz;
+
+	/* Its distance from XYZ origin */
+	r = sqrt(
+		data.px2[i]*data.px2[i] +
+		data.py2[i]*data.py2[i] +
+		data.pz2[i]*data.pz2[i] );
+	if( r > r_max )
+	  r_max = r;
+
+  } /* for( idx = 0; idx < data.m; idx++ ) */
+
+  /* Max value of patch r saved if appropriate */
+  if( r_max > structure_proj_params.r_max )
+	structure_proj_params.r_max = r_max;
+
+  /* Redraw structure on screen */
+  New_Projection_Parameters(
+	  structure_pixmap_width,
+	  structure_pixmap_height,
+	  &structure_proj_params );
+
+} /* New_Patch_Data() */
+
+/*-----------------------------------------------------------------------*/
+
+/*  Process_Wire_Segments()
+ *
+ *  Processes wire segment data so they can be drawn on Screen
+ */
+  void
+Process_Wire_Segments( void )
+{
+  int idx;
+
+  /* Project all wire segs from xyz frame to screen frame */
+  for( idx = 0; idx < data.n; idx++ )
+	Set_Gdk_Segment(
+		&structure_segs[idx],
+		&structure_proj_params,
+		(double)data.x1[idx],
+		(double)data.y1[idx],
+		(double)data.z1[idx],
+		(double)data.x2[idx],
+		(double)data.y2[idx],
+		(double)data.z2[idx] );
+
+} /* Process_Wire_Segments() */
+
+/*-----------------------------------------------------------------------*/
+
+/*  Process_Surface_Patches()
+ *
+ *  Processes surface patch data so they can be drawn on Screen
+ */
+  void
+Process_Surface_Patches( void )
+{
+  int idx, m2;
+
+  /* Project all patch segs from xyz frame to screen frame */
+  /* Patches are represented by 2 line segs parallel to t1 */
+  /* and t2 vectors. Length of segs is sqrt of patch area  */
+  m2 = data.m * 2;
+  for( idx = 0; idx < m2; idx++ )
+	Set_Gdk_Segment(
+		&structure_segs[idx+data.n],
+		&structure_proj_params,
+		data.px1[idx],
+		data.py1[idx],
+		data.pz1[idx],
+		data.px2[idx],
+		data.py2[idx],
+		data.pz2[idx] );
+
+} /* Process_Surface_Patches() */
+
+/*-----------------------------------------------------------------------*/
+
+/*  Draw_Wire_Segments()
+ *
+ *  Draws all wire segments of the input structure
+ */
+
+void
+Draw_Wire_Segments(	GdkSegment *segm, gint nseg )
+{
+  /* Abort if no wire segs or new input pending */
+  if( !nseg || isFlagSet(INPUT_PENDING) )
+	return;
+
+  int idx, i;
+
+  /* Cairo context */
+  cairo_t *cr = gdk_cairo_create( structure_pixmap );
+
+  /* Draw networks */
+  for( idx = 0; idx < netcx.nonet; idx++ )
+  {
+	int i1, i2;
+
+	i1 = netcx.iseg1[idx]-1;
+	i2 = netcx.iseg2[idx]-1;
+
+	switch( netcx.ntyp[idx] )
+	{
+	  case 1: /* Two-port network */
+		{
+		  GdkPoint points[4];
+
+		  /* Draw a box between segs to represent two-port network */
+		  points[0].x = segm[i1].x1 + (segm[i2].x1 - segm[i1].x1)/3;
+		  points[0].y = segm[i1].y1 + (segm[i2].y1 - segm[i1].y1)/3;
+		  points[1].x = segm[i2].x1 + (segm[i1].x1 - segm[i2].x1)/3;
+		  points[1].y = segm[i2].y1 + (segm[i1].y1 - segm[i2].y1)/3;
+		  points[2].x = segm[i2].x2 + (segm[i1].x2 - segm[i2].x2)/3;
+		  points[2].y = segm[i2].y2 + (segm[i1].y2 - segm[i2].y2)/3;
+		  points[3].x = segm[i1].x2 + (segm[i2].x2 - segm[i1].x2)/3;
+		  points[3].y = segm[i1].y2 + (segm[i2].y2 - segm[i1].y2)/3;
+
+		  cairo_set_source_rgb( cr, MAGENTA );
+		  Cairo_Draw_Polygon( cr, points, 4 );
+		  cairo_fill( cr );
+
+			/* Draw connecting lines */
+		  Cairo_Draw_Line( cr,
+			  segm[i1].x1, segm[i1].y1,
+			  segm[i2].x1, segm[i2].y1 );
+		  Cairo_Draw_Line( cr,
+			  segm[i1].x2, segm[i1].y2,
+			  segm[i2].x2, segm[i2].y2 );
+		}
+		break;
+
+	  case 2: /* Straight transmission line */
+		/* Set cr attributes for transmission line */
+		cairo_set_source_rgb( cr, CYAN );
+
+		Cairo_Draw_Line( cr,
+			segm[i1].x1, segm[i1].y1,
+			segm[i2].x1, segm[i2].y1 );
+		Cairo_Draw_Line( cr,
+			segm[i1].x2, segm[i1].y2,
+			segm[i2].x2, segm[i2].y2 );
+		break;
+
+	  case 3: /* Crossed transmisson line */
+		/* Set cr attributes for transmission line */
+		cairo_set_source_rgb( cr, CYAN );
+
+		Cairo_Draw_Line( cr,
+			segm[i1].x1, segm[i1].y1,
+			segm[i2].x2, segm[i2].y2 );
+		Cairo_Draw_Line( cr,
+			segm[i1].x2, segm[i1].y2,
+			segm[i2].x1, segm[i2].y1 );
+
+	} /* switch( netcx.ntyp ) */
+
+  } /* for( idx = 0; idx < netcx.nonet; idx++ ) */
+
+  /* Draw currents/charges if enabled, return */
+  /* Current or charge calculations do not contain wavelength */
+  /* factors, since they are drawn normalized to their max value */
+  if(
+	  (isFlagSet(DRAW_CURRENTS) ||
+	   isFlagSet(DRAW_CHARGES)) &&
+	  crnt.valid )
+  {
+	static double cmax; /* Max of seg current/charge */
+	/* To color structure segs */
+	double red = 0.0, grn = 0.0, blu = 0.0;
+	char label[11];
+
+	/* Loop over all wire segs, find max current/charge */
+	if( crnt.newer )
+	{
+	  cmax = 0.0;
+	  for( idx = 0; idx < nseg; idx++ )
+	  {
+		if( isFlagSet(DRAW_CURRENTS) )
+		  /* Calculate segment current magnitude */
+		  cmag[idx] = (double)cabs( crnt.cur[idx] );
+		else
+		  /* Calculate segment charge density */
+		  cmag[idx] = (double)cabs( cmplx(crnt.bii[idx], crnt.bir[idx]) );
+
+		/* Find max current/charge magnitude */
+		if( cmag[idx] > cmax )
+		  cmax = cmag[idx];
+	  }
+
+	  /* Show max value in color code label */
+	  if( isFlagSet(DRAW_CURRENTS) )
+		snprintf( label, 11, "%10.3E", cmax * (double)data.wlam );
+	  else
+		snprintf( label, 11, "%10.3E", cmax * 1.0E-6/(double)calc_data.fmhz );
+	  gtk_label_set_text(
+		  GTK_LABEL(lookup_widget(structure_drawingarea,
+			  "main_colorcode_maxlabel")), label );
+
+	} /* if( crnt.newer ) */
+
+	/* Draw segments in color code according to current */
+	for( idx = 0; idx < nseg; idx++ )
+	{
+	  /* Calculate RGB value for seg current */
+	  Value_to_Color( &red, &grn, &blu, cmag[idx], cmax );
+
+	  /* Set cr attributes for segment */
+	  cairo_set_source_rgb( cr, red, grn, blu );
+
+	  /* Draw segment */
+	  Cairo_Draw_Line( cr,
+		  segm[idx].x1, segm[idx].y1,
+		  segm[idx].x2, segm[idx].y2 );
+	} /* for( idx = 0; idx < nseg; idx++ ) */
+
+	cairo_destroy( cr );
+	return;
+  } /* if( isFlagSet(DRAW_CURRENTS) || isFlagSet(DRAW_CHARGES) ) */
+
+  /* Draw segs if not all loaded */
+  cairo_set_line_width( cr, 2.0 );
+  if( zload.nldseg != nseg )
+  {
+	/* Set gc attributes for segments */
+	if( isFlagSet(OVERLAY_STRUCT) &&
+		(structure_proj_params.type == RDPATTERN_DRAWINGAREA) )
+	  cairo_set_source_rgb( cr, WHITE );
+	else
+	  cairo_set_source_rgb( cr, BLUE );
+
+	/* Draw wire segments */
+	Cairo_Draw_Segments( cr, segm, nseg );
+  }
+
+  /* Draw lumped loaded segments */
+  cairo_set_source_rgb( cr, YELLOW );
+  cairo_set_line_width( cr, 9.0 );
+  for( idx = 0; idx < zload.nldseg; idx++ )
+  {
+	if( zload.ldtype[idx] != 5 )
+	{
+	  i = zload.ldsegn[idx]-1;
+	  Cairo_Draw_Line( cr,
+		  segm[i].x1, segm[i].y1,
+		  segm[i].x2, segm[i].y2 );
+	}
+  }
+
+  /* Set gc attributes for excitation */
+  cairo_set_source_rgb( cr, RED );
+  cairo_set_line_width( cr, 5.0 );
+
+  /* Draw excitation sources */
+  for( idx = 0; idx < vsorc.nsant; idx++ )
+  {
+	i = vsorc.isant[idx]-1;
+	Cairo_Draw_Line( cr,
+		segm[i].x1, segm[i].y1,
+		segm[i].x2, segm[i].y2 );
+  }
+
+  for( idx = 0; idx < vsorc.nvqd; idx++ )
+  {
+	i = vsorc.ivqd[idx]-1;
+	Cairo_Draw_Line( cr,
+		segm[i].x1, segm[i].y1,
+		segm[i].x2, segm[i].y2 );
+  }
+
+  /* Draw resistivity loaded segments */
+  cairo_set_source_rgb( cr, YELLOW );
+  cairo_set_line_width( cr, 2.0 );
+  for( idx = 0; idx < zload.nldseg; idx++ )
+  {
+	if( zload.ldtype[idx] == 5 )
+	{
+	  i = zload.ldsegn[idx]-1;
+	  Cairo_Draw_Line( cr,
+		  segm[i].x1, segm[i].y1,
+		  segm[i].x2, segm[i].y2 );
+	}
+  }
+
+  cairo_destroy( cr );
+} /* Draw_Wire_Segments() */
+
+/*-----------------------------------------------------------------------*/
+
+/*  Draw_Surface_Patches()
+ *
+ *  Draws the line segments that represent surface patches
+ */
+void
+Draw_Surface_Patches( GdkSegment *segm, gint npatch )
+{
+  /* Abort if no patches */
+  if( ! npatch )
+	return;
+
+  /* Cairo context */
+  cairo_t *cr = gdk_cairo_create( structure_pixmap );
+
+  /* Draw currents if enabled, return */
+  if( isFlagSet(DRAW_CURRENTS) && crnt.valid )
+  {
+	/* Buffers for t1,t2 currents below */
+	static double cmax;
+
+	/* Current along x,y,z and t1,t2 vector directions */
+	complex double cx, cy, cz, ct1, ct2;
+
+	double red = 0.0, grn = 0.0, blu = 0.0;
+
+	int i, j;
+
+	/* Find max value of patch current magnitude */
+	if( crnt.newer )
+	{
+	  j= data.n;
+	  cmax = 0.0;
+
+	  for( i = 0; i < npatch; i++ )
+	  {
+		/* Calculate current along x,y,z vectors */
+		cx = (complex double)crnt.cur[j];
+		cy = (complex double)crnt.cur[j+1];
+		cz = (complex double)crnt.cur[j+2];
+
+		/* Calculate current along t1 and t2 tangent vectors */
+		ct1 = cx*(double)data.t1x[i] +
+		  cy*(double)data.t1y[i] +
+		  cz*(double)data.t1z[i];
+		ct2 = cx*(double)data.t2x[i] +
+		  cy*(double)data.t2y[i] +
+		  cz*(double)data.t2z[i];
+
+		/* Save current magnitudes */
+		ct1m[i] = (double)cabs( ct1 );
+		ct2m[i] = (double)cabs( ct2 );
+
+		/* Find current magnitude max */
+		if( ct1m[i] > cmax ) cmax = ct1m[i];
+		if( ct2m[i] > cmax ) cmax = ct2m[i];
+
+		j += 3;
+
+	  } /* for( i = 0; i < npatch; i++ ) */
+
+	} /* if( crnt.newer ) */
+
+	/* Draw patches in color code according to current */
+	for( i = 0; i < npatch; i++ )
+	{
+	  j = 2 * i;
+
+	  /* Calculate RGB value for patch t1 current */
+	  Value_to_Color( &red, &grn, &blu, ct1m[i], cmax );
+
+	  /* Set cr attributes for patch t1 */
+	  cairo_set_source_rgb( cr, red, grn, blu );
+
+	  /* Draw patch t1 */
+	  Cairo_Draw_Line( cr,
+		  segm[j].x1, segm[j].y1,
+		  segm[j].x2, segm[j].y2 );
+
+	  /* Calculate RGB value for patch t2 current */
+	  Value_to_Color( &red, &grn, &blu, ct2m[i], cmax );
+
+	  /* Set cr attributes for patch t2 */
+	  cairo_set_source_rgb( cr, red, grn, blu );
+
+	  /* Draw patch t2 */
+	  j++;
+	  Cairo_Draw_Line( cr,
+		  segm[j].x1, segm[j].y1,
+		  segm[j].x2, segm[j].y2 );
+
+	} /* for( idx = 0; idx < npatch; idx++ ) */
+
+  } /* if( isFlagSet(DRAW_CURRENTS) ) */
+  else
+  {
+	int idx;
+
+	/* Set gc attributes for patches */
+	if( isFlagSet(OVERLAY_STRUCT) &&
+		(structure_proj_params.type == RDPATTERN_DRAWINGAREA) )
+	  cairo_set_source_rgb( cr, WHITE );
+	else cairo_set_source_rgb( cr, BLUE );
+
+	/* Draw patch segments */
+	int nsg = 2 * npatch;
+	for( idx = 0; idx < nsg; idx++ )
+	{
+	  Cairo_Draw_Line( cr,
+		  segm[idx].x1, segm[idx].y1,
+		  segm[idx].x2, segm[idx].y2 );
+	}
+  }
+
+  cairo_destroy( cr );
+} /* Draw_Surface_Patches() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Redo_Currents()
+ *
+ * Refreshes plots on new frequency in spinbutton
+ */
+  gboolean
+Redo_Currents( gpointer udata )
+{
+  /* Abort if no geometry data */
+  if( ((data.n == 0) && (data.m == 0)) ||
+	  isFlagClear(ENABLE_EXCITN) )
+	return FALSE;
+
+  /* Makes calcs use the extra buffer in rad_pattern */
+  calc_data.fstep = calc_data.nfrq;
+  save.last_freq = 0.0;
+  New_Frequency();
+
+  /* Display freq data in entry widgets */
+  if( isFlagSet(PLOT_FREQ_LINE) )
+	Plot_Frequency_Data();
+
+  /* Redraw structure on screen */
+  if( (structure_drawingarea != NULL) &&
+	  (isFlagSet(DRAW_CURRENTS) || isFlagSet(DRAW_CHARGES)) )
+	Draw_Structure( structure_drawingarea );
+
+  return FALSE;
+} /* Redo_Currents() */
+
+/*-----------------------------------------------------------------------*/
+
+/*  New_Structure_Projection_Angle()
+ *
+ *  Calculates new projection parameters when a
+ *  structure projection angle (Wr or Wi) changes
+ */
+  void
+New_Structure_Projection_Angle(void)
+{
+  /* sin and cos of structure rotation and inclination angles */
+  structure_proj_params.sin_wr = sin(structure_proj_params.Wr/(double)TD);
+  structure_proj_params.cos_wr = cos(structure_proj_params.Wr/(double)TD);
+  structure_proj_params.sin_wi = sin(structure_proj_params.Wi/(double)TD);
+  structure_proj_params.cos_wi = cos(structure_proj_params.Wi/(double)TD);
+
+  /* Trigger a redraw of structure drawingarea */
+  if( isFlagClear(INPUT_PENDING) )
+	Draw_Structure( structure_drawingarea );
+
+  /* Trigger a redraw of plots drawingarea */
+  if( isFlagSet(PLOT_ENABLED) && isFlagSet(PLOT_GVIEWER) )
+	Plot_Frequency_Data();
+
+} /* New_Structure_Projection_Angle() */
+
+/*-----------------------------------------------------------------------*/
+
+/*  Init_Struct_Drawing()
+ *
+ *  Initializes drawing parameters after geometry input
+ */
+  void
+Init_Struct_Drawing( void )
+{
+  /* We need n segs for wires + 2m for patces */
+  size_t mreq = (size_t)(data.n + 2*data.m) * sizeof(GdkSegment);
+  mem_realloc( (void *)&structure_segs, mreq, "in draw_structure.c" );
+  New_Wire_Data();
+  New_Patch_Data();
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* Show_Viewer_Gain()
+ *
+ * Shows gain in direction of viewer
+ */
+  void
+Show_Viewer_Gain(
+	GtkWidget *window,
+	const char *widget,
+	projection_parameters_t proj_params )
+{
+  if( isFlagSet(DRAW_CURRENTS)	||
+	  isFlagSet(DRAW_CHARGES)	||
+	  isFlagSet(DRAW_GAIN)		||
+	  isFlagSet(FREQ_LOOP_RUNNING) )
+  {
+	char txt[8];
+
+	if( isFlagSet(ENABLE_RDPAT) && (calc_data.fstep >=0) )
+	{
+	  snprintf( txt, 8, "%7.2f",
+		  Viewer_Gain(proj_params, calc_data.fstep) );
+	  txt[7] = '\0';
+	  gtk_entry_set_text( GTK_ENTRY(lookup_widget(window, widget)), txt );
+	}
+  }
+
+} /* Show_Viewer_Gain() */
+
+/*-----------------------------------------------------------------------*/
+
diff --git a/src/draw_structure.h b/src/draw_structure.h
new file mode 100644
index 0000000..0fb275d
--- /dev/null
+++ b/src/draw_structure.h
@@ -0,0 +1,26 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	DRAW_STRUCTURE_H
+#define	DRAW_STRUCTURE_H		1
+
+#include "common.h"
+#include "support.h"
+
+#endif
+
diff --git a/src/editors.h b/src/editors.h
new file mode 100644
index 0000000..f891a80
--- /dev/null
+++ b/src/editors.h
@@ -0,0 +1,226 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	EDITORS_H
+#define	EDITORS_H		1
+
+#include "common.h"
+
+#define CMND_NUM_FCOLS 6
+#define CMND_NUM_ICOLS 4
+#define GEOM_NUM_FCOLS 7
+#define GEOM_NUM_ICOLS 2
+
+#define NEXT		TRUE
+#define PREVIOUS	FALSE
+
+/* Editor actions that imply saving */
+enum SAVE_ACTION
+{
+  EDITOR_SAVE = 64,
+  EDITOR_NEW,
+  EDITOR_EDIT,
+  EDITOR_APPLY
+};
+
+enum EDITOR_FUNC
+{
+  /* General editor function actions */
+  EDITOR_DATA = 0,
+  EDITOR_TAGNUM,
+  EDITOR_CANCEL,
+  EDITOR_SEGPC,
+  EDITOR_RDBUTTON,
+  EDITOR_LOAD,
+
+  /* Wire editor function actions */
+  WIRE_EDITOR_WLEN,
+  WIRE_EDITOR_RLEN,
+  WIRE_EDITOR_DIAN,
+  WIRE_EDITOR_RDIA,
+  WIRE_EDITOR_TAPR,
+
+  /* Helix editor function actions */
+  HELIX_EDITOR_NTURN,
+  HELIX_EDITOR_LH,
+  HELIX_EDITOR_RH,
+  HELIX_EDITOR_LINKALL,
+  HELIX_EDITOR_LINKZO,
+  HELIX_EDITOR_LINKZHL,
+
+  /* Patch editor actions */
+  PATCH_EDITOR_ARBT,
+  PATCH_EDITOR_RECT,
+  PATCH_EDITOR_TRIA,
+  PATCH_EDITOR_QUAD,
+  PATCH_EDITOR_SURF,
+  PATCH_EDITOR_SCCD,
+
+  /* Reflect editor actions */
+  REFLECT_EDITOR_TOGGLE,
+
+  /* Frequency editor actions */
+  FREQUENCY_EDITOR_FSTEP,
+
+  /* General command function actions */
+  COMMAND_RDBUTTON,
+  COMMAND_CKBUTTON,
+
+  /* Nearfield check buttons toggled */
+  NEARFIELD_NE_CKBUTTON,
+  NEARFIELD_NH_CKBUTTON
+};
+
+/* Comment "card" columns */
+enum CARDS
+{
+  CMNT_COL_NAME = 0,
+  CMNT_COL_COMMENT,
+  CMNT_NUM_COLS
+};
+
+/* Editor spinbuttons corresponding to int list columns */
+enum SPIN_COL_I
+{
+  SPIN_COL_I1 = 0,
+  SPIN_COL_I2,
+  SPIN_COL_I3,
+  SPIN_COL_I4
+};
+
+/* Editor spinbuttons corresponding to float list columns */
+enum SPIN_COL_F
+{
+  SPIN_COL_F1 = 0,
+  SPIN_COL_F2,
+  SPIN_COL_F3,
+  SPIN_COL_F4,
+  SPIN_COL_F5,
+  SPIN_COL_F6,
+  SPIN_COL_F7
+};
+
+/* Geometry data "card" columns */
+enum GEOM_CARD
+{
+  GEOM_COL_NAME = 0,
+  GEOM_COL_I1,
+  GEOM_COL_I2,
+  GEOM_COL_F1,
+  GEOM_COL_F2,
+  GEOM_COL_F3,
+  GEOM_COL_F4,
+  GEOM_COL_F5,
+  GEOM_COL_F6,
+  GEOM_COL_F7,
+  GEOM_NUM_COLS
+};
+
+/* Control/Command "card" columns */
+enum CMND_CARD
+{
+  CMND_COL_NAME = 0,
+  CMND_COL_I1,
+  CMND_COL_I2,
+  CMND_COL_I3,
+  CMND_COL_I4,
+  CMND_COL_F1,
+  CMND_COL_F2,
+  CMND_COL_F3,
+  CMND_COL_F4,
+  CMND_COL_F5,
+  CMND_COL_F6,
+  CMND_NUM_COLS
+};
+
+/* F1-F7 columns of GW & GC cards */
+enum GW_COLS
+{
+  WIRE_X1 = 0,
+  WIRE_Y1,
+  WIRE_Z1,
+  WIRE_X2,
+  WIRE_Y2,
+  WIRE_Z2,
+  WIRE_DIA,
+  WIRE_RLEN,
+  WIRE_DIA1,
+  WIRE_DIAN,
+  WIRE_RDIA,
+  WIRE_PCL,
+  WIRE_LEN,
+  WIRE_RES
+};
+
+/* Patch types */
+enum PATCH_TYPE
+{
+  PATCH_ARBT = 0,
+  PATCH_RECT,
+  PATCH_TRIA,
+  PATCH_QUAD,
+  PATCH_SURF
+};
+
+/* F1-F6 columns of SP & SC cards */
+enum SP_COLS
+{
+  PATCH_X1 = 0,
+  PATCH_Y1,
+  PATCH_Z1,
+  PATCH_X2,
+  PATCH_Y2,
+  PATCH_Z2,
+  UNUSED_F1,
+  PATCH_X3,
+  PATCH_Y3,
+  PATCH_Z3,
+  PATCH_X4,
+  PATCH_Y4,
+  PATCH_Z4,
+  UNUSED_F2
+};
+
+/* GA card float data */
+enum GA_CARD
+{
+  ARC_RAD = 0,
+  ARC_END1,
+  ARC_END2,
+  ARC_DIA,
+  ARC_PCL,
+  ARC_RES
+};
+
+/* GH card float data */
+enum GH_CARD
+{
+  HELIX_TSPACE = 0,
+  HELIX_LEN,
+  HELIX_RXZO,
+  HELIX_RYZO,
+  HELIX_RXZHL,
+  HELIX_RYZHL,
+  HELIX_DIA,
+  HELIX_PCL,
+  HELIX_NTURN,
+  HELIX_RES
+};
+
+#endif
+
diff --git a/src/fields.c b/src/fields.c
new file mode 100644
index 0000000..7cff010
--- /dev/null
+++ b/src/fields.c
@@ -0,0 +1,1926 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/******* Translated to the C language by N. Kyriazis  20 Aug 2003 ******
+
+  Program NEC(input,tape5=input,output,tape11,tape12,tape13,tape14,
+  tape15,tape16,tape20,tape21)
+
+  Numerical Electromagnetics Code (NEC2)  developed at Lawrence
+  Livermore lab., Livermore, CA.  (contact G. Burke at 415-422-8414
+  for problems with the NEC code. For problems with the vax implem-
+  entation, contact J. Breakall at 415-422-8196 or E. Domning at 415
+  422-5936)
+  file created 4/11/80.
+
+ ***********Notice**********
+ This computer code material was prepared as an account of work
+ sponsored by the United States government.  Neither the United
+ States nor the United States Department Of Energy, nor any of
+ their employees, nor any of their contractors, subcontractors,
+ or their employees, makes any warranty, express or implied, or
+ assumes any legal liability or responsibility for the accuracy,
+ completeness or usefulness of any information, apparatus, product
+ or process disclosed, or represents that its use would not infringe
+ privately-owned rights.
+
+ **********************************************************************/
+
+#include "fields.h"
+#include "shared.h"
+
+/* common  /tmi/ */
+static tmi_t tmi;
+
+/*common  /tmh/ */
+static tmh_t tmh;
+
+/*-------------------------------------------------------------------*/
+
+/* compute near e fields of a segment with sine, cosine, and */
+/* constant currents.  ground effect included. */
+void efld( double xi, double yi,
+	double zi, double ai, int ij )
+{
+  #define	txk	egnd[0]
+  #define	tyk	egnd[1]
+  #define	tzk	egnd[2]
+  #define	txs	egnd[3]
+  #define	tys	egnd[4]
+  #define	tzs	egnd[5]
+  #define	txc	egnd[6]
+  #define	tyc	egnd[7]
+  #define	tzc	egnd[8]
+
+  int ip, ijx;
+  double xij, yij, rfl, salpr, zij, zp, rhox;
+  double rhoy, rhoz, rh, r, rmag, cth, px, py;
+  double xymag, xspec, yspec, rhospc, dmin;
+  complex double epx, epy, refs, refps, zrsin, zratx, zscrn;
+  complex double tezs, ters, tezc=0.0, terc=0.0, tezk=0.0, terk=0.0;
+  static complex double *egnd = NULL;
+
+  size_t mreq = 9 * sizeof(complex double);
+  mem_alloc( (void *)&egnd, mreq, "in fields.c");
+
+  xij= xi- dataj.xj;
+  yij= yi- dataj.yj;
+  ijx= ij;
+  rfl=-1.0;
+
+  for( ip = 0; ip < gnd.ksymp; ip++ )
+  {
+	if( ip == 1)
+	  ijx=1;
+	rfl= -rfl;
+	salpr= dataj.salpj* rfl;
+	zij= zi- rfl* dataj.zj;
+	zp= xij* dataj.cabj+ yij* dataj.sabj+ zij* salpr;
+	rhox= xij- dataj.cabj* zp;
+	rhoy= yij- dataj.sabj* zp;
+	rhoz= zij- salpr* zp;
+
+	rh= sqrt( rhox* rhox+ rhoy* rhoy+ rhoz* rhoz+ ai* ai);
+	if( rh <= 1.0e-10)
+	{
+	  rhox=0.0;
+	  rhoy=0.0;
+	  rhoz=0.0;
+	}
+	else
+	{
+	  rhox= rhox/ rh;
+	  rhoy= rhoy/ rh;
+	  rhoz= rhoz/ rh;
+	}
+
+	/* lumped current element approx. for large separations */
+	r= sqrt( zp* zp+ rh* rh);
+	if( r >= dataj.rkh)
+	{
+	  rmag= TP* r;
+	  cth= zp/ r;
+	  px= rh/ r;
+	  txk= cmplx( cos( rmag),- sin( rmag));
+	  py= TP* r* r;
+	  tyk= ETA* cth* txk* cmplx(1.0,-1.0/ rmag)/ py;
+	  tzk= ETA* px* txk* cmplx(1.0, rmag-1.0/ rmag)/(2.0* py);
+	  tezk= tyk* cth- tzk* px;
+	  terk= tyk* px+ tzk* cth;
+	  rmag= sin( PI* dataj.s)/ PI;
+	  tezc= tezk* rmag;
+	  terc= terk* rmag;
+	  tezk= tezk* dataj.s;
+	  terk= terk* dataj.s;
+	  txs=CPLX_00;
+	  tys=CPLX_00;
+	  tzs=CPLX_00;
+
+	} /* if( r >= dataj.rkh) */
+
+	if( r < dataj.rkh)
+	{
+	  /* eksc for thin wire approx. or ekscx for extended t.w. approx. */
+	  if( dataj.iexk != 1)
+	   eksc( dataj.s, zp, rh, TP, ijx, &tezs, &ters,
+			&tezc, &terc, &tezk, &terk );
+	  else
+		ekscx( dataj.b, dataj.s, zp, rh, TP, ijx, dataj.ind1,
+			dataj.ind2,	&tezs, &ters, &tezc, &terc, &tezk, &terk);
+
+	  txs= tezs* dataj.cabj+ ters* rhox;
+	  tys= tezs* dataj.sabj+ ters* rhoy;
+	  tzs= tezs* salpr+ ters* rhoz;
+
+	} /* if( r < dataj.rkh) */
+
+	txk= tezk* dataj.cabj+ terk* rhox;
+	tyk= tezk* dataj.sabj+ terk* rhoy;
+	tzk= tezk* salpr+ terk* rhoz;
+	txc= tezc* dataj.cabj+ terc* rhox;
+	tyc= tezc* dataj.sabj+ terc* rhoy;
+	tzc= tezc* salpr+ terc* rhoz;
+
+	if( ip == 1)
+	{
+	  if( gnd.iperf <= 0)
+	  {
+		zratx= gnd.zrati;
+		rmag= r;
+		xymag= sqrt( xij* xij+ yij* yij);
+
+		/* set parameters for radial wire ground screen. */
+		if( gnd.nradl > 0)
+		{
+		  xspec=( xi* dataj.zj+ zi* dataj.xj)/( zi+ dataj.zj);
+		  yspec=( yi* dataj.zj+ zi* dataj.yj)/( zi+ dataj.zj);
+		  rhospc= sqrt( xspec* xspec+ yspec* yspec+ gnd.t2* gnd.t2);
+
+		  if( rhospc <= gnd.scrwl)
+		  {
+			zscrn= gnd.t1* rhospc* log( rhospc/ gnd.t2);
+			zratx=( zscrn* gnd.zrati)/( ETA* gnd.zrati+ zscrn);
+		  }
+		} /* if( gnd.nradl > 0) */
+		else
+		{
+		  xspec= 0.0;
+		  yspec= 0.0;
+		  rhospc= 0.0;
+		  zscrn= 0.0;
+		  zratx= 0.0;
+		}
+
+		/* calculation of reflection coefficients
+		 * when ground is specified. */
+		if( xymag <= 1.0e-6)
+		{
+		  px=0.0;
+		  py=0.0;
+		  cth=1.0;
+		  zrsin=CPLX_10;
+		}
+		else
+		{
+		  px= -yij/ xymag;
+		  py= xij/ xymag;
+		  cth= zij/ rmag;
+		  zrsin= csqrt(1.0 - zratx*zratx*(1.0 - cth*cth) );
+
+		} /* if( xymag <= 1.0e-6) */
+
+		refs=( cth- zratx* zrsin)/( cth+ zratx* zrsin);
+		refps=-( zratx* cth- zrsin)/( zratx* cth+ zrsin);
+		refps= refps- refs;
+		epy= px* txk+ py* tyk;
+		epx= px* epy;
+		epy= py* epy;
+		txk= refs* txk+ refps* epx;
+		tyk= refs* tyk+ refps* epy;
+		tzk= refs* tzk;
+		epy= px* txs+ py* tys;
+		epx= px* epy;
+		epy= py* epy;
+		txs= refs* txs+ refps* epx;
+		tys= refs* tys+ refps* epy;
+		tzs= refs* tzs;
+		epy= px* txc+ py* tyc;
+		epx= px* epy;
+		epy= py* epy;
+		txc= refs* txc+ refps* epx;
+		tyc= refs* tyc+ refps* epy;
+		tzc= refs* tzc;
+
+	  } /* if( gnd.iperf <= 0) */
+
+	  dataj.exk= dataj.exk- txk* gnd.frati;
+	  dataj.eyk= dataj.eyk- tyk* gnd.frati;
+	  dataj.ezk= dataj.ezk- tzk* gnd.frati;
+	  dataj.exs= dataj.exs- txs* gnd.frati;
+	  dataj.eys= dataj.eys- tys* gnd.frati;
+	  dataj.ezs= dataj.ezs- tzs* gnd.frati;
+	  dataj.exc= dataj.exc- txc* gnd.frati;
+	  dataj.eyc= dataj.eyc- tyc* gnd.frati;
+	  dataj.ezc= dataj.ezc- tzc* gnd.frati;
+	  continue;
+
+	} /* if( ip == 1) */
+
+	dataj.exk= txk;
+	dataj.eyk= tyk;
+	dataj.ezk= tzk;
+	dataj.exs= txs;
+	dataj.eys= tys;
+	dataj.ezs= tzs;
+	dataj.exc= txc;
+	dataj.eyc= tyc;
+	dataj.ezc= tzc;
+
+  } /* for( ip = 0; ip < gnd.ksymp; ip++ ) */
+
+  if( gnd.iperf != 2)
+	return;
+
+  /* field due to ground using sommerfeld/norton */
+  incom.sn= sqrt( dataj.cabj* dataj.cabj+ dataj.sabj* dataj.sabj);
+  if( incom.sn >= 1.0e-5)
+  {
+	incom.xsn= dataj.cabj/ incom.sn;
+	incom.ysn= dataj.sabj/ incom.sn;
+  }
+  else
+  {
+	incom.sn=0.0;
+	incom.xsn=1.0;
+	incom.ysn=0.0;
+  }
+
+  /* displace observation point for thin wire approximation */
+  zij= zi+ dataj.zj;
+  salpr= -dataj.salpj;
+  rhox= dataj.sabj* zij- salpr* yij;
+  rhoy= salpr* xij- dataj.cabj* zij;
+  rhoz= dataj.cabj* yij- dataj.sabj* xij;
+  rh= rhox* rhox+ rhoy* rhoy+ rhoz* rhoz;
+
+  if( rh <= 1.0e-10)
+  {
+	incom.xo= xi- ai* incom.ysn;
+	incom.yo= yi+ ai* incom.xsn;
+	incom.zo= zi;
+  }
+  else
+  {
+	rh= ai/ sqrt( rh);
+	if( rhoz < 0.0)
+	  rh= -rh;
+	incom.xo= xi+ rh* rhox;
+	incom.yo= yi+ rh* rhoy;
+	incom.zo= zi+ rh* rhoz;
+
+  } /* if( rh <= 1.0e-10) */
+
+  r= xij* xij+ yij* yij+ zij* zij;
+  if( r <= .95)
+  {
+	double shaf;
+
+	/* field from interpolation is integrated over segment */
+	incom.isnor=1;
+	dmin=
+	  creal(dataj.exk*conj(dataj.exk)) +
+	  creal(dataj.eyk*conj(dataj.eyk)) +
+	  creal(dataj.ezk*conj(dataj.ezk));
+	dmin=.01* sqrt( dmin);
+	shaf=.5* dataj.s;
+	rom2(- shaf, shaf, egnd, dmin);
+  }
+  else
+  {
+	/* norton field equations and lumped
+	 * current element approximation */
+	incom.isnor=2;
+	sflds(0.0, egnd);
+  } /* if( r <= .95) */
+
+  if( r > .95)
+  {
+	zp= xij* dataj.cabj+ yij* dataj.sabj+ zij* salpr;
+	rh= r- zp* zp;
+	if( rh <= 1.0e-10)
+	  dmin=0.0;
+	else dmin= sqrt( rh/( rh+ ai* ai));
+
+	if( dmin <= .95)
+	{
+	  px=1.0- dmin;
+	  terk=( txk* dataj.cabj+ tyk* dataj.sabj+ tzk* salpr)* px;
+	  txk= dmin* txk+ terk* dataj.cabj;
+	  tyk= dmin* tyk+ terk* dataj.sabj;
+	  tzk= dmin* tzk+ terk* salpr;
+	  ters=( txs* dataj.cabj+ tys* dataj.sabj+ tzs* salpr)* px;
+	  txs= dmin* txs+ ters* dataj.cabj;
+	  tys= dmin* tys+ ters* dataj.sabj;
+	  tzs= dmin* tzs+ ters* salpr;
+	  terc=( txc* dataj.cabj+ tyc* dataj.sabj+ tzc* salpr)* px;
+	  txc= dmin* txc+ terc* dataj.cabj;
+	  tyc= dmin* tyc+ terc* dataj.sabj;
+	  tzc= dmin* tzc+ terc* salpr;
+
+	} /* if( dmin <= .95) */
+
+  } /* if( r > .95) */
+
+  dataj.exk= dataj.exk+ txk;
+  dataj.eyk= dataj.eyk+ tyk;
+  dataj.ezk= dataj.ezk+ tzk;
+  dataj.exs= dataj.exs+ txs;
+  dataj.eys= dataj.eys+ tys;
+  dataj.ezs= dataj.ezs+ tzs;
+  dataj.exc= dataj.exc+ txc;
+  dataj.eyc= dataj.eyc+ tyc;
+  dataj.ezc= dataj.ezc+ tzc;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* compute e field of sine, cosine, and constant */
+/* current filaments by thin wire approximation. */
+void eksc( double s, double z, double rh,
+	double xk, int ij,	complex double *ezs,
+	complex double *ers, complex double *ezc,
+	complex double *erc, complex double *ezk,
+	complex double *erk )
+{
+  double rhk, sh, shk, ss, cs, z1a, z2a, cint, sint;
+  complex double gz1, gz2, gp1, gp2, gzp1, gzp2;
+
+  tmi.ij= ij;
+  tmi.zpk= xk* z;
+  rhk= xk* rh;
+  tmi.rkb2= rhk* rhk;
+  sh=.5* s;
+  shk= xk* sh;
+  ss= sin( shk);
+  cs= cos( shk);
+  z2a= sh- z;
+  z1a=-( sh+ z);
+  gx( z1a, rh, xk, &gz1, &gp1);
+  gx( z2a, rh, xk, &gz2, &gp2);
+  gzp1= gp1* z1a;
+  gzp2= gp2* z2a;
+  *ezs=  CONST1*(( gz2- gz1)* cs* xk-( gzp2+ gzp1)* ss);
+  *ezc= -CONST1*(( gz2+ gz1)* ss* xk+( gzp2- gzp1)* cs);
+  *erk= CONST1*( gp2- gp1)* rh;
+  intx(- shk, shk, rhk, ij, &cint, &sint);
+  *ezk= -CONST1*( gzp2- gzp1+ xk* xk* cmplx( cint,- sint));
+  gzp1= gzp1* z1a;
+  gzp2= gzp2* z2a;
+
+  if( rh >= 1.0e-10)
+  {
+	*ers= -CONST1*(( gzp2+ gzp1+ gz2+ gz1)*
+		ss-( z2a* gz2- z1a* gz1)* cs*xk)/ rh;
+	*erc= -CONST1*(( gzp2- gzp1+ gz2- gz1)*
+		cs+( z2a* gz2+ z1a* gz1)* ss*xk)/ rh;
+	return;
+  }
+
+  *ers = CPLX_00;
+  *erc = CPLX_00;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* compute e field of sine, cosine, and constant current */
+/* filaments by extended thin wire approximation. */
+void ekscx( double bx, double s, double z,
+	double rhx, double xk, int ij, int inx1,
+	int inx2, complex double *ezs, complex double *ers,
+	complex double *ezc, complex double *erc,
+	complex double *ezk, complex double *erk )
+{
+  int ira;
+  double b, rh, sh, rhk, shk, ss, cs, z1a;
+  double z2a, a2, bk, bk2, cint, sint;
+  complex double gz1, gz2, gzp1, gzp2, gr1, gr2;
+  complex double grp1, grp2, grk1, grk2, gzz1, gzz2;
+
+  if( rhx >= bx)
+  {
+	rh= rhx;
+	b= bx;
+	ira=0;
+  }
+  else
+  {
+	rh= bx;
+	b= rhx;
+	ira=1;
+  }
+
+  sh=.5* s;
+  tmi.ij= ij;
+  tmi.zpk= xk* z;
+  rhk= xk* rh;
+  tmi.rkb2= rhk* rhk;
+  shk= xk* sh;
+  ss= sin( shk);
+  cs= cos( shk);
+  z2a= sh- z;
+  z1a=-( sh+ z);
+  a2= b* b;
+
+  if( inx1 != 2)
+	gxx( z1a, rh, b, a2, xk, ira, &gz1,
+		&gzp1, &gr1, &grp1, &grk1, &gzz1);
+  else
+  {
+	gx( z1a, rhx, xk, &gz1, &grk1);
+	gzp1= grk1* z1a;
+	gr1= gz1/ rhx;
+	grp1= gzp1/ rhx;
+	grk1= grk1* rhx;
+	gzz1= CPLX_00;
+  }
+
+  if( inx2 != 2)
+	gxx( z2a, rh, b, a2, xk, ira, &gz2,
+		&gzp2, &gr2, &grp2, &grk2, &gzz2);
+  else
+  {
+	gx( z2a, rhx, xk, &gz2, &grk2);
+	gzp2= grk2* z2a;
+	gr2= gz2/ rhx;
+	grp2= gzp2/ rhx;
+	grk2= grk2* rhx;
+	gzz2= CPLX_00;
+  }
+
+  *ezs= CONST1*(( gz2- gz1)* cs* xk-( gzp2+ gzp1)* ss);
+  *ezc= -CONST1*(( gz2+ gz1)* ss* xk+( gzp2- gzp1)* cs);
+  *ers= -CONST1*(( z2a* grp2+ z1a* grp1+ gr2+ gr1)*ss
+	  -( z2a* gr2- z1a* gr1)* cs* xk);
+  *erc= -CONST1*(( z2a* grp2- z1a* grp1+ gr2- gr1)*cs
+	  +( z2a* gr2+ z1a* gr1)* ss* xk);
+  *erk= CONST1*( grk2- grk1);
+  intx(- shk, shk, rhk, ij, &cint, &sint);
+  bk= b* xk;
+  bk2= bk* bk*.25;
+  *ezk= -CONST1*( gzp2- gzp1+ xk* xk*(1.0- bk2)*
+	  cmplx( cint,- sint)-bk2*( gzz2- gzz1));
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* gf computes the integrand exp(jkr)/(kr) for numerical integration. */
+void gf( double zk, double *co, double *si )
+{
+  double zdk, rk, rks;
+
+  zdk= zk- tmi.zpk;
+  rk= sqrt( tmi.rkb2+ zdk* zdk);
+  *si= sin( rk)/ rk;
+
+  if( tmi.ij != 0 )
+  {
+	*co= cos( rk)/ rk;
+	return;
+  }
+
+  if( rk >= .2l)
+  {
+	*co=( cos( rk)-1.0)/ rk;
+	return;
+  }
+
+  rks= rk* rk;
+  *co=((-1.38888889e-3* rks+4.16666667e-2)* rks-.5)* rk;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* integrand for h field of a wire */
+void gh( double zk, double *hr, double *hi)
+{
+  double rs, r, ckr, skr, rr2, rr3;
+
+  rs= zk- tmh.zpka;
+  rs= tmh.rhks+ rs* rs;
+  r= sqrt( rs);
+  ckr= cos( r);
+  skr= sin( r);
+  rr2=1.0/ rs;
+  rr3= rr2/ r;
+  *hr= skr* rr2+ ckr* rr3;
+  *hi= ckr* rr2- skr* rr3;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* gwave computes the electric field, including ground wave, of a */
+/* current element over a ground plane using formulas of k.a. norton */
+/* (proc. ire, sept., 1937, pp.1203,1236) */
+
+void gwave( complex double *erv, complex double *ezv,
+	complex double *erh, complex double *ezh,
+	complex double *eph )
+{
+  double sppp, sppp2, cppp2, cppp, spp, spp2, cpp2, cpp;
+  complex double rk1, rk2, t1, t2, t3, t4, p1, rv;
+  complex double omr, w, f, q1, rh, v, g, xr1, xr2;
+  complex double x1, x2, x3, x4, x5, x6, x7;
+
+  sppp= gwav.zmh/ gwav.r1;
+  sppp2= sppp* sppp;
+  cppp2=1.0- sppp2;
+
+  if( cppp2 < 1.0e-20)
+	cppp2=1.0e-20;
+
+  cppp= sqrt( cppp2);
+  spp= gwav.zph/ gwav.r2;
+  spp2= spp* spp;
+  cpp2=1.0- spp2;
+
+  if( cpp2 < 1.0e-20)
+	cpp2=1.0e-20;
+
+  cpp= sqrt( cpp2);
+  rk1= -TPJ* gwav.r1;
+  rk2= -TPJ* gwav.r2;
+  t1=1.0 -gwav.u2* cpp2;
+  t2= csqrt( t1);
+  t3=(1.0 -1.0/ rk1)/ rk1;
+  t4=(1.0 -1.0/ rk2)/ rk2;
+  p1= rk2* gwav.u2* t1/(2.0* cpp2);
+  rv=( spp- gwav.u* t2)/( spp+ gwav.u* t2);
+  omr=1.0- rv;
+  w=1.0/ omr;
+  w=(4.0 + I*0.0)* p1* w* w;
+  fbar( w, &f );
+  q1= rk2* t1/(2.0* gwav.u2* cpp2);
+  rh=( t2- gwav.u* spp)/( t2+ gwav.u* spp);
+  v=1.0/(1.0+ rh);
+  v=(4.0 + I*0.0)* q1* v* v;
+  fbar( v, &g );
+  xr1= gwav.xx1/ gwav.r1;
+  xr2= gwav.xx2/ gwav.r2;
+  x1= cppp2* xr1;
+  x2= rv* cpp2* xr2;
+  x3= omr* cpp2* f* xr2;
+  x4= gwav.u* t2* spp*2.0* xr2/ rk2;
+  x5= xr1* t3*(1.0-3.0* sppp2);
+  x6= xr2* t4*(1.0-3.0* spp2);
+  *ezv=( x1+ x2+ x3- x4- x5- x6)* (-CONST4);
+  x1= sppp* cppp* xr1;
+  x2= rv* spp* cpp* xr2;
+  x3= cpp* omr* gwav.u* t2* f* xr2;
+  x4= spp* cpp* omr* xr2/ rk2;
+  x5=3.0* sppp* cppp* t3* xr1;
+  x6= cpp* gwav.u* t2* omr* xr2/ rk2*.50;
+  x7=3.0* spp* cpp* t4* xr2;
+  *erv=-( x1+ x2- x3+ x4- x5+ x6- x7)* (-CONST4);
+  *ezh=-( x1- x2+ x3- x4- x5- x6+ x7)* (-CONST4);
+  x1= sppp2* xr1;
+  x2= rv* spp2* xr2;
+  x4= gwav.u2* t1* omr* f* xr2;
+  x5= t3*(1.0-3.0* cppp2)* xr1;
+  x6= t4*(1.0-3.0* cpp2)*(1.0- gwav.u2*(1.0+ rv )-
+	  gwav.u2* omr* f)* xr2;
+  x7= gwav.u2* cpp2* omr*(1.0-1.0/ rk2)*( f*( gwav.u2* t1 -
+		spp2-1.0/ rk2)+1.0/rk2)* xr2;
+  *erh=( x1- x2- x4- x5+ x6+ x7)* (-CONST4);
+  x1= xr1;
+  x2= rh* xr2;
+  x3=( rh+1.0)* g* xr2;
+  x4= t3* xr1;
+  x5= t4*(1.0- gwav.u2*(1.0+ rv)- gwav.u2* omr* f)* xr2;
+  x6=.5* gwav.u2* omr*( f*( gwav.u2* t1- spp2-1.0/ rk2) +
+	  1.0/ rk2)* xr2/ rk2;
+  *eph=-( x1- x2+ x3- x4+ x5+ x6)* (-CONST4);
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* segment end contributions for thin wire approx. */
+void gx( double zz, double rh, double xk,
+	complex double *gz, complex double *gzp)
+{
+  double r, r2, rkz;
+
+  r2= zz* zz+ rh* rh;
+  r= sqrt( r2);
+  rkz= xk* r;
+  *gz= cmplx( cos( rkz),- sin( rkz))/ r;
+  *gzp= -cmplx(1.0, rkz)* *gz/ r2;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* segment end contributions for ext. thin wire approx. */
+void gxx( double zz, double rh, double a,
+	double a2, double xk, int ira, complex double *g1,
+	complex double *g1p, complex double *g2,
+	complex double *g2p, complex double *g3,
+	complex double *gzp )
+{
+  double r, r2, r4, rk, rk2, rh2, t1, t2;
+  complex double  gz, c1, c2, c3;
+
+  r2= zz* zz+ rh* rh;
+  r= sqrt( r2);
+  r4= r2* r2;
+  rk= xk* r;
+  rk2= rk* rk;
+  rh2= rh* rh;
+  t1=.25* a2* rh2/ r4;
+  t2=.5* a2/ r2;
+  c1= cmplx(1.0, rk);
+  c2=3.0* c1- rk2;
+  c3= cmplx(6.0, rk)* rk2-15.0* c1;
+  gz= cmplx( cos( rk),- sin( rk))/ r;
+  *g2= gz*(1.0+ t1* c2);
+  *g1= *g2- t2* c1* gz;
+  gz= gz/ r2;
+  *g2p= gz*( t1* c3- c1);
+  *gzp= t2* c2* gz;
+  *g3= *g2p+ *gzp;
+  *g1p= *g3* zz;
+
+  if( ira != 1)
+  {
+	*g3=( *g3+ *gzp)* rh;
+	*gzp= -zz* c1* gz;
+
+	if( rh <= 1.0e-10)
+	{
+	  *g2=0.0;
+	  *g2p=0.0;
+	  return;
+	}
+
+	*g2= *g2/ rh;
+	*g2p= *g2p* zz/ rh;
+	return;
+
+  } /* if( ira != 1) */
+
+  t2=.5* a;
+  *g2= -t2* c1* gz;
+  *g2p= t2* gz* c2/ r2;
+  *g3= rh2* *g2p- a* gz* c1;
+  *g2p= *g2p* zz;
+  *gzp= -zz* c1* gz;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* hfk computes the h field of a uniform current */
+/* filament by numerical integration */
+void hfk( double el1, double el2, double rhk,
+	double zpkx, double *sgr, double *sgi )
+{
+  int nx = 1, nma = 65536, nts = 4;
+  int ns, nt;
+  int flag = TRUE;
+  double rx = 1.0e-4;
+  double z, ze, s, ep, zend, dz=0.0, zp, dzot=0.0;
+  double t00r, g1r, g5r=0.0, t00i, g1i, g5i=0.0, t01r;
+  double g3r=0.0, t01i, g3i=0.0, t10r, t10i, te1i;
+  double te1r, g2r, g4r, t02i, g2i, g4i, t11r, t11i;
+  double t20r, t20i, te2i, te2r, t02r;
+
+  tmh.zpka= zpkx;
+  tmh.rhks= rhk* rhk;
+  z= el1;
+  ze= el2;
+  s= ze- z;
+  ep= s/(10.0* nma);
+  zend= ze- ep;
+  *sgr=0.0;
+  *sgi=0.0;
+  ns= nx;
+  nt=0;
+  gh( z, &g1r, &g1i);
+
+  while( TRUE )
+  {
+	if( flag )
+	{
+	  dz= s/ ns;
+	  zp= z+ dz;
+
+	  if( zp > ze )
+	  {
+		dz= ze- z;
+		if( fabs(dz) <= ep )
+		{
+		  *sgr= *sgr* rhk*.5;
+		  *sgi= *sgi* rhk*.5;
+		  return;
+		}
+	  }
+
+	  dzot= dz*.5;
+	  zp= z+ dzot;
+	  gh( zp, &g3r, &g3i);
+	  zp= z+ dz;
+	  gh( zp, &g5r, &g5i);
+
+	} /* if( flag ) */
+
+	t00r=( g1r+ g5r)* dzot;
+	t00i=( g1i+ g5i)* dzot;
+	t01r=( t00r+ dz* g3r)*0.5;
+	t01i=( t00i+ dz* g3i)*0.5;
+	t10r=(4.0* t01r- t00r)/3.0;
+	t10i=(4.0* t01i- t00i)/3.0;
+
+	test( t01r, t10r, &te1r, t01i, t10i, &te1i, 0.0);
+	if( (te1i <= rx) && (te1r <= rx) )
+	{
+	  *sgr= *sgr+ t10r;
+	  *sgi= *sgi+ t10i;
+	  nt += 2;
+
+	  z += dz;
+	  if( z >= zend)
+	  {
+		*sgr= *sgr* rhk*.5;
+		*sgi= *sgi* rhk*.5;
+		return;
+	  }
+
+	  g1r= g5r;
+	  g1i= g5i;
+	  if( nt >= nts)
+		if( ns > nx)
+		{
+		  ns= ns/2;
+		  nt=1;
+		}
+	  flag = TRUE;
+	  continue;
+
+	} /* if( (te1i <= rx) && (te1r <= rx) ) */
+
+	zp= z+ dz*0.25;
+	gh( zp, &g2r, &g2i);
+	zp= z+ dz*0.75;
+	gh( zp, &g4r, &g4i);
+	t02r=( t01r+ dzot*( g2r+ g4r))*0.5;
+	t02i=( t01i+ dzot*( g2i+ g4i))*0.5;
+	t11r=(4.0* t02r- t01r)/3.0;
+	t11i=(4.0* t02i- t01i)/3.0;
+	t20r=(16.0* t11r- t10r)/15.0;
+	t20i=(16.0* t11i- t10i)/15.0;
+
+	test( t11r, t20r, &te2r, t11i, t20i, &te2i, 0.0);
+	if( (te2i > rx) || (te2r > rx) )
+	{
+	  nt=0;
+	  if( ns >= nma)
+	  {
+		fprintf( stderr,
+			"\nxnec2c: step size limited at z= %10.5f", z );
+	  }
+	  else
+	  {
+		ns= ns*2;
+		dz= s/ ns;
+		dzot= dz*0.5;
+		g5r= g3r;
+		g5i= g3i;
+		g3r= g2r;
+		g3i= g2i;
+
+		flag = FALSE;
+		continue;
+	  }
+
+	} /* if( (te2i > rx) || (te2r > rx) ) */
+
+	*sgr= *sgr+ t20r;
+	*sgi= *sgi+ t20i;
+	nt++;
+
+	z += dz;
+	if( z >= zend)
+	{
+	  *sgr= *sgr* rhk*.5;
+	  *sgi= *sgi* rhk*.5;
+	  return;
+	}
+
+	g1r= g5r;
+	g1i= g5i;
+	if( nt >= nts)
+	  if( ns > nx)
+	  {
+		ns= ns/2;
+		nt=1;
+	  }
+	flag = TRUE;
+
+  } /* while( TRUE ) */
+
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* hintg computes the h field of a patch current */
+void hintg( double xi, double yi, double zi )
+{
+  int ip;
+  double rx, ry, rfl, xymag, pxx, pyy, cth;
+  double rz, rsq, r, rk, cr, sr, t1zr, t2zr;
+  complex double  gam, f1x, f1y, f1z, f2x, f2y, f2z, rrv, rrh;
+
+  rx= xi- dataj.xj;
+  ry= yi- dataj.yj;
+  rfl=-1.0;
+  dataj.exk=CPLX_00;
+  dataj.eyk=CPLX_00;
+  dataj.ezk=CPLX_00;
+  dataj.exs=CPLX_00;
+  dataj.eys=CPLX_00;
+  dataj.ezs=CPLX_00;
+
+  for( ip = 1; ip <= gnd.ksymp; ip++ )
+  {
+	rfl= -rfl;
+	rz= zi- dataj.zj* rfl;
+	rsq= rx* rx+ ry* ry+ rz* rz;
+
+	if( rsq < 1.0e-20)
+	  continue;
+
+	r = sqrt( rsq );
+	rk= TP* r;
+	cr= cos( rk);
+	sr= sin( rk);
+	gam=-( cmplx(cr,-sr)+rk*cmplx(sr,cr) )/( FPI*rsq*r )* dataj.s;
+	dataj.exc= gam* rx;
+	dataj.eyc= gam* ry;
+	dataj.ezc= gam* rz;
+	t1zr= dataj.t1zj* rfl;
+	t2zr= dataj.t2zj* rfl;
+	f1x= dataj.eyc* t1zr- dataj.ezc* dataj.t1yj;
+	f1y= dataj.ezc* dataj.t1xj- dataj.exc* t1zr;
+	f1z= dataj.exc* dataj.t1yj- dataj.eyc* dataj.t1xj;
+	f2x= dataj.eyc* t2zr- dataj.ezc* dataj.t2yj;
+	f2y= dataj.ezc* dataj.t2xj- dataj.exc* t2zr;
+	f2z= dataj.exc* dataj.t2yj- dataj.eyc* dataj.t2xj;
+
+	if( ip != 1)
+	{
+	  if( gnd.iperf == 1)
+	  {
+		f1x= -f1x;
+		f1y= -f1y;
+		f1z= -f1z;
+		f2x= -f2x;
+		f2y= -f2y;
+		f2z= -f2z;
+	  }
+	  else
+	  {
+		xymag= sqrt( rx* rx+ ry* ry);
+		if( xymag <= 1.0e-6)
+		{
+		  pxx=0.0;
+		  pyy=0.0;
+		  cth=1.0;
+		  rrv=CPLX_10;
+		}
+		else
+		{
+		  pxx= -ry/ xymag;
+		  pyy= rx/ xymag;
+		  cth= rz/ r;
+		  rrv= csqrt(1.0- gnd.zrati* gnd.zrati*(1.0- cth* cth));
+
+		} /* if( xymag <= 1.0e-6) */
+
+		rrh= gnd.zrati* cth;
+		rrh=( rrh- rrv)/( rrh+ rrv);
+		rrv= gnd.zrati* rrv;
+		rrv=-( cth- rrv)/( cth+ rrv);
+		gam=( f1x* pxx+ f1y* pyy)*( rrv- rrh);
+		f1x= f1x* rrh+ gam* pxx;
+		f1y= f1y* rrh+ gam* pyy;
+		f1z= f1z* rrh;
+		gam=( f2x* pxx+ f2y* pyy)*( rrv- rrh);
+		f2x= f2x* rrh+ gam* pxx;
+		f2y= f2y* rrh+ gam* pyy;
+		f2z= f2z* rrh;
+
+	  } /* if( gnd.iperf == 1) */
+
+	} /* if( ip != 1) */
+
+	dataj.exk += f1x;
+	dataj.eyk += f1y;
+	dataj.ezk += f1z;
+	dataj.exs += f2x;
+	dataj.eys += f2y;
+	dataj.ezs += f2z;
+
+  } /* for( ip = 1; ip <= gnd.ksymp; ip++ ) */
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* hsfld computes the h field for constant, sine, and */
+/* cosine current on a segment including ground effects. */
+void hsfld( double xi, double yi,
+	double zi, double ai )
+{
+  int ip;
+  double xij, yij, rfl, salpr, zij, zp, rhox;
+  double rhoy, rhoz, rh, phx, phy, phz, rmag;
+  double xymag, xspec, yspec, rhospc, px, py, cth;
+  complex double hpk, hps, hpc, qx, qy, qz, rrv, rrh, zratx;
+
+  xij= xi- dataj.xj;
+  yij= yi- dataj.yj;
+  rfl=-1.0;
+
+  for( ip = 0; ip < gnd.ksymp; ip++ )
+  {
+	rfl= -rfl;
+	salpr= dataj.salpj* rfl;
+	zij= zi- rfl* dataj.zj;
+	zp= xij* dataj.cabj+ yij* dataj.sabj+ zij* salpr;
+	rhox= xij- dataj.cabj* zp;
+	rhoy= yij- dataj.sabj* zp;
+	rhoz= zij- salpr* zp;
+	rh= sqrt( rhox* rhox+ rhoy* rhoy+ rhoz* rhoz+ ai* ai);
+
+	if( rh <= 1.0e-10)
+	{
+	  dataj.exk=0.0;
+	  dataj.eyk=0.0;
+	  dataj.ezk=0.0;
+	  dataj.exs=0.0;
+	  dataj.eys=0.0;
+	  dataj.ezs=0.0;
+	  dataj.exc=0.0;
+	  dataj.eyc=0.0;
+	  dataj.ezc=0.0;
+	  continue;
+	}
+
+	rhox= rhox/ rh;
+	rhoy= rhoy/ rh;
+	rhoz= rhoz/ rh;
+	phx= dataj.sabj* rhoz- salpr* rhoy;
+	phy= salpr* rhox- dataj.cabj* rhoz;
+	phz= dataj.cabj* rhoy- dataj.sabj* rhox;
+
+	hsflx( dataj.s, rh, zp, &hpk, &hps, &hpc);
+
+	if( ip == 1 )
+	{
+	  if( gnd.iperf != 1 )
+	  {
+		zratx= gnd.zrati;
+		rmag= sqrt( zp* zp+ rh* rh);
+		xymag= sqrt( xij* xij+ yij* yij);
+
+		/* set parameters for radial wire ground screen. */
+		if( gnd.nradl > 0)
+		{
+		  xspec=( xi* dataj.zj+ zi* dataj.xj)/( zi+ dataj.zj);
+		  yspec=( yi* dataj.zj+ zi* dataj.yj)/( zi+ dataj.zj);
+		  rhospc= sqrt( xspec* xspec+ yspec* yspec+ gnd.t2* gnd.t2);
+
+		  if( rhospc <= gnd.scrwl)
+		  {
+			rrv= gnd.t1* rhospc* log( rhospc/ gnd.t2);
+			zratx=( rrv* gnd.zrati)/( ETA* gnd.zrati+ rrv);
+		  }
+		} /* if( gnd.nradl > 0) */
+
+		/* calculation of reflection coefficients
+		 * when ground is specified. */
+		if( xymag <= 1.0e-6)
+		{
+		  px=0.0;
+		  py=0.0;
+		  cth=1.0;
+		  rrv=CPLX_10;
+		}
+		else
+		{
+		  px= -yij/ xymag;
+		  py= xij/ xymag;
+		  cth= zij/ rmag;
+		  rrv= csqrt(1.0- zratx* zratx*(1.0- cth* cth));
+		}
+
+		rrh= zratx* cth;
+		rrh=-( rrh- rrv)/( rrh+ rrv);
+		rrv= zratx* rrv;
+		rrv=( cth- rrv)/( cth+ rrv);
+		qy=( phx* px+ phy* py)*( rrv- rrh);
+		qx= qy* px+ phx* rrh;
+		qy= qy* py+ phy* rrh;
+		qz= phz* rrh;
+		dataj.exk= dataj.exk- hpk* qx;
+		dataj.eyk= dataj.eyk- hpk* qy;
+		dataj.ezk= dataj.ezk- hpk* qz;
+		dataj.exs= dataj.exs- hps* qx;
+		dataj.eys= dataj.eys- hps* qy;
+		dataj.ezs= dataj.ezs- hps* qz;
+		dataj.exc= dataj.exc- hpc* qx;
+		dataj.eyc= dataj.eyc- hpc* qy;
+		dataj.ezc= dataj.ezc- hpc* qz;
+		continue;
+
+	  } /* if( gnd.iperf != 1 ) */
+	  else
+	  {
+		xspec= 0.0;
+		yspec= 0.0;
+		rhospc= 0.0;
+		rrv= 0.0;
+		zratx= 0.0;
+	  }
+
+	  dataj.exk= dataj.exk- hpk* phx;
+	  dataj.eyk= dataj.eyk- hpk* phy;
+	  dataj.ezk= dataj.ezk- hpk* phz;
+	  dataj.exs= dataj.exs- hps* phx;
+	  dataj.eys= dataj.eys- hps* phy;
+	  dataj.ezs= dataj.ezs- hps* phz;
+	  dataj.exc= dataj.exc- hpc* phx;
+	  dataj.eyc= dataj.eyc- hpc* phy;
+	  dataj.ezc= dataj.ezc- hpc* phz;
+	  continue;
+
+	} /* if( ip == 1 ) */
+
+	dataj.exk= hpk* phx;
+	dataj.eyk= hpk* phy;
+	dataj.ezk= hpk* phz;
+	dataj.exs= hps* phx;
+	dataj.eys= hps* phy;
+	dataj.ezs= hps* phz;
+	dataj.exc= hpc* phx;
+	dataj.eyc= hpc* phy;
+	dataj.ezc= hpc* phz;
+
+  } /* for( ip = 0; ip < gnd.ksymp; ip++ ) */
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* calculates h field of sine cosine, and constant current of segment */
+void hsflx( double s, double rh, double zpx,
+	complex double *hpk, complex double *hps,
+	complex double *hpc )
+{
+  complex double fjk, ekr1, ekr2, t1, t2, cons;
+
+  fjk = -TPJ;
+  if( rh >= 1.0e-10)
+  {
+	double zp, z2a, hss, dh, z1;
+	double rhz, dk, cdk, sdk, hkr, hki;
+
+	if( zpx >= 0.0)
+	{
+	  zp= zpx;
+	  hss=1.0;
+	}
+	else
+	{
+	  zp= -zpx;
+	  hss=-1.0;
+	}
+
+	dh=.5* s;
+	z1= zp+ dh;
+	z2a= zp- dh;
+	if( z2a >= 1.0e-7)
+	  rhz= rh/ z2a;
+	else
+	  rhz=1.0;
+
+	dk= TP* dh;
+	cdk= cos( dk);
+	sdk= sin( dk);
+	hfk(- dk, dk, rh* TP, zp* TP, &hkr, &hki);
+	*hpk= cmplx( hkr, hki);
+
+	if( rhz >= 1.0e-3)
+	{
+	  double rh2, r1, r2;
+
+	  rh2= rh* rh;
+	  r1= sqrt( rh2+ z1* z1);
+	  r2= sqrt( rh2+ z2a* z2a);
+	  ekr1= cexp( fjk* r1);
+	  ekr2= cexp( fjk* r2);
+	  t1= z1* ekr1/ r1;
+	  t2= z2a* ekr2/ r2;
+	  *hps=( cdk*( ekr2- ekr1)- CPLX_01* sdk*( t2+ t1))* hss;
+	  *hpc= -sdk*( ekr2+ ekr1)- CPLX_01* cdk*( t2- t1);
+	  cons= -CPLX_01/(2.0* TP* rh);
+	  *hps= cons* *hps;
+	  *hpc= cons* *hpc;
+	  return;
+
+	} /* if( rhz >= 1.0e-3) */
+
+	ekr1= cmplx( cdk, sdk)/( z2a* z2a);
+	ekr2= cmplx( cdk,- sdk)/( z1* z1);
+	t1= TP*(1.0/ z1-1.0/ z2a);
+	t2= cexp( fjk* zp)* rh/PI8;
+	*hps= t2*( t1+( ekr1+ ekr2)* sdk)* hss;
+	*hpc= t2*(- CPLX_01* t1+( ekr1- ekr2)* cdk);
+	return;
+
+  } /* if( rh >= 1.0e-10) */
+
+  *hps=CPLX_00;
+  *hpc=CPLX_00;
+  *hpk=CPLX_00;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* nefld computes the near field at specified points in space after */
+/* the structure currents have been computed. */
+void nefld( double xob, double yob,
+	double zob, complex double *ex,
+	complex double *ey, complex double *ez )
+{
+  int i, ix, ipr, iprx, jc, ipa;
+  double zp, xi, ax;
+  complex double acx, bcx, ccx;
+
+  *ex=CPLX_00;
+  *ey=CPLX_00;
+  *ez=CPLX_00;
+  ax=0.0;
+
+  if( data.n != 0)
+  {
+	for( i = 0; i < data.n; i++ )
+	{
+	  dataj.xj= xob- data.x[i];
+	  dataj.yj= yob- data.y[i];
+	  dataj.zj= zob- data.z[i];
+	  zp= data.cab[i]* dataj.xj+ data.sab[i] *
+		dataj.yj+ data.salp[i]* dataj.zj;
+
+	  if( fabs( zp) > 0.5001* data.si[i])
+		continue;
+
+	  zp= dataj.xj* dataj.xj+ dataj.yj* dataj.yj +
+		dataj.zj* dataj.zj- zp* zp;
+	  dataj.xj= data.bi[i];
+
+	  if( zp > 0.9* dataj.xj* dataj.xj)
+		continue;
+
+	  ax= dataj.xj;
+	  break;
+
+	} /* for( i = 0; i < n; i++ ) */
+
+	for( i = 0; i < data.n; i++ )
+	{
+	  ix = i+1;
+	  dataj.s= data.si[i];
+	  dataj.b= data.bi[i];
+	  dataj.xj= data.x[i];
+	  dataj.yj= data.y[i];
+	  dataj.zj= data.z[i];
+	  dataj.cabj= data.cab[i];
+	  dataj.sabj= data.sab[i];
+	  dataj.salpj= data.salp[i];
+
+	  if( dataj.iexk != 0)
+	  {
+		ipr= data.icon1[i];
+
+		if (ipr > PCHCON) dataj.ind1 = 2;
+		else if( ipr < 0 )
+		{
+		  ipr = -ipr;
+		  iprx = ipr-1;
+
+		  if( -data.icon1[iprx] != ix )
+			dataj.ind1=2;
+		  else
+		  {
+			xi= fabs( dataj.cabj* data.cab[iprx]+ dataj.sabj*
+				data.sab[iprx]+ dataj.salpj* data.salp[iprx]);
+			if( (xi < 0.999999) ||
+				(fabs(data.bi[iprx]/dataj.b-1.0) > 1.0e-6) )
+			  dataj.ind1=2;
+			else
+			  dataj.ind1=0;
+		  }
+		} /* if( ipr < 0 ) */
+		else if( ipr == 0 )
+		  dataj.ind1=1;
+		else
+		{
+		  iprx = ipr-1;
+
+		  if( ipr != ix )
+		  {
+			if( data.icon2[iprx] != ix )
+			  dataj.ind1=2;
+			else
+			{
+			  xi= fabs( dataj.cabj* data.cab[iprx]+ dataj.sabj*
+				  data.sab[iprx]+ dataj.salpj* data.salp[iprx]);
+			  if( (xi < 0.999999) ||
+				  (fabs(data.bi[iprx]/dataj.b-1.0) > 1.0e-6) )
+				dataj.ind1=2;
+			  else
+				dataj.ind1=0;
+			}
+		  } /* if( ipr != ix ) */
+		  else
+		  {
+			if( dataj.cabj* dataj.cabj +
+				dataj.sabj* dataj.sabj > 1.0e-8)
+			  dataj.ind1=2;
+			else
+			  dataj.ind1=0;
+		  }
+		} /* else */
+
+		ipr= data.icon2[i];
+
+		if (ipr > PCHCON) dataj.ind2 = 2;
+		else if( ipr < 0 )
+		{
+		  ipr = -ipr;
+		  iprx = ipr-1;
+
+		  if( -data.icon2[iprx] != ix )
+			dataj.ind1=2;
+		  else
+		  {
+			xi= fabs( dataj.cabj* data.cab[iprx]+ dataj.sabj*
+				data.sab[iprx]+ dataj.salpj* data.salp[iprx]);
+			if( (xi < 0.999999) ||
+				(fabs(data.bi[iprx]/dataj.b-1.0) > 1.0e-6) )
+			  dataj.ind1=2;
+			else
+			  dataj.ind1=0;
+		  }
+		} /* if( ipr < 0 ) */
+		else if( ipr == 0 )
+		  dataj.ind2=1;
+		else
+		{
+		  iprx = ipr-1;
+
+		  if( ipr != ix )
+		  {
+			if( data.icon1[iprx] != ix )
+			  dataj.ind2=2;
+			else
+			{
+			  xi= fabs( dataj.cabj* data.cab[iprx]+ dataj.sabj*
+				  data.sab[iprx]+ dataj.salpj* data.salp[iprx]);
+			  if( (xi < 0.999999) ||
+				  (fabs(data.bi[iprx]/dataj.b-1.0) > 1.0e-6) )
+				dataj.ind2=2;
+			  else
+				dataj.ind2=0;
+			}
+		  } /* if( ipr != (i+1) ) */
+		  else
+		  {
+			if( dataj.cabj* dataj.cabj +
+				dataj.sabj* dataj.sabj > 1.0e-8)
+			  dataj.ind1=2;
+			else
+			  dataj.ind1=0;
+		  }
+
+		} /* else */
+
+	  } /* if( dataj.iexk != 0) */
+
+	  efld( xob, yob, zob, ax,1);
+	  acx= cmplx( crnt.air[i], crnt.aii[i]);
+	  bcx= cmplx( crnt.bir[i], crnt.bii[i]);
+	  ccx= cmplx( crnt.cir[i], crnt.cii[i]);
+	  *ex += dataj.exk* acx+ dataj.exs* bcx+ dataj.exc* ccx;
+	  *ey += dataj.eyk* acx+ dataj.eys* bcx+ dataj.eyc* ccx;
+	  *ez += dataj.ezk* acx+ dataj.ezs* bcx+ dataj.ezc* ccx;
+
+	} /* for( i = 0; i < n; i++ ) */
+
+	if( data.m == 0)
+	  return;
+
+  } /* if( n != 0) */
+
+  jc= data.n-1;
+  for( i = 0; i < data.m; i++ )
+  {
+	dataj.s= data.pbi[i];
+	dataj.xj= data.px[i];
+	dataj.yj= data.py[i];
+	dataj.zj= data.pz[i];
+	dataj.t1xj= data.t1x[i];
+	dataj.t1yj= data.t1y[i];
+	dataj.t1zj= data.t1z[i];
+	dataj.t2xj= data.t2x[i];
+	dataj.t2yj= data.t2y[i];
+	dataj.t2zj= data.t2z[i];
+	jc += 3;
+	acx= dataj.t1xj* crnt.cur[jc-2]+ dataj.t1yj *
+	  crnt.cur[jc-1]+ dataj.t1zj* crnt.cur[jc];
+	bcx= dataj.t2xj* crnt.cur[jc-2]+ dataj.t2yj *
+	  crnt.cur[jc-1]+ dataj.t2zj* crnt.cur[jc];
+
+	for( ipa = 0; ipa < gnd.ksymp; ipa++ )
+	{
+	  dataj.ipgnd= ipa+1;
+	  unere( xob, yob, zob);
+	  *ex= *ex+ acx* dataj.exk+ bcx* dataj.exs;
+	  *ey= *ey+ acx* dataj.eyk+ bcx* dataj.eys;
+	  *ez= *ez+ acx* dataj.ezk+ bcx* dataj.ezs;
+	}
+
+  } /* for( i = 0; i < m; i++ ) */
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* compute near e or h fields over a range of points */
+void nfpat( int nfeh )
+{
+  int i, j, kk, idx;
+  double znrt, cth=0.0, sth=0.0, ynrt, cph=0.0, sph=0.0, yob;
+  double xnrt, xob,zob, tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
+  complex double ex, ey, ez;
+  double r; /* Distance of field point from xyz origin */
+
+  Alloc_Nearfield_Buffers( fpat.nrx, fpat.nry, fpat.nrz );
+
+  /* Initialize according to E/H flag */
+  if( nfeh == 1 )
+	near_field.max_hr = 0.0;
+  else
+	near_field.max_er = 0.0;
+  near_field.r_max = 0.0;
+
+  idx = 0;
+  znrt= fpat.znr- fpat.dznr;
+  for( i = 0; i < fpat.nrz; i++ )
+  {
+	znrt += fpat.dznr;
+	if( fpat.near != 0)
+	{
+	  cth= cos( TA* znrt);
+	  sth= sin( TA* znrt);
+	}
+
+	ynrt= fpat.ynr- fpat.dynr;
+	for( j = 0; j < fpat.nry; j++ )
+	{
+	  ynrt += fpat.dynr;
+	  if( fpat.near != 0)
+	  {
+		cph= cos( TA* ynrt);
+		sph= sin( TA* ynrt);
+	  }
+
+	  xnrt= fpat.xnr- fpat.dxnr;
+	  for( kk = 0; kk < fpat.nrx; kk++ )
+	  {
+		xnrt += fpat.dxnr;
+		if( fpat.near != 0)
+		{
+		  xob= xnrt* sth* cph;
+		  yob= xnrt* sth* sph;
+		  zob= xnrt* cth;
+		}
+		else
+		{
+		  xob= xnrt;
+		  yob= ynrt;
+		  zob= znrt;
+		}
+
+		tmp1= xob/ data.wlam;
+		tmp2= yob/ data.wlam;
+		tmp3= zob/ data.wlam;
+
+		if( nfeh == 1 ) /* Magnetic field */
+		  nhfld( tmp1, tmp2, tmp3, &ex, &ey, &ez);
+		else /* Electric field */
+		  nefld( tmp1, tmp2, tmp3, &ex, &ey, &ez);
+
+		/* Calculate total field vector */
+		Near_Field_Total( ex, ey, ez, nfeh, idx );
+
+		/* Save field point co-ordinates */
+		near_field.px[idx] = (double)xob;
+		near_field.py[idx] = (double)yob;
+		near_field.pz[idx] = (double)zob;
+
+		/* Find max distance from xyz origin */
+		r = sqrt(
+			near_field.px[idx] * near_field.px[idx] +
+			near_field.py[idx] * near_field.py[idx] +
+			near_field.pz[idx] * near_field.pz[idx] );
+		if( near_field.r_max < r )
+		  near_field.r_max = r;
+
+		tmp1= cabs(ex);
+		tmp2= cang (ex);
+		tmp3= cabs(ey);
+		tmp4= cang (ey);
+		tmp5= cabs(ez);
+		tmp6= cang (ez);
+
+		if( nfeh == 1 ) /* Magnetic field */
+		{
+		  near_field.hx[idx]  = (double)tmp1;
+		  near_field.hy[idx]  = (double)tmp3;
+		  near_field.hz[idx]  = (double)tmp5;
+		  near_field.fhx[idx] = (double)(tmp2 * TA);
+		  near_field.fhy[idx] = (double)(tmp4 * TA);
+		  near_field.fhz[idx] = (double)(tmp6 * TA);
+		}
+		else /* Electric field */
+		{
+		  near_field.ex[idx]  = (double)tmp1;
+		  near_field.ey[idx]  = (double)tmp3;
+		  near_field.ez[idx]  = (double)tmp5;
+		  near_field.fex[idx] = (double)(tmp2 * TA);
+		  near_field.fey[idx] = (double)(tmp4 * TA);
+		  near_field.fez[idx] = (double)(tmp6 * TA);
+		}
+
+		idx++;
+
+	  } /* for( kk = 0; kk < fpat.nrx; kk++ ) */
+
+	} /* for( j = 0; j < fpat.nry; j++ ) */
+
+  } /* for( i = 0; i < fpat.nrz; i++ ) */
+
+  /* Signal new valid near field data */
+  near_field.newer = near_field.valid = 1;
+
+  /* Signal new E/H pattern data */
+  SetFlag( DRAW_NEW_EHFIELD );
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* nhfld computes the near field at specified points in space after */
+/* the structure currents have been computed. */
+
+void nhfld( double xob, double yob,
+	double zob, complex double *hx,
+	complex double *hy, complex double *hz )
+{
+  int i, jc;
+  double ax, zp;
+  complex double acx, bcx, ccx;
+
+  *hx=CPLX_00;
+  *hy=CPLX_00;
+  *hz=CPLX_00;
+  ax=0.0;
+
+  if( data.n != 0)
+  {
+	for( i = 0; i < data.n; i++ )
+	{
+	  dataj.xj= xob- data.x[i];
+	  dataj.yj= yob- data.y[i];
+	  dataj.zj= zob- data.z[i];
+	  zp= data.cab[i]* dataj.xj+ data.sab[i] *
+		dataj.yj+ data.salp[i]* dataj.zj;
+
+	  if( fabs( zp) > 0.5001* data.si[i])
+		continue;
+
+	  zp= dataj.xj* dataj.xj+ dataj.yj* dataj.yj +
+		dataj.zj* dataj.zj- zp* zp;
+	  dataj.xj= data.bi[i];
+
+	  if( zp > 0.9* dataj.xj* dataj.xj)
+		continue;
+
+	  ax= dataj.xj;
+	  break;
+	}
+
+	for( i = 0; i < data.n; i++ )
+	{
+	  dataj.s= data.si[i];
+	  dataj.b= data.bi[i];
+	  dataj.xj= data.x[i];
+	  dataj.yj= data.y[i];
+	  dataj.zj= data.z[i];
+	  dataj.cabj= data.cab[i];
+	  dataj.sabj= data.sab[i];
+	  dataj.salpj= data.salp[i];
+	  hsfld( xob, yob, zob, ax);
+	  acx= cmplx( crnt.air[i], crnt.aii[i]);
+	  bcx= cmplx( crnt.bir[i], crnt.bii[i]);
+	  ccx= cmplx( crnt.cir[i], crnt.cii[i]);
+	  *hx += dataj.exk* acx+ dataj.exs* bcx+ dataj.exc* ccx;
+	  *hy += dataj.eyk* acx+ dataj.eys* bcx+ dataj.eyc* ccx;
+	  *hz += dataj.ezk* acx+ dataj.ezs* bcx+ dataj.ezc* ccx;
+	}
+
+	if( data.m == 0)
+	  return;
+
+  } /* if( data.n != 0) */
+
+  jc= data.n-1;
+  for( i = 0; i < data.m; i++ )
+  {
+	dataj.s= data.pbi[i];
+	dataj.xj= data.px[i];
+	dataj.yj= data.py[i];
+	dataj.zj= data.pz[i];
+	dataj.t1xj= data.t1x[i];
+	dataj.t1yj= data.t1y[i];
+	dataj.t1zj= data.t1z[i];
+	dataj.t2xj= data.t2x[i];
+	dataj.t2yj= data.t2y[i];
+	dataj.t2zj= data.t2z[i];
+	hintg( xob, yob, zob);
+	jc += 3;
+	acx= dataj.t1xj* crnt.cur[jc-2]+ dataj.t1yj *
+	  crnt.cur[jc-1]+ dataj.t1zj* crnt.cur[jc];
+	bcx= dataj.t2xj* crnt.cur[jc-2]+ dataj.t2yj *
+	  crnt.cur[jc-1]+ dataj.t2zj* crnt.cur[jc];
+	*hx= *hx+ acx* dataj.exk+ bcx* dataj.exs;
+	*hy= *hy+ acx* dataj.eyk+ bcx* dataj.eys;
+	*hz= *hz+ acx* dataj.ezk+ bcx* dataj.ezs;
+  }
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* integrate over patches at wire connection point */
+void pcint( double xi, double yi, double zi,
+	double cabi, double sabi, double salpi,
+	complex double *e )
+{
+  int nint, i1, i2;
+  double d, ds, da, gcon, fcon, xxj, xyj, xzj, xs, s1;
+  double xss, yss, zss, s2x, s2, g1, g2, g3, g4, f2, f1;
+  complex double e1, e2, e3, e4, e5, e6, e7, e8, e9;
+
+  nint = 10;
+  d= sqrt( dataj.s)*.5;
+  ds=4.0* d/ (double) nint;
+  da= ds* ds;
+  gcon=1.0/ dataj.s;
+  fcon=1.0/(2.0* TP* d);
+  xxj= dataj.xj;
+  xyj= dataj.yj;
+  xzj= dataj.zj;
+  xs= dataj.s;
+  dataj.s= da;
+  s1= d+ ds*.5;
+  xss= dataj.xj+ s1*( dataj.t1xj+ dataj.t2xj);
+  yss= dataj.yj+ s1*( dataj.t1yj+ dataj.t2yj);
+  zss= dataj.zj+ s1*( dataj.t1zj+ dataj.t2zj);
+  s1= s1+ d;
+  s2x= s1;
+  e1=CPLX_00;
+  e2=CPLX_00;
+  e3=CPLX_00;
+  e4=CPLX_00;
+  e5=CPLX_00;
+  e6=CPLX_00;
+  e7=CPLX_00;
+  e8=CPLX_00;
+  e9=CPLX_00;
+
+  for( i1 = 0; i1 < nint; i1++ )
+  {
+	s1= s1- ds;
+	s2= s2x;
+	xss= xss- ds* dataj.t1xj;
+	yss= yss- ds* dataj.t1yj;
+	zss= zss- ds* dataj.t1zj;
+	dataj.xj= xss;
+	dataj.yj= yss;
+	dataj.zj= zss;
+
+	for( i2 = 0; i2 < nint; i2++ )
+	{
+	  s2= s2- ds;
+	  dataj.xj= dataj.xj- ds* dataj.t2xj;
+	  dataj.yj= dataj.yj- ds* dataj.t2yj;
+	  dataj.zj= dataj.zj- ds* dataj.t2zj;
+	  unere( xi, yi, zi);
+	  dataj.exk= dataj.exk* cabi+ dataj.eyk *
+		sabi+ dataj.ezk* salpi;
+	  dataj.exs= dataj.exs* cabi+ dataj.eys *
+		sabi+ dataj.ezs* salpi;
+	  g1=( d+ s1)*( d+ s2)* gcon;
+	  g2=( d- s1)*( d+ s2)* gcon;
+	  g3=( d- s1)*( d- s2)* gcon;
+	  g4=( d+ s1)*( d- s2)* gcon;
+	  f2=( s1* s1+ s2* s2)* TP;
+	  f1= s1/ f2-( g1- g2- g3+ g4)* fcon;
+	  f2= s2/ f2-( g1+ g2- g3- g4)* fcon;
+	  e1= e1+ dataj.exk* g1;
+	  e2= e2+ dataj.exk* g2;
+	  e3= e3+ dataj.exk* g3;
+	  e4= e4+ dataj.exk* g4;
+	  e5= e5+ dataj.exs* g1;
+	  e6= e6+ dataj.exs* g2;
+	  e7= e7+ dataj.exs* g3;
+	  e8= e8+ dataj.exs* g4;
+	  e9= e9+ dataj.exk* f1+ dataj.exs* f2;
+
+	} /* for( i2 = 0; i2 < nint; i2++ ) */
+
+  } /* for( i1 = 0; i1 < nint; i1++ ) */
+
+  e[0]= e1;
+  e[1]= e2;
+  e[2]= e3;
+  e[3]= e4;
+  e[4]= e5;
+  e[5]= e6;
+  e[6]= e7;
+  e[7]= e8;
+  e[8]= e9;
+  dataj.xj= xxj;
+  dataj.yj= xyj;
+  dataj.zj= xzj;
+  dataj.s= xs;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* calculates the electric field due to unit current */
+/* in the t1 and t2 directions on a patch */
+void unere( double xob, double yob, double zob )
+{
+  double zr, t1zr, t2zr, rx, ry, rz, r, tt1;
+  double tt2, rt, xymag, px, py, cth, r2;
+  complex double er, q1, q2, rrv, rrh, edp;
+
+  zr= dataj.zj;
+  t1zr= dataj.t1zj;
+  t2zr= dataj.t2zj;
+
+  if( dataj.ipgnd == 2)
+  {
+	zr= -zr;
+	t1zr= -t1zr;
+	t2zr= -t2zr;
+  }
+
+  rx= xob- dataj.xj;
+  ry= yob- dataj.yj;
+  rz= zob- zr;
+  r2= rx* rx+ ry* ry+ rz* rz;
+
+  if( r2 <= 1.0e-20)
+  {
+	dataj.exk=CPLX_00;
+	dataj.eyk=CPLX_00;
+	dataj.ezk=CPLX_00;
+	dataj.exs=CPLX_00;
+	dataj.eys=CPLX_00;
+	dataj.ezs=CPLX_00;
+	return;
+  }
+
+  r= sqrt( r2);
+  tt1= -TP* r;
+  tt2= tt1* tt1;
+  rt= r2* r;
+  er= cmplx( sin( tt1),- cos( tt1))*( CONST2* dataj.s);
+  q1= cmplx( tt2-1.0, tt1)* er/ rt;
+  q2= cmplx(3.0- tt2,-3.0* tt1)* er/( rt* r2);
+  er = q2*( dataj.t1xj* rx+ dataj.t1yj* ry+ t1zr* rz);
+  dataj.exk= q1* dataj.t1xj+ er* rx;
+  dataj.eyk= q1* dataj.t1yj+ er* ry;
+  dataj.ezk= q1* t1zr+ er* rz;
+  er= q2*( dataj.t2xj* rx+ dataj.t2yj* ry+ t2zr* rz);
+  dataj.exs= q1* dataj.t2xj+ er* rx;
+  dataj.eys= q1* dataj.t2yj+ er* ry;
+  dataj.ezs= q1* t2zr+ er* rz;
+
+  if( dataj.ipgnd == 1)
+	return;
+
+  if( gnd.iperf == 1)
+  {
+	dataj.exk= -dataj.exk;
+	dataj.eyk= -dataj.eyk;
+	dataj.ezk= -dataj.ezk;
+	dataj.exs= -dataj.exs;
+	dataj.eys= -dataj.eys;
+	dataj.ezs= -dataj.ezs;
+	return;
+  }
+
+  xymag= sqrt( rx* rx+ ry* ry);
+  if( xymag <= 1.0e-6)
+  {
+	px=0.0;
+	py=0.0;
+	cth=1.0;
+	rrv=CPLX_10;
+  }
+  else
+  {
+	px= -ry/ xymag;
+	py= rx/ xymag;
+	cth= rz/ sqrt( xymag* xymag+ rz* rz);
+	rrv= csqrt(1.0- gnd.zrati* gnd.zrati*(1.0- cth* cth));
+  }
+
+  rrh= gnd.zrati* cth;
+  rrh=( rrh- rrv)/( rrh+ rrv);
+  rrv= gnd.zrati* rrv;
+  rrv=-( cth- rrv)/( cth+ rrv);
+  edp=( dataj.exk* px+ dataj.eyk* py)*( rrh- rrv);
+  dataj.exk= dataj.exk* rrv+ edp* px;
+  dataj.eyk= dataj.eyk* rrv+ edp* py;
+  dataj.ezk= dataj.ezk* rrv;
+  edp=( dataj.exs* px+ dataj.eys* py)*( rrh- rrv);
+  dataj.exs= dataj.exs* rrv+ edp* px;
+  dataj.eys= dataj.eys* rrv+ edp* py;
+  dataj.ezs= dataj.ezs* rrv;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* Near_Field_Total()
+ *
+ * Calculates the value of Total Near Field vector
+ */
+void
+Near_Field_Total(
+	complex double ex,
+	complex double ey,
+	complex double ez,
+	int nfeh, int idx )
+{
+  /* Display a time-frozen "snapshot" of near field */
+  if( isFlagSet(NEAREH_SNAPSHOT) )
+  {
+	if( nfeh == 1 ) /* Magnetic field */
+	{
+	  /* Near magnetic field components */
+	  near_field.hrx[idx] = (double)creal(ex);
+	  near_field.hry[idx] = (double)creal(ey);
+	  near_field.hrz[idx] = (double)creal(ez);
+
+	  /* Near total magnetic field vector*/
+	  near_field.hr[idx]  = sqrt(
+		  near_field.hrx[idx] * near_field.hrx[idx] +
+		  near_field.hry[idx] * near_field.hry[idx] +
+		  near_field.hrz[idx] * near_field.hrz[idx] );
+	  if( near_field.max_hr < near_field.hr[idx] )
+		near_field.max_hr = near_field.hr[idx];
+	}
+	else /* Electric field */
+	{
+	  /* Near electric field components */
+	  /* Near electric field components */
+	  near_field.erx[idx] = (double)creal(ex);
+	  near_field.ery[idx] = (double)creal(ey);
+	  near_field.erz[idx] = (double)creal(ez);
+
+	  /* Near total electric field vector */
+	  near_field.er[idx]  = sqrt(
+		  near_field.erx[idx] * near_field.erx[idx] +
+		  near_field.ery[idx] * near_field.ery[idx] +
+		  near_field.erz[idx] * near_field.erz[idx] );
+	  if( near_field.max_er < near_field.er[idx] )
+		near_field.max_er = near_field.er[idx];
+	} /* if( nfeh == 1 ) */
+
+  } /* if( isFlagSet(NEAREH_SNAPSHOT) ) */
+  else /* Display Total near field vector peak */
+  {
+	double
+	  exm, eym, ezm,	/* Near field magnitude in x, y, z    */
+	  exm2, eym2, ezm2,	/* Near field magnitude^2 in x, y, z  */
+	  fx, fy, fz,		/* Time phase of near field vectors   */
+	  fx2, fy2, fz2,	/* Time phase of near field vectors*2 */
+	  cp, sp, tp, wt;	/* Some values needed in calculations */
+
+	exm = (double)cabs(ex);
+	eym = (double)cabs(ey);
+	ezm = (double)cabs(ez);
+	/* Near total electric field vector */
+	fx  = (double)cang(ex)/(double)TD;
+	fy  = (double)cang(ey)/(double)TD;
+	fz  = (double)cang(ez)/(double)TD;
+
+	fx2 = fx * 2.0;
+	fy2 = fy * 2.0;
+	fz2 = fz * 2.0;
+
+	exm2 = exm*exm;
+	eym2 = eym*eym;
+	ezm2 = ezm*ezm;
+
+	cp = exm2*cos(fx2) + eym2*cos(fy2) + ezm2*cos(fz2);
+	sp = exm2*sin(fx2) + eym2*sin(fy2) + ezm2*sin(fz2);
+	tp = sqrt(cp*cp + sp*sp);
+	wt = atan2(-sp, cp)/2.0;
+
+	if( nfeh == 1 ) /* Magnetic field */
+	{
+	  /* Near magnetic field components */
+	  near_field.hrx[idx] = exm * cos(wt + fx);
+	  near_field.hry[idx] = eym * cos(wt + fy);
+	  near_field.hrz[idx] = ezm * cos(wt + fz);
+
+	  /* Near total magnetic field vector, peak value */
+	  near_field.hr[idx]  = sqrt( (exm2 + eym2 + ezm2 + tp)/2.0 );
+	  if( near_field.max_hr < near_field.hr[idx] )
+		near_field.max_hr = near_field.hr[idx];
+	}
+	else /* Electric field */
+	{
+	  /* Near electric field components */
+	  near_field.erx[idx] = exm * cos(wt + fx);
+	  near_field.ery[idx] = eym * cos(wt + fy);
+	  near_field.erz[idx] = ezm * cos(wt + fz);
+
+	  /* Near total electric field vector, peak value */
+	  near_field.er[idx]  = sqrt( (exm2 + eym2 + ezm2 + tp)/2.0 );
+	  if( near_field.max_er < near_field.er[idx] )
+		near_field.max_er = near_field.er[idx];
+	}
+  }
+
+} /* Near_Field_Total() */
+
+/*-----------------------------------------------------------------------*/
+
diff --git a/src/fields.h b/src/fields.h
new file mode 100644
index 0000000..fa6bab3
--- /dev/null
+++ b/src/fields.h
@@ -0,0 +1,50 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	FIELDS_H
+#define	FIELDS_H		1
+
+#include "common.h"
+
+#define	TPJ		(0.0+I*6.283185308)
+#define PI8		25.13274123
+#define	FPI		12.56637062
+#define	CONST2	4.771341188
+
+/* common  /tmi/ */
+typedef struct
+{
+  int ij;
+
+  double
+    zpk,
+    rkb2;
+
+} tmi_t;
+
+/*common  /tmh/ */
+typedef struct
+{
+  double
+    zpka,
+    rhks;
+
+} tmh_t;
+
+#endif
+
diff --git a/src/fork.c b/src/fork.c
new file mode 100644
index 0000000..9f5c79e
--- /dev/null
+++ b/src/fork.c
@@ -0,0 +1,668 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* fork.c
+ *
+ * Functions for forking xnec2c in multiprocessor systems
+ */
+
+#include "fork.h"
+#include "shared.h"
+
+/*-----------------------------------------------------------------------*/
+
+/* Child_Process()
+ *
+ * Destination of child processes, handles data
+ * transfers between parent and children via pipes
+ */
+void Child_Process( int num_child ) __attribute__ ((noreturn));
+  void
+Child_Process( int num_child )
+{
+  ssize_t retval;	/* Return from select()/read() etc */
+  char cmnd[8];		/* Command string received from parent */
+  char *buff;		/* Passes address of variables to read()/write() */
+  size_t cnt;		/* Size of data buffers for read()/write() */
+
+  /* Close unwanted pipe ends */
+  close( forked_proc_data[num_child]->pnt2child_pipe[WRITE] );
+  close( forked_proc_data[num_child]->child2pnt_pipe[READ] );
+
+  /* Watch read/write pipe for i/o */
+  FD_ZERO( &forked_proc_data[num_child]->read_fds );
+
+  FD_SET( forked_proc_data[num_child]->pnt2child_pipe[READ],
+	  &forked_proc_data[num_child]->read_fds );
+
+  FD_ZERO( &forked_proc_data[num_child]->write_fds );
+
+  FD_SET( forked_proc_data[num_child]->child2pnt_pipe[WRITE],
+	  &forked_proc_data[num_child]->write_fds );
+
+  /* Loop around select() in Read_Pipe() waiting for commands/data */
+  while( TRUE )
+  {
+	retval = Read_Pipe( num_child, cmnd, 7, TRUE );
+	cmnd[retval]='\0';
+
+	switch( Fork_Command(cmnd) )
+	{
+	  case INFILE: /* Read input file */
+		retval = Read_Pipe( num_child, infile, 80, FALSE );
+		infile[retval] = '\0';
+		Child_Input_File();
+		break;
+
+	  case FRQDATA: /* Calculate currents and pass on */
+		/* Get new frequency */
+		buff = (char *)&calc_data.fmhz;
+		cnt = sizeof( double );
+		Read_Pipe( num_child, buff, (ssize_t)cnt, TRUE );
+
+		/* Frequency buffers in children
+		 * are for current frequency only */
+		calc_data.fstep = 0;
+
+		/* Clear "last-used-frequency" buffer */
+		save.last_freq = 0.0;
+
+		/* Set flags */
+		SetFlag( FREQ_LOOP_RUNNING );
+
+		/* Calculate freq data and pass to parent */
+		New_Frequency();
+		Pass_Freq_Data();
+		break;
+
+	  case EHFIELD: /* Calcualte near field E/H data */
+		{
+		  /* Get near field flags */
+		  char flag;
+
+		  /* Set near field flags */
+		  cnt = sizeof( flag );
+		  Read_Pipe( num_child, &flag, (ssize_t)cnt, TRUE );
+
+		  if( flag & E_HFIELD )
+			SetFlag( DRAW_EHFIELD );
+		  else
+			ClearFlag( DRAW_EHFIELD );
+
+		  if( flag & SNAPSHOT )
+			SetFlag( NEAREH_SNAPSHOT );
+		  else
+			ClearFlag( NEAREH_SNAPSHOT );
+
+		  if( flag & EFIELD )
+			SetFlag( DRAW_EFIELD );
+		  else
+			ClearFlag( DRAW_EFIELD );
+
+		  if( flag & HFIELD )
+			SetFlag( DRAW_HFIELD );
+		  else
+			ClearFlag( DRAW_HFIELD );
+		}
+
+	} /* switch( Command(cmnd) ) */
+
+  } /* while( TRUE ) */
+
+} /* Child_Process() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Child_Input_File()
+ *
+ * Opens NEC2 input file for child processes
+ */
+  void
+Child_Input_File( void )
+{
+  /* Close open files if any */
+  Close_File( &input_fp );
+
+  /* Open NEC2 input file */
+  Open_File( &input_fp, infile, "r" );
+
+  /* Read input file */
+  ClearFlag( ALL_FLAGS );
+  SetFlag( INPUT_PENDING );
+  Read_Comments();
+  Read_Geometry();
+  Read_Commands();
+  ClearFlag( INPUT_PENDING );
+
+  /* Initialize xnec2c child */
+  save.last_freq = 0.0;
+  crnt.newer = crnt.valid = 0;
+
+} /* Child_Input_FIle() */
+
+/*------------------------------------------------------------------------*/
+
+/* Fork_Command()
+ *
+ * Identifies a command srting
+ */
+  int
+Fork_Command( const char *cdstr )
+{
+  int idx;
+
+  for( idx = 0; idx < NUM_FKCMNDS; idx++ )
+	if( strcmp(fork_commands[idx], cdstr) == 0 )
+	  break;
+
+  return( idx );
+
+} /* Fork_Command() */
+
+/*------------------------------------------------------------------------*/
+
+/* Read_Pipe()
+ *
+ * Reads data from a pipe (child and parent processes)
+ */
+  ssize_t
+Read_Pipe( int idx, char *str, ssize_t len, gboolean err )
+{
+  ssize_t retval;
+  int pipefd;
+
+  if(CHILD)
+	pipefd = forked_proc_data[idx]->pnt2child_pipe[READ];
+  else
+	pipefd = forked_proc_data[idx]->child2pnt_pipe[READ];
+
+  retval = select( 1024, &forked_proc_data[idx]->read_fds, NULL, NULL, NULL );
+  if( retval == -1 )
+  {
+	perror( "xnec2c: select()" );
+	_exit(0);
+  }
+
+  retval = read( pipefd, str, (size_t)len );
+  if( (retval == -1) || ((retval != len) && err ) )
+  {
+	perror( "xnec2c: Read_Pipe(): read()" );
+	fprintf( stderr, "xnec2c: Read_Pipe(): child %d  length %d  return %d\n",
+		idx, (int)len, (int)retval );
+	_exit(0);
+  }
+  return( retval );
+
+} /* Read_Pipe() */
+
+/*------------------------------------------------------------------------*/
+
+/* Write_Pipe()
+ *
+ * Writes data to a pipe (child and parent processes)
+ */
+  ssize_t
+Write_Pipe( int idx, char *str, ssize_t len, gboolean err )
+{
+  ssize_t retval;
+  int pipefd;
+
+  if( CHILD )
+	pipefd = forked_proc_data[idx]->child2pnt_pipe[WRITE];
+  else
+	pipefd = forked_proc_data[idx]->pnt2child_pipe[WRITE];
+
+  retval = select( 1024, NULL, &forked_proc_data[idx]->write_fds, NULL, NULL );
+  if( retval == -1 )
+  {
+	perror( "xnec2c: select()" );
+	_exit(0);
+  }
+
+  retval = write( pipefd, str, (size_t)len );
+  if( (retval == -1) || ((retval != len) && err) )
+  {
+	perror( "xnec2c: write()" );
+	_exit(0);
+  }
+
+  usleep(2);
+  return( retval );
+
+} /* Write_Pipe() */
+
+/*------------------------------------------------------------------------*/
+
+/* PRead_Pipe()
+ *
+ * Reads data from a pipe (used by parent process)
+ */
+  ssize_t
+PRead_Pipe( int idx, char *str, ssize_t len, gboolean err )
+{
+  ssize_t retval;
+
+  retval = read( forked_proc_data[idx]->child2pnt_pipe[READ], str, (size_t)len );
+  if( (retval == -1) || ((retval != len) && err ) )
+  {
+	perror( "xnec2c: PRead_Pipe(): read()" );
+	_exit(0);
+  }
+  return( retval );
+
+} /* PRead_Pipe() */
+
+/*------------------------------------------------------------------------*/
+
+/* Pass_Freq_Data()
+ *
+ * Passes frequency-dependent data (current, charge density,
+ * input impedances etc) from child processes to parent.
+ */
+  void
+Pass_Freq_Data( void )
+{
+  char *buff = NULL, flag;
+  size_t cnt, buff_size;
+
+  /*** Total of bytes to read/write thru pipe ***/
+  buff_size =
+	/* Current & charge data (a, b, c, ir & ii) */
+	(size_t)(6 * data.npm) * sizeof( double ) +
+	/* Complex current (crnt.cur) */
+	(size_t)data.np3m * sizeof( complex double ) +
+	/* newer and valid flags */
+	2 * sizeof(char) +
+	/* Impedance data */
+	4 * sizeof(double) +
+	/* Network data */
+	sizeof(complex double);
+
+  /* Radiation pattern data if enabled */
+  if( isFlagSet(ENABLE_RDPAT) )
+  {
+	buff_size +=
+	  /* Gain total, tilt, axial ratio */
+	  (size_t)(3 * fpat.nph * fpat.nth) * sizeof(double) +
+	  /* max & min gain, tht & phi angles */
+	  (size_t)(4 * NUM_POL) * sizeof(double) +
+	  /* max and min gain index */
+	  (size_t)(2 * NUM_POL) * sizeof(int) +
+	  /* Polarization sens */
+	  (size_t)(fpat.nph * fpat.nth) * sizeof(int) +
+	  /* New pattern flag */
+	  sizeof( char );
+  }
+
+  /* Near field data if enabled */
+  if( isFlagSet(DRAW_EHFIELD) )
+  {
+	/* Notify parent to read near field data */
+	Write_Pipe( num_child_procs, "nfeh", 4, TRUE );
+
+	/* Near E field data */
+	if( fpat.nfeh & NEAR_EFIELD )
+	  buff_size +=
+		(size_t)( 10 * fpat.nrx * fpat.nry * fpat.nrz + 1 ) * sizeof(double);
+	/* Near H field data */
+	if( fpat.nfeh & NEAR_HFIELD )
+	  buff_size +=
+		(size_t)( 10 * fpat.nrx * fpat.nry * fpat.nrz + 1 ) * sizeof(double);
+	/* Co-ordinates of field points */
+	buff_size +=
+	  (size_t)( 3 * fpat.nrx * fpat.nry * fpat.nrz + 1 ) * sizeof(double) +
+	  /* newer & valid flags */
+	  2 * sizeof(char);
+  }
+  else /* Notify parent not to read near field data */
+	Write_Pipe( num_child_procs, "noeh", 4, TRUE );
+
+  /* Allocate data buffers */
+  mem_alloc( (void *)&buff, buff_size, "in fork.c" );
+
+  /* Clear buffer index in this function */
+  Mem_Copy( buff, buff, 0, WRITE );
+
+  /* Pass on current and charge data */
+  cnt =  (size_t)data.npm * sizeof( double );
+  Mem_Copy( buff, (char *)crnt.air, cnt, WRITE );
+  Mem_Copy( buff, (char *)crnt.aii, cnt, WRITE );
+  Mem_Copy( buff, (char *)crnt.bir, cnt, WRITE );
+  Mem_Copy( buff, (char *)crnt.bii, cnt, WRITE );
+  Mem_Copy( buff, (char *)crnt.cir, cnt, WRITE );
+  Mem_Copy( buff, (char *)crnt.cii, cnt, WRITE );
+
+  cnt = (size_t)data.np3m * sizeof( complex double );
+  Mem_Copy( buff, (char *)crnt.cur, cnt, WRITE );
+
+  cnt = sizeof( char );
+  Mem_Copy( buff, &crnt.newer, cnt, WRITE );
+  Mem_Copy( buff, &crnt.valid, cnt, WRITE );
+
+  /* Impedance data */
+  cnt = sizeof(double);
+  Mem_Copy( buff, (char *)&impedance_data.zreal[0],  cnt, WRITE );
+  Mem_Copy( buff, (char *)&impedance_data.zimag[0],  cnt, WRITE );
+  Mem_Copy( buff, (char *)&impedance_data.zmagn[0],  cnt, WRITE );
+  Mem_Copy( buff, (char *)&impedance_data.zphase[0], cnt, WRITE );
+
+  /* Network data */
+  cnt = sizeof(complex double);
+  Mem_Copy( buff, (char *)&netcx.zped, cnt, WRITE );
+
+  /* Pass on radiation pattern data if enabled */
+  if( isFlagSet(ENABLE_RDPAT) )
+  {
+	cnt = (size_t)(fpat.nph * fpat.nth) * sizeof(double);
+	Mem_Copy( buff, (char *)rad_pattern[0].gtot, cnt, WRITE );
+	Mem_Copy( buff, (char *)rad_pattern[0].tilt, cnt, WRITE );
+	Mem_Copy( buff, (char *)rad_pattern[0].axrt, cnt, WRITE );
+
+	cnt = (size_t)NUM_POL * sizeof(double);
+	Mem_Copy( buff, (char *)rad_pattern[0].max_gain, cnt, WRITE );
+	Mem_Copy( buff, (char *)rad_pattern[0].min_gain, cnt, WRITE );
+	Mem_Copy( buff, (char *)rad_pattern[0].max_gain_tht, cnt, WRITE );
+	Mem_Copy( buff, (char *)rad_pattern[0].max_gain_phi, cnt, WRITE );
+
+	cnt = (size_t)NUM_POL * sizeof(int);
+	Mem_Copy( buff, (char *)rad_pattern[0].max_gain_idx, cnt, WRITE );
+	Mem_Copy( buff, (char *)rad_pattern[0].min_gain_idx, cnt, WRITE );
+
+	cnt = (size_t)(fpat.nph * fpat.nth) * sizeof(int);
+	Mem_Copy( buff, (char *)rad_pattern[0].sens, cnt, WRITE );
+
+	if( isFlagSet(DRAW_NEW_RDPAT) )
+	  flag = 1;
+	else
+	  flag = 0;
+	cnt = sizeof( char );
+	Mem_Copy( buff, &flag, cnt, WRITE );
+  }
+
+  /* Near field data */
+  if( isFlagSet(DRAW_EHFIELD) )
+  {
+	/* Magnitude and phase of E field */
+	if( fpat.nfeh & NEAR_EFIELD )
+	{
+	  cnt = (size_t)(fpat.nrx * fpat.nry * fpat.nrz) * sizeof(double);
+	  Mem_Copy( buff, (char *)near_field.ex, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.ey, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.ez, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.fex, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.fey, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.fez, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.erx, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.ery, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.erz, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.er, cnt, WRITE );
+	  cnt = sizeof(double);
+	  Mem_Copy( buff, (char *)&near_field.max_er, cnt, WRITE );
+	}
+
+	/* Magnitude and phase of H fields */
+	if( fpat.nfeh & NEAR_HFIELD )
+	{
+	  cnt = (size_t)(fpat.nrx * fpat.nry * fpat.nrz) * sizeof(double);
+	  Mem_Copy( buff, (char *)near_field.hx, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.hy, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.hz, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.fhx, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.fhy, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.fhz, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.hrx, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.hry, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.hrz, cnt, WRITE );
+	  Mem_Copy( buff, (char *)near_field.hr, cnt, WRITE );
+	  cnt = sizeof(double);
+	  Mem_Copy( buff, (char *)&near_field.max_hr, cnt, WRITE );
+	}
+
+	/* Co-ordinates of field points */
+	cnt = (size_t)(fpat.nrx * fpat.nry * fpat.nrz) * sizeof(double);
+	Mem_Copy( buff, (char *)near_field.px, cnt, WRITE );
+	Mem_Copy( buff, (char *)near_field.py, cnt, WRITE );
+	Mem_Copy( buff, (char *)near_field.pz, cnt, WRITE );
+	cnt = sizeof(double);
+	Mem_Copy( buff, (char *)&near_field.r_max, cnt, WRITE );
+
+	cnt = sizeof( char );
+	Mem_Copy( buff, &near_field.newer, cnt, WRITE );
+	Mem_Copy( buff, &near_field.valid, cnt, WRITE );
+
+  } /* if( isFlagSet(DRAW_EHFIELD) ) */
+
+  /* Pass data accumulated in buffer if child */
+  Write_Pipe( num_child_procs, buff, (ssize_t)buff_size, TRUE );
+
+  free_ptr( (void *)&buff );
+
+} /* Pass_Freq_Data() */
+
+/*------------------------------------------------------------------------*/
+
+/* Get_Freq_Data()
+ *
+ * Gets frequency-dependent data (current, charge density,
+ * input impedances etc) from child processes.
+ */
+  void
+Get_Freq_Data( int idx, int fstep )
+{
+  char *buff = NULL, flag;
+  char nfeh[5];
+  size_t cnt, buff_size;
+
+  /*** Total of bytes to read/write thru pipe ***/
+  buff_size =
+	/* Current & charge data (a, b, c ir & ii) */
+	(size_t)(6 * data.npm) * sizeof( double ) +
+	/* Complex current (crnt.cur) */
+	(size_t)data.np3m * sizeof( complex double ) +
+	/* newer and valid flags */
+	2 * sizeof(char) +
+	/* Impedance data */
+	4 * sizeof(double) +
+	/* Network data */
+	sizeof(complex double);
+
+  /* Radiation pattern data if enabled */
+  if( isFlagSet(ENABLE_RDPAT) )
+  {
+	buff_size +=
+	  /* Gain total, tilt, axial ratio */
+	  (size_t)(3 * fpat.nph * fpat.nth) * sizeof(double) +
+	  /* max & min gain, tht & phi angles */
+	  (size_t)(4 * NUM_POL) * sizeof(double) +
+	  /* max and min gain index */
+	  (size_t)(2 * NUM_POL) * sizeof(int) +
+	  /* Polarization sens */
+	  (size_t)(fpat.nph * fpat.nth) * sizeof(int) +
+	  /* New pattern flag */
+	  sizeof( char );
+  }
+
+  /* Notification to read near field data */
+  PRead_Pipe( idx, nfeh, 4, TRUE );
+  nfeh[4] = '\0';
+
+  /* Get near field data if enabled */
+  if( strcmp(nfeh, "nfeh") == 0 )
+  {
+	/* Near E field data */
+	if( fpat.nfeh & NEAR_EFIELD )
+	  buff_size +=
+		(size_t)( 10 * fpat.nrx * fpat.nry * fpat.nrz + 1 ) * sizeof(double);
+	/* Near H field data */
+	if( fpat.nfeh & NEAR_HFIELD )
+	  buff_size +=
+		(size_t)( 10 * fpat.nrx * fpat.nry * fpat.nrz + 1 ) * sizeof(double);
+	/* Co-ordinates of field points */
+	buff_size +=
+	  (size_t)( 3 * fpat.nrx * fpat.nry * fpat.nrz + 1 ) * sizeof(double) +
+	  /* newer & valid flags */
+	  2 * sizeof(char);
+  }
+
+  /* Allocate data buffer */
+  mem_alloc( (void *)&buff, buff_size, "in fork.c" );
+
+  /* Clear buffer index in this function */
+  Mem_Copy( buff, buff, 0, READ );
+
+  /* Get data accumulated in buffer if child */
+  PRead_Pipe( idx, buff, (ssize_t)buff_size, TRUE );
+
+  /* Get current and charge data */
+  cnt =  (size_t)data.npm * sizeof( double );
+  Mem_Copy( buff, (char *)crnt.air, cnt, READ );
+  Mem_Copy( buff, (char *)crnt.aii, cnt, READ );
+  Mem_Copy( buff, (char *)crnt.bir, cnt, READ );
+  Mem_Copy( buff, (char *)crnt.bii, cnt, READ );
+  Mem_Copy( buff, (char *)crnt.cir, cnt, READ );
+  Mem_Copy( buff, (char *)crnt.cii, cnt, READ );
+
+  cnt = (size_t)data.np3m * sizeof( complex double );
+  Mem_Copy( buff, (char *)crnt.cur, cnt, READ );
+
+  cnt = sizeof( char );
+  Mem_Copy( buff, &crnt.newer, cnt, READ );
+  Mem_Copy( buff, &crnt.valid, cnt, READ );
+
+  /* Get impedance data */
+  cnt = sizeof(double);
+  Mem_Copy( buff, (char *)&impedance_data.zreal[fstep], cnt, READ );
+  Mem_Copy( buff, (char *)&impedance_data.zimag[fstep], cnt, READ );
+  Mem_Copy( buff, (char *)&impedance_data.zmagn[fstep], cnt, READ );
+  Mem_Copy( buff, (char *)&impedance_data.zphase[fstep], cnt, READ );
+
+  /* Get network data */
+  cnt = sizeof(complex double);
+  Mem_Copy( buff, (char *)&netcx.zped, cnt, READ );
+
+  /* Get radiation pattern data if enabled */
+  if( isFlagSet(ENABLE_RDPAT) )
+  {
+	cnt = (size_t)(fpat.nph * fpat.nth) * sizeof(double);
+	Mem_Copy( buff, (char *)rad_pattern[fstep].gtot, cnt, READ );
+	Mem_Copy( buff, (char *)rad_pattern[fstep].tilt, cnt, READ );
+	Mem_Copy( buff, (char *)rad_pattern[fstep].axrt, cnt, READ );
+
+	cnt = (size_t)NUM_POL * sizeof(double);
+	Mem_Copy( buff, (char *)rad_pattern[fstep].max_gain, cnt, READ );
+	Mem_Copy( buff, (char *)rad_pattern[fstep].min_gain, cnt, READ );
+	Mem_Copy( buff, (char *)rad_pattern[fstep].max_gain_tht, cnt, READ );
+	Mem_Copy( buff, (char *)rad_pattern[fstep].max_gain_phi, cnt, READ );
+
+	cnt = (size_t)NUM_POL * sizeof(int);
+	Mem_Copy( buff, (char *)rad_pattern[fstep].max_gain_idx, cnt, READ );
+	Mem_Copy( buff, (char *)rad_pattern[fstep].min_gain_idx, cnt, READ );
+
+	cnt = (size_t)(fpat.nph * fpat.nth) * sizeof(int);
+	Mem_Copy( buff, (char *)rad_pattern[fstep].sens, cnt, READ );
+
+	Mem_Copy( buff, &flag, sizeof(flag), READ );
+	if( flag ) SetFlag( DRAW_NEW_RDPAT );
+  }
+
+  /* Get near field data if signaled by child */
+  if( strcmp(nfeh, "nfeh") == 0 )
+  {
+	/* Magnitude and phase of E field */
+	if( fpat.nfeh & NEAR_EFIELD )
+	{
+	  cnt = (size_t)(fpat.nrx * fpat.nry * fpat.nrz) * sizeof(double);
+	  Mem_Copy( buff, (char *)near_field.ex, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.ey, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.ez, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.fex, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.fey, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.fez, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.erx, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.ery, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.erz, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.er, cnt, READ );
+	  cnt = sizeof(double);
+	  Mem_Copy( buff, (char *)&near_field.max_er, cnt, READ );
+	}
+
+	/* Magnitude and phase of H fields */
+	if( fpat.nfeh & NEAR_HFIELD )
+	{
+	  cnt = (size_t)(fpat.nrx * fpat.nry * fpat.nrz) * sizeof(double);
+	  Mem_Copy( buff, (char *)near_field.hx, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.hy, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.hz, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.fhx, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.fhy, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.fhz, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.hrx, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.hry, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.hrz, cnt, READ );
+	  Mem_Copy( buff, (char *)near_field.hr, cnt, READ );
+	  cnt = sizeof(double);
+	  Mem_Copy( buff, (char *)&near_field.max_hr, cnt, READ );
+	}
+
+	/* Co-ordinates of field points */
+	cnt = (size_t)(fpat.nrx * fpat.nry * fpat.nrz) * sizeof(double);
+	Mem_Copy( buff, (char *)near_field.px, cnt, READ );
+	Mem_Copy( buff, (char *)near_field.py, cnt, READ );
+	Mem_Copy( buff, (char *)near_field.pz, cnt, READ );
+	cnt = sizeof(double);
+	Mem_Copy( buff, (char *)&near_field.r_max, cnt, READ );
+
+	cnt = sizeof( char );
+	Mem_Copy( buff, &near_field.newer, cnt, READ );
+	Mem_Copy( buff, &near_field.valid, cnt, READ );
+
+  } /*if( isFlagSet(DRAW_EHFIELD) ) */
+
+  free_ptr( (void *)&buff );
+
+} /* Get_Freq_Data() */
+
+/*------------------------------------------------------------------------*/
+
+/* Mem_Copy()
+ *
+ * Copies between buffers using memcpy()
+ */
+  void
+Mem_Copy( char *buff, char *var, size_t cnt, gboolean wrt )
+{
+  static int idx;
+
+  /* Clear idx to buffer */
+  if( !cnt )
+  {
+	idx = 0;
+	return;
+  }
+
+  /* If child process writing data */
+  if( wrt )
+	memcpy( &buff[idx], var, cnt );
+  else /* Parent reading data */
+	memcpy( var, &buff[idx], cnt );
+  idx += (int)cnt;
+
+} /* Mem_Copy() */
+
+/*------------------------------------------------------------------------*/
+
diff --git a/src/fork.h b/src/fork.h
new file mode 100644
index 0000000..130702b
--- /dev/null
+++ b/src/fork.h
@@ -0,0 +1,42 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	FORK_H
+#define	FORK_H		1
+
+#include "common.h"
+
+/* Parent/child commands */
+#define FORK_CMNDS { "inpfile", "frqdata", "nearehf" }
+
+/* Indices for parent/child commands */
+enum P2CH_COMND
+{
+  INFILE = 0,
+  FRQDATA,
+  EHFIELD,
+  NUM_FKCMNDS
+};
+
+/* Near Field select flags */
+#define E_HFIELD	0x01
+#define SNAPSHOT	0x02
+#define EFIELD		0x04
+#define HFIELD		0x08
+
+#endif
diff --git a/src/geom_edit.c b/src/geom_edit.c
new file mode 100644
index 0000000..b7f44b8
--- /dev/null
+++ b/src/geom_edit.c
@@ -0,0 +1,2435 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* geom_edit.c
+ *
+ * Structure/Geometry editor functions for xnec2c
+ */
+
+#include "geom_edit.h"
+#include "shared.h"
+
+/*------------------------------------------------------------------------*/
+
+/* Wire_Editor()
+ *
+ * Handles all actions of the wire editor window
+ */
+  void
+Wire_Editor( int action )
+{
+  /* For looking up spinbuttons */
+  GtkSpinButton *spin;
+
+  /* Frame of tapered wire data */
+  GtkWidget *frame;
+
+  /* For reading/writing to GW & GC rows */
+  static GtkTreeIter
+	iter_gw,
+	iter_gc;
+
+  int idx, idi;
+
+  static gboolean
+		   load   = FALSE, /* Enable wire loading (conductivity specified) */
+		   taper  = FALSE, /* Editing a tapered wire */
+		   save   = FALSE, /* Enable saving of editor data */
+		   busy   = FALSE, /* Block callbacks. Must be a better way to do this? */
+		   newpcl = TRUE,  /* New percent-of-lambda value */
+		   newrdm = TRUE,  /* New diameter ratio value */
+		   newwln = TRUE;  /* New wire length value */
+
+  /* Float type data, wire conductivity */
+  static gdouble fv[14], s = 0.0;
+
+  /* Integer type data */
+  static gint iv[4];
+
+  /* Wire's projection on xyz axes */
+  gdouble dx, dy, dz;
+
+  /* Card (row) name */
+  gchar name[3];
+
+  /* Spin button names, int & float data */
+  gchar *ispin[2] =
+  {
+	"wire_tagnum_spinbutton",
+	"wire_numseg_spinbutton"
+  };
+
+  gchar *fspin[14] =
+  {
+	"wire_x1_spinbutton",
+	"wire_y1_spinbutton",
+	"wire_z1_spinbutton",
+	"wire_x2_spinbutton",
+	"wire_y2_spinbutton",
+	"wire_z2_spinbutton",
+	"wire_dia_spinbutton",
+	"wire_rlen_spinbutton",
+	"wire_dia1_spinbutton",
+	"wire_dian_spinbutton",
+	"wire_rdia_spinbutton",
+	"wire_pcl_spinbutton",
+	"wire_len_spinbutton",
+	"wire_res_spinbutton"
+  };
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, wire_editor) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	/* Clear data not used in GC card */
+	iv[SPIN_COL_I3] = iv[SPIN_COL_I4] = 0;
+	for( idx = WIRE_RDIA; idx <= WIRE_RES; idx++ )
+	  fv[idx] = 0.0;
+
+	/* Set GW data to treeview */
+	Set_Geometry_Data( geom_store, &iter_gw, iv, fv );
+
+	/* Set GC card data to treeview if taper */
+	if( taper )
+	  Set_Geometry_Data( geom_store, &iter_gc,
+		  &iv[SPIN_COL_I3], &fv[WIRE_RLEN] );
+
+	/* Set wire conductivity (loading card) */
+	if( load )
+	  Set_Wire_Conductivity( iv[SPIN_COL_I1], s, cmnd_store );
+
+	save = load = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Read int data from the wire editor */
+  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(wire_editor, ispin[idi]) );
+	iv[idi] = gtk_spin_button_get_value_as_int( spin );
+  }
+
+  /* Read float data from the wire editor */
+  for( idx = WIRE_X1; idx <= WIRE_RES; idx++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(wire_editor, fspin[idx]) );
+	fv[idx] = gtk_spin_button_get_value( spin );
+  }
+  fv[WIRE_DIA]  /= 2.0;
+  fv[WIRE_DIA1] /= 2.0;
+  fv[WIRE_DIAN] /= 2.0;
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New wire row(s) to create */
+	  /* Insert a default GE card if list is empty */
+	  Insert_GE_Card( geom_store, &iter_gw );
+
+	  /* Insert a new blank GW row after a selected row,
+	   * if any, otherwise before the last (GE) row */
+	  Insert_Blank_Geometry_Row(
+		  geom_treeview, geom_store, &iter_gw, "GW" );
+
+	  /* Some default values */
+	  iv[SPIN_COL_I1] = ++gbl_tag_num;
+	  iv[SPIN_COL_I3] = iv[SPIN_COL_I4] = 0;
+
+	  if( taper )
+	  {
+		/* Insert a new blank GC row if tapered wire */
+		Insert_Blank_Geometry_Row(
+			geom_treeview, geom_store, &iter_gc, "GC" );
+		fv[WIRE_DIA]  = 0.0;
+	  }
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  geom_adjustment, geom_adjustment->upper );
+	  break;
+
+	case EDITOR_EDIT:  /* Edit a wire row (GW/GC) */
+	  /* Get selected row */
+	  Get_Selected_Row(
+		  geom_treeview, geom_store, &iter_gw, name );
+	  iter_gc = iter_gw;
+
+	  /*** Editing a GC card ***/
+	  if( strcmp(name, "GC") == 0 )
+	  {
+		taper = TRUE;
+
+		/* Get tapered wire data from tree view */
+		Get_Geometry_Data( geom_store, &iter_gc,
+			&iv[SPIN_COL_I3], &fv[WIRE_RLEN] );
+		fv[WIRE_RDIA] = fv[WIRE_RLEN];
+
+		/* Check for a preceding GW card.
+		 * If card is GW, get wire data */
+		if( Check_Card_Name(geom_store, &iter_gw, PREVIOUS, "GW") )
+		{
+		  Get_Geometry_Data( geom_store, &iter_gw, iv, fv );
+
+		  /* Warn user if wire radius not 0 */
+		  if( fv[WIRE_DIA] != 0.0 )
+			stop( _("GC card preceded by GW card\n"\
+				  "with non-zero wire radius"), ERR_OK );
+
+		} /* if( strcmp(name, "GC") == 0 ) */
+		else stop( _("No GW card before GC card"), ERR_OK );
+	  }
+	  else /*** Editing a GW card ***/
+	  {
+		taper = FALSE;
+
+		/* Get wire data from tree view */
+		Get_Geometry_Data( geom_store, &iter_gw, iv, fv );
+
+		/* Get wire conductivity if specified in LD card */
+		Get_Wire_Conductivity(iv[SPIN_COL_I1], &s, cmnd_store);
+		fv[WIRE_RES] = s;
+
+		/*** Get tapered wire data if dia = 0 ***/
+		if( fv[WIRE_DIA] == 0.0 )
+		{
+		  /* If next card is GC, get data */
+		  if( Check_Card_Name(geom_store, &iter_gc, NEXT, "GC") )
+		  {
+			taper = TRUE;
+
+			/* Get wire taper data from tree view */
+			Get_Geometry_Data( geom_store, &iter_gc,
+				&iv[SPIN_COL_I3], &fv[WIRE_RLEN] );
+			fv[WIRE_RDIA] = fv[WIRE_RLEN];
+		  }
+		  else stop( _("No GC card after a GW card\n"\
+				"with a zero wire radius"), ERR_OK );
+
+		} /* if( fv[WIRE_DIA] == 0.0 ) */
+		/* If radius != 0, next card should not be GC */
+		else if( Check_Card_Name(geom_store, &iter_gc, NEXT, "GC") )
+		  stop( _("GC card follows a GW card\n"\
+				"with non-zero wire radius"), ERR_OK );
+
+	  } /* if( strcmp(name, "GC") == 0 ) */
+	  break;
+
+	case WIRE_EDITOR_TAPR: /* Show taper wire data if button checked */
+	  {
+		/* Wire diameter */
+		static double diam;
+
+		/* Read tapered wire checkbutton */
+		taper = gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON(
+			  lookup_widget(wire_editor, "wire_taper_checkbutton")) );
+		if( taper )
+		{
+		  /* Set wire dia to 0 */
+		  diam = fv[WIRE_DIA];
+		  fv[WIRE_DIA] = 0.0;
+
+		  /* Insert GC card if valid GW iteration */
+		  if( gtk_list_store_iter_is_valid(geom_store, &iter_gw) )
+			Insert_Blank_Geometry_Row(
+				geom_treeview, geom_store, &iter_gc, "GC");
+		}
+		else
+		{
+		  /* Restore wire diam */
+		  fv[WIRE_DIA] = diam;
+
+		  /* Remove GC card if valid */
+		  Remove_Row( geom_store, &iter_gc );
+		} /* if( taper ) */
+	  }
+	  save = TRUE;
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel wire editor */
+	  /* Remove cards */
+	  Remove_Row( geom_store, &iter_gw );
+	  if( taper )
+		Remove_Row( geom_store, &iter_gc );
+	  save = busy = FALSE;
+	  return;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  save = TRUE;
+	  break;
+
+	case EDITOR_LOAD: /* Wire conductivity specified */
+	  spin = GTK_SPIN_BUTTON( lookup_widget(
+			wire_editor, fspin[WIRE_RES]) );
+	  s = gtk_spin_button_get_value( spin );
+	  if( s > 0.0 )
+	  {
+		save = TRUE;
+		load = TRUE;
+	  }
+	  else load = FALSE;
+	  break;
+
+	case EDITOR_TAGNUM: /* Tag number edited by user */
+	  gbl_tag_num = iv[SPIN_COL_I1];
+	  save = TRUE;
+	  if( s > 0.0 ) load = TRUE;
+	  break;
+
+	case EDITOR_SEGPC: /* Segment length as % of smallest wavelength */
+	  /* Calculate num of segs for given % of lambda */
+	  if( calc_data.mxfrq != 0.0 )
+	  {
+		if( taper && ( fv[WIRE_RLEN] != 1.0) ) /* Taper ratio < 1 */
+		{
+		  double cnt = 1.0 / (fv[WIRE_PCL]/100.0) * (1.0-fv[WIRE_RLEN]);
+		  if( cnt < 1.0 )
+		  {
+			double i = ceil( log(1.0-cnt) / log(fv[WIRE_RLEN]) );
+			iv[SPIN_COL_I2] = (gint)i;
+		  }
+		}
+		else
+		{
+		  double i = ceil( 100.0 * (fv[WIRE_LEN]/fv[WIRE_PCL]) /
+			  ((double)CVEL/calc_data.mxfrq) );
+		  iv[SPIN_COL_I2] = (gint)i;
+		}
+	  }
+	  newpcl = FALSE;
+	  save = TRUE;
+	  break;
+
+	  /* Calculate new wire end points on length change */
+	case WIRE_EDITOR_WLEN:
+	  {
+		double l, dl;
+
+		/* Length of wire's projection on axes */
+		dx = fv[WIRE_X2]-fv[WIRE_X1];
+		dy = fv[WIRE_Y2]-fv[WIRE_Y1];
+		dz = fv[WIRE_Z2]-fv[WIRE_Z1];
+
+		/* Wire's length */
+		l = (gdouble)sqrt( dx*dx + dy*dy + dz*dz );
+
+		/* 1/2 of change in wire's length / length */
+		dl = fv[WIRE_LEN] - l; dl /= 2.0 * l;
+
+		/* Corresponding change in wire end co-ordinates */
+		dx *= dl; dy *= dl; dz *= dl;
+		fv[WIRE_X1] -= dx; fv[WIRE_X2] += dx;
+		fv[WIRE_Y1] -= dy; fv[WIRE_Y2] += dy;
+		fv[WIRE_Z1] -= dz; fv[WIRE_Z2] += dz;
+	  }
+	  newwln = FALSE;
+	  save = TRUE;
+	  break;
+
+	case WIRE_EDITOR_RLEN: /* Length taper ratio changed */
+	  fv[WIRE_DIAN] = fv[WIRE_DIA1] *
+		pow(fv[WIRE_RLEN], (double)(iv[SPIN_COL_I2]-1)); /* Nth seg dia */
+	  break;
+
+	case WIRE_EDITOR_RDIA: /* New diameter taper ratio */
+	  fv[WIRE_DIAN] = fv[WIRE_DIA1] *
+		pow(fv[WIRE_RDIA], (double)(iv[SPIN_COL_I2]-1)); /* Nth seg dia */
+	  newrdm = FALSE;
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Frame of tapered wire data */
+  frame = lookup_widget(wire_editor, "wire_taperframe");
+  /* Show taper data if appropriate */
+  if( taper )
+  {
+	gtk_widget_show( frame );
+	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(
+		  lookup_widget(wire_editor,
+			"wire_taper_checkbutton")), TRUE );
+  }
+  else
+  {
+	gtk_widget_hide( frame );
+	gtk_window_resize( GTK_WINDOW(wire_editor), 10, 10 );
+	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(
+		  lookup_widget(wire_editor,
+			"wire_taper_checkbutton")), FALSE );
+  }
+
+  /*** Calculate wire length ***/
+  if( newwln )
+  {
+	/* Length of wire's projection on axes */
+	dx = fv[WIRE_X2]-fv[WIRE_X1];
+	dy = fv[WIRE_Y2]-fv[WIRE_Y1];
+	dz = fv[WIRE_Z2]-fv[WIRE_Z1];
+	/* Wire's length */
+	fv[WIRE_LEN] = (gdouble)sqrt( dx*dx + dy*dy + dz*dz );
+  }
+  else newwln = TRUE;
+
+  /*** Calculate seg length as % of smallest wavelength ***/
+  if( (calc_data.mxfrq != 0.0) && newpcl )
+  {
+	if( taper && (fv[WIRE_RLEN] != 1.0) )
+	  fv[WIRE_PCL] =
+		100.0 * fv[WIRE_LEN] * (1.0-fv[WIRE_RLEN]) /
+		(1.0-(gdouble)pow(fv[WIRE_RLEN], (gdouble)iv[SPIN_COL_I2])) /
+		((gdouble)CVEL/calc_data.mxfrq);
+	else
+	  fv[WIRE_PCL] = 100.0 * (fv[WIRE_LEN] /
+		  (gdouble)iv[SPIN_COL_I2]) / ((gdouble)CVEL/calc_data.mxfrq);
+  }
+  else newpcl = TRUE;
+
+  /*** Calculate radius taper ratio ***/
+  if( (iv[SPIN_COL_I2] > 1) && newrdm )
+	fv[WIRE_RDIA] = pow( fv[WIRE_DIAN]/fv[WIRE_DIA1],
+		1.0/(double)(iv[SPIN_COL_I2]-1) );
+  else newrdm = TRUE;
+
+  /* Write int data to the wire editor */
+  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
+  {
+	spin = GTK_SPIN_BUTTON(
+		lookup_widget(wire_editor, ispin[idi]) );
+	gtk_spin_button_set_value( spin, iv[idi] );
+  }
+
+  /* Write float data to the wire editor (F1 to F7 and taper) */
+  fv[WIRE_DIA] *= 2.0; fv[WIRE_DIA1] *= 2.0; fv[WIRE_DIAN] *= 2.0;
+  for( idx = WIRE_X1; idx <= WIRE_RES; idx++ )
+  {
+	spin = GTK_SPIN_BUTTON(
+		lookup_widget(wire_editor, fspin[idx]) );
+	gtk_spin_button_set_value( spin, fv[idx] );
+  }
+  fv[WIRE_DIA] /= 2.0; fv[WIRE_DIA1] /= 2.0; fv[WIRE_DIAN] /= 2.0;
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Wire_Editor() */
+
+/*------------------------------------------------------------------------*/
+
+/* Patch_Editor()
+ *
+ * Handles all actions of the patch editor window
+ */
+  void
+Patch_Editor( int action )
+{
+  /* For looking up spinbuttons */
+  GtkSpinButton *spin;
+
+  /* For reading/writing to SP/SM & SC rows */
+  static GtkTreeIter
+	iter_sp,
+	iter_sc;
+
+  int idx, idi;
+
+  /* Patch type */
+  static int ptype = PATCH_ARBT;
+
+  /* Integer type data */
+  static gint iv[4];
+
+  /* Float type data */
+  static gdouble fv[14];
+
+  /* Card (row) name */
+  static gchar name[3] = "SP";
+
+  /* Spin button names, int data */
+  gchar *ispin[2] =
+  {
+	"patch_nx_spinbutton",
+	"patch_ny_spinbutton",
+  };
+
+  /* Spin button names, float data */
+  gchar *fspin[12] =
+  {
+	"patch_x1_spinbutton",
+	"patch_y1_spinbutton",
+	"patch_z1_spinbutton",
+	"patch_x2_spinbutton",
+	"patch_y2_spinbutton",
+	"patch_z2_spinbutton",
+	"patch_x3_spinbutton",
+	"patch_y3_spinbutton",
+	"patch_z3_spinbutton",
+	"patch_x4_spinbutton",
+	"patch_y4_spinbutton",
+	"patch_z4_spinbutton",
+  };
+
+  gchar *rbutton[5] =
+  {
+	"patch_arbitrary_radiobutton",
+	"patch_rectangular_radiobutton",
+	"patch_triangular_radiobutton",
+	"patch_quadrilateral_radiobutton",
+	"patch_surface_radiobutton"
+  };
+
+  static gboolean
+	save  = FALSE,	/* Enable saving of editor data */
+		  busy  = FALSE,	/* Block callbacks. Must be a better way to do this? */
+		  ptset = FALSE;	/* Set patch type radio buttons */
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, patch_editor) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	/* Clear data not used in SC card */
+	iv[SPIN_COL_I3]  = iv[SPIN_COL_I4]  = 0;
+	fv[UNUSED_F1] = fv[UNUSED_F2] = 0.0;
+
+	/* Set SP data to treeview */
+	Set_Geometry_Data( geom_store, &iter_sp, iv, fv );
+
+	/* Set SC card data to treeview if non arbitrary */
+	if( ptype != PATCH_ARBT )
+	  Set_Geometry_Data(geom_store,
+		  &iter_sc, &iv[SPIN_COL_I3], &fv[PATCH_X3]);
+
+	save = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Set int data from the patch editor (SP card) */
+  if( ptype != PATCH_SURF )
+  {
+	iv[SPIN_COL_I1] = 0; 	  /* Not used in SP */
+	iv[SPIN_COL_I2] = ptype; /* Patch type */
+  }
+  /* Read int data from the patch editor (SM card) */
+  else for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
+  {
+	spin = GTK_SPIN_BUTTON(
+		lookup_widget(patch_editor, ispin[idi]) );
+	double i = gtk_spin_button_get_value( spin );
+	iv[idi] = (gint)i;
+  }
+
+  /* Read float data from the patch editor */
+  for( idx = PATCH_X1; idx <= PATCH_Z2; idx++ )
+  {
+	spin = GTK_SPIN_BUTTON(
+		lookup_widget(patch_editor, fspin[idx]) );
+	fv[idx] = gtk_spin_button_get_value( spin );
+  }
+  for( idx = PATCH_X3; idx <= PATCH_Z4; idx++ )
+  {
+	spin = GTK_SPIN_BUTTON(
+		lookup_widget(patch_editor, fspin[idx-1]) );
+	fv[idx] = gtk_spin_button_get_value( spin );
+  }
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New patch to edit, enter some default data */
+	  /* Insert a default GE card if list is empty */
+	  Insert_GE_Card( geom_store, &iter_sp );
+
+	  /* Insert a new blank SP row after a selected row,
+	   * if any, otherwise before the last (GE) row */
+	  Insert_Blank_Geometry_Row(
+		  geom_treeview, geom_store, &iter_sp, name );
+
+	  /* Insert an SC card for non-arbitrary patch */
+	  if( ptype != PATCH_ARBT )
+		Insert_Blank_Geometry_Row(
+			geom_treeview, geom_store, &iter_sc, "SC" );
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  geom_adjustment, geom_adjustment->upper );
+	  ptset = TRUE;
+	  break;
+
+	case EDITOR_EDIT:  /* Edit a selected geometry row */
+	  /* Get selected row */
+	  Get_Selected_Row(
+		  geom_treeview, geom_store, &iter_sp, name );
+	  iter_sc = iter_sp;
+
+	  /*** Editing an SC card ***/
+	  if( strcmp(name, "SC") == 0 )
+	  {
+		/* Get patch data from SC row in tree view */
+		Get_Geometry_Data( geom_store, &iter_sc,
+			&iv[SPIN_COL_I3], &fv[PATCH_X3] );
+
+		/* Check for a preceding SP | SM card.
+		 * If card is SP, get patch data */
+		if( Check_Card_Name(geom_store, &iter_sp, PREVIOUS, "SP") )
+		{
+		  Get_Geometry_Data( geom_store, &iter_sp, iv, fv );
+		  ptype = iv[SPIN_COL_I2];
+
+		  /* Warn user if SP card with arbitrary
+		   * patch is followed by an SC card */
+		  if( ptype == PATCH_ARBT )
+			stop( _("SC card preceded by SP card\n"\
+				  "with arbitrary patch type"), ERR_OK );
+
+		} /* if( Check_Card_Name(geom_store, &iter_sp, PREVIOUS, "SP") ) */
+		else /* Look for a previous SM card */
+		{
+		  iter_sp = iter_sc;
+		  if( Check_Card_Name(geom_store, &iter_sp, PREVIOUS, "SM") )
+		  {
+			Get_Geometry_Data( geom_store, &iter_sp, iv, fv );
+			ptype = PATCH_SURF;
+		  }
+		  else stop( _("No SP or SM card before SC card"), ERR_OK );
+		}
+	  } /* if( strcmp(name, "SC") == 0 ) */
+	  /*** Editing an SP|SM card ***/
+	  else if( strcmp(name, "SP") == 0 )
+	  {
+		/* Get patch data from treeview */
+		Get_Geometry_Data( geom_store, &iter_sp, iv, fv );
+		ptype = iv[SPIN_COL_I2];
+
+		/*** Get SC card data if patch type non-arbitrary ***/
+		if( ptype != PATCH_ARBT )
+		{
+		  /* If next card is SC, get data */
+		  if( Check_Card_Name(geom_store, &iter_sc, NEXT, "SC") )
+			Get_Geometry_Data( geom_store, &iter_sc,
+				&iv[SPIN_COL_I3], &fv[PATCH_X3] );
+		  else
+		  {
+			ptype = PATCH_ARBT;
+			stop( _("No SC card after an SP card\n"\
+				  "with non-arbitrary patch type"), ERR_OK );
+		  }
+
+		} /* if( ptype != PATCH_ARBT ) */
+		/* If patch type arbitrary, no SC card should follow */
+		else if( Check_Card_Name(geom_store, &iter_sc, NEXT, "SC") )
+		  stop( _("SC card follows an SP card\n"\
+				"with arbitrary patch type"), ERR_OK );
+	  } /* if( strcmp(name, "SP") == 0 ) */
+	  else /* SM card */
+	  {
+		/* Get patch data from treeview */
+		Get_Geometry_Data( geom_store, &iter_sp, iv, fv );
+		ptype = PATCH_SURF;
+
+		/* If next card is SC, get data */
+		if( Check_Card_Name(geom_store, &iter_sc, NEXT, "SC") )
+		  Get_Geometry_Data( geom_store, &iter_sc,
+			  &iv[SPIN_COL_I3], &fv[PATCH_X3] );
+		else stop( _("No SC card after an SM card"), ERR_OK );
+
+	  } /* if( strcmp(name, "SP") == 0 ) */
+
+	  ptset = TRUE;
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel patch editor */
+	  /* Remove cards */
+	  Remove_Row( geom_store, &iter_sp );
+	  if( ptype != PATCH_ARBT )
+		Remove_Row( geom_store, &iter_sc );
+	  save = busy = FALSE;
+	  return;
+
+	case EDITOR_DATA: /* Some editor data changed */
+	  save = TRUE;
+	  break;
+
+	case PATCH_EDITOR_ARBT: /* Arbitary-shaped patch */
+	  ptype = PATCH_ARBT;
+	  ptset = FALSE;
+	  save  = TRUE;
+	  for( idx = PATCH_X3; idx <= UNUSED_F2; idx++ )
+		fv[idx] = 0.0;
+
+	  /* Remove SC card */
+	  Remove_Row( geom_store, &iter_sc );
+	  break;
+
+	case PATCH_EDITOR_RECT: /* Rectangular patch */
+	  ptype = PATCH_RECT;
+	  ptset = FALSE;
+	  save  = TRUE;
+	  for( idx = PATCH_X4; idx <= UNUSED_F2; idx++ )
+		fv[idx] = 0.0;
+	  break;
+
+	case PATCH_EDITOR_TRIA: /* Triangular patch */
+	  ptype = PATCH_TRIA;
+	  ptset = FALSE;
+	  save  = TRUE;
+	  for( idx = PATCH_X4; idx <= UNUSED_F2; idx++ )
+		fv[idx] = 0.0;
+	  break;
+
+	case PATCH_EDITOR_QUAD: /* Quadrilateral patch */
+	  ptype = PATCH_QUAD;
+	  ptset = FALSE;
+	  save  = TRUE;
+	  break;
+
+	case PATCH_EDITOR_SURF: /* Multi-patch surface */
+	  iv[SPIN_COL_I1] = iv[SPIN_COL_I2] = 8;
+	  ptype = PATCH_SURF;
+	  ptset  = FALSE;
+	  save   = TRUE;
+	  break;
+
+	case PATCH_EDITOR_SCCD: /* Insert SC card (non-arbitrary patch case) */
+	  if( gtk_list_store_iter_is_valid( geom_store, &iter_sp) )
+		Insert_Blank_Geometry_Row(
+			geom_treeview, geom_store, &iter_sc, "SC");
+
+  } /* switch( action ) */
+
+  /* Change labels as needed */
+  if( ptype == PATCH_ARBT )
+  {
+	gtk_label_set_text( GTK_LABEL(
+		  lookup_widget(patch_editor, "patch_x1_label")), _("Center - X") );
+	gtk_label_set_text( GTK_LABEL(
+		  lookup_widget(patch_editor, "patch_y1_label")), _("Center - Y") );
+	gtk_label_set_text( GTK_LABEL(
+		  lookup_widget(patch_editor, "patch_z1_label")), _("Center - Z") );
+	gtk_label_set_text( GTK_LABEL(
+		  lookup_widget(patch_editor, "patch_x2_label")), _("Normal - Elev.") );
+	gtk_label_set_text( GTK_LABEL(
+		  lookup_widget(patch_editor, "patch_y2_label")), _("Normal - Azim.") );
+	gtk_label_set_text( GTK_LABEL(
+		  lookup_widget(patch_editor, "patch_z2_label")), _("Patch Area") );
+  }
+  else
+  {
+	gtk_label_set_text( GTK_LABEL(
+		  lookup_widget(patch_editor, "patch_x1_label")), _("Corner 1 - X") );
+	gtk_label_set_text( GTK_LABEL(
+		  lookup_widget(patch_editor, "patch_y1_label")), _("Corner 1 - Y") );
+	gtk_label_set_text( GTK_LABEL(
+		  lookup_widget(patch_editor, "patch_z1_label")), _("Corner 1 - Z") );
+	gtk_label_set_text( GTK_LABEL(
+		  lookup_widget(patch_editor, "patch_x2_label")), _("Corner 2 - X") );
+	gtk_label_set_text( GTK_LABEL(
+		  lookup_widget(patch_editor, "patch_y2_label")), _("Corner 2 - Y") );
+	gtk_label_set_text( GTK_LABEL(
+		  lookup_widget(patch_editor, "patch_z2_label")), _("Corner 2 - Z") );
+  }
+
+  /* Hide/Show parts of window as needed */
+  switch( ptype )
+  {
+	case PATCH_ARBT: /* Arbitary shaped patch */
+	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sc_frame") );
+	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sm_frame") );
+	  gtk_window_resize( GTK_WINDOW(patch_editor), 10, 10 );
+	  break;
+
+	case PATCH_RECT: /* Rectangular patch */
+	  gtk_widget_show( lookup_widget(patch_editor, "patch_sc_frame") );
+	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sc_table") );
+	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sm_frame") );
+	  gtk_window_resize( GTK_WINDOW(patch_editor), 10, 10 );
+	  break;
+
+	case PATCH_TRIA: /* Triangular patch */
+	  gtk_widget_show( lookup_widget(patch_editor, "patch_sc_frame") );
+	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sc_table") );
+	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sm_frame") );
+	  gtk_window_resize( GTK_WINDOW(patch_editor), 10, 10 );
+	  break;
+
+	case PATCH_QUAD: /* Quadrilateral patch */
+	  gtk_widget_show( lookup_widget(patch_editor, "patch_sc_frame") );
+	  gtk_widget_show( lookup_widget(patch_editor, "patch_sc_table") );
+	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sm_frame") );
+	  gtk_window_resize( GTK_WINDOW(patch_editor), 10, 10 );
+	  break;
+
+	case PATCH_SURF: /* Multi-patch surface */
+	  gtk_widget_show( lookup_widget(patch_editor, "patch_sm_frame") );
+	  gtk_widget_show( lookup_widget(patch_editor, "patch_sc_frame") );
+	  gtk_widget_hide( lookup_widget(patch_editor, "patch_sc_table") );
+	  gtk_window_resize( GTK_WINDOW(patch_editor), 10, 10 );
+
+  } /* switch( ptype ) */
+
+  /* Set patch type radio button */
+  if( ptset )
+  {
+	ptset = FALSE;
+	gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON(
+		  lookup_widget(patch_editor, rbutton[ptype])), TRUE );
+  }
+
+  /* Set card name */
+  Strlcpy( name, (ptype == PATCH_SURF ? "SM" : "SP"), sizeof(name) );
+  if( gtk_list_store_iter_is_valid(geom_store, &iter_sp) && save )
+	gtk_list_store_set( geom_store, &iter_sp, GEOM_COL_NAME, name, -1 );
+
+  /* Write int data for SM card */
+  if( ptype == PATCH_SURF )
+	for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
+	{
+	  spin = GTK_SPIN_BUTTON( lookup_widget(patch_editor, ispin[idi]) );
+	  gtk_spin_button_set_value( spin, iv[idi] );
+	}
+
+  /* Write float data to the patch editor */
+  for( idx = PATCH_X1; idx <= PATCH_Z2; idx++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(patch_editor, fspin[idx]) );
+	gtk_spin_button_set_value( spin, fv[idx] );
+  }
+  for( idx = PATCH_X3; idx <= PATCH_Z4; idx++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(patch_editor, fspin[idx-1]) );
+	gtk_spin_button_set_value( spin, fv[idx] );
+  }
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Patch_Editor() */
+
+/*------------------------------------------------------------------------*/
+
+/* Arc_Editor()
+ *
+ * Handles all actions of the arc editor window
+ */
+
+  void
+Arc_Editor( int action )
+{
+  /* For looking up spinbuttons */
+  GtkSpinButton *spin;
+
+  /* For reading/writing to GA rows */
+  static GtkTreeIter iter_ga;
+
+  int idx, idi;
+
+  static gboolean
+		   load   = FALSE, /* Enable wire loading (conductivity specified) */
+		   newpcl = TRUE,  /* New percent-of-lambda value  */
+		   save   = FALSE, /* Enable saving of editor data */
+		   busy   = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+  /* Float type data */
+  static gdouble fv[7] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+
+  /* Wire conductivity */
+  static gdouble s = 0.0;
+
+  /* Integer type data */
+  static gint iv[2];
+
+  /* Card (row) name */
+  gchar name[3];
+
+  /* Spin button names, int & float data */
+  gchar *ispin[2] =
+  {
+	"arc_tagnum_spinbutton",
+	"arc_numseg_spinbutton"
+  };
+
+  gchar *fspin[6] =
+  {
+	"arc_rad_spinbutton",
+	"arc_end1_spinbutton",
+	"arc_end2_spinbutton",
+	"arc_dia_spinbutton",
+	"arc_pcl_spinbutton",
+	"arc_res_spinbutton"
+  };
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, arc_editor) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	Set_Geometry_Data( geom_store, &iter_ga, iv, fv );
+
+	/* Set wire conductivity (loading card) */
+	if( load )
+	  Set_Wire_Conductivity( iv[SPIN_COL_I1], s, cmnd_store );
+
+	save = load = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Read int data from the arc editor */
+  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(arc_editor, ispin[idi]) );
+	iv[idi] = gtk_spin_button_get_value_as_int( spin );
+  }
+
+  /* Read float data from the arc editor */
+  for( idx = ARC_RAD; idx <= ARC_PCL; idx++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(arc_editor, fspin[idx]) );
+	fv[idx] = gtk_spin_button_get_value( spin );
+  }
+  fv[ARC_DIA] /= 2.0;
+
+  /* Get wire conductivity */
+  spin = GTK_SPIN_BUTTON( lookup_widget(arc_editor, fspin[idx]) );
+  s = gtk_spin_button_get_value( spin );
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New arc row to create */
+	  /* Insert a default GE card if list is empty */
+	  Insert_GE_Card( geom_store, &iter_ga );
+
+	  /* Insert a new blank GA row after a selected row,
+	   * if any, otherwise before the last (GE) row */
+	  Insert_Blank_Geometry_Row(
+		  geom_treeview, geom_store, &iter_ga, "GA");
+
+	  /* Some default values */
+	  iv[SPIN_COL_I1] = ++gbl_tag_num;
+	  spin = GTK_SPIN_BUTTON(
+		  lookup_widget(arc_editor, ispin[SPIN_COL_I1]));
+	  gtk_spin_button_set_value( spin, iv[SPIN_COL_I1] );
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  geom_adjustment, geom_adjustment->upper);
+	  break;
+
+	case EDITOR_EDIT:  /* Edit an arc row (GA) selected in treeview */
+	  /* Get selected row */
+	  Get_Selected_Row(
+		  geom_treeview, geom_store, &iter_ga, name );
+
+	  /* Get arc data from tree view */
+	  Get_Geometry_Data(
+		  geom_store, &iter_ga, iv, fv );
+
+	  /* Get wire conductivity if specified in LD card */
+	  Get_Wire_Conductivity(iv[SPIN_COL_I1], &s, cmnd_store);
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel arc editor */
+	  /* Remove cards */
+	  Remove_Row( geom_store, &iter_ga );
+	  save = busy = FALSE;
+	  return;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  save = TRUE;
+	  break;
+
+	case EDITOR_LOAD: /* Wire conductivity specified */
+	  spin = GTK_SPIN_BUTTON( lookup_widget(
+			arc_editor, fspin[SPIN_COL_F6]) );
+	  s = gtk_spin_button_get_value( spin );
+	  if( s > 0.0 )
+	  {
+		save = TRUE;
+		load = TRUE;
+	  }
+	  else load = FALSE;
+	  break;
+
+	case EDITOR_TAGNUM: /* Tag number edited by user */
+	  gbl_tag_num = iv[SPIN_COL_I1];
+	  save = TRUE;
+	  if( s > 0.0 )	load = TRUE;
+	  break;
+
+	case EDITOR_SEGPC: /* Segment length as % of smallest wavelength */
+	  /* Calculate num of segs for given % of lambda */
+	  if( calc_data.mxfrq != 0.0 )
+	  {
+		gdouble len = fv[ARC_RAD] *
+		  (gdouble)fabs( fv[ARC_END1]-fv[ARC_END2] )/(gdouble)TD;
+		double i = ceil(100.0 / fv[ARC_PCL] *
+			len /((gdouble)CVEL/(gdouble)calc_data.mxfrq));
+		iv[SPIN_COL_I2] = (gint)i;
+	  }
+	  newpcl = FALSE;
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /*** Calculate seg length as % of smallest wavelength ***/
+  if( (calc_data.mxfrq != 0.0) && newpcl )
+  {
+	gdouble len = fv[ARC_RAD] *
+	  (gdouble)fabs( fv[ARC_END1]-fv[ARC_END2] )/(gdouble)TD;
+	fv[ARC_PCL] = 100.0 * (len/(gdouble)iv[SPIN_COL_I2]) /
+	  ((gdouble)CVEL/(gdouble)calc_data.mxfrq);
+  }
+  else newpcl = TRUE;
+
+  /* Write int data to the arc editor */
+  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
+  {
+	spin = GTK_SPIN_BUTTON(
+		lookup_widget(arc_editor, ispin[idi]) );
+	gtk_spin_button_set_value( spin, iv[idi] );
+  }
+
+  /* Write float data to the arc editor (F1 to F4 & pcl/resistance) */
+  fv[ARC_DIA] *= 2.0;
+  for( idx = ARC_RAD; idx <= ARC_PCL; idx++ )
+  {
+	spin = GTK_SPIN_BUTTON(
+		lookup_widget(arc_editor, fspin[idx]) );
+	gtk_spin_button_set_value( spin, fv[idx] );
+  }
+  fv[ARC_DIA] /= 2.0;
+
+  spin = GTK_SPIN_BUTTON(
+	  lookup_widget(arc_editor, fspin[idx]) );
+  gtk_spin_button_set_value( spin, s );
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Arc_Editor() */
+
+/*------------------------------------------------------------------------*/
+
+/* Helix_Editor()
+ *
+ * Handles all actions of the helix editor window
+ */
+
+  void
+Helix_Editor( int action )
+{
+  /* For looking up spinbuttons */
+  GtkSpinButton *spin;
+
+  /* For reading/writing to GH rows */
+  static GtkTreeIter iter_gh;
+
+  gint idx, idi;
+  gdouble ftmp;
+
+  static gboolean
+			load    = FALSE, /* Enable wire loading (conductivity specified) */
+			linkall = TRUE,  /* Link all radius spinbuttons  */
+			linkzo  = FALSE, /* Link X, Y @ Z=0 spinbuttons  */
+			linkzhl = FALSE, /* Link X, Y @ Z=HL spinbuttons */
+			helixlh = FALSE, /* Specify a left hand helix */
+			newpcl  = TRUE,  /* New percent-of-lambda value  */
+			newspc  = TRUE,  /* New percent-of-lambda value  */
+			save    = FALSE, /* Enable saving of editor data */
+			busy    = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+  /* Float type data, wire conductivity */
+  static gdouble fv[10], s = 0.0;
+
+  /* Integer type data */
+  static gint iv[2];
+
+  /* Card (row) name */
+  gchar name[3];
+
+  /* Spin button names, int & float data */
+  gchar *ispin[2] =
+  {
+	"helix_tagnum_spinbutton",
+	"helix_numseg_spinbutton"
+  };
+
+  gchar *fspin[10] =
+  {
+	"helix_tspace_spinbutton",
+	"helix_len_spinbutton",
+	"helix_radxzo_spinbutton",
+	"helix_radyzo_spinbutton",
+	"helix_radxzhl_spinbutton",
+	"helix_radyzhl_spinbutton",
+	"helix_dia_spinbutton",
+	"helix_pcl_spinbutton",
+	"helix_nturns_spinbutton",
+	"helix_res_spinbutton"
+  };
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, helix_editor) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	/* Change seg/turn to total number of segs */
+	gint tmp = iv[SPIN_COL_I2];
+	double i = ceil( (gdouble)iv[SPIN_COL_I2] * fv[HELIX_NTURN] );
+	iv[SPIN_COL_I2] = (gint)i;
+
+	/* Change to left hand helix */
+	if( helixlh )
+	  fv[HELIX_LEN] = -fv[HELIX_LEN];
+
+	Set_Geometry_Data( geom_store, &iter_gh, iv, fv );
+
+	/* Change back */
+	iv[SPIN_COL_I2] = tmp;
+	fv[HELIX_LEN] = fabs( fv[HELIX_LEN] );
+
+	/* Set wire conductivity (loading card) */
+	if( load )
+	  Set_Wire_Conductivity( iv[SPIN_COL_I1], s, cmnd_store );
+
+	save = load = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Read int data from the helix editor */
+  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
+  {
+	spin = GTK_SPIN_BUTTON(
+		lookup_widget(helix_editor, ispin[idi]) );
+	iv[idi] = gtk_spin_button_get_value_as_int( spin );
+  }
+  /* Read float data from the helix editor */
+  for( idx = HELIX_TSPACE; idx <= HELIX_RES; idx++ )
+  {
+	spin = GTK_SPIN_BUTTON(
+		lookup_widget(helix_editor, fspin[idx]) );
+	fv[idx] = gtk_spin_button_get_value( spin );
+  }
+  fv[HELIX_DIA] /= 2.0;
+
+  /* Link all radius spinbuttons to X @ Z=0 */
+  if( linkall )
+	fv[HELIX_RYZO] = fv[HELIX_RXZHL] = fv[HELIX_RYZHL] = fv[HELIX_RXZO];
+
+  /* Link X, Y @ Z=0 spinbuttons */
+  if( linkzo )
+	fv[HELIX_RYZO] = fv[HELIX_RXZO];
+
+  /* Link X, Y @ Z=0 spinbuttons */
+  if( linkzhl )
+	fv[HELIX_RYZHL] = fv[HELIX_RXZHL];
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New helix row to create */
+	  /* Insert a default GE card if list is empty */
+	  Insert_GE_Card( geom_store, &iter_gh );
+
+	  /* Insert a new blank GH row after a selected row,
+	   * if any, otherwise before the last (GE) row */
+	  Insert_Blank_Geometry_Row(
+		  geom_treeview, geom_store, &iter_gh, "GH");
+
+	  /* Some default values */
+	  iv[SPIN_COL_I1] = ++gbl_tag_num;
+	  spin = GTK_SPIN_BUTTON( lookup_widget(
+			helix_editor, ispin[SPIN_COL_I1]) );
+	  gtk_spin_button_set_value( spin, iv[SPIN_COL_I1] );
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  geom_adjustment, geom_adjustment->upper);
+	  break;
+
+	case EDITOR_EDIT:  /* Edit a helix row (GH) */
+	  /* Get selected row */
+	  Get_Selected_Row( geom_treeview, geom_store, &iter_gh, name );
+
+	  /* Get helix data from tree view */
+	  Get_Geometry_Data( geom_store, &iter_gh, iv, fv );
+
+	  /* Get wire conductivity if specified in LD card */
+	  Get_Wire_Conductivity(iv[SPIN_COL_I1], &s, cmnd_store);
+	  fv[HELIX_RES] = s;
+
+	  /* Set LH/RH helix check button */
+	  {
+		GtkToggleButton *toggle =
+		  GTK_TOGGLE_BUTTON( lookup_widget(
+				helix_editor, "helix_lh_checkbutton") );
+		if( fv[HELIX_LEN] < 0.0 )
+		  gtk_toggle_button_set_active( toggle, TRUE );
+		else
+		  gtk_toggle_button_set_active( toggle, FALSE );
+	  }
+
+	  /* If left hand helix */
+	  fv[HELIX_LEN] = fabs( fv[HELIX_LEN] );
+
+	  /* Change to number of segs/turn */
+	  fv[HELIX_NTURN] = fv[HELIX_LEN] / fv[HELIX_TSPACE];
+	  iv[SPIN_COL_I2] =
+		(gint)((gdouble)iv[SPIN_COL_I2] / fv[HELIX_NTURN]);
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel helix editor */
+	  /* Remove cards */
+	  Remove_Row( geom_store, &iter_gh );
+	  save = busy = FALSE;
+	  return;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  save = TRUE;
+	  break;
+
+	case EDITOR_LOAD: /* Wire conductivity specified */
+	  spin = GTK_SPIN_BUTTON(lookup_widget(
+			helix_editor, fspin[HELIX_RES]));
+	  s = gtk_spin_button_get_value( spin );
+	  if( s > 0.0 )
+	  {
+		save = TRUE;
+		load = TRUE;
+	  }
+	  else load = FALSE;
+	  break;
+
+	case EDITOR_TAGNUM: /* Tag number edited by user */
+	  gbl_tag_num = iv[SPIN_COL_I1];
+	  save = TRUE;
+	  if( s > 0.0 )	load = TRUE;
+	  break;
+
+	case HELIX_EDITOR_LH: /* Left hand helix */
+	  helixlh = TRUE;
+	  save = TRUE;
+	  break;
+
+	case HELIX_EDITOR_RH: /* Right hand helix */
+	  helixlh = FALSE;
+	  save = TRUE;
+	  break;
+
+	case HELIX_EDITOR_LINKALL: /* Link all radius spinbuttons */
+	  linkall = TRUE;
+	  linkzo  = linkzhl = FALSE;
+	  break;
+
+	case HELIX_EDITOR_LINKZO: /* Link X, Y @ Z=0 spinbuttons */
+	  linkzo = TRUE;
+	  linkall = linkzhl = FALSE;
+	  break;
+
+	case HELIX_EDITOR_LINKZHL: /* Link X, Y @ Z=HL spinbuttons */
+	  linkzhl = TRUE;
+	  linkzo  = linkall = FALSE;
+	  break;
+
+	case HELIX_EDITOR_NTURN: /* New number of turns */
+	  fv[HELIX_TSPACE] = fv[HELIX_LEN] / fv[HELIX_NTURN];
+	  newspc = FALSE;
+	  save = TRUE;
+	  break;
+
+	case EDITOR_SEGPC: /* Segment length as % of smallest wavelength */
+	  /* Calculate num of segs for given % of lambda */
+	  if( calc_data.mxfrq != 0.0 )
+	  {
+		gdouble len, f;
+
+		/* Pitch angle of helix, assumes untapered helix */
+		f = asin( fv[HELIX_TSPACE] / (gdouble)TP / fv[HELIX_RXZO] );
+
+		/* Helix turn length */
+		len = (gdouble)TP * fv[HELIX_RXZO] / (gdouble)cos( f );
+
+		/* New number of segments */
+		double i = ceil(100.0 / fv[HELIX_PCL]*len /
+			((gdouble)CVEL / (gdouble)calc_data.mxfrq) );
+		iv[SPIN_COL_I2] = (gint)i;
+	  }
+	  newpcl = FALSE;
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /*** Calculate seg length as % of smallest wavelength ***/
+  if( (calc_data.mxfrq != 0.0) && newpcl )
+  {
+	gdouble len, f;
+
+	/* Pitch angle of helix, assumes untapered helix */
+	f = asin( fv[HELIX_TSPACE]/(gdouble)TP/fv[HELIX_RXZO] );
+
+	/* Helix turn length */
+	len = (gdouble)TP * fv[HELIX_RXZO] / (gdouble)cos( f );
+
+	fv[HELIX_PCL] = 100.0 * (len/(gdouble)iv[SPIN_COL_I2]) /
+	  ((gdouble)CVEL / (gdouble)calc_data.mxfrq);
+  }
+  else newpcl = TRUE;
+
+  /* Calculate new turn spacing */
+  if( newspc )
+	fv[HELIX_NTURN] = fv[HELIX_LEN] / fv[HELIX_TSPACE];
+  else
+	newspc = TRUE;
+
+  /* Write int data to the helix editor */
+  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(
+		  helix_editor, ispin[idi]) );
+	gtk_spin_button_set_value( spin, iv[idi] );
+  }
+
+  /* Write float data to the helix editor */
+  ftmp = fv[HELIX_DIA];
+  fv[HELIX_DIA] *= 2.0;
+  for( idx = HELIX_TSPACE; idx <= HELIX_RES; idx++ )
+  {
+	spin = GTK_SPIN_BUTTON( lookup_widget(
+		  helix_editor, fspin[idx]) );
+	gtk_spin_button_set_value( spin, fv[idx] );
+  }
+  fv[HELIX_DIA] = ftmp;
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Helix_Editor() */
+
+/*------------------------------------------------------------------------*/
+
+/* Reflect_Editor()
+ *
+ * Handles all actions of the reflect editor window
+ */
+  void
+Reflect_Editor( int action )
+{
+  /* For looking up spinbuttons/checkbuttons */
+  GtkSpinButton *spin;
+  GtkToggleButton *toggle;
+
+  /* For reading/writing to GX row */
+  static GtkTreeIter iter_gx;
+
+  int idx, ck;
+
+  /* Integer type data */
+  static gint iv[2];
+
+  /* Check button names */
+  gchar *ckbutton[3] =
+  {
+	"reflect_z_checkbutton",
+	"reflect_y_checkbutton",
+	"reflect_x_checkbutton"
+  };
+
+  /* Card (row) name */
+  gchar name[3];
+
+  static gboolean
+	save = FALSE, /* Enable saving of editor data */
+		 busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, reflect_editor) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	Set_Geometry_Int_Data( geom_store, &iter_gx, iv );
+	save = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New reflect row to create */
+	  /* Insert a default GE card if list is empty */
+	  Insert_GE_Card( geom_store, &iter_gx );
+
+	  /* Insert a new blank GX row after a selected row,
+	   * if any, otherwise before the last (GE) row */
+	  Insert_Blank_Geometry_Row(
+		  geom_treeview, geom_store, &iter_gx, "GX");
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  geom_adjustment, geom_adjustment->upper);
+	  break;
+
+	case EDITOR_EDIT:  /* Edit a reflect row (GX) selected in treeview */
+	  /* Get selected row */
+	  Get_Selected_Row(
+		  geom_treeview, geom_store, &iter_gx, name );
+
+	  /* Get reflect data from tree view */
+	  Get_Geometry_Int_Data( geom_store, &iter_gx, iv );
+
+	  /* Set reflection axes check buttons */
+	  {
+		ck = iv[SPIN_COL_I2];
+
+		for( idx = 0; idx < 3; idx++ )
+		{
+		  toggle = GTK_TOGGLE_BUTTON(
+			  lookup_widget(reflect_editor, ckbutton[idx]) );
+		  if( ck & 1 )
+			gtk_toggle_button_set_active( toggle, TRUE );
+		  else
+			gtk_toggle_button_set_active( toggle, FALSE );
+		  ck /= 10;
+		}
+	  }
+
+	  /* Set tag num increment */
+	  spin = GTK_SPIN_BUTTON(
+		  lookup_widget(reflect_editor, "reflect_taginc_spinbutton") );
+	  gtk_spin_button_set_value( spin, iv[SPIN_COL_I1] );
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel reflect editor */
+	  /* Remove cards */
+	  Remove_Row( geom_store, &iter_gx );
+	  save = busy = FALSE;
+	  return;
+
+	case REFLECT_EDITOR_TOGGLE: /* Reflect button toggled */
+	  save = TRUE;
+	  break;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Work out the I2 value needed by GX card */
+  ck = 1;  iv[SPIN_COL_I2] = 0;
+  for( idx = 0; idx < 3; idx++ )
+  {
+	toggle = GTK_TOGGLE_BUTTON(
+		lookup_widget(reflect_editor, ckbutton[idx]) );
+	if( gtk_toggle_button_get_active(toggle) )
+	  iv[SPIN_COL_I2] += ck;
+	ck *= 10;
+  }
+
+  /* Read tag inc from the reflect editor */
+  spin = GTK_SPIN_BUTTON(
+	  lookup_widget(reflect_editor,
+		"reflect_taginc_spinbutton") );
+  iv[SPIN_COL_I1] = gtk_spin_button_get_value_as_int( spin );
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Reflection_Editor() */
+
+/*------------------------------------------------------------------------*/
+
+/* Scale_Editor()
+ *
+ * Handles all actions of the scale editor window
+ */
+  void
+Scale_Editor( int action )
+{
+  /* For looking up spinbuttons */
+  GtkSpinButton *spin;
+
+  /* For reading/writing to GS row */
+  static GtkTreeIter iter_gs;
+
+  /* Integer type data */
+  static gint iv[2];
+
+  /* Spin button names, int data */
+  gchar *ispin[2] =
+  {
+	"scale_from_spinbutton",
+	"scale_to_spinbutton"
+  };
+
+  int idx, idi;
+
+  /* Scale factor */
+  static gdouble scale = 1.0;
+
+  /* Card (row) name, strings for convertions */
+  gchar name[3], sf[13], *str;
+
+  static gboolean
+	save = FALSE, /* Enable saving of editor data */
+		 busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, scale_editor) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	/* Clear all GS columns */
+	for( idx = GEOM_COL_I1; idx <= GEOM_COL_F7; idx++ )
+	  gtk_list_store_set( geom_store, &iter_gs, idx, "0", -1 );
+
+	/* Enter tag from-to data */
+	Set_Geometry_Int_Data( geom_store, &iter_gs, iv );
+
+	/* Enter scale factor */
+	snprintf( sf, 13, "%12.5E", scale );
+	gtk_list_store_set(
+		geom_store, &iter_gs, GEOM_COL_F1, sf, -1 );
+
+	save = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New scale row to create */
+	  /* Insert a default GE card if list is empty */
+	  Insert_GE_Card( geom_store, &iter_gs );
+
+	  /* Insert a new blank GS row after a selected row,
+	   * if any, otherwise before the last (GE) row */
+	  Insert_Blank_Geometry_Row(
+		  geom_treeview, geom_store, &iter_gs, "GS");
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  geom_adjustment, geom_adjustment->upper);
+	  save = FALSE;
+	  break;
+
+	case EDITOR_EDIT:  /* Edit a scale row (GS) selected in treeview */
+	  /* Get selected row */
+	  Get_Selected_Row(
+		  geom_treeview, geom_store, &iter_gs, name );
+
+	  /* Get tag from-to data from tree view */
+	  Get_Geometry_Int_Data( geom_store, &iter_gs, iv );
+
+	  /* Get scale data from tree view */
+	  if( gtk_list_store_iter_is_valid(geom_store, &iter_gs) )
+	  {
+		gtk_tree_model_get(	GTK_TREE_MODEL(geom_store),
+			&iter_gs, GEOM_COL_F1, &str, -1);
+		scale = Strtod( str, NULL );
+		g_free( str );
+	  }
+	  else
+		stop( _("Error reading row data\n"\
+			    "Invalid list iterator"), ERR_OK );
+
+	  /* Enter tag from-to data to scale editor */
+	  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
+	  {
+		spin = GTK_SPIN_BUTTON(
+			lookup_widget(scale_editor, ispin[idi]) );
+		gtk_spin_button_set_value( spin, iv[idi] );
+	  }
+
+	  /* Set scale factor to scale editor */
+	  spin = GTK_SPIN_BUTTON(
+		  lookup_widget(scale_editor, "scale_factor_spinbutton") );
+	  gtk_spin_button_set_value( spin, scale );
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel scale editor */
+	  /* Remove cards */
+	  Remove_Row( geom_store, &iter_gs );
+	  save = busy = FALSE;
+	  return;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  /* Read int data from the scale editor */
+	  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
+	  {
+		spin = GTK_SPIN_BUTTON(
+			lookup_widget(scale_editor, ispin[idi]) );
+		iv[idi] = gtk_spin_button_get_value_as_int( spin );
+	  }
+
+	  /* Read scale from the scale editor */
+	  spin = GTK_SPIN_BUTTON(
+		  lookup_widget(scale_editor, "scale_factor_spinbutton") );
+	  scale = gtk_spin_button_get_value( spin );
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Scale_Editor() */
+
+/*------------------------------------------------------------------------*/
+
+/* Cylinder_Editor()
+ *
+ * Handles all actions of the cylinder editor window
+ */
+  void
+Cylinder_Editor( int action )
+{
+  /* For looking up spinbuttons */
+  GtkSpinButton *spin;
+
+  /* For reading/writing to GR row */
+  static GtkTreeIter iter_gr;
+
+  int idi;
+
+  /* Integer data (I1 & I2) */
+  static gint iv[2];
+
+  /* Cylinder data spinbuttons */
+  static gchar *ispin[2] =
+  {
+	"cylinder_taginc_spinbutton",
+	"cylinder_total_spinbutton"
+  };
+
+  /* Card (row) name, strings for convertions */
+  gchar name[3];
+
+  static gboolean
+	save = FALSE, /* Enable saving of editor data */
+		 busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, cylinder_editor) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	Set_Geometry_Int_Data( geom_store, &iter_gr, iv );
+	save = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New cylinder row to create */
+	  /* Insert a default GE card if list is empty */
+	  Insert_GE_Card( geom_store, &iter_gr );
+
+	  /* Insert a new blank GR row after a selected row,
+	   * if any, otherwise before the last (GE) row */
+	  Insert_Blank_Geometry_Row(
+		  geom_treeview, geom_store, &iter_gr, "GR");
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  geom_adjustment, geom_adjustment->upper);
+	  save = TRUE;
+	  break;
+
+	case EDITOR_EDIT:  /* Edit a cylinder row (GR) selected in treeview */
+	  /* Get selected row */
+	  Get_Selected_Row(
+		  geom_treeview, geom_store, &iter_gr, name);
+
+	  /* Get integer data from cylinder editor */
+	  Get_Geometry_Int_Data( geom_store, &iter_gr, iv );
+
+	  /* Write int data to the cylinder editor */
+	  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
+	  {
+		spin = GTK_SPIN_BUTTON(
+			lookup_widget(cylinder_editor, ispin[idi]));
+		gtk_spin_button_set_value( spin, iv[idi] );
+	  }
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel cylinder editor */
+	  /* Remove cards */
+	  Remove_Row( geom_store, &iter_gr );
+	  save = busy = FALSE;
+	  return;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Read int data from the cylinder editor */
+  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I2; idi++ )
+  {
+	spin = GTK_SPIN_BUTTON(
+		lookup_widget(cylinder_editor, ispin[idi]));
+	iv[idi] = gtk_spin_button_get_value_as_int( spin );
+  }
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Cylinder_Editor() */
+
+/*------------------------------------------------------------------------*/
+
+/* Transform_Editor()
+ *
+ * Handles all actions of the transform editor window
+ */
+  void
+Transform_Editor( int action )
+{
+  /* For looking up spinbuttons */
+  GtkSpinButton *spin;
+
+  /* For reading/writing to GM row */
+  static GtkTreeIter iter_gm;
+
+  int idx, idi, idf;
+
+  /* Integer data (I1 to I3) */
+  static gint iv[3];
+
+  /* Float data (F1 to F7) */
+  static gdouble fv[7];
+
+  /* Transform int data spinbuttons */
+  static gchar *ispin[3] =
+  {
+	"transform_taginc_spinbutton",
+	"transform_new_spinbutton",
+	"transform_start_spinbutton"
+  };
+
+  /* Transform float data spinbuttons */
+  static gchar *fspin[6] =
+  {
+	"transform_rx_spinbutton",
+	"transform_ry_spinbutton",
+	"transform_rz_spinbutton",
+	"transform_mx_spinbutton",
+	"transform_my_spinbutton",
+	"transform_mz_spinbutton"
+  };
+
+  /* Card (row) name, strings for convertions */
+  gchar name[3];
+
+  static gboolean
+	save = FALSE, /* Enable saving of editor data */
+	busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, transform_editor) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save )
+  {
+	Set_Geometry_Data( geom_store, &iter_gm, iv, fv );
+	save = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_NEW: /* New transform row to create */
+	  /* Insert a default GE card if list is empty */
+	  Insert_GE_Card( geom_store, &iter_gm );
+
+	  /* Insert a new blank GM row after a selected row,
+	   * if any, otherwise before the last (GE) row */
+	  Insert_Blank_Geometry_Row(
+		  geom_treeview, geom_store, &iter_gm, "GM");
+
+	  /* Scroll tree view to bottom */
+	  gtk_adjustment_set_value(
+		  geom_adjustment, geom_adjustment->upper);
+	  break;
+
+	case EDITOR_EDIT:  /* Edit transform row (GM) selected in treeview */
+	  /* Get selected row */
+	  Get_Selected_Row(geom_treeview, geom_store, &iter_gm, name);
+
+	  /* Get integer data from transform editor */
+	  Get_Geometry_Data( geom_store, &iter_gm, iv, fv );
+
+	  /* Write int data to the transform editor */
+	  iv[SPIN_COL_I3] = (gint)fv[SPIN_COL_F7];
+	  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I3; idi++ )
+	  {
+		spin = GTK_SPIN_BUTTON(
+			lookup_widget(transform_editor, ispin[idi]));
+		gtk_spin_button_set_value( spin, iv[idi] );
+	  }
+	  /* Write float data to the transform editor */
+	  for( idf = SPIN_COL_F1; idf <= SPIN_COL_F6; idf++ )
+	  {
+		spin = GTK_SPIN_BUTTON(
+			lookup_widget(transform_editor, fspin[idf]));
+		gtk_spin_button_set_value( spin, fv[idf] );
+	  }
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel transform editor */
+	  /* Remove cards */
+	  Remove_Row( geom_store, &iter_gm );
+	  save = busy = FALSE;
+	  return;
+
+	case EDITOR_DATA: /* Some data changed in editor window */
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Read int data from the transform editor */
+  for( idi = SPIN_COL_I1; idi <= SPIN_COL_I3; idi++ )
+  {
+	spin = GTK_SPIN_BUTTON(
+		lookup_widget(transform_editor, ispin[idi]));
+	iv[idi] = gtk_spin_button_get_value_as_int( spin );
+  }
+  /* Read float data from the transform editor */
+  for( idx = 0; idx < 6; idx++ )
+  {
+	spin = GTK_SPIN_BUTTON(
+		lookup_widget(transform_editor, fspin[idx]));
+	fv[idx] = gtk_spin_button_get_value( spin );
+  }
+  fv[SPIN_COL_F7] = (gdouble)iv[SPIN_COL_I3];
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Transform_Editor() */
+
+/*------------------------------------------------------------------------*/
+
+/* Gend_Editor()
+ *
+ * Edits the GE card
+ */
+
+  void
+Gend_Editor( int action )
+{
+  /* For reading/writing to GE row */
+  static GtkTreeIter iter_ge;
+
+  /* For checking radio buttons */
+  GtkToggleButton *toggle;
+
+  /* Ground type radio buttons */
+#define GE_RDBTN 3
+  static gchar *rdbutton[GE_RDBTN] =
+  {
+	"gend_noimg_radiobutton",
+	"gend_nognd_radiobutton",
+	"gend_img_radiobutton"
+  };
+
+  /* Card (row) name, strings for convertions */
+  gchar name[3], *sv;
+  static gchar si[6];
+
+  int idx;
+
+  static gboolean
+	save = FALSE, /* Enable saving of editor data */
+		 busy = FALSE; /* Block callbacks. Must be a better way to do this? */
+
+
+  /* Block callbacks. (Should be a better way to do this) */
+  if( Give_Up( &busy, gend_editor) ) return;
+
+  /* Save data to nec2 editor if appropriate */
+  if( (action & EDITOR_SAVE) && save &&
+	  gtk_list_store_iter_is_valid(geom_store, &iter_ge))
+  {
+	gtk_list_store_set(
+		geom_store, &iter_ge, GEOM_COL_I1, si, -1 );
+	save = FALSE;
+  } /* if( (action & EDITOR_SAVE) && save ) */
+
+  /* Respond to user action */
+  switch( action )
+  {
+	case EDITOR_EDIT:  /* Edit geom end row (GE) */
+	  /* Open GE Editor */
+	  if( gend_editor == NULL )
+	  {
+		gend_editor = create_gend_editor();
+		gtk_widget_show( gend_editor );
+	  }
+
+	  /* Get selected row */
+	  Get_Selected_Row( geom_treeview, geom_store, &iter_ge, name );
+
+	  /* Get integer data from transform editor */
+	  if( gtk_list_store_iter_is_valid(geom_store, &iter_ge) )
+	  {
+		gtk_tree_model_get( GTK_TREE_MODEL(geom_store),
+			&iter_ge, GEOM_COL_I1, &sv, -1 );
+		idx = atoi(sv) + 1;
+		g_free(sv);
+		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			  gend_editor, rdbutton[idx]) );
+		gtk_toggle_button_set_active( toggle, TRUE );
+	  }
+	  else stop( _("Error reading row data\n"\
+			"Invalid list iterator"), ERR_OK );
+	  break;
+
+	case EDITOR_CANCEL: /* Cancel transform editor */
+	  /* Remove card */
+	  Remove_Row( geom_store, &iter_ge );
+	  save = busy = FALSE;
+	  return;
+
+	case EDITOR_RDBUTTON: /* Radio button toggled in editor window */
+	  /* Test radio buttons */
+	  for( idx = 0; idx < GE_RDBTN; idx++ )
+	  {
+		toggle = GTK_TOGGLE_BUTTON( lookup_widget(
+			  gend_editor, rdbutton[idx]) );
+		if( gtk_toggle_button_get_active(toggle) )
+		  break;
+	  }
+	  snprintf( si, 6, "%5d", idx-1 );
+	  save = TRUE;
+
+  } /* switch( action ) */
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+  busy = FALSE;
+
+} /* Gend_Editor() */
+
+/*------------------------------------------------------------------------*/
+
+/* Insert_GE_Card()
+ *
+ * Inserts a default GE card if missing
+ */
+
+  void
+Insert_GE_Card( GtkListStore *store, GtkTreeIter *iter )
+{
+  gint idx, idi;
+
+  /* Insert default GE card if list is clear */
+  idx = gtk_tree_model_iter_n_children(
+	  GTK_TREE_MODEL(store), NULL );
+  if( !idx )
+  {
+	gtk_list_store_append( store, iter );
+	gtk_list_store_set( store, iter, GEOM_COL_NAME, "GE", -1 );
+	for( idi = GEOM_COL_I1; idi < GEOM_NUM_COLS; idi++ )
+	  gtk_list_store_set( store, iter, idi, "0", -1 );
+  }
+
+} /* Insert_GE_Card() */
+
+/*------------------------------------------------------------------------*/
+
+/* Get_Geometry_Data()
+ *
+ * Gets geometry data from a treeview row
+ */
+
+  void
+Get_Geometry_Data(
+	GtkListStore *store,
+	GtkTreeIter *iter,
+	int *iv, double *fv )
+{
+  gint idi, idf;
+  gchar *sv;
+
+  /* Get data from tree view (I1,I2, F1-F7)*/
+  if( gtk_list_store_iter_is_valid(store, iter) )
+  {
+	for( idi = GEOM_COL_I1; idi <= GEOM_COL_I2; idi++ )
+	{
+	  gtk_tree_model_get(
+		  GTK_TREE_MODEL(store), iter, idi, &sv, -1);
+	  iv[idi-GEOM_COL_I1] = atoi(sv);
+	  g_free(sv);
+	}
+	for( idf = GEOM_COL_F1; idf <= GEOM_COL_F7; idf++ )
+	{
+	  gtk_tree_model_get(
+		  GTK_TREE_MODEL(store), iter, idf, &sv, -1);
+	  fv[idf-GEOM_COL_F1] = Strtod( sv, NULL );
+	  g_free(sv);
+	}
+  }
+  else stop( _("Error reading row data\n"\
+		"Invalid list iterator"), ERR_OK );
+
+} /* Get_Geometry_Data() */
+
+/*------------------------------------------------------------------------*/
+
+/* Get_Geometry_Int_Data()
+ *
+ * Gets integer (I1, I2) geometry data from a treeview row
+ */
+
+  void
+Get_Geometry_Int_Data( GtkListStore *store, GtkTreeIter *iter, int *iv )
+{
+  gint idi;
+  gchar *sv;
+
+  /* Get data from tree view (I1, I2) */
+  if( gtk_list_store_iter_is_valid(store, iter) )
+  {
+	for( idi = GEOM_COL_I1; idi <= GEOM_COL_I2; idi++ )
+	{
+	  gtk_tree_model_get(
+		  GTK_TREE_MODEL(store), iter, idi, &sv, -1);
+	  iv[idi-GEOM_COL_I1] = atoi(sv);
+	  g_free(sv);
+	}
+  }
+  else stop( _("Error reading row data\n"\
+		"Invalid list iterator"), ERR_OK );
+
+} /* Get_Geometry_Int_Data() */
+
+/*------------------------------------------------------------------------*/
+
+/* Set_Geometry_Data()
+ *
+ * Sets data into a geometry row
+ */
+
+  void
+Set_Geometry_Data(
+	GtkListStore *store,
+	GtkTreeIter *iter,
+	int *iv, double *fv )
+{
+  gchar str[13];
+  gint idi, idf;
+
+  /* Format and set editor data to treeview (I1, I2 & F1-F7) */
+  if( gtk_list_store_iter_is_valid(store, iter) )
+  {
+	for( idi = GEOM_COL_I1; idi <= GEOM_COL_I2; idi++ )
+	{
+	  snprintf( str, 6, "%5d", iv[idi-GEOM_COL_I1] );
+	  gtk_list_store_set( store, iter, idi, str, -1 );
+	}
+
+	for( idf = GEOM_COL_F1; idf <= GEOM_COL_F7; idf++ )
+	{
+	  snprintf( str, 13, "%12.5E", fv[idf-GEOM_COL_F1] );
+	  gtk_list_store_set( store, iter, idf, str, -1 );
+	}
+  }
+  else stop( _("Error writing row data\n"\
+		"Please re-select row"), ERR_OK );
+
+  SetFlag( NEC2_EDIT_SAVE );
+
+} /* Set_Geometry_Data() */
+
+/*------------------------------------------------------------------------*/
+
+/* Set_Geometry_Int_Data()
+ *
+ * Sets integer (I1, I2) data into a geometry row
+ */
+
+  void
+Set_Geometry_Int_Data( GtkListStore *store, GtkTreeIter *iter, int *iv )
+{
+  gchar str[6];
+  gint idi, idf;
+
+  /* Format and set editor data to treeview (I1, I2) */
+  if( gtk_list_store_iter_is_valid(store, iter) )
+  {
+	for( idi = GEOM_COL_I1; idi <= GEOM_COL_I2; idi++ )
+	{
+	  snprintf( str, 6, "%5d", iv[idi-GEOM_COL_I1] );
+	  gtk_list_store_set( store, iter, idi, str, -1 );
+	}
+
+	/* Clear unused float columns */
+	for( idf = GEOM_COL_F1; idf <= GEOM_COL_F7; idf++ )
+	  gtk_list_store_set( store, iter, idf, "0.0", -1 );
+  }
+  else stop( _("Error writing row data\n"\
+		"Please re-select row"), ERR_OK );
+
+  SetFlag( NEC2_EDIT_SAVE );
+
+} /* Set_Geometry_Int_Data() */
+
+/*------------------------------------------------------------------------*/
+
+/* Check_Card_Name()
+ *
+ * Checks previous or next card's name, returns TRUE on match
+ */
+
+  gboolean
+Check_Card_Name(
+	GtkListStore *store,
+	GtkTreeIter *iter,
+	gboolean next,
+	const gchar *name )
+{
+  gboolean retv;
+  char *str;
+
+  retv = FALSE;
+  if( gtk_list_store_iter_is_valid(store, iter) )
+  {
+	if( next )
+	{
+	  if( gtk_tree_model_iter_next(GTK_TREE_MODEL(store), iter) )
+	  {
+		gtk_tree_model_get( GTK_TREE_MODEL(store),
+			iter, GEOM_COL_NAME, &str, -1);
+		if( strcmp(name, str) == 0 ) retv = TRUE;
+		g_free(str);
+	  }
+	}
+	else
+	{
+	  if( gtk_tree_model_iter_previous(GTK_TREE_MODEL(store), iter) )
+	  {
+		gtk_tree_model_get( GTK_TREE_MODEL(store), iter,
+			GEOM_COL_NAME, &str, -1);
+		if( strcmp(name, str) == 0 ) retv = TRUE;
+		g_free(str);
+	  }
+	}
+  }
+
+  return( retv );
+
+} /* Check_Card_Name() */
+
+/*------------------------------------------------------------------------*/
+
+/* Give_Up()
+ *
+ * Signals functon to abort if busy or no NEC2 editor window
+ */
+
+  gboolean
+Give_Up( int *busy, GtkWidget *widget )
+{
+  /* Block callbacks. (Should be a better way to do this) */
+  if( *busy ) return( TRUE );
+  *busy = TRUE;
+
+  /* Abort if NEC2 editor window is closed */
+  if( nec2_edit_window == NULL )
+  {
+	stop( _("NEC2 editor window not open"), ERR_OK );
+	gtk_widget_destroy( widget );
+	*busy = FALSE;
+	return( TRUE );
+  }
+
+  return( FALSE );
+
+} /* Give_Up() */
+
+/*------------------------------------------------------------------------*/
+
+/* Insert_Blank_Geometry_Row()
+ *
+ * Inserts a blank row in a tree view with only its name (GW ... )
+ */
+
+  void
+Insert_Blank_Geometry_Row(
+	GtkTreeView *view, GtkListStore *store,
+	GtkTreeIter *iter, const gchar *name )
+{
+  GtkTreeSelection *selection;
+  gboolean retv;
+  gint n;
+  gchar *str;
+
+  if( nec2_edit_window == NULL )
+	return;
+
+  /* Get selected row, if any */
+  selection = gtk_tree_view_get_selection( view );
+  retv = gtk_tree_selection_get_selected(
+	  selection, NULL, iter );
+
+  /* If no selected row, insert new row into list
+   * store before last row, else after the selected row,
+   * but if this is a GE row, then insert before it */
+  if( !retv )
+  {
+	n = gtk_tree_model_iter_n_children(
+		GTK_TREE_MODEL(store), NULL );
+	gtk_tree_model_iter_nth_child(
+		GTK_TREE_MODEL(store), iter, NULL, n-1 );
+	gtk_list_store_insert_before( store, iter, iter );
+  }
+  else
+  {
+	gtk_tree_model_get( GTK_TREE_MODEL(store),
+		iter, GEOM_COL_NAME, &str, -1 );
+	if( strcmp(str, "GE") == 0 )
+	  gtk_list_store_insert_before( store, iter, iter );
+	else
+	  gtk_list_store_insert_after( store, iter, iter );
+	g_free(str);
+  }
+
+  gtk_list_store_set( store, iter, GEOM_COL_NAME, name, -1 );
+  for( n = GEOM_COL_I1; n < GEOM_NUM_COLS; n++ )
+	gtk_list_store_set( store, iter, n, "--", -1 );
+  gtk_tree_selection_select_iter( selection, iter );
+
+} /* Insert_Blank_Geometry_Row() */
+
+/*------------------------------------------------------------------------*/
+
+/* Remove_Row()
+ *
+ * Removes a row and selects previous or next row
+ */
+
+  void
+Remove_Row( GtkListStore *store, GtkTreeIter *iter )
+{
+  if( gtk_list_store_iter_is_valid(store, iter) )
+	gtk_list_store_remove( store, iter );
+
+} /* Remove_Row() */
+
+/*------------------------------------------------------------------------*/
+
+/* Get_Selected_Row()
+ *
+ * Gets the selected row in a tree view
+ */
+
+  gboolean
+Get_Selected_Row(
+	GtkTreeView *view,
+	GtkListStore *store,
+	GtkTreeIter *iter,
+	gchar *name )
+{
+  gchar *str;
+  GtkTreeSelection *selection;
+
+  /* Get selected row, if any */
+  selection = gtk_tree_view_get_selection( view );
+  if( !gtk_tree_selection_get_selected(selection, NULL, iter) )
+	return( FALSE );
+
+  /* Get row name */
+  gtk_tree_model_get(
+	  GTK_TREE_MODEL(store), iter, GEOM_COL_NAME, &str, -1);
+  Strlcpy( name, str, 3 );
+  g_free( str );
+
+  return( TRUE );
+
+} /* Get_Selected_Row() */
+
+/*------------------------------------------------------------------------*/
+
+/* Set_Wire_Conductivity()
+ *
+ * Sets the wire conductivity specified in a geometry editor
+ * (wire, arc, helix) to a loading card (LD row) in commands treview
+ */
+
+  void
+Set_Wire_Conductivity( int tag, double s, GtkListStore *store )
+{
+  int idx, idi, nchld;
+  GtkTreeIter iter_ld;
+  gchar *str, sv[13];
+
+  /* Find num of rows and first iter, abort if tree empty */
+  nchld = gtk_tree_model_iter_n_children(
+	  GTK_TREE_MODEL(store), NULL);
+  if(!gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter_ld))
+	return;
+
+  /* Look for an LD card with tag number = tag */
+  for( idx = 0; idx < nchld; )
+  {
+	gtk_tree_model_get( GTK_TREE_MODEL(store),
+		&iter_ld, GEOM_COL_NAME, &str, -1 );
+
+	if( strcmp(str, "LD") == 0 )
+	{
+	  g_free( str );
+	  gtk_tree_model_get( GTK_TREE_MODEL(store),
+		  &iter_ld, GEOM_COL_I2, &str, -1 );
+	  if( atoi( str ) == tag )
+	  {
+		g_free( str );
+		break;
+	  }
+	  else g_free( str );
+	}
+	else g_free( str );
+
+	idx++;
+	if( !gtk_tree_model_iter_next(
+		  GTK_TREE_MODEL(store), &iter_ld) )
+	  break;
+
+  } /* for( idx = 0; idx < nchld; idx++ ) */
+
+  /* If not found LD card with tagnum = tag, insert new */
+  if( idx >= nchld )
+  {
+	gtk_tree_model_iter_nth_child(
+		GTK_TREE_MODEL(store), &iter_ld, NULL, nchld-1 );
+	gtk_list_store_insert_before( store, &iter_ld, &iter_ld );
+	gtk_list_store_set(
+		store, &iter_ld, CMND_COL_NAME, "LD", -1 );
+
+	/* Clear rest of LD row */
+	for( idi = CMND_COL_I1; idi <= CMND_COL_F6; idi++ )
+	  gtk_list_store_set( store, &iter_ld, idi, "0", -1 );
+  }
+
+  /* Set LD card parameters */
+  gtk_list_store_set( store, &iter_ld, CMND_COL_I1, "5", -1 );
+  snprintf( sv, 6, "%5d", tag );
+  gtk_list_store_set( store, &iter_ld, CMND_COL_I2, sv, -1 );
+  snprintf( sv, 13, "%12.5E", s );
+  gtk_list_store_set( store, &iter_ld, CMND_COL_F1, sv, -1 );
+
+  /* Scroll tree view to bottom */
+  gtk_adjustment_set_value(
+	  cmnd_adjustment, cmnd_adjustment->upper );
+
+} /* Set_Wire_Conductivity() */
+
+/*------------------------------------------------------------------------*/
+
+/* Get_Wire_Conductivity()
+ *
+ * Gets the wire conductivity specified in a loading
+ * card (LD row) in commands treview for a given tag #
+ */
+
+  gboolean
+Get_Wire_Conductivity( int tag, double *s, GtkListStore *store )
+{
+  int idx, type, nchld;
+  GtkTreeIter iter_ld;
+  gchar *str;
+  static int t = -1;
+
+  /* Find num of rows and first iter, abort if tree empty */
+  nchld = gtk_tree_model_iter_n_children(
+	  GTK_TREE_MODEL(store), NULL );
+  if( !gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter_ld) )
+	return( FALSE );
+
+  /* Look for an LD card with tag number = tag */
+  for( idx = 0; idx < nchld; )
+  {
+	gtk_tree_model_get( GTK_TREE_MODEL(store),
+		&iter_ld, GEOM_COL_NAME, &str, -1 );
+
+	if( strcmp(str, "LD") == 0 )
+	{
+	  g_free( str );
+	  gtk_tree_model_get( GTK_TREE_MODEL(store),
+		  &iter_ld, GEOM_COL_I2, &str, -1 );
+	  if( atoi(str) == tag )
+	  {
+		g_free( str );
+		break;
+	  }
+	  else g_free( str );
+	}
+	else g_free( str );
+
+	idx++;
+	if( !gtk_tree_model_iter_next(
+		  GTK_TREE_MODEL(store), &iter_ld) )
+	  break;
+
+  } /* for( idx = 0; idx < nchld; idx++ ) */
+
+  /* If not found LD card with tagnum = tag, return s=0 */
+  if( idx >= nchld )
+  {
+	*s = 0.0;
+	t = tag;
+	return( FALSE );
+  }
+
+  /* If LD card for given tag is already read, abort */
+  if( t == tag ) return( FALSE );
+  else t = tag;
+
+  /* Get the loading type (we want LDTYP 5) */
+  gtk_tree_model_get( GTK_TREE_MODEL(store),
+	  &iter_ld, GEOM_COL_I1, &str, -1 );
+  type = atoi( str );
+  g_free( str );
+  if( type != 5 ) return( FALSE );
+
+  /* Get the wire conductivity S/m */
+  gtk_tree_model_get( GTK_TREE_MODEL(store),
+	  &iter_ld, CMND_COL_F1, &str, -1 );
+  *s = Strtod( str, NULL );
+  g_free( str );
+
+  return( TRUE );
+} /* Get_Wire_Conductivity() */
+
+/*------------------------------------------------------------------------*/
+
diff --git a/src/geom_edit.h b/src/geom_edit.h
new file mode 100644
index 0000000..ac4a524
--- /dev/null
+++ b/src/geom_edit.h
@@ -0,0 +1,28 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	GEOM_EDIT_H
+#define	GEOM_EDIT_H		1
+
+#include "common.h"
+#include "interface.h"
+#include "support.h"
+#include "editors.h"
+
+#endif
+
diff --git a/src/geometry.c b/src/geometry.c
new file mode 100644
index 0000000..2329284
--- /dev/null
+++ b/src/geometry.c
@@ -0,0 +1,1673 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/******* Translated to the C language by N. Kyriazis  20 Aug 2003 ******
+
+  Program NEC(input,tape5=input,output,tape11,tape12,tape13,tape14,
+  tape15,tape16,tape20,tape21)
+
+  Numerical Electromagnetics Code (NEC2)  developed at Lawrence
+  Livermore lab., Livermore, CA.  (contact G. Burke at 415-422-8414
+  for problems with the NEC code. For problems with the vax implem-
+  entation, contact J. Breakall at 415-422-8196 or E. Domning at 415
+  422-5936)
+  file created 4/11/80.
+
+ ***********Notice**********
+ This computer code material was prepared as an account of work
+ sponsored by the United States government.  Neither the United
+ States nor the United States Department Of Energy, nor any of
+ their employees, nor any of their contractors, subcontractors,
+ or their employees, makes any warranty, express or implied, or
+ assumes any legal liability or responsibility for the accuracy,
+ completeness or usefulness of any information, apparatus, product
+ or process disclosed, or represents that its use would not infringe
+ privately-owned rights.
+
+ ***********************************************************************/
+
+#include "geometry.h"
+#include "shared.h"
+
+/*-------------------------------------------------------------------*/
+
+/* arc generates segment geometry data for an arc of ns segments */
+  gboolean
+arc( int itg, int ns, double rada,
+	double ang1, double ang2, double rad )
+{
+  int ist;
+
+  ist= data.n;
+  data.n += ns;
+  data.np= data.n;
+  data.mp= data.m;
+  data.ipsym=0;
+
+  if( ns < 1)
+  {
+	fprintf( stderr,
+		"xnec2c: arc(): number of segments less than 1 (ns < 1)\n");
+	stop( _("arc(): Number of segments < 1"), ERR_OK );
+	return( FALSE );
+  }
+
+  if( fabs( ang2- ang1) < 360.00001)
+  {
+	int i;
+	double ang, dang, xs1, xs2, zs1, zs2;
+	size_t mreq;
+
+	/* Reallocate tags buffer */
+	mreq = (size_t)(data.n + data.m) * sizeof(int);
+	mem_realloc( (void *)&data.itag, mreq, "in geometry.c" );
+
+	/* Reallocate wire buffers */
+	mreq = (size_t)data.n * sizeof(double);
+	mem_realloc( (void *)&data.x1, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.y1, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.z1, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.x2, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.y2, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.z2, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.bi, mreq, "in geometry.c" );
+
+	ang= ang1* TA;
+	dang=( ang2- ang1)* TA/ ns;
+	xs1= rada* cos( ang);
+	zs1= rada* sin( ang);
+
+	for( i = ist; i < data.n; i++ )
+	{
+	  ang += dang;
+	  xs2= rada* cos( ang);
+	  zs2= rada* sin( ang);
+	  data.x1[i]= xs1;
+
+	  data.y1[i]=0.0;
+	  data.z1[i]= zs1;
+	  data.x2[i]= xs2;
+	  data.y2[i]=0.0;
+	  data.z2[i]= zs2;
+	  xs1= xs2;
+	  zs1= zs2;
+	  data.bi[i]= rad;
+	  data.itag[i]= itg;
+
+	} /* for( i = ist; i < data.n; i++ ) */
+
+  } /* if( fabs( ang2- ang1) < 360.00001) */
+  else
+  {
+	fprintf( stderr,
+		"xnec2c: arc(): arc angle exceeds 360 degrees\n");
+	stop( _("arc(): Arc angle exceeds 360 degrees"), ERR_OK );
+	return( FALSE );
+  }
+
+  return( TRUE );
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* connect sets up segment connection data in arrays icon1 and */
+/* icon2 by searching for segment ends that are in contact. */
+  gboolean
+conect( int ignd )
+{
+  int i, iz, ic, j, jx, ix, ixx, iseg, iend, jend, jump;
+  double sep=0.0, xi1, yi1, zi1, xi2, yi2, zi2;
+  double slen, xa, ya, za, xs, ys, zs;
+  size_t mreq;
+
+  segj.maxcon = 1;
+
+  if( ignd != 0)
+  {
+	if( data.ipsym == 2)
+	{
+	  data.np=2* data.np;
+	  data.mp=2* data.mp;
+	}
+
+	if( abs(data.ipsym) > 2 )
+	{
+	  data.np= data.n;
+	  data.mp= data.m;
+	}
+
+	/*** possibly should be error condition?? **/
+	if( data.np > data.n)
+	{
+	  fprintf( stderr, "xnec2c: conect(): np > n\n" );
+	  stop( _("Error in conect(): np > n"), ERR_OK );
+	  return( FALSE );
+	}
+
+	if( (data.np == data.n) && (data.mp == data.m) )
+	  data.ipsym=0;
+
+  } /* if( ignd != 0) */
+
+  if( data.n != 0)
+  {
+	/* Allocate memory to connections */
+	mreq = (size_t)(data.n + data.m) * sizeof(int);
+	mem_realloc( (void *)&data.icon1, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.icon2, mreq, "in geometry.c" );
+
+	for( i = 0; i < data.n; i++ )
+	{
+	  data.icon1[i] = data.icon2[i] = 0;
+	  iz = i+1;
+	  xi1= data.x1[i];
+	  yi1= data.y1[i];
+	  zi1= data.z1[i];
+	  xi2= data.x2[i];
+	  yi2= data.y2[i];
+	  zi2= data.z2[i];
+	  slen= sqrt( (xi2- xi1)*(xi2- xi1) + (yi2- yi1) *
+		  (yi2- yi1) + (zi2- zi1)*(zi2- zi1) ) * SMIN;
+
+	  /* determine connection data for end 1 of segment. */
+	  jump = FALSE;
+	  if( ignd > 0)
+	  {
+		if( zi1 <= -slen)
+		{
+		  fprintf( stderr,
+			  "xnec2c: conect(): geometry data error\n"
+			  "Segment %d extends below ground\n", iz );
+		  stop( _("conect(): Geometry data error\n"\
+				"Segment extends below ground"), ERR_OK );
+		  return( FALSE );
+		}
+
+		if( zi1 <= slen)
+		{
+		  data.icon1[i]= iz;
+		  data.z1[i]=0.0;
+		  jump = TRUE;
+
+		} /* if( zi1 <= slen) */
+
+	  } /* if( ignd > 0) */
+
+	  if( ! jump )
+	  {
+		ic= i;
+		for( j = 1; j < data.n; j++)
+		{
+		  ic++;
+		  if( ic >= data.n)
+			ic=0;
+
+		  sep= fabs( xi1- data.x1[ic]) +
+			fabs(yi1- data.y1[ic])+ fabs(zi1- data.z1[ic]);
+		  if( sep <= slen)
+		  {
+			data.icon1[i]= -(ic+1);
+			break;
+		  }
+
+		  sep= fabs( xi1- data.x2[ic]) +
+			fabs(yi1- data.y2[ic])+ fabs(zi1- data.z2[ic]);
+		  if( sep <= slen)
+		  {
+			data.icon1[i]= (ic+1);
+			break;
+		  }
+
+		} /* for( j = 1; j < data.n; j++) */
+
+	  } /* if( ! jump ) */
+
+	  /* determine connection data for end 2 of segment. */
+	  if( (ignd > 0) || jump )
+	  {
+		if( zi2 <= -slen)
+		{
+		  fprintf( stderr,
+			  "xnec2c: conect(): geometry data error\n"
+			  "segment %d extends below ground\n", iz );
+		  stop( _("conect(): Geometry data error\n"\
+				"Segment extends below ground"), ERR_OK );
+		  return( FALSE );
+		}
+
+		if( zi2 <= slen)
+		{
+		  if( data.icon1[i] == iz )
+		  {
+			fprintf( stderr,
+				"xnec2c: conect(): geometry data error\n"
+				"segment %d lies in ground plane\n", iz );
+			stop( _("conect(): Geometry data error\n"\
+				  "Segment lies in ground plane"), ERR_OK );
+			return( FALSE );
+		  }
+
+		  data.icon2[i]= iz;
+		  data.z2[i]=0.0;
+		  continue;
+
+		} /* if( zi2 <= slen) */
+
+	  } /* if( ignd > 0) */
+
+	  ic= i;
+	  for( j = 1; j < data.n; j++ )
+	  {
+		ic++;
+		if( ic >= data.n)
+		  ic=0;
+
+		sep= fabs(xi2- data.x1[ic]) +
+		  fabs(yi2- data.y1[ic])+ fabs(zi2- data.z1[ic]);
+		if( sep <= slen)
+		{
+		  data.icon2[i]= (ic+1);
+		  break;
+		}
+
+		sep= fabs(xi2- data.x2[ic]) +
+		  fabs(yi2- data.y2[ic])+ fabs(zi2- data.z2[ic]);
+		if( sep <= slen)
+		{
+		  data.icon2[i]= -(ic+1);
+		  break;
+		}
+
+	  } /* for( j = 1; j < data.n; j++ ) */
+
+	} /* for( i = 0; i < data.n; i++ ) */
+
+	/* find wire-surface connections for new patches */
+	if( data.m != 0)
+	{
+	  ix = -1;
+	  i = 0;
+	  while( ++i <= data.m )
+	  {
+		ix++;
+		xs= data.px[ix];
+		ys= data.py[ix];
+		zs= data.pz[ix];
+
+		for( iseg = 0; iseg < data.n; iseg++ )
+		{
+		  xi1= data.x1[iseg];
+		  yi1= data.y1[iseg];
+		  zi1= data.z1[iseg];
+		  xi2= data.x2[iseg];
+		  yi2= data.y2[iseg];
+		  zi2= data.z2[iseg];
+
+		  /* for first end of segment */
+		  slen=( fabs(xi2- xi1) +
+			  fabs(yi2- yi1)+ fabs(zi2- zi1))* SMIN;
+		  sep= fabs(xi1- xs)+ fabs(yi1- ys)+ fabs(zi1- zs);
+
+		  /* connection - divide patch into 4
+		   * patches at present array loc. */
+		  if( sep <= slen)
+		  {
+			data.icon1[iseg]=PCHCON+ i;
+			ic=0;
+			subph( i, ic );
+			break;
+		  }
+
+		  sep= fabs(xi2- xs)+ fabs(yi2- ys)+ fabs(zi2- zs);
+		  if( sep <= slen)
+		  {
+			data.icon2[iseg]=PCHCON+ i;
+			ic=0;
+			subph( i, ic );
+			break;
+		  }
+
+		} /* for( iseg = 0; iseg < data.n; iseg++ ) */
+
+	  } /* while( ++i <= data.m ) */
+
+	} /* if( data.m != 0) */
+
+  } /* if( data.n != 0) */
+
+  iseg=( data.n+ data.m)/( data.np+ data.mp);
+  if( iseg != 1)
+  {
+	/*** may be error condition?? ***/
+	if( data.ipsym == 0 )
+	{
+	  fprintf( stderr, "xnec2c: conect(): ipsym = 0\n" );
+	  stop( _("conect(): Error: ipsym = 0"), ERR_OK );
+	  return( FALSE );
+	}
+  } /* if( iseg != 1) */
+
+  /* No wire segments */
+  if( data.n <= 0) return( TRUE );
+
+  /* Allocate to connection buffers */
+  mreq = (size_t)segj.maxcon * sizeof(int);
+  mem_realloc( (void *)&segj.jco, mreq, "in geometry.c" );
+
+  /* Adjust connected segment ends to exactly coincide.
+   * Also find old seg. connecting to new segment */
+  iseg = 0;
+  for( j = 0; j < data.n; j++ )
+  {
+	jx = j+1;
+	iend=-1;
+	jend=-1;
+	ix= data.icon1[j];
+	ic=1;
+	segj.jco[0]= -jx;
+	xa= data.x1[j];
+	ya= data.y1[j];
+	za= data.z1[j];
+
+	while( TRUE )
+	{
+	  if( (ix != 0) && (ix != (j+1)) && (ix <= PCHCON) )
+	  {
+		do
+		{
+		  if( ix < 0 )
+			ix= -ix;
+		  else
+			jend= -jend;
+
+		  jump = FALSE;
+
+		  if( ix == jx )
+			break;
+
+		  if( ix < jx )
+		  {
+			jump = TRUE;
+			break;
+		  }
+
+		  /* Record max. no. of connections */
+		  ic++;
+		  if( ic >= segj.maxcon )
+		  {
+			segj.maxcon = ic+1;
+			mreq = (size_t)segj.maxcon * sizeof(int);
+			mem_realloc( (void *)&segj.jco, mreq, "in geometry.c" );
+		  }
+		  segj.jco[ic-1]= ix* jend;
+
+		  ixx = ix-1;
+		  if( jend != 1)
+		  {
+			xa= xa+ data.x1[ixx];
+			ya= ya+ data.y1[ixx];
+			za= za+ data.z1[ixx];
+			ix= data.icon1[ixx];
+			continue;
+		  }
+
+		  xa= xa+ data.x2[ixx];
+		  ya= ya+ data.y2[ixx];
+		  za= za+ data.z2[ixx];
+		  ix= data.icon2[ixx];
+
+		} /* do */
+		while( ix != 0 );
+
+		if( jump && (iend == 1) ) break;
+		else if( jump )
+		{
+		  iend=1;
+		  jend=1;
+		  ix= data.icon2[j];
+		  ic=1;
+		  segj.jco[0]= jx;
+		  xa= data.x2[j];
+		  ya= data.y2[j];
+		  za= data.z2[j];
+		  continue;
+		}
+
+		sep= (double)ic;
+		xa= xa/ sep;
+		ya= ya/ sep;
+		za= za/ sep;
+
+		for( i = 0; i < ic; i++ )
+		{
+		  ix= segj.jco[i];
+		  if( ix <= 0)
+		  {
+			ix= -ix;
+			ixx = ix-1;
+			data.x1[ixx]= xa;
+			data.y1[ixx]= ya;
+			data.z1[ixx]= za;
+			continue;
+		  }
+
+		  ixx = ix-1;
+		  data.x2[ixx]= xa;
+		  data.y2[ixx]= ya;
+		  data.z2[ixx]= za;
+
+		} /* for( i = 0; i < ic; i++ ) */
+
+		if( ic >= 3)
+		  iseg++;
+
+	  } /*if( (ix != 0) && (ix != j) && (ix <= PCHCON) ) */
+
+	  if( iend == 1) break;
+
+	  iend=1;
+	  jend=1;
+	  ix= data.icon2[j];
+	  ic=1;
+	  segj.jco[0]= jx;
+	  xa= data.x2[j];
+	  ya= data.y2[j];
+	  za= data.z2[j];
+
+	} /* while( TRUE ) */
+
+  } /* for( j = 0; j < data.n; j++ ) */
+
+  mreq = (size_t)segj.maxcon * sizeof(double);
+  mem_realloc( (void *)&segj.ax, mreq, "in geometry.c" );
+  mem_realloc( (void *)&segj.bx, mreq, "in geometry.c" );
+  mem_realloc( (void *)&segj.cx, mreq, "in geometry.c" );
+
+  return( TRUE );
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* subroutine helix generates segment geometry */
+/* data for a helix of ns segments */
+  void
+helix(
+	double s, double hl,
+	double a1, double b1,
+	double a2, double b2,
+	double rad, int ns, int itg )
+{
+  int ist, i;
+  size_t mreq;
+  double zinc, copy;
+
+  ist = data.n;
+  data.n += ns;
+  data.np = data.n;
+  data.mp = data.m;
+  data.ipsym = 0;
+
+  if( ns < 1) return;
+
+  zinc= fabs( hl/ ns);
+
+  /* Reallocate tags buffer */
+  mreq = (size_t)data.n * sizeof(int);
+  mem_realloc( (void *)&data.itag, mreq, "in geometry.c" );
+
+  /* Reallocate wire buffers */
+  mreq = (size_t)data.n * sizeof(double);
+  mem_realloc( (void *)&data.x1, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.y1, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.z1, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.x2, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.y2, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.z2, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.bi, mreq, "in geometry.c" );
+
+  data.z1[ist] = 0.0;
+  for( i = ist; i < data.n; i++ )
+  {
+	data.bi[i]= rad;
+	data.itag[i]= itg;
+
+	if( i != ist )
+	  data.z1[i]= data.z1[i-1]+ zinc;
+
+	data.z2[i]= data.z1[i]+ zinc;
+
+	if( a2 == a1)
+	{
+	  if( b1 == 0.0)
+		b1= a1;
+
+	  data.x1[i]= a1* cos(2.0* PI* data.z1[i]/ s);
+	  data.y1[i]= b1* sin(2.0* PI* data.z1[i]/ s);
+	  data.x2[i]= a1* cos(2.0* PI* data.z2[i]/ s);
+	  data.y2[i]= b1* sin(2.0* PI* data.z2[i]/ s);
+	}
+	else
+	{
+	  if( b2 == 0.0)
+		b2= a2;
+
+	  data.x1[i]=( a1+( a2- a1)* data.z1[i] /
+		  fabs( hl))* cos(2.0* PI* data.z1[i]/ s);
+	  data.y1[i]=( b1+( b2- b1)* data.z1[i] /
+		  fabs( hl))* sin(2.0* PI* data.z1[i]/ s);
+	  data.x2[i]=( a1+( a2- a1)* data.z2[i] /
+		  fabs( hl))* cos(2.0* PI* data.z2[i]/ s);
+	  data.y2[i]=( b1+( b2- b1)* data.z2[i] /
+		  fabs( hl))* sin(2.0* PI* data.z2[i]/ s);
+
+	} /* if( a2 == a1) */
+
+	if( hl > 0.0)
+	  continue;
+
+	copy= data.x1[i];
+	data.x1[i]= data.y1[i];
+	data.y1[i]= copy;
+	copy= data.x2[i];
+	data.x2[i]= data.y2[i];
+	data.y2[i]= copy;
+
+  } /* for( i = ist; i < data.n; i++ ) */
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* isegno returns the segment number of the mth segment having the */
+/* tag number itagi.  if itagi=0 segment number m is returned. */
+  int
+isegno( int itagi, int mx)
+{
+  int icnt, iseg;
+
+  if( mx <= 0)
+  {
+	fprintf( stderr,
+		"xnec2c: isegno(): check data, parameter specifying segment\n"
+		"position in a group of equal tags must not be zero\n" );
+	stop( _("isegno(): Parameter specifying segment\n"\
+		  "position in a group of equal tags is zero"), ERR_OK );
+	return( -1 );
+  }
+
+  icnt=0;
+  if( itagi == 0)
+  {
+	iseg = mx;
+	return( iseg );
+  }
+
+  if( data.n > 0)
+  {
+	int i;
+
+	for( i = 0; i < data.n; i++ )
+	{
+	  if( data.itag[i] != itagi )
+		continue;
+
+	  icnt++;
+	  if( icnt == mx)
+	  {
+		iseg= i+1;
+		return( iseg );
+	  }
+
+	} /* for( i = 0; i < data.n; i++ ) */
+
+  } /* if( data.n > 0) */
+
+  fprintf( stderr,
+	  "xnec2c: isegno(): no segment has an itag of %d\n",  itagi );
+  stop( _("isegno(): Segment tag number error"), ERR_OK );
+
+  return( -1 );
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* subroutine move moves the structure with respect to its */
+/* coordinate system or reproduces structure in new positions. */
+/* structure is rotated about x,y,z axes by rox,roy,roz */
+/* respectively, then shifted by xs,ys,zs */
+  gboolean
+move( double rox, double roy,
+	double roz, double xs, double ys,
+	double zs, int its, int nrpt, int itgi )
+{
+  int nrp, ix, i1, k, i;
+  size_t mreq;
+  double sps, cps, sth, cth, sph, cph, xx, xy;
+  double xz, yx, yy, yz, zx, zy, zz, xi, yi, zi;
+
+  if( fabs( rox)+ fabs( roy) > 1.0e-10)
+	data.ipsym= data.ipsym*3;
+
+  sps= sin( rox);
+  cps= cos( rox);
+  sth= sin( roy);
+  cth= cos( roy);
+  sph= sin( roz);
+  cph= cos( roz);
+  xx= cph* cth;
+  xy= cph* sth* sps- sph* cps;
+  xz= cph* sth* cps+ sph* sps;
+  yx= sph* cth;
+  yy= sph* sth* sps+ cph* cps;
+  yz= sph* sth* cps- cph* sps;
+  zx= -sth;
+  zy= cth* sps;
+  zz= cth* cps;
+
+  if( nrpt == 0) nrp=1;
+  else nrp= nrpt;
+
+  ix=1;
+  if( data.n > 0)
+  {
+	int ir;
+
+	i1= isegno( its, 1);
+	if( i1 < 0 ) return( FALSE ); /* my addition, error */
+	if( i1 < 1) i1= 1;
+
+	ix= i1;
+	if( nrpt == 0) k= i1-1;
+	else
+	{
+	  k= data.n;
+	  /* Reallocate tags buffer */
+	  mreq = (size_t)(data.n + data.m + (data.n + 1 - i1) * nrpt) * sizeof(int);
+	  mem_realloc( (void *)&data.itag, mreq, "in geometry.c" );
+
+	  /* Reallocate wire buffers */
+	  mreq = (size_t)(data.n + (data.n + 1 - i1) * nrpt) * sizeof(double);
+	  mem_realloc( (void *)&data.x1, mreq, "in geometry.c" );
+	  mem_realloc( (void *)&data.y1, mreq, "in geometry.c" );
+	  mem_realloc( (void *)&data.z1, mreq, "in geometry.c" );
+	  mem_realloc( (void *)&data.x2, mreq, "in geometry.c" );
+	  mem_realloc( (void *)&data.y2, mreq, "in geometry.c" );
+	  mem_realloc( (void *)&data.z2, mreq, "in geometry.c" );
+	  mem_realloc( (void *)&data.bi, mreq, "in geometry.c" );
+	}
+
+	for( ir = 0; ir < nrp; ir++ )
+	{
+	  for( i = i1-1; i < data.n; i++ )
+	  {
+		xi= data.x1[i];
+		yi= data.y1[i];
+		zi= data.z1[i];
+		data.x1[k]= xi* xx+ yi* xy+ zi* xz+ xs;
+		data.y1[k]= xi* yx+ yi* yy+ zi* yz+ ys;
+		data.z1[k]= xi* zx+ yi* zy+ zi* zz+ zs;
+		xi= data.x2[i];
+		yi= data.y2[i];
+		zi= data.z2[i];
+		data.x2[k]= xi* xx+ yi* xy+ zi* xz+ xs;
+		data.y2[k]= xi* yx+ yi* yy+ zi* yz+ ys;
+		data.z2[k]= xi* zx+ yi* zy+ zi* zz+ zs;
+		data.bi[k]= data.bi[i];
+		data.itag[k]= data.itag[i];
+		if( data.itag[i] != 0)
+		  data.itag[k]= data.itag[i]+ itgi;
+
+		k++;
+
+	  } /* for( i = i1; i < data.n; i++ ) */
+
+	  i1= data.n+1;
+	  data.n= k;
+
+	} /* for( ir = 0; ir < nrp; ir++ ) */
+
+  } /* if( data.n >= n2) */
+
+  if( data.m > 0)
+  {
+	int ii;
+	i1 = 0;
+	if( nrpt == 0) k= 0;
+	else k = data.m;
+
+	/* Reallocate patch buffers */
+	mreq = (size_t)(data.m * (nrpt + 1)) * sizeof(double);
+	mem_realloc( (void *)&data.px,  mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.py,  mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.pz,  mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t1x, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t1y, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t1z, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t2x, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t2y, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t2z, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.pbi, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.psalp, mreq, "in geometry.c" );
+
+	for( ii = 0; ii < nrp; ii++ )
+	{
+	  for( i = i1; i < data.m; i++ )
+	  {
+		xi= data.px[i];
+		yi= data.py[i];
+		zi= data.pz[i];
+		data.px[k]= xi* xx+ yi* xy+ zi* xz+ xs;
+		data.py[k]= xi* yx+ yi* yy+ zi* yz+ ys;
+		data.pz[k]= xi* zx+ yi* zy+ zi* zz+ zs;
+		xi= data.t1x[i];
+		yi= data.t1y[i];
+		zi= data.t1z[i];
+		data.t1x[k]= xi* xx+ yi* xy+ zi* xz;
+		data.t1y[k]= xi* yx+ yi* yy+ zi* yz;
+		data.t1z[k]= xi* zx+ yi* zy+ zi* zz;
+		xi= data.t2x[i];
+		yi= data.t2y[i];
+		zi= data.t2z[i];
+		data.t2x[k]= xi* xx+ yi* xy+ zi* xz;
+		data.t2y[k]= xi* yx+ yi* yy+ zi* yz;
+		data.t2z[k]= xi* zx+ yi* zy+ zi* zz;
+		data.psalp[k]= data.psalp[i];
+		data.pbi[k]= data.pbi[i];
+		k++;
+
+	  } /* for( i = i1; i < data.m; i++ ) */
+
+	  i1= data.m;
+	  data.m = k;
+
+	} /* for( ii = 0; ii < nrp; ii++ ) */
+
+  } /* if( data.m >= m2) */
+
+  if( (nrpt == 0) && (ix == 1) )
+	return( TRUE );
+
+  data.np= data.n;
+  data.mp= data.m;
+  data.ipsym=0;
+
+  return( TRUE );
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* patch generates and modifies patch geometry data */
+  gboolean
+patch(
+	int nx, int ny,
+	double ax1, double ay1, double az1,
+	double ax2, double ay2, double az2,
+	double ax3, double ay3, double az3,
+	double ax4, double ay4, double az4 )
+{
+  int mi, ntp;
+  size_t mreq;
+  double s1x=0.0, s1y=0.0, s1z=0.0;
+  double s2x=0.0, s2y=0.0, s2z=0.0, xst=0.0;
+  double znv, xnv, ynv, xa, xn2, yn2;
+  double zn2;
+
+  /* new patches.  for nx=0, ny=1,2,3,4 patch is (respectively) */;
+  /* arbitrary, rectagular, triangular, or quadrilateral. */
+  /* for nx and ny  > 0 a rectangular surface is produced with */
+  /* nx by ny rectangular patches. */
+
+  data.m++;
+  mi= data.m-1;
+
+  /* Reallocate patch buffers */
+  mreq = (size_t)data.m * sizeof(double);
+  mem_realloc( (void *)&data.px,  mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.py,  mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.pz,  mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t1x, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t1y, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t1z, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t2x, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t2y, mreq, "in geometry.c");
+  mem_realloc( (void *)&data.t2z, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.pbi, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.psalp, mreq, "in geometry.c" );
+
+  if( nx > 0) ntp=2;
+  else ntp= ny;
+
+  if( ntp <= 1)
+  {
+	data.px[mi]= ax1;
+	data.py[mi]= ay1;
+	data.pz[mi]= az1;
+	data.pbi[mi]= az2;
+	znv= cos( ax2);
+	xnv= znv* cos( ay2);
+	ynv= znv* sin( ay2);
+	znv= sin( ax2);
+	xa= sqrt( xnv* xnv+ ynv* ynv);
+
+	if( xa >= 1.0e-6)
+	{
+	  data.t1x[mi]= -ynv/ xa;
+	  data.t1y[mi]= xnv/ xa;
+	  data.t1z[mi]=0.0;
+	}
+	else
+	{
+	  data.t1x[mi]=1.0;
+	  data.t1y[mi]=0.0;
+	  data.t1z[mi]=0.0;
+	}
+
+  } /* if( ntp <= 1) */
+  else
+  {
+	s1x= ax2- ax1;
+	s1y= ay2- ay1;
+	s1z= az2- az1;
+	s2x= ax3- ax2;
+	s2y= ay3- ay2;
+	s2z= az3- az2;
+
+	if( nx != 0)
+	{
+	  s1x= s1x/ nx;
+	  s1y= s1y/ nx;
+	  s1z= s1z/ nx;
+	  s2x= s2x/ ny;
+	  s2y= s2y/ ny;
+	  s2z= s2z/ ny;
+	}
+
+	xnv= s1y* s2z- s1z* s2y;
+	ynv= s1z* s2x- s1x* s2z;
+	znv= s1x* s2y- s1y* s2x;
+	xa= sqrt( xnv* xnv+ ynv* ynv+ znv* znv);
+	xnv= xnv/ xa;
+	ynv= ynv/ xa;
+	znv= znv/ xa;
+	xst= sqrt( s1x* s1x+ s1y* s1y+ s1z* s1z);
+	data.t1x[mi]= s1x/ xst;
+	data.t1y[mi]= s1y/ xst;
+	data.t1z[mi]= s1z/ xst;
+
+	if( ntp <= 2)
+	{
+	  data.px[mi]= ax1+.5*( s1x+ s2x);
+	  data.py[mi]= ay1+.5*( s1y+ s2y);
+	  data.pz[mi]= az1+.5*( s1z+ s2z);
+	  data.pbi[mi]= xa;
+	}
+	else
+	{
+	  if( ntp != 4)
+	  {
+		data.px[mi]=( ax1+ ax2+ ax3)/3.0;
+		data.py[mi]=( ay1+ ay2+ ay3)/3.0;
+		data.pz[mi]=( az1+ az2+ az3)/3.0;
+		data.pbi[mi]=.5* xa;
+	  }
+	  else
+	  {
+		s1x= ax3- ax1;
+		s1y= ay3- ay1;
+		s1z= az3- az1;
+		s2x= ax4- ax1;
+		s2y= ay4- ay1;
+		s2z= az4- az1;
+		xn2= s1y* s2z- s1z* s2y;
+		yn2= s1z* s2x- s1x* s2z;
+		zn2= s1x* s2y- s1y* s2x;
+		xst= sqrt( xn2* xn2+ yn2* yn2+ zn2* zn2);
+		double salpn=1.0/(3.0*( xa+ xst));
+		data.px[mi]=( xa*( ax1+ ax2+ ax3) +
+			xst*( ax1+ ax3+ ax4))* salpn;
+		data.py[mi]=( xa*( ay1+ ay2+ ay3) +
+			xst*( ay1+ ay3+ ay4))* salpn;
+		data.pz[mi]=( xa*( az1+ az2+ az3) +
+			xst*( az1+ az3+ az4))* salpn;
+		data.pbi[mi]=.5*( xa+ xst);
+		s1x=( xnv* xn2+ ynv* yn2+ znv* zn2)/ xst;
+
+		if( s1x <= 0.9998)
+		{
+		  fprintf( stderr,
+			  "xnec2c: patch(): corners of quadrilateral\n"
+			  "patch do not lie in a plane\n" );
+		  stop( _("patch(): Corners of quadrilateral\n"\
+				"patch do not lie in a plane"), ERR_OK );
+		  return( FALSE );
+		}
+
+	  } /* if( ntp != 4) */
+
+	} /* if( ntp <= 2) */
+
+  } /* if( ntp <= 1) */
+
+  data.t2x[mi]= ynv* data.t1z[mi]- znv* data.t1y[mi];
+  data.t2y[mi]= znv* data.t1x[mi]- xnv* data.t1z[mi];
+  data.t2z[mi]= xnv* data.t1y[mi]- ynv* data.t1x[mi];
+  data.psalp[mi]=1.0;
+
+  if( nx != 0)
+  {
+	int  iy, ix;
+	double xs, ys, zs, xt, yt, zt;
+
+	data.m += nx*ny-1;
+	/* Reallocate patch buffers */
+	mreq = (size_t)data.m * sizeof(double);
+	mem_realloc( (void *)&data.px,  mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.py,  mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.pz,  mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t1x, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t1y, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t1z, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t2x, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t2y, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t2z, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.pbi, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.psalp, mreq, "in geometry.c" );
+
+	xn2= data.px[mi]- s1x- s2x;
+	yn2= data.py[mi]- s1y- s2y;
+	zn2= data.pz[mi]- s1z- s2z;
+	xs= data.t1x[mi];
+	ys= data.t1y[mi];
+	zs= data.t1z[mi];
+	xt= data.t2x[mi];
+	yt= data.t2y[mi];
+	zt= data.t2z[mi];
+
+	for( iy = 0; iy < ny; iy++ )
+	{
+	  xn2 += s2x;
+	  yn2 += s2y;
+	  zn2 += s2z;
+
+	  for( ix = 1; ix <= nx; ix++ )
+	  {
+		xst= (double)ix;
+		data.px[mi]= xn2+ xst* s1x;
+		data.py[mi]= yn2+ xst* s1y;
+		data.pz[mi]= zn2+ xst* s1z;
+		data.pbi[mi]= xa;
+		data.psalp[mi]=1.0;
+		data.t1x[mi]= xs;
+		data.t1y[mi]= ys;
+		data.t1z[mi]= zs;
+		data.t2x[mi]= xt;
+		data.t2y[mi]= yt;
+		data.t2z[mi]= zt;
+		mi++;
+	  } /* for( ix = 0; ix < nx; ix++ ) */
+
+	} /* for( iy = 0; iy < ny; iy++ ) */
+
+  } /* if( nx != 0) */
+
+  data.ipsym=0;
+  data.np= data.n;
+  data.mp= data.m;
+
+  return( TRUE );
+}
+
+/*-----------------------------------------------------------------------*/
+
+/*** this function was an 'entry point' (part of) 'patch()' ***/
+  void
+subph( int nx, int ny )
+{
+  int mia, ix, iy, mi;
+  size_t mreq;
+  double xs, ys, zs, xa, xst, s1x, s1y;
+  double s1z, s2x, s2y, s2z, saln, xt, yt;
+
+  /* Reallocate patch buffers */
+  if( ny == 0 ) data.m += 3;
+  else data.m += 4;
+
+  mreq = (size_t)data.m * sizeof(double);
+  mem_realloc( (void *)&data.px,  mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.py,  mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.pz,  mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t1x, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t1y, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t1z, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t2x, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t2y, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t2z, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.pbi, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.psalp, mreq, "in geometry.c" );
+  if( !CHILD )
+  {
+	mreq = (size_t)(data.n + 2 * data.m) * sizeof(GdkSegment);
+	mem_realloc( (void *)&structure_segs, mreq, "in geometry.c" );
+  }
+
+  /* Shift patches to make room for new ones */
+  if( (ny == 0) && (nx != data.m) )
+  {
+	for( iy = data.m-1; iy > nx+2; iy-- )
+	{
+	  ix = iy-3;
+	  data.px[iy]= data.px[ix];
+	  data.py[iy]= data.py[ix];
+	  data.pz[iy]= data.pz[ix];
+	  data.pbi[iy]= data.pbi[ix];
+	  data.psalp[iy]= data.psalp[ix];
+	  data.t1x[iy]= data.t1x[ix];
+	  data.t1y[iy]= data.t1y[ix];
+	  data.t1z[iy]= data.t1z[ix];
+	  data.t2x[iy]= data.t2x[ix];
+	  data.t2y[iy]= data.t2y[ix];
+	  data.t2z[iy]= data.t2z[ix];
+	}
+
+  } /* if( (ny == 0) || (nx != m) ) */
+
+  /* divide patch for connection */
+  mi= nx-1;
+  xs= data.px[mi];
+  ys= data.py[mi];
+  zs= data.pz[mi];
+  xa= data.pbi[mi]/4.0;
+  xst= sqrt( xa)/2.0;
+  s1x= data.t1x[mi];
+  s1y= data.t1y[mi];
+  s1z= data.t1z[mi];
+  s2x= data.t2x[mi];
+  s2y= data.t2y[mi];
+  s2z= data.t2z[mi];
+  saln= data.psalp[mi];
+  xt= xst;
+  yt= xst;
+
+  if( ny == 0)
+	mia= mi;
+  else
+  {
+	data.mp++;
+	mia= data.m-1;
+  }
+
+  for( ix = 1; ix <= 4; ix++ )
+  {
+	data.px[mia]= xs+ xt* s1x+ yt* s2x;
+	data.py[mia]= ys+ xt* s1y+ yt* s2y;
+	data.pz[mia]= zs+ xt* s1z+ yt* s2z;
+	data.pbi[mia]= xa;
+	data.t1x[mia]= s1x;
+	data.t1y[mia]= s1y;
+	data.t1z[mia]= s1z;
+	data.t2x[mia]= s2x;
+	data.t2y[mia]= s2y;
+	data.t2z[mia]= s2z;
+	data.psalp[mia]= saln;
+
+	if( ix == 2)
+	  yt= -yt;
+
+	if( (ix == 1) || (ix == 3) )
+	  xt= -xt;
+
+	mia++;
+  }
+
+  if( nx <= data.mp)
+	data.mp += 3;
+
+  if( ny > 0 )
+	data.pz[mi]=10000.0;
+
+  /* Process new patches created */
+  if( ! CHILD )
+	New_Patch_Data();
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* reflc reflects partial structure along x,y, or z axes */
+/* or rotates structure to complete a symmetric structure. */
+  gboolean
+reflc( int ix, int iy, int iz, int iti, int nop )
+{
+  int i, nx, itagi, k;
+  size_t mreq;
+  double e1, e2, fnop, sam, cs, ss, xk, yk;
+
+  if( nop == 0) return( TRUE );
+
+  data.np= data.n;
+  data.mp= data.m;
+  data.ipsym=0;
+
+  if( ix >= 0)
+  {
+	data.ipsym=1;
+
+	/* reflect along z axis */
+	if( iz != 0)
+	{
+	  data.ipsym=2;
+
+	  if( data.n > 0 )
+	  {
+		/* Reallocate tags buffer */
+		mreq = (size_t)(2 * data.n + data.m) * sizeof(int);
+		mem_realloc( (void *)&data.itag, mreq, "in geometry.c" );
+
+		/* Reallocate wire buffers */
+		mreq = (size_t)(2 * data.n) * sizeof(double);
+		mem_realloc( (void *)&data.x1, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.y1, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.z1, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.x2, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.y2, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.z2, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.bi, mreq, "in geometry.c" );
+
+		for( i = 0; i < data.n; i++ )
+		{
+		  nx= i+ data.n;
+		  e1= data.z1[i];
+		  e2= data.z2[i];
+
+		  if( (fabs(e1)+fabs(e2) <= 1.0e-5) || (e1*e2 < -1.0e-6) )
+		  {
+			fprintf( stderr,
+				"xnec2c: reflc(): geometry data error\n"
+				"segment %d lies in plane of symmetry\n", i+1 );
+			stop( _("reflc(): Geometry data error\n"\
+				  "Segment lies in plane of symmetry"), ERR_OK );
+			return( FALSE );
+		  }
+
+		  data.x1[nx]= data.x1[i];
+		  data.y1[nx]= data.y1[i];
+		  data.z1[nx]= -e1;
+		  data.x2[nx]= data.x2[i];
+		  data.y2[nx]= data.y2[i];
+		  data.z2[nx]= -e2;
+		  itagi= data.itag[i];
+
+		  if( itagi == 0)
+			data.itag[nx]=0;
+		  if( itagi != 0)
+			data.itag[nx]= itagi+ iti;
+
+		  data.bi[nx]= data.bi[i];
+
+		} /* for( i = 0; i < data.n; i++ ) */
+
+		data.n= data.n*2;
+		iti= iti*2;
+
+	  } /* if( data.n > 0) */
+
+	  if( data.m > 0 )
+	  {
+		/* Reallocate patch buffers */
+		mreq = (size_t)(2 * data.m) * sizeof(double);
+		mem_realloc( (void *)&data.px,  mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.py,  mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.pz,  mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.t1x, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.t1y, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.t1z, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.t2x, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.t2y, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.t2z, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.pbi, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.psalp, mreq, "in geometry.c" );
+
+		for( i = 0; i < data.m; i++ )
+		{
+		  nx = i+data.m;
+		  if( fabs(data.pz[i]) <= 1.0e-10)
+		  {
+			fprintf( stderr,
+				"xnec2c: reflc(): geometry data error\n"
+				"patch %d lies in plane of symmetry\n", i+1 );
+			stop( _("reflc(): Geometry data error\n"\
+				  "Patch lies in plane of symmetry"), ERR_OK );
+			return( FALSE );
+		  }
+
+		  data.px[nx]= data.px[i];
+		  data.py[nx]= data.py[i];
+		  data.pz[nx]= -data.pz[i];
+		  data.t1x[nx]= data.t1x[i];
+		  data.t1y[nx]= data.t1y[i];
+		  data.t1z[nx]= -data.t1z[i];
+		  data.t2x[nx]= data.t2x[i];
+		  data.t2y[nx]= data.t2y[i];
+		  data.t2z[nx]= -data.t2z[i];
+		  data.psalp[nx]= -data.psalp[i];
+		  data.pbi[nx]= data.pbi[i];
+		}
+
+		data.m= data.m*2;
+
+	  } /* if( data.m >= m2) */
+
+	} /* if( iz != 0) */
+
+	/* reflect along y axis */
+	if( iy != 0)
+	{
+	  if( data.n > 0)
+	  {
+		/* Reallocate tags buffer */
+		mreq = (size_t)(2 * data.n) * sizeof(int);
+		mem_realloc( (void *)&data.itag, mreq, "in geometry.c" );
+		/* Reallocate wire buffers */
+		mreq = (size_t)(2 * data.n) * sizeof(double);
+		mem_realloc( (void *)&data.x1, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.y1, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.z1, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.x2, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.y2, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.z2, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.bi, mreq, "in geometry.c" );
+
+		for( i = 0; i < data.n; i++ )
+		{
+		  nx= i+ data.n;
+		  e1= data.y1[i];
+		  e2= data.y2[i];
+
+		  if( (fabs(e1)+fabs(e2) <= 1.0e-5) || (e1*e2 < -1.0e-6) )
+		  {
+			fprintf( stderr,
+				"xnec2c: reflc(): geometry data error\n"
+				"segment %d lies in plane of symmetry\n", i+1 );
+			stop( _("reflc(): Geometry data error\n"\
+				  "Segment lies in plane of symmetry"), ERR_OK );
+			return( FALSE );
+		  }
+
+		  data.x1[nx]= data.x1[i];
+		  data.y1[nx]= -e1;
+		  data.z1[nx]= data.z1[i];
+		  data.x2[nx]= data.x2[i];
+		  data.y2[nx]= -e2;
+		  data.z2[nx]= data.z2[i];
+		  itagi= data.itag[i];
+
+		  if( itagi == 0)
+			data.itag[nx]=0;
+		  if( itagi != 0)
+			data.itag[nx]= itagi+ iti;
+
+		  data.bi[nx]= data.bi[i];
+
+		} /* for( i = n2-1; i < data.n; i++ ) */
+
+		data.n= data.n*2;
+		iti= iti*2;
+
+	  } /* if( data.n >= n2) */
+
+	  if( data.m > 0 )
+	  {
+		/* Reallocate patch buffers */
+		mreq = (size_t)(2 * data.m) * sizeof(double);
+		mem_realloc( (void *)&data.px,  mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.py,  mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.pz,  mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.t1x, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.t1y, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.t1z, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.t2x, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.t2y, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.t2z, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.pbi, mreq, "in geometry.c" );
+		mem_realloc( (void *)&data.psalp, mreq, "in geometry.c" );
+
+		for( i = 0; i < data.m; i++ )
+		{
+		  nx= i+data.m;
+		  if( fabs( data.py[i]) <= 1.0e-10)
+		  {
+			fprintf( stderr,
+				"xnec2c: reflc(): geometry data error\n"
+				"patch %d lies in plane of symmetry\n", i+1 );
+			stop( _("reflc(): Geometry data error\n"\
+				  "Patch lies in plane of symmetry"), ERR_OK );
+			return( FALSE );
+		  }
+
+		  data.px[nx]= data.px[i];
+		  data.py[nx]= -data.py[i];
+		  data.pz[nx]= data.pz[i];
+		  data.t1x[nx]= data.t1x[i];
+		  data.t1y[nx]= -data.t1y[i];
+		  data.t1z[nx]= data.t1z[i];
+		  data.t2x[nx]= data.t2x[i];
+		  data.t2y[nx]= -data.t2y[i];
+		  data.t2z[nx]= data.t2z[i];
+		  data.psalp[nx]= -data.psalp[i];
+		  data.pbi[nx]= data.pbi[i];
+
+		} /* for( i = m2; i <= data.m; i++ ) */
+
+		data.m= data.m*2;
+
+	  } /* if( data.m >= m2) */
+
+	} /* if( iy != 0) */
+
+	/* reflect along x axis */
+	if( ix == 0 ) return( TRUE );
+
+	if( data.n > 0 )
+	{
+	  /* Reallocate tags buffer */
+	  mreq = (size_t)(2 * data.n) * sizeof(int);
+	  mem_realloc( (void *)&data.itag, mreq, "in geometry.c" );
+
+	  /* Reallocate wire buffers */
+	  mreq = (size_t)(2 * data.n) * sizeof(double);
+	  mem_realloc( (void *)&data.x1, mreq, "in geometry.c" );
+	  mem_realloc( (void *)&data.y1, mreq, "in geometry.c" );
+	  mem_realloc( (void *)&data.z1, mreq, "in geometry.c" );
+	  mem_realloc( (void *)&data.x2, mreq, "in geometry.c" );
+	  mem_realloc( (void *)&data.y2, mreq, "in geometry.c" );
+	  mem_realloc( (void *)&data.z2, mreq, "in geometry.c" );
+	  mem_realloc( (void *)&data.bi, mreq, "in geometry.c" );
+
+	  for( i = 0; i < data.n; i++ )
+	  {
+		nx= i+ data.n;
+		e1= data.x1[i];
+		e2= data.x2[i];
+
+		if( (fabs(e1)+fabs(e2) <= 1.0e-5) || (e1*e2 < -1.0e-6) )
+		{
+		  fprintf( stderr,
+			  "xnec2c: reflc(): geometry data error\n"
+			  "segment %d lies in plane of symmetry\n", i+1 );
+		  stop( _("reflc(): Geometry data error\n"\
+				"Segment lies in plane of symmetry"), ERR_OK );
+		  return( FALSE );
+		}
+
+		data.x1[nx]= -e1;
+		data.y1[nx]= data.y1[i];
+		data.z1[nx]= data.z1[i];
+		data.x2[nx]= -e2;
+		data.y2[nx]= data.y2[i];
+		data.z2[nx]= data.z2[i];
+		itagi= data.itag[i];
+
+		if( itagi == 0)
+		  data.itag[nx]=0;
+		if( itagi != 0)
+		  data.itag[nx]= itagi+ iti;
+
+		data.bi[nx]= data.bi[i];
+	  }
+
+	  data.n= data.n*2;
+
+	} /* if( data.n > 0) */
+
+	if( data.m == 0 ) return( TRUE );
+
+	/* Reallocate patch buffers */
+	mreq = (size_t)(2 * data.m) * sizeof(double);
+	mem_realloc( (void *)&data.px,  mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.py,  mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.pz,  mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t1x, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t1y, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t1z, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t2x, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t2y, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.t2z, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.pbi, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.psalp, mreq, "in geometry.c" );
+
+	for( i = 0; i < data.m; i++ )
+	{
+	  nx= i+data.m;
+	  if( fabs( data.px[i]) <= 1.0e-10)
+	  {
+		fprintf( stderr,
+			"xnec2c: reflc(): geometry data error\n"
+			"patch %d lies in plane of symmetry\n", i+1 );
+		stop( _("reflc(): Geometry data error\n"\
+			  "Patch lies in plane of symmetry"), ERR_OK );
+		return( FALSE );
+	  }
+
+	  data.px[nx]= -data.px[i];
+	  data.py[nx]= data.py[i];
+	  data.pz[nx]= data.pz[i];
+	  data.t1x[nx]= -data.t1x[i];
+	  data.t1y[nx]= data.t1y[i];
+	  data.t1z[nx]= data.t1z[i];
+	  data.t2x[nx]= -data.t2x[i];
+	  data.t2y[nx]= data.t2y[i];
+	  data.t2z[nx]= data.t2z[i];
+	  data.psalp[nx]= -data.psalp[i];
+	  data.pbi[nx]= data.pbi[i];
+	}
+
+	data.m= data.m*2;
+	return( TRUE );
+
+  } /* if( ix >= 0) */
+
+  /* reproduce structure with rotation to form cylindrical structure */
+  fnop= (double)nop;
+  data.ipsym=-1;
+  sam=TP/ fnop;
+  cs= cos( sam);
+  ss= sin( sam);
+
+  if( data.n > 0)
+  {
+	data.n *= nop;
+	nx= data.np;
+
+	/* Reallocate tags buffer */
+	mreq = (size_t)data.n * sizeof(int);
+	mem_realloc( (void *)&data.itag, mreq, "in geometry.c" );
+
+	/* Reallocate wire buffers */
+	mreq = (size_t)data.n * sizeof(double);
+	mem_realloc( (void *)&data.x1, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.y1, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.z1, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.x2, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.y2, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.z2, mreq, "in geometry.c" );
+	mem_realloc( (void *)&data.bi, mreq, "in geometry.c" );
+
+	for( i = nx; i < data.n; i++ )
+	{
+	  k= i- data.np;
+	  xk= data.x1[k];
+	  yk= data.y1[k];
+	  data.x1[i]= xk* cs- yk* ss;
+	  data.y1[i]= xk* ss+ yk* cs;
+	  data.z1[i]= data.z1[k];
+	  xk= data.x2[k];
+	  yk= data.y2[k];
+	  data.x2[i]= xk* cs- yk* ss;
+	  data.y2[i]= xk* ss+ yk* cs;
+	  data.z2[i]= data.z2[k];
+	  data.bi[i]= data.bi[k];
+	  itagi= data.itag[k];
+
+	  if( itagi == 0)
+		data.itag[i]=0;
+	  if( itagi != 0)
+		data.itag[i]= itagi+ iti;
+	}
+
+  } /* if( data.n >= n2) */
+
+  if( data.m == 0 ) return( TRUE );
+
+  data.m *= nop;
+  nx= data.mp;
+
+  /* Reallocate patch buffers */
+  mreq = (size_t)data.m * sizeof(double);
+  mem_realloc( (void *)&data.px,  mreq, "in geometry.c"  );
+  mem_realloc( (void *)&data.py,  mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.pz,  mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t1x, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t1y, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t1z, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t2x, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t2y, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.t2z, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.pbi, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.psalp, mreq, "in geometry.c" );
+
+  for( i = nx; i < data.m; i++ )
+  {
+	k = i-data.mp;
+	xk= data.px[k];
+	yk= data.py[k];
+	data.px[i]= xk* cs- yk* ss;
+	data.py[i]= xk* ss+ yk* cs;
+	data.pz[i]= data.pz[k];
+	xk= data.t1x[k];
+	yk= data.t1y[k];
+	data.t1x[i]= xk* cs- yk* ss;
+	data.t1y[i]= xk* ss+ yk* cs;
+	data.t1z[i]= data.t1z[k];
+	xk= data.t2x[k];
+	yk= data.t2y[k];
+	data.t2x[i]= xk* cs- yk* ss;
+	data.t2y[i]= xk* ss+ yk* cs;
+	data.t2z[i]= data.t2z[k];
+	data.psalp[i]= data.psalp[k];
+	data.pbi[i]= data.pbi[k];
+
+  } /* for( i = nx; i < data.m; i++ ) */
+
+  return( TRUE );
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* subroutine wire generates segment geometry */
+/* data for a straight wire of ns segments. */
+  void
+wire( double xw1, double yw1, double zw1,
+	double xw2, double yw2, double zw2, double rad,
+	double rdel, double rrad, int ns, int itg )
+{
+  int ist, i;
+  size_t mreq;
+  double xd, yd, zd, delz, rd, fns, radz;
+  double xs1, ys1, zs1, xs2, ys2, zs2;
+
+  if( ns < 1) return;
+
+  ist= data.n;
+  data.n= data.n+ ns;
+  data.np= data.n;
+  data.mp= data.m;
+  data.ipsym=0;
+
+  /* Reallocate tags buffer */
+  mreq = (size_t)data.n * sizeof(int);
+  mem_realloc( (void *)&data.itag, mreq, "in geometry.c" );
+
+  /* Reallocate wire buffers */
+  mreq = (size_t)data.n * sizeof(double);
+  mem_realloc( (void *)&data.x1, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.y1, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.z1, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.x2, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.y2, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.z2, mreq, "in geometry.c" );
+  mem_realloc( (void *)&data.bi, mreq, "in geometry.c" );
+
+  xd= xw2- xw1;
+  yd= yw2- yw1;
+  zd= zw2- zw1;
+
+  if( fabs( rdel-1.0) >= 1.0e-6)
+  {
+	delz= sqrt( xd* xd+ yd* yd+ zd* zd);
+	xd= xd/ delz;
+	yd= yd/ delz;
+	zd= zd/ delz;
+	delz= delz*(1.0- rdel)/(1.0- pow(rdel, ns) );
+	rd= rdel;
+  }
+  else
+  {
+	fns= ns;
+	xd= xd/ fns;
+	yd= yd/ fns;
+	zd= zd/ fns;
+	delz=1.0;
+	rd=1.0;
+  }
+
+  radz= rad;
+  xs1= xw1;
+  ys1= yw1;
+  zs1= zw1;
+
+  for( i = ist; i < data.n; i++ )
+  {
+	data.itag[i]= itg;
+	xs2= xs1+ xd* delz;
+	ys2= ys1+ yd* delz;
+	zs2= zs1+ zd* delz;
+	data.x1[i]= xs1;
+	data.y1[i]= ys1;
+	data.z1[i]= zs1;
+	data.x2[i]= xs2;
+	data.y2[i]= ys2;
+	data.z2[i]= zs2;
+	data.bi[i]= radz;
+	delz= delz* rd;
+	radz= radz* rrad;
+	xs1= xs2;
+	ys1= ys2;
+	zs1= zs2;
+  }
+
+  data.x2[data.n-1]= xw2;
+  data.y2[data.n-1]= yw2;
+  data.z2[data.n-1]= zw2;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
diff --git a/src/geometry.h b/src/geometry.h
new file mode 100644
index 0000000..afde3f6
--- /dev/null
+++ b/src/geometry.h
@@ -0,0 +1,26 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	GEOMETRY_H
+#define	GEOMETRY_H		1
+
+#include "common.h"
+#include "support.h"
+
+#endif
+
diff --git a/src/gnuplot.c b/src/gnuplot.c
new file mode 100644
index 0000000..9372e52
--- /dev/null
+++ b/src/gnuplot.c
@@ -0,0 +1,511 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/*
+ *  gnuplot.c
+ *
+ *  gnuplot routines for xnec2c
+ */
+
+#include "gnuplot.h"
+#include "shared.h"
+
+/*-----------------------------------------------------------------------*/
+
+/* Save_FreqPlots_Gnuplot_Data()
+ *
+ * Saves frequency plots data to a file for gnuplot
+ */
+  void
+Save_FreqPlots_Gnuplot_Data( char *filename )
+{
+  /* Abort if plot data not available */
+  if( isFlagClear(FREQ_LOOP_DONE) )
+	return;
+
+  /* Used to calculate net gain */
+  double Zr, Zo, Zi;
+
+  /* Open gplot file, abort on error */
+  FILE *fp = NULL;
+  if( !Open_File(&fp, filename, "w") )
+	return;
+
+  /* Plot max gain vs frequency, if possible */
+  if( isFlagSet(PLOT_GMAX) && isFlagSet(ENABLE_RDPAT) )
+  {
+	int nth, nph, idx, pol;
+	gboolean no_fbr;
+
+	double
+	  gmax,		/* Max gain buffer */
+	  netgain,	/* Viewer direction net gain buffer */
+	  gdir_phi,	/* Direction in phi of gain */
+	  fbratio;	/* Front to back ratio */
+
+	/* Find max gain and direction, F/B ratio */
+	no_fbr = FALSE;
+	netgain = 0;
+
+	/* Polarization type and impedance */
+	pol = calc_data.pol_type;
+	Zo = calc_data.zo;
+
+	/* Save data for all frequency steps that were used */
+	fprintf( fp, _("# Gain and F/B Ratio vs Frequency\n") );
+	for( idx = 0; idx <= calc_data.lastf; idx++ )
+	{
+	  double fbdir;
+	  int fbidx, mgidx;
+
+	  /* Index to gtot buffer where max gain
+	   * occurs for given polarization type */
+	  mgidx = rad_pattern[idx].max_gain_idx[pol];
+
+	  /* Max gain for given polarization type */
+	  gmax = rad_pattern[idx].gtot[mgidx] +
+		10.0 * log10( Polarization_Factor(pol, idx, mgidx) );
+
+	  /* Net gain if selected */
+	  if( isFlagSet(PLOT_NETGAIN) )
+	  {
+		Zr = impedance_data.zreal[idx];
+		Zi = impedance_data.zimag[idx];
+		netgain = gmax + 10*log10(4*Zr*Zo/(pow(Zr+Zo,2)+pow(Zi,2)));
+	  }
+
+	  /* Radiation angle/phi where max gain occurs */
+	  gdir_phi = rad_pattern[idx].max_gain_phi[pol];
+
+	  /* Find F/B direction in theta */
+	  fbdir = 180.0 - rad_pattern[idx].max_gain_tht[pol];
+	  if( fpat.dth == 0.0 )
+		nth = 0;
+	  else
+		nth = (int)( fbdir/fpat.dth + 0.5 );
+
+	  /* If the antenna is modelled over ground, then use the same
+	   * theta as the max gain direction, relying on phi alone to
+	   * take us to the back. Patch supplied by Rik van Riel AB1KW
+	   */
+	  if( (nth >= fpat.nth) || (nth < 0) )
+	  {
+		fbdir = rad_pattern[idx].max_gain_tht[pol];
+		if( fpat.dth == 0.0 )
+		  nth = 0;
+		else
+		  nth = (int)( fbdir/fpat.dth + 0.5 );
+	  }
+
+	  /* Find F/B direction in phi */
+	  fbdir = gdir_phi + 180.0;
+	  if( fbdir >= 360.0 ) fbdir -= 360.0;
+	  nph = (int)( fbdir/fpat.dph + 0.5 );
+
+	  /* No F/B calc. possible if no phi step at +180 from max gain */
+	  if( (nph >= fpat.nph) || (nph < 0) )
+		no_fbr = TRUE;
+
+	  /* Index to gtot buffer for gain in back direction */
+	  fbidx = nth + nph*fpat.nth;
+
+	  /* Front to back ratio */
+	  fbratio  = pow( 10.0, gmax / 10.0 );
+	  fbratio /= pow( 10.0,
+		  rad_pattern[idx].gtot[fbidx] / 10.0 +
+		  log10(Polarization_Factor(pol, idx, fbidx)) );
+	  fbratio = 10.0 * log10( fbratio );
+
+	  if( no_fbr && isFlagClear(PLOT_NETGAIN) ) /* Plot max gain only */
+		fprintf( fp, "%13.6E %10.3E\n", save.freq[idx], gmax );
+	  else if( isFlagSet(PLOT_NETGAIN) ) /* Plot max gain and net gain */
+		fprintf( fp, "%13.6E %10.3E %10.3E\n", save.freq[idx], gmax, netgain );
+	  else if( !no_fbr ) /* Plot max gain and F/B ratio */
+		fprintf( fp, "%13.6E %10.3E %10.3E\n", save.freq[idx], gmax, fbratio );
+	} /* for( idx = 0; idx < calc_data.lastf; idx++ ) */
+
+	/* Plot gain direction in phi and theta */
+	if( isFlagSet(PLOT_GAIN_DIR) )
+	{
+	  fprintf( fp, "\n\n" );
+	  fprintf( fp, _("# Direction of gain in theta and phi\n") );
+	  for( idx = 0; idx < calc_data.lastf; idx++ )
+	  {
+		double gdir_tht; /* Direction in theta of gain */
+
+		/* Radiation angle/phi where max gain occurs */
+		gdir_tht = 90.0 - rad_pattern[idx].max_gain_tht[pol];
+		gdir_phi = rad_pattern[idx].max_gain_phi[pol];
+		fprintf( fp, "%13.6E %10.3E %10.3E\n", save.freq[idx], gdir_tht, gdir_phi );
+	  } /* for( idx = 0; idx < calc_data.lastf; idx++ ) */
+	} /* if( isFlagSet(PLOT_GAIN_DIR) ) */
+
+	fprintf( fp, "\n\n" );
+  } /* if( isFlagSet(PLOT_GMAX) && isFlagSet(ENABLE_RDPAT) ) */
+
+  /* Plot VSWR vs freq */
+  if( isFlagSet(PLOT_VSWR) )
+  {
+	int idx;
+	double vswr, gamma;
+	double zrpro2, zrmro2, zimag2;
+
+	/* Calculate VSWR */
+	fprintf( fp, _("# VSWR vs Frequency\n") );
+	for(idx = 0; idx <= calc_data.lastf; idx++ )
+	{
+	  zrpro2 = impedance_data.zreal[idx] + calc_data.zo;
+	  zrpro2 *= zrpro2;
+	  zrmro2 = impedance_data.zreal[idx] - calc_data.zo;
+	  zrmro2 *= zrmro2;
+	  zimag2 = impedance_data.zimag[idx] * impedance_data.zimag[idx];
+	  gamma = sqrt( (zrmro2 + zimag2)/(zrpro2 + zimag2) );
+	  vswr = (1+gamma)/(1-gamma);
+	  if( vswr > 10.0 ) vswr = 10.0;
+	  fprintf( fp, "%13.6E %10.3E\n", save.freq[idx], vswr );
+	}
+
+	fprintf( fp, "\n\n" );
+  } /* if( isFlagSet(PLOT_VSWR) ) */
+
+  /* Plot z-real and z-imag */
+  if( isFlagSet(PLOT_ZREAL_ZIMAG) )
+  {
+	int idx;
+	fprintf( fp, _("# Z real & Z imaginary vs Frequency\n") );
+	for(idx = 0; idx <= calc_data.lastf; idx++ )
+	  fprintf( fp, "%13.6E %10.3E %10.3E\n",
+		  save.freq[idx], impedance_data.zreal[idx], impedance_data.zimag[idx] );
+
+	fprintf( fp, "\n\n" );
+  } /* if( isFlagSet(PLOT_ZREAL_ZIMAG) ) */
+
+  /* Plot z-magn and z-phase */
+  if( isFlagSet(PLOT_ZMAG_ZPHASE) )
+  {
+	int idx;
+	fprintf( fp, _("# Z magnitude & Z phase vs Frequency\n") );
+	for(idx = 0; idx <= calc_data.lastf; idx++ )
+	  fprintf( fp, "%13.6E %10.3E %10.3E\n",
+		  save.freq[idx], impedance_data.zmagn[idx], impedance_data.zphase[idx] );
+  } /* if( isFlagSet(PLOT_ZREAL_ZIMAG) ) */
+
+  fclose(fp);
+} /* Save_FreqPlots_Gnuplot_Data() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Save_RadPattern_Gnuplot_Data()
+ *
+ * Saves radiation pattern data to a file for gnuplot
+ */
+  void
+Save_RadPattern_Gnuplot_Data( char *filename )
+{
+  int idx, npts; /* Number of points to plot */
+
+  /* Scale factor ref, for normalizing field strength values */
+  double dr;
+
+  double
+	fx, fy, fz,	/* Co-ordinates of "free" end of field lines */
+	fscale;		/* Scale factor for equalizing field line segments */
+
+  FILE *fp = NULL;
+
+  /* Draw near field pattern if possible */
+  if( isFlagSet(ENABLE_NEAREH) && near_field.valid )
+  {
+	/* Open gplot file, abort on error */
+	if( !Open_File(&fp, filename, "w") )
+	  return;
+
+	/* Reference for scale factor used in
+	 * normalizing field strength values */
+	if( fpat.near ) /* Spherical co-ordinates */
+	  dr = (double)fpat.dxnr;
+	/* Rectangular co-ordinates */
+	else dr = sqrt(
+		(double)fpat.dxnr * (double)fpat.dxnr +
+		(double)fpat.dynr * (double)fpat.dynr +
+		(double)fpat.dznr * (double)fpat.dznr )/1.75;
+
+	npts = fpat.nrx * fpat.nry * fpat.nrz;
+
+	/*** Draw Near E Field ***/
+	if( isFlagSet(DRAW_EFIELD) && (fpat.nfeh & NEAR_EFIELD) )
+	{
+	  fprintf( fp, _("# Near E field\n") );
+	  /* Write e-field out to file [DJS] */
+	  for( idx = 0; idx < npts; idx++ )
+	  {
+		fscale = dr / near_field.er[idx];
+		fx = near_field.px[idx] + near_field.erx[idx] * fscale;
+		fy = near_field.py[idx] + near_field.ery[idx] * fscale;
+		fz = near_field.pz[idx] + near_field.erz[idx] * fscale;
+
+		/* Print as x, y, z, dx, dy, dz for gnuplot */
+		fprintf( fp, "%f %f %f %f %f %f\n",
+			near_field.px[idx],
+			near_field.py[idx],
+			near_field.pz[idx],
+			fx - near_field.px[idx],
+			fy - near_field.py[idx],
+			fz - near_field.pz[idx] );
+	  }
+	} /* if( isFlagSet(DRAW_EFIELD) */
+
+	/*** Draw Near H Field ***/
+	if( isFlagSet(DRAW_HFIELD) && (fpat.nfeh & NEAR_HFIELD) )
+	{
+	  fprintf( fp, _("# Near H field\n") );
+	  /* Write h-field out to file [DJS] */
+	  for( idx = 0; idx < npts; idx++ )
+	  {
+		fscale = dr / near_field.hr[idx];
+		fx = near_field.px[idx] + near_field.hrx[idx] * fscale;
+		fy = near_field.py[idx] + near_field.hry[idx] * fscale;
+		fz = near_field.pz[idx] + near_field.hrz[idx] * fscale;
+
+		/* Print as x, y, z, dx, dy, dz for gnuplot */
+		fprintf( fp, "%f %f %f %f %f %f\n",
+			near_field.px[idx],
+			near_field.py[idx],
+			near_field.pz[idx],
+			fx - near_field.px[idx],
+			fy - near_field.py[idx],
+			fz - near_field.pz[idx] );
+	  }
+	} /* if( isFlagSet(DRAW_HFIELD) && (fpat.nfeh & NEAR_HFIELD) ) */
+
+	/*** Draw Poynting Vector ***/
+	if( isFlagSet(DRAW_POYNTING)  &&
+		(fpat.nfeh & NEAR_EFIELD) &&
+		(fpat.nfeh & NEAR_HFIELD) )
+	{
+	  int ipv;
+	  static size_t mreq = 0;
+
+	  /* Co-ordinates of Poynting vectors */
+	  static double *pov_x = NULL, *pov_y = NULL;
+	  static double *pov_z = NULL, *pov_r = NULL;
+
+	  /* Range of Poynting vector values,
+	   * its max and min and log of max/min */
+	  static double pov_max = 0;
+
+	  /* Allocate on new near field matrix size */
+	  if( mreq != (size_t)npts * sizeof( double ) )
+	  {
+		mreq = (size_t)npts * sizeof( double );
+		mem_realloc( (void *)&pov_x, mreq, "in draw_radiation.c" );
+		mem_realloc( (void *)&pov_y, mreq, "in draw_radiation.c" );
+		mem_realloc( (void *)&pov_z, mreq, "in draw_radiation.c" );
+		mem_realloc( (void *)&pov_r, mreq, "in draw_radiation.c" );
+	  }
+
+	  /* Calculate Poynting vector and its max and min */
+	  fprintf( fp, _("# Poynting Vector\n") );
+	  for( idx = 0; idx < npts; idx++ )
+	  {
+		pov_max = 0;
+		for( ipv = 0; ipv < npts; ipv++ )
+		{
+		  pov_x[ipv] =
+			near_field.ery[ipv] * near_field.hrz[ipv] -
+			near_field.hry[ipv] * near_field.erz[ipv];
+		  pov_y[ipv] =
+			near_field.erz[ipv] * near_field.hrx[ipv] -
+			near_field.hrz[ipv] * near_field.erx[ipv];
+		  pov_z[ipv] =
+			near_field.erx[ipv] * near_field.hry[ipv] -
+			near_field.hrx[ipv] * near_field.ery[ipv];
+		  pov_r[ipv] = sqrt(
+			  pov_x[ipv] * pov_x[ipv] +
+			  pov_y[ipv] * pov_y[ipv] +
+			  pov_z[ipv] * pov_z[ipv] );
+		  if( pov_max < pov_r[ipv] )
+			pov_max = pov_r[ipv];
+
+		} /* for( ipv = 0; ipv < npts; ipv++ ) */
+
+		/* Scale factor for each field point, to make
+		 * near field direction lines equal-sized */
+		fscale = dr / pov_r[idx];
+
+		/* Scaled field values are used to set one end of a
+		 * line segment that represents direction of field.
+		 * The other end is set by the field point co-ordinates */
+		fx = near_field.px[idx] + pov_x[idx] * fscale;
+		fy = near_field.py[idx] + pov_y[idx] * fscale;
+		fz = near_field.pz[idx] + pov_z[idx] * fscale;
+
+		/* Print as x, y, z, dx, dy, dz for gnuplot */
+		fprintf( fp, "%f %f %f %f %f %f\n",
+			near_field.px[idx],
+			near_field.py[idx],
+			near_field.pz[idx],
+			fx - near_field.px[idx],
+			fy - near_field.py[idx],
+			fz - near_field.pz[idx] );
+	  } /* for( idx = 0; idx < npts; idx++ ) */
+
+	} /* if( isFlagSet(DRAW_POYNTING) ) */
+  } /* if( isFlagSet(ENABLE_NEAREH) && near_field.valid ) */
+
+  /* Save radiation pattern data if possible */
+  if( isFlagSet(ENABLE_RDPAT) && (calc_data.fstep >= 0) )
+  {
+	int
+	  nth,	/* Theta step count */
+	  nph;	/* Phi step count   */
+
+	/* Frequency step and polarization type */
+	int fstep = calc_data.fstep;
+
+	/* Theta and phi angles defining a rad pattern point
+	 * and distance of its projection from xyz origin */
+	double theta, phi, r;
+
+	/* theta and phi step in rads */
+	double dth = (double)fpat.dth * (double)TA;
+	double dph = (double)fpat.dph * (double)TA;
+
+	/* Open gplot file, abort on error */
+	if( !Open_File(&fp, filename, "w") )
+	  return;
+	fprintf( fp, _("# Radiation Pattern") );
+
+	/* Distance of rdpattern point nearest to xyz origin */
+	/*** Convert radiation pattern values
+	 * to points in 3d space in x,y,z axis ***/
+	phi = (double)fpat.phis * (double)TA; /* In rads */
+
+	/* Step phi angle */
+	idx = 0;
+	for( nph = 0; nph < fpat.nph; nph++ )
+	{
+	  theta = (double)fpat.thets * (double)TA; /* In rads */
+
+	  /* Step theta angle */
+	  for( nth = 0; nth < fpat.nth; nth++ )
+	  {
+		double x, y, z;
+
+		/* Distance of pattern point from the xyz origin */
+		r = Scale_Gain(
+			rad_pattern[fstep].gtot[idx], fstep, idx );
+
+		/* Distance of point's projection on xyz axis, from origin */
+		z = r * cos(theta);
+		r *= sin(theta);
+		x = r * cos(phi);
+		y = r * sin(phi);
+
+		/* Print to file */
+		fprintf( fp, "%10.3E %10.3E %10.3E\n", x, y, z );
+
+		/* Step theta in rads */
+		theta += dth;
+		idx++;
+	  } /* for( nth = 0; nth < fpat.nth; nth++ ) */
+
+	  /* Step phi in rads */
+	  phi += dph;
+	} /* for( nph = 0; nph < fpat.nph; nph++ ) */
+
+
+  } /* if( isFlagSet(ENABLE_RDPAT) && (calc_data.fstep >= 0) ) */
+
+  if( fp != NULL ) fclose(fp);
+} /* Save_RadPattern_Gnuplot_Data() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Save_Struct_Gnuplot_Data()
+ *
+ * Saves antenna structure data for gnuplot
+ */
+  void
+Save_Struct_Gnuplot_Data( char *filename )
+{
+  FILE *fp = NULL;
+
+  /* Open gplot file, abort on error */
+  if( !Open_File(&fp, filename, "w") )
+	return;
+
+  /* Output if patch segs and no new input pending */
+  if( data.m && isFlagClear(INPUT_PENDING) )
+  {
+	int idx, m2;
+
+	/* Output segments data */
+	fprintf( fp, _("# structure patch segmenets\n") );
+
+	/* Output first segment outside loop to enable separation of wires */
+	fprintf( fp, "%10.3E %10.3E %10.3E\n%10.3E %10.3E %10.3E\n",
+		(double)data.px1[0], (double)data.py1[0], (double)data.pz1[0],
+		(double)data.px2[0], (double)data.py2[0], (double)data.pz2[0] );
+
+	/* Start from second segment and check for connection of ends */
+	m2 = data.m * 2;
+	for( idx = 1; idx < m2; idx++ )
+	{
+	  fprintf( fp, "%10.3E %10.3E %10.3E\n%10.3E %10.3E %10.3E\n",
+		  (double)data.px1[idx], (double)data.py1[idx], (double)data.pz1[idx],
+		  (double)data.px2[idx], (double)data.py2[idx], (double)data.pz2[idx] );
+	} /* for( idx = 1; idx < m2; idx++ ) */
+
+	fprintf( fp, "\n\n" );
+  } /* if( data.m && isFlagSet(INPUT_PENDING) ) */
+
+  /* Output if wire segs and no new input pending */
+  if( data.n && isFlagClear(INPUT_PENDING) )
+  {
+	int idx;
+
+	/* Output segments data */
+	fprintf( fp, _("# structure wire segmenets\n") );
+
+	/* Output first segment outside loop to enable separation of wires */
+	fprintf( fp, "%10.3E %10.3E %10.3E\n%10.3E %10.3E %10.3E\n",
+		(double)data.x1[0], (double)data.y1[0], (double)data.z1[0],
+		(double)data.x2[0], (double)data.y2[0], (double)data.z2[0] );
+
+	/* Start from second segment and check for connection of ends */
+	for( idx = 1; idx < data.n; idx++ )
+	{
+	  /* Leave a 2-line gap to next segment */
+	  if( (data.icon1[idx] == 0) || (data.icon1[idx] == (idx+1)) )
+		fprintf( fp, "\n\n" );
+	  fprintf( fp, "%10.3E %10.3E %10.3E\n%10.3E %10.3E %10.3E\n",
+		  (double)data.x1[idx], (double)data.y1[idx], (double)data.z1[idx],
+		  (double)data.x2[idx], (double)data.y2[idx], (double)data.z2[idx] );
+	  /* Leave a 2-line gap to next segment */
+	  if( (data.icon2[idx] == 0) || (data.icon2[idx] == (idx+1)) )
+		fprintf( fp, "\n\n" );
+
+	} /* for( idx = 1; idx < data.n; idx++ ) */
+  } /* if( data.n && isFlagSet(INPUT_PENDING) ) */
+
+  fclose( fp );
+} /* Save_Struct_Gnuplot_Data() */
+
+/*-----------------------------------------------------------------------*/
+
diff --git a/src/gnuplot.h b/src/gnuplot.h
new file mode 100644
index 0000000..0339341
--- /dev/null
+++ b/src/gnuplot.h
@@ -0,0 +1,26 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	GNUPLOT_H
+#define	GNUPLOT_H		1
+
+#include "common.h"
+#include "support.h"
+
+#endif
+
diff --git a/src/ground.c b/src/ground.c
new file mode 100644
index 0000000..c2d583f
--- /dev/null
+++ b/src/ground.c
@@ -0,0 +1,368 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/******* Translated to the C language by N. Kyriazis  20 Aug 2003 ******
+
+  Program NEC(input,tape5=input,output,tape11,tape12,tape13,tape14,
+  tape15,tape16,tape20,tape21)
+
+  Numerical Electromagnetics Code (NEC2)  developed at Lawrence
+  Livermore lab., Livermore, CA.  (contact G. Burke at 415-422-8414
+  for problems with the NEC code. For problems with the vax implem-
+  entation, contact J. Breakall at 415-422-8196 or E. Domning at 415
+  422-5936)
+  file created 4/11/80.
+
+ ***********Notice**********
+ This computer code material was prepared as an account of work
+ sponsored by the United States government.  Neither the United
+ States nor the United States Department Of Energy, nor any of
+ their employees, nor any of their contractors, subcontractors,
+ or their employees, makes any warranty, express or implied, or
+ assumes any legal liability or responsibility for the accuracy,
+ completeness or usefulness of any information, apparatus, product
+ or process disclosed, or represents that its use would not infringe
+ privately-owned rights.
+
+ ***********************************************************************/
+
+#include "ground.h"
+#include "shared.h"
+
+/*-------------------------------------------------------------------*/
+
+/* segment to obtain the total field due to ground.  the method of */
+/* variable interval width romberg integration is used.  there are 9 */
+/* field components - the x, y, and z components due to constant, */
+/* sine, and cosine current distributions. */
+  void
+rom2( double a, double b,
+	complex double *sum, double dmin )
+{
+  int i, ns, nt, flag = TRUE;
+  int nts = 4, nx = 1, n = 9;
+  double ze, ep, zend, dz=0.0, dzot=0.0, tmag1, tmag2, tr, ti;
+  double z, s; /***also global***/
+  double rx = 1.0e-4;
+  complex double t00, t02, t11;
+  static complex double *g1 = NULL, *g2 = NULL;
+  static complex double *g3 = NULL, *g4 = NULL;
+  static complex double *t01 = NULL, *t10 = NULL;
+  static complex double *t20 = NULL, *g5 = NULL;
+  static gboolean first_call = TRUE;
+
+  if( first_call )
+  {
+	first_call = FALSE;
+	size_t mreq = 9 * sizeof(complex double);
+	mem_alloc( (void *)&g1, mreq, "in ground.c");
+	mem_alloc( (void *)&g2, mreq, "in ground.c");
+	mem_alloc( (void *)&g3, mreq, "in ground.c");
+	mem_alloc( (void *)&g4, mreq, "in ground.c");
+	mem_alloc( (void *)&g5, mreq, "in ground.c");
+	mem_alloc( (void *)&t01, mreq, "in ground.c");
+	mem_alloc( (void *)&t10, mreq, "in ground.c");
+	mem_alloc( (void *)&t20, mreq, "in ground.c");
+  }
+
+  z= a;
+  ze= b;
+  s= b- a;
+
+  if( s < 0.0)
+  {
+	fprintf( stderr, "xnec2c: b less than a in rom2\n" );
+	stop( _("rom2(): b less than a"), ERR_STOP );
+  }
+
+  ep= s/(1.0e4* data.npm);
+  zend= ze- ep;
+
+  for( i = 0; i < n; i++ )
+	sum[i]=CPLX_00;
+
+  ns= nx;
+  nt=0;
+  sflds( z, g1);
+
+  while( TRUE )
+  {
+	if( flag )
+	{
+	  dz= s/ ns;
+	  if( z+ dz > ze)
+	  {
+		dz= ze- z;
+		if( dz <= ep) return;
+	  }
+
+	  dzot= dz*.5;
+	  sflds( z+ dzot, g3);
+	  sflds( z+ dz, g5);
+
+	} /* if( flag ) */
+
+	tmag1=0.0;
+	tmag2=0.0;
+
+	/* evaluate 3 point romberg result and test convergence. */
+	for( i = 0; i < n; i++ )
+	{
+	  t00=( g1[i]+ g5[i])* dzot;
+	  t01[i]=( t00+ dz* g3[i])*.5;
+	  t10[i]=(4.0* t01[i]- t00)/3.0;
+	  if( i > 2)
+		continue;
+
+	  tr= creal( t01[i]);
+	  ti= cimag( t01[i]);
+	  tmag1= tmag1+ tr* tr+ ti* ti;
+	  tr= creal( t10[i]);
+	  ti= cimag( t10[i]);
+	  tmag2= tmag2+ tr* tr+ ti* ti;
+
+	} /* for( i = 0; i < n; i++ ) */
+
+	tmag1= sqrt( tmag1);
+	tmag2= sqrt( tmag2);
+	test( tmag1, tmag2, &tr, 0.0, 0.0, &ti, dmin);
+
+	if( tr <= rx)
+	{
+	  for( i = 0; i < n; i++ )
+		sum[i] += t10[i];
+	  nt += 2;
+
+	  z += dz;
+	  if( z > zend)
+		return;
+
+	  for( i = 0; i < n; i++ )
+		g1[i]= g5[i];
+
+	  if( (nt >= nts) && (ns > nx) )
+	  {
+		ns= ns/2;
+		nt=1;
+	  }
+	  flag = TRUE;
+	  continue;
+
+	} /* if( tr <= rx) */
+
+	sflds( z+ dz*.25, g2);
+	sflds( z+ dz*.75, g4);
+	tmag1=0.0;
+	tmag2=0.0;
+
+	/* evaluate 5 point romberg result and test convergence. */
+	for( i = 0; i < n; i++ )
+	{
+	  t02=( t01[i]+ dzot*( g2[i]+ g4[i]))*.5;
+	  t11=( 4.0 * t02- t01[i] )/3.0;
+	  t20[i]=(16.0* t11- t10[i])/15.0;
+	  if( i > 2)
+		continue;
+
+	  tr= creal( t11);
+	  ti= cimag( t11);
+	  tmag1= tmag1+ tr* tr+ ti* ti;
+	  tr= creal( t20[i]);
+	  ti= cimag( t20[i]);
+	  tmag2= tmag2+ tr* tr+ ti* ti;
+
+	} /* for( i = 0; i < n; i++ ) */
+
+	tmag1= sqrt( tmag1);
+	tmag2= sqrt( tmag2);
+	test( tmag1, tmag2, &tr, 0.0,0.0, &ti, dmin);
+
+	if( tr > rx)
+	{
+	  nt=0;
+	  if( ns < data.npm )
+	  {
+		ns= ns*2;
+		dz= s/ ns;
+		dzot= dz*.5;
+
+		for( i = 0; i < n; i++ )
+		{
+		  g5[i]= g3[i];
+		  g3[i]= g2[i];
+		}
+
+		flag=FALSE;
+		continue;
+
+	  } /* if( ns < npm) */
+
+	  fprintf( stderr,
+		  "xnec2c: rom2 -- step size limited at z = %12.5E\n", z );
+
+	} /* if( tr > rx) */
+
+	for( i = 0; i < n; i++ )
+	  sum[i]= sum[i]+ t20[i];
+	nt= nt+1;
+
+	z= z+ dz;
+	if( z > zend)
+	  return;
+
+	for( i = 0; i < n; i++ )
+	  g1[i]= g5[i];
+
+	flag = TRUE;
+	if( (nt < nts) || (ns <= nx) )
+	  continue;
+
+	ns= ns/2;
+	nt=1;
+
+  } /* while( TRUE ) */
+
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* sfldx returns the field due to ground for a current element on */
+/* the source segment at t relative to the segment center. */
+  void
+sflds( double t, complex double *e )
+{
+  double xt, yt, zt, rhx, rhy, rhs, rho, phx, phy;
+  double cph, sph, zphs, r2s, rk, sfac, thet;
+  complex double eph, erv, ezv, erh, ezh;
+  complex double er, et, hrv, hzv, hrh;
+
+  xt= dataj.xj+ t* dataj.cabj;
+  yt= dataj.yj+ t* dataj.sabj;
+  zt= dataj.zj+ t* dataj.salpj;
+  rhx= incom.xo- xt;
+  rhy= incom.yo- yt;
+  rhs= rhx* rhx+ rhy* rhy;
+  rho= sqrt( rhs);
+
+  if( rho <= 0.0)
+  {
+	rhx=1.0;
+	rhy=0.0;
+	phx=0.0;
+	phy=1.0;
+  }
+  else
+  {
+	rhx= rhx/ rho;
+	rhy= rhy/ rho;
+	phx= -rhy;
+	phy= rhx;
+  }
+
+  cph= rhx* incom.xsn+ rhy* incom.ysn;
+  sph= rhy* incom.xsn- rhx* incom.ysn;
+
+  if( fabs( cph) < 1.0e-10)
+	cph=0.0;
+  if( fabs( sph) < 1.0e-10)
+	sph=0.0;
+
+  gwav.zph= incom.zo+ zt;
+  zphs= gwav.zph* gwav.zph;
+  r2s= rhs+ zphs;
+  gwav.r2= sqrt( r2s);
+  rk= gwav.r2* TP;
+  gwav.xx2= cmplx( cos( rk),- sin( rk));
+
+  /* use norton approximation for field due to ground.
+   * current is lumped at segment center with current moment
+   * for constant, sine or cosine distribution. */
+  if( incom.isnor != 1)
+  {
+	gwav.zmh=1.0;
+	gwav.r1=1.0;
+	gwav.xx1=0.0;
+	gwave( &erv, &ezv, &erh, &ezh, &eph);
+
+	et=-CONST1* gnd.frati* gwav.xx2/( r2s* gwav.r2);
+	er=2.0* et* cmplx(1.0, rk);
+	et= et* cmplx(1.0 - rk* rk, rk);
+	hrv=( er+ et)* rho* gwav.zph/ r2s;
+	hzv=( zphs* er- rhs* et)/ r2s;
+	hrh=( rhs* er- zphs* et)/ r2s;
+	erv= erv- hrv;
+	ezv= ezv- hzv;
+	erh= erh+ hrh;
+	ezh= ezh+ hrv;
+	eph= eph+ et;
+	erv= erv* dataj.salpj;
+	ezv= ezv* dataj.salpj;
+	erh= erh* incom.sn* cph;
+	ezh= ezh* incom.sn* cph;
+	eph= eph* incom.sn* sph;
+	erh= erv+ erh;
+	e[0]=( erh* rhx+ eph* phx)* dataj.s;
+	e[1]=( erh* rhy+ eph* phy)* dataj.s;
+	e[2]=( ezv+ ezh)* dataj.s;
+	e[3]=0.0;
+	e[4]=0.0;
+	e[5]=0.0;
+	sfac= PI* dataj.s;
+	sfac= sin( sfac)/ sfac;
+	e[6]= e[0]* sfac;
+	e[7]= e[1]* sfac;
+	e[8]= e[2]* sfac;
+
+	return;
+  } /* if( smat.isnor != 1) */
+
+  /* interpolate in sommerfeld field tables */
+  if( rho >= 1.0e-12)
+	thet= atan( gwav.zph/ rho);
+  else
+	thet= POT;
+
+  /* combine vertical and horizontal components and convert */
+  /* to x,y,z components. multiply by exp(-jkr)/r. */
+  intrp( gwav.r2, thet, &erv, &ezv, &erh, &eph );
+  gwav.xx2= gwav.xx2/ gwav.r2;
+  sfac= incom.sn* cph;
+  erh= gwav.xx2*( dataj.salpj* erv+ sfac* erh);
+  ezh= gwav.xx2*( dataj.salpj* ezv- sfac* erv);
+  /* x,y,z fields for constant current */
+  eph= incom.sn* sph* gwav.xx2* eph;
+  e[0]= erh* rhx+ eph* phx;
+  e[1]= erh* rhy+ eph* phy;
+  e[2]= ezh;
+  /* x,y,z fields for sine current */
+  rk= TP* t;
+  sfac= sin( rk);
+  e[3]= e[0]* sfac;
+  e[4]= e[1]* sfac;
+  /* x,y,z fields for cosine current */
+  e[5]= e[2]* sfac;
+  sfac= cos( rk);
+  e[6]= e[0]* sfac;
+  e[7]= e[1]* sfac;
+  e[8]= e[2]* sfac;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
diff --git a/src/ground.h b/src/ground.h
new file mode 100644
index 0000000..0449a69
--- /dev/null
+++ b/src/ground.h
@@ -0,0 +1,26 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	GROUND_H
+#define	GROUND_H		1
+
+#include "common.h"
+#include "support.h"
+
+#endif
+
diff --git a/src/input.c b/src/input.c
new file mode 100644
index 0000000..b591958
--- /dev/null
+++ b/src/input.c
@@ -0,0 +1,1600 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/******* Translated to the C language by N. Kyriazis  20 Aug 2003 ******
+
+  Program NEC(input,tape5=input,output,tape11,tape12,tape13,tape14,
+  tape15,tape16,tape20,tape21)
+
+  Numerical Electromagnetics Code (NEC2)  developed at Lawrence
+  Livermore lab., Livermore, CA.  (contact G. Burke at 415-422-8414
+  for problems with the NEC code. For problems with the vax implem-
+  entation, contact J. Breakall at 415-422-8196 or E. Domning at 415
+  422-5936)
+  file created 4/11/80
+
+ *********** Notice **********
+ This computer code material was prepared as an account of work
+ sponsored by the United States government.  Neither the United
+ States nor the United States Department Of Energy, nor any of
+ their employees, nor any of their contractors, subcontractors,
+ or their employees, makes any warranty, express or implied, or
+ assumes any legal liability or responsibility for the accuracy,
+ completeness or usefulness of any information, apparatus, product
+ or process disclosed, or represents that its use would not infringe
+ privately-owned rights.
+
+ ***********************************************************************/
+
+#include "input.h"
+#include "shared.h"
+
+/*------------------------------------------------------------------------*/
+
+/* Read_Comments()
+ *
+ * Reads CM comment cards from input file
+ */
+  gboolean
+Read_Comments( void )
+{
+  char ain[3], line_buf[LINE_LEN];
+
+
+  /* Look for CM or CE card */
+  do
+  {
+	/* read a line from input file */
+	if( Load_Line(line_buf, input_fp) == EOF )
+	{
+	  fprintf( stderr, "xnec2c: Read_Comments():"
+		  "unexpected EOF (End of File)\n" );
+	  stop( _("Read_Comments(): Error reading Comments\n"\
+			"Unexpected EOF (End of File)"), ERR_OK );
+	  return( FALSE );
+	}
+
+	/* Check that comment line is not short */
+	if( strlen(line_buf) < 2 )
+	{
+	  fprintf( stderr, "xnec2c: Read_Comments():"
+		  "error reading Comments: "
+		  "Comment mnemonic short or missing\n" );
+	  stop( _("Read_Comments(): Error reading Comments\n"\
+			"Comment mnemonic short or missing"), ERR_OK );
+	  return( FALSE );
+	}
+
+	/* separate card's id mnemonic */
+	Strlcpy( ain, line_buf, 3 );
+
+	/* Check for incorrect mnemonic */
+	if( (strcmp(ain, "CM") != 0) && (strcmp(ain, "CE") != 0) )
+	{
+	  stop( _("Read_Comments():\n"\
+			" Error reading input file\n"\
+			"Comment mnemonic incorrect"), ERR_OK );
+	  return( FALSE );
+	}
+  }
+  while( (strcmp(ain, "CE") != 0) );
+
+  return( TRUE );
+} /* Read_Comments() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Read_Geometry()
+ *
+ * Reads geometry data from input file
+ */
+  gboolean
+Read_Geometry( void )
+{
+  int idx;
+  size_t mreq;
+
+  /* Moved here from Read_Commands() */
+  matpar.imat=0;
+  data.n = data.m = 0;
+  if( !datagn() ) return( FALSE );
+
+  /* Memory allocation for temporary buffers */
+  mreq = (size_t)data.npm * sizeof(double);
+  mem_realloc( (void *)&save.xtemp,  mreq, "in input.c" );
+  mem_realloc( (void *)&save.ytemp,  mreq, "in input.c" );
+  mem_realloc( (void *)&save.ztemp,  mreq, "in input.c" );
+  mem_realloc( (void *)&save.bitemp, mreq, "in input.c" );
+  if( data.n > 0 )
+  {
+	mreq = (size_t)data.n * sizeof(double);
+	mem_realloc( (void *)&save.sitemp, mreq, "in input.c" );
+  }
+
+  /* Memory allocation for primary interacton matrix. */
+  mreq = (size_t)(data.np2m * (data.np + 2 * data.mp)) * sizeof(complex double);
+  mem_realloc( (void *)&cm, mreq, "in input.c" );
+
+  /* Memory allocation for current buffers */
+  mreq = (size_t)data.npm * sizeof( double);
+  mem_realloc( (void *)&crnt.air, mreq, "in input.c" );
+  mem_realloc( (void *)&crnt.aii, mreq, "in input.c" );
+  mem_realloc( (void *)&crnt.bir, mreq, "in input.c" );
+  mem_realloc( (void *)&crnt.bii, mreq, "in input.c" );
+  mem_realloc( (void *)&crnt.cir, mreq, "in input.c" );
+  mem_realloc( (void *)&crnt.cii, mreq, "in input.c" );
+  mreq = (size_t)data.np3m * sizeof( complex double);
+  mem_realloc( (void *)&crnt.cur, mreq, "in input.c" );
+
+  /* Memory allocation for loading buffers */
+  mreq = (size_t)data.npm * sizeof(complex double);
+  mem_realloc( (void *)&zload.zarray, mreq, "in input.c" );
+
+  /* Save segment and patch data for freq scaling */
+  if( data.n > 0 )
+	for( idx = 0; idx < data.n; idx++ )
+	{
+	  save.xtemp[idx]  = data.x[idx];
+	  save.ytemp[idx]  = data.y[idx];
+	  save.ztemp[idx]  = data.z[idx];
+	  save.sitemp[idx] = data.si[idx];
+	  save.bitemp[idx] = data.bi[idx];
+	}
+
+  if( data.m > 0 )
+	for( idx = 0; idx < data.m; idx++ )
+	{
+	  int j;
+
+	  j = idx + data.n;
+	  save.xtemp[j]  = data.px[idx];
+	  save.ytemp[j]  = data.py[idx];
+	  save.ztemp[j]  = data.pz[idx];
+	  save.bitemp[j] = data.pbi[idx];
+	}
+
+  return( TRUE );
+} /* Read_Geometry() */
+
+/*------------------------------------------------------------------------*/
+
+/* Read_Commands()
+ *
+ * Reads commands from input file and stores
+ * them for later execution by user command
+ */
+  gboolean
+Read_Commands( void )
+{
+  /* input card mnemonic list */
+  char *atst[NUM_CMNDS] =
+  {
+	"CM", "CP", "EK", "EN", "EX", \
+	"FR", "GD", "GN", "KH", "LD", \
+	"NE", "NH", "NT", "PQ", "PT", \
+	"RP", "SY", "TL", "XQ"
+  };
+
+  char ain[3];
+  double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
+  int
+	mpcnt, itmp1, itmp2, itmp3, itmp4,
+	ain_num;     /* My addition, ain mnemonic as a number */
+  size_t mreq; /* My addition, size req. for malloc's   */
+
+  /* initializations etc from original fortran code */
+  mpcnt = 0;
+
+  /* Matrix parameters */
+  if( matpar.imat == 0)
+  {
+	netcx.neq  = data.n+2*data.m;
+	netcx.neq2 = 0;
+  }
+
+  /* default values for input parameters and flags */
+  calc_data.rkh = 1.0;
+  calc_data.iexk = 0;
+  calc_data.iped = 0;
+  calc_data.nfrq = 1;
+  calc_data.fmhz = CVEL;
+  save.fmhz = CVEL;
+  calc_data.mxfrq = 0.0;
+  fpat.dth   = 0.0;
+  fpat.thets = 0.0;
+  fpat.ixtyp = 0;
+  fpat.nfeh  = 0;
+  fpat.nrx   = 0;
+  fpat.nry   = 0;
+  fpat.nry   = 0;
+  fpat.nth   = 0;
+  fpat.nph   = 0;
+  fpat.near = -1;
+  gnd.ifar  = -1;
+  gnd.zrati = CPLX_10;
+  gnd.ksymp = 1;
+  gnd.nradl = 0;
+  gnd.iperf = 0;
+  netcx.nonet = 0;
+  netcx.ntsol = 0;
+  netcx.masym = 0;
+  netcx.npeq = data.np+2*data.mp;
+
+  /* My additions */
+  vsorc.nvqd   = 0;
+  vsorc.nsant  = 0;
+  zload.nldseg = 0;
+  zload.nload  = 0;
+
+  /* Allocate some buffers */
+  mreq = (size_t)data.np2m * sizeof(int);
+  mem_realloc( (void *)&save.ip, mreq, "in input.c" );
+
+  /* Memory allocation for symmetry array */
+  smat.nop = netcx.neq/netcx.npeq;
+  mreq = (size_t)(smat.nop * smat.nop) * sizeof( complex double);
+  mem_realloc( (void *)&smat.ssx, mreq, "in input.c" );
+
+  /* main input section, exits at various points */
+  /* depending on error conditions or end of job */
+  while( TRUE )
+  {
+	/* Main input section - standard read statement - jumps */
+	/* to appropriate section for specific parameter set up */
+	if( !readmn(
+		  ain, &itmp1, &itmp2, &itmp3, &itmp4,
+		  &tmp1, &tmp2, &tmp3, &tmp4, &tmp5, &tmp6) )
+	  return( FALSE );
+
+	mpcnt++;
+
+	/* identify command card id mnemonic */
+	for( ain_num = 0; ain_num < NUM_CMNDS; ain_num++ )
+	  if( strncmp( ain, atst[ain_num], 2) == 0 )
+		break;
+
+	/* take action according to card id mnemonic */
+	switch( ain_num )
+	{
+	  case CM: /* "cm" card ignored, comments in data cards as in NEC4 */
+		fprintf( stderr, "xnec2c: Read_Commands():"
+			" ignoring CM card in commands\n" );
+		stop( _("Read_Commands(): Ignoring CM card in commands"),
+			ERR_OK );
+		continue;
+
+	  case CP: /* "cp" card ignored, maximum coupling between antennas */
+		stop( _("Read_Commands(): CP card is ignored\n"\
+			  "Coupling calculation not implemented"), ERR_OK );
+		continue; /* continue card input loop */
+
+	  case EK: /* "ek" card,  extended thin wire kernel option */
+		if( itmp1 == -1)
+		  calc_data.iexk = 0;
+		else
+		  calc_data.iexk = 1;
+		continue; /* continue card input loop */
+
+	  case EN: /* "en" card, end data input, no action */
+		break;
+
+	  case EX: /* "ex" card, excitation parameters */
+		netcx.masym = itmp4/10;
+		fpat.ixtyp  = itmp1;
+
+		/* Applied E field or current discontinuity */
+		if( (fpat.ixtyp == 0) || (fpat.ixtyp == 5) )
+		{
+		  netcx.ntsol = 0;
+
+		  /* Current discontinuity E source */
+		  if( fpat.ixtyp == 5 )
+		  {
+			vsorc.nvqd++;
+			mreq = (size_t)vsorc.nvqd * sizeof(int);
+			mem_realloc( (void *)&vsorc.ivqd, mreq, "in input.c" );
+			mem_realloc( (void *)&vsorc.iqds, mreq, "in input.c" );
+			mreq = (size_t)vsorc.nvqd * sizeof(complex double);
+			mem_realloc( (void *)&vsorc.vqd, mreq, "in input.c" );
+			mem_realloc( (void *)&vsorc.vqds, mreq, "in input.c" );
+			{
+			  int indx = vsorc.nvqd-1;
+
+			  if( (vsorc.ivqd[indx] = isegno(itmp2, itmp3)) < 0 )
+				return( FALSE ); /* my addition, error */
+			  vsorc.vqd[indx]= cmplx( tmp1, tmp2);
+			  if( cabs( vsorc.vqd[indx]) < 1.0e-20)
+				vsorc.vqd[indx] = CPLX_10;
+
+			  calc_data.iped   = itmp4- netcx.masym*10;
+			  calc_data.zpnorm = tmp3;
+			}
+
+		  } /* if( fpat.ixtyp == 5) */
+		  else
+		  {
+			/* Else, applied E field */
+			vsorc.nsant++;
+			mreq = (size_t)vsorc.nsant * sizeof(int);
+			mem_realloc( (void *)&vsorc.isant, mreq, "in input.c" );
+			mreq = (size_t)vsorc.nsant * sizeof(complex double);
+			mem_realloc( (void *)&vsorc.vsant, mreq, "in input.c" );
+			{
+			  int indx = vsorc.nsant-1;
+
+			  if( (vsorc.isant[indx] = isegno(itmp2, itmp3)) < 0 )
+				  return( FALSE ); /* my addition, error condition */
+			  vsorc.vsant[indx]= cmplx( tmp1, tmp2);
+			  if( cabs( vsorc.vsant[indx]) < 1.0e-20)
+				vsorc.vsant[indx] = CPLX_10;
+
+			  calc_data.iped= itmp4- netcx.masym*10;
+			  calc_data.zpnorm= tmp3;
+			  if( (calc_data.iped == 1) && (calc_data.zpnorm > 0.0) )
+				calc_data.iped=2;
+			}
+
+		  } /* if( fpat.ixtyp == 5 ) */
+
+		} /* if( (fpat.ixtyp == 0) || (fpat.ixtyp == 5) ) */
+		else
+		{
+		  /* For fpat.ixtyp = 2|3|4 = incident field or current source */
+		  calc_data.nthi= itmp2;
+		  calc_data.nphi= itmp3;
+		  calc_data.xpr1= tmp1;
+		  calc_data.xpr2= tmp2;
+		  calc_data.xpr3= tmp3;
+		  calc_data.xpr4= tmp4;
+		  calc_data.xpr5= tmp5;
+		  calc_data.xpr6= tmp6;
+		  vsorc.nsant=0;
+		  vsorc.nvqd=0;
+		  calc_data.thetis= tmp1;
+		  calc_data.phiss= tmp2;
+		}
+
+		SetFlag( ENABLE_EXCITN );
+		continue; /* continue card input loop */
+
+	  case FR: /* "fr" card, frequency parameters */
+		if( !CHILD )
+		{
+		  calc_data.nfrq = itmp2;
+		  if( calc_data.nfrq <= 0)
+			calc_data.nfrq = 1;
+		}
+		else calc_data.nfrq = 1;
+
+		/* Allocate normalization buffer */
+		{
+		  mreq = (size_t)calc_data.nfrq * sizeof(double);
+		  mem_realloc( (void *)&impedance_data.zreal, mreq, "in input.c" );
+		  mem_realloc( (void *)&impedance_data.zimag, mreq, "in input.c" );
+		  mem_realloc( (void *)&impedance_data.zmagn, mreq, "in input.c" );
+		  mem_realloc( (void *)&impedance_data.zphase, mreq, "in input.c" );
+		  mem_realloc( (void *)&save.freq, mreq, "in input.c" );
+		  mreq = (size_t)calc_data.nfrq * sizeof(char);
+		  mem_realloc( (void *)&save.fstep, mreq, "in input.c" );
+		}
+
+		if( CHILD ) continue;
+
+		calc_data.ifrq = itmp1;
+		calc_data.fmhz = save.fmhz = tmp1;
+
+		/* My addition, max frequency */
+		if( itmp1 == 0 )
+		  calc_data.mxfrq =
+			(double)tmp1 + (double)tmp2 * (double)(itmp2-1);
+		else if( itmp1 == 1 )
+		  calc_data.mxfrq =
+			(double)tmp1 * pow( (double)tmp2, (double)(itmp2-1) );
+
+		/* My addition, extra features in "fr" card. */
+		/* Specifies lower and upper value of frequency range */
+		if( calc_data.ifrq == 2 )
+		{
+		  calc_data.nfrq++;
+		  /* Linear frequency stepping */
+		  if( calc_data.nfrq > 1 )
+			calc_data.delfrq =
+			  (tmp2 - tmp1)/(double)(calc_data.nfrq-1);
+		  calc_data.ifrq  = 0;
+		  calc_data.mxfrq = (double)tmp2; /* Max frequency */
+		}
+		else if( calc_data.ifrq == 3 )
+		{
+		  calc_data.nfrq++;
+		  /* Multiplicative frequency stepping */
+		  if( calc_data.nfrq > 1 )
+			calc_data.delfrq =
+			  pow( (tmp2-tmp1), 1.0/(double)(calc_data.nfrq-1) );
+		  calc_data.ifrq  = 1;
+		  calc_data.mxfrq = (double)tmp2; /* Max frequency */
+		}
+		else calc_data.delfrq = tmp2;
+
+		if( calc_data.iped == 1)
+		  calc_data.zpnorm = 0.0;
+		continue; /* continue card input loop */
+
+	  case GD: /* "gd" card, ground representation */
+		fpat.epsr2 = tmp1;
+		fpat.sig2  = tmp2;
+		fpat.clt   = tmp3;
+		fpat.cht   = tmp4;
+		continue; /* continue card input loop */
+
+	  case GN: /* "gn" card, ground parameters under the antenna */
+		gnd.iperf = itmp1;
+		gnd.nradl = itmp2;
+		gnd.ksymp = 2;
+		save.epsr = tmp1;
+		save.sig  = tmp2;
+
+		/* Theta must be less than 90 if ground present */
+		double test = (double)(fpat.nth - 1) * fpat.dth + fpat.thets;
+		if( (gnd.ifar != 1) && (test > 90.0) )
+		{
+		  fprintf( stderr,
+			  "xnec2c: Read_Commands(): theta > 90 deg. with ground specified\n" );
+		  stop( _("Read_Commands(): Theta > 90 deg with ground specified\n"\
+				"Please check RP card data and correct"), ERR_OK );
+		  return( FALSE );
+		}
+
+		if( gnd.nradl > 0)
+		{
+		  if( gnd.iperf == 2)
+		  {
+			fprintf( stderr,
+				"xnec2c: Read_Commands(): radial wire g.s. approximation\n"
+				"may not be used with Sommerfeld ground option\n" );
+			stop( _("Read_Commands(): radial wire g.s. approximation\n"\
+				  "may not be used with Sommerfeld ground option"), ERR_OK );
+			return( FALSE );
+		  }
+
+		  save.scrwlt = tmp3;
+		  save.scrwrt = tmp4;
+		  continue; /* continue card input loop */
+		} /* if( gnd.nradl > 0) */
+		else
+		{
+		  save.scrwlt = 0.0;
+		  save.scrwrt = 0.0;
+		}
+
+		fpat.epsr2 = tmp3;
+		fpat.sig2  = tmp4;
+		fpat.clt   = tmp5;
+		fpat.cht   = tmp6;
+		continue; /* continue card input loop */
+
+	  case KH: /* "kh" card, matrix integration limit */
+		calc_data.rkh = tmp1;
+		continue; /* continue card input loop */
+
+	  case LD: /* "ld" card, loading parameters */
+		{
+		  int idx, nseg;
+
+		  /* Reallocate loading buffers */
+		  zload.nload++;
+		  mreq = (size_t)zload.nload * sizeof(int);
+		  mem_realloc( (void *)&calc_data.ldtyp,  mreq, "in input.c" );
+		  mem_realloc( (void *)&calc_data.ldtag,  mreq, "in input.c" );
+		  mem_realloc( (void *)&calc_data.ldtagf, mreq, "in input.c" );
+		  mem_realloc( (void *)&calc_data.ldtagt, mreq, "in input.c" );
+
+		  mreq = (size_t)zload.nload * sizeof(double);
+		  mem_realloc( (void *)&calc_data.zlr, mreq, "in input.c" );
+		  mem_realloc( (void *)&calc_data.zli, mreq, "in input.c" );
+		  mem_realloc( (void *)&calc_data.zlc, mreq, "in input.c" );
+
+		  idx = zload.nload-1;
+		  calc_data.ldtyp[idx]= itmp1;
+		  calc_data.ldtag[idx]= itmp2;
+		  if( itmp4 == 0) itmp4= itmp3;
+		  calc_data.ldtagf[idx]= itmp3;
+		  calc_data.ldtagt[idx]= itmp4;
+
+		  if( itmp4 < itmp3 )
+		  {
+			fprintf( stderr,
+				"xnec2c: Read_Commands(): data fault on loading card no %d\n"
+				"itag step1 %d is greater than itag step2 %d\n",
+				zload.nload, itmp3, itmp4 );
+			stop( _("Read_Commands(): Data fault on loading card\n"\
+				  "itag step1 is greater than itag step2"), ERR_OK );
+			return( FALSE );
+		  }
+
+		  calc_data.zlr[idx]= tmp1;
+		  calc_data.zli[idx]= tmp2;
+		  calc_data.zlc[idx]= tmp3;
+
+		  /*** My addition, for drawing structure ***/
+		  /* Work out absolute seg number of loaded segments (!) */
+		  if( itmp1 == -1 ) /* Null all loads */
+			zload.nldseg = 0;
+		  else if( itmp2 == 0 ) /* No tag num */
+		  {
+			if( itmp3 == 0 ) /* All segs loaded */
+			{
+			  nseg = data.n;
+			  mreq = (size_t)(nseg + zload.nldseg) * sizeof(int);
+			  mem_realloc( (void *)&zload.ldsegn, mreq, "in input.c" );
+			  mem_realloc( (void *)&zload.ldtype, mreq, "in input.c" );
+			  for( idx = 0; idx < nseg; idx++ )
+			  {
+				zload.ldtype[zload.nldseg]   = itmp1;
+				zload.ldsegn[zload.nldseg++] = idx+1;
+			  }
+			}
+			else /* Absolute seg num specified */
+			{
+			  nseg = itmp4 - itmp3 + 1;
+			  if( nseg <= 0 ) nseg = 1;
+			  mreq = (size_t)(nseg + zload.nldseg) * sizeof(int);
+			  mem_realloc( (void *)&zload.ldsegn, mreq, "in input.c" );
+			  mem_realloc( (void *)&zload.ldtype, mreq, "in input.c" );
+			  for( idx = 0; idx < nseg; idx++ )
+			  {
+				zload.ldtype[zload.nldseg]   = itmp1;
+				zload.ldsegn[zload.nldseg++] = itmp3+idx;
+			  }
+			}
+
+		  } /* if( itmp2 == 0 ) */
+		  else /* Tag num specified */
+		  {
+			if( (itmp3 == 0) && (itmp4 == 0) ) /* All segs of tag loaded */
+			{
+			  for( idx = 0; idx < data.n; idx++ )
+				if( data.itag[idx] == itmp2 )
+				{
+				  mreq = (size_t)(zload.nldseg + 1) * sizeof(int);
+				  mem_realloc( (void *)&zload.ldsegn, mreq, "in input.c" );
+				  mem_realloc( (void *)&zload.ldtype, mreq, "in input.c" );
+				  zload.ldtype[zload.nldseg]   = itmp1;
+				  zload.ldsegn[zload.nldseg++] = idx+1;
+				}
+			}
+			else /* A range of segs of tag loaded */
+			{
+			  nseg = itmp4 - itmp3 + 1;
+			  if( nseg <= 0 ) nseg = 1; /* Just one seg of tag (=itmp3) */
+			  mreq = (size_t)(zload.nldseg + nseg) * sizeof(int);
+			  mem_realloc( (void *)&zload.ldsegn, mreq, "in input.c" );
+			  mem_realloc( (void *)&zload.ldtype, mreq, "in input.c" );
+			  for( idx = 0; idx < nseg; idx++ )
+			  {
+				zload.ldtype[zload.nldseg] = itmp1;
+				if( (zload.ldsegn[zload.nldseg++] =
+					  isegno(itmp2, itmp3+idx)) < 0 )
+				  return( FALSE );
+			  }
+			}
+		  }
+		} /* case 8: */
+		continue; /* continue card input loop */
+
+	  case NE: case NH:  /* "ne"/"nh" cards, near field calculation parameters */
+		if( ain_num == 11 )
+		  fpat.nfeh |= NEAR_HFIELD;
+		else
+		  fpat.nfeh |= NEAR_EFIELD;
+
+		fpat.near = itmp1;
+		fpat.nrx  = itmp2;
+		fpat.nry  = itmp3;
+		fpat.nrz  = itmp4;
+		fpat.xnr  = tmp1;
+		fpat.ynr  = tmp2;
+		fpat.znr  = tmp3;
+		fpat.dxnr = tmp4;
+		fpat.dynr = tmp5;
+		fpat.dznr = tmp6;
+
+		if( (fpat.nrx > 0) &&
+			(fpat.nry > 0) &&
+			(fpat.nrz > 0) &&
+			(fpat.near != -1) )
+		{
+		  SetFlag( ENABLE_NEAREH );
+		  SetFlag( ALLOC_NEAREH_BUFF );
+		  SetFlag( ALLOC_PNTING_BUFF );
+		}
+
+		/* Because of the interactive GUI, program
+		 * execution is not triggered by any card */
+		continue; /* continue card input loop */
+
+	  case NT: case TL: /* "nt" & "tl" cards, network parameters */
+		{
+		  int idx;
+
+		  /* Re-allocate network buffers */
+		  netcx.nonet++;
+		  mreq = (size_t)netcx.nonet * sizeof(int);
+		  mem_realloc( (void *)&netcx.ntyp,  mreq, "in input.c" );
+		  mem_realloc( (void *)&netcx.iseg1, mreq, "in input.c" );
+		  mem_realloc( (void *)&netcx.iseg2, mreq, "in input.c" );
+
+		  mreq = (size_t)netcx.nonet * sizeof(double);
+		  mem_realloc( (void *)&netcx.x11r, mreq, "in input.c" );
+		  mem_realloc( (void *)&netcx.x11i, mreq, "in input.c" );
+		  mem_realloc( (void *)&netcx.x12r, mreq, "in input.c" );
+		  mem_realloc( (void *)&netcx.x12i, mreq, "in input.c" );
+		  mem_realloc( (void *)&netcx.x22r, mreq, "in input.c" );
+		  mem_realloc( (void *)&netcx.x22i, mreq, "in input.c" );
+
+		  idx = netcx.nonet-1;
+		  if( ain_num == 12 )
+			netcx.ntyp[idx] = 1;
+		  else
+		  {
+			netcx.ntyp[idx] = 2;
+			if( tmp1 == 0.0 )
+			{
+			  fprintf( stderr,
+				  "xnec2c: Read_Commands(): Transmission Line impedance = 0\n"
+				  "is not valid. Please correct NT or TL card\n" );
+			  stop( _("Read_Commands(): Transmission Line impedance = 0\n"\
+					"is not valid. Please correct NT or TL card"), ERR_OK );
+			  return( FALSE );
+			}
+		  }
+
+		  if( ((netcx.iseg1[idx] = isegno(itmp1, itmp2)) < 0) ||
+			  ((netcx.iseg2[idx] = isegno(itmp3, itmp4)) < 0) )
+		  {
+			fprintf( stderr,
+				"xnec2c: Read_Commands(): Segment number error in TL or NT card\n" );
+			stop( _("Read_Commands(): Segment number\n"\
+				"error in NT or TL card"), ERR_OK );
+			return( FALSE );
+		  }
+		  netcx.x11r[idx]  = tmp1;
+		  netcx.x11i[idx]  = tmp2;
+		  netcx.x12r[idx]  = tmp3;
+		  netcx.x12i[idx]  = tmp4;
+		  netcx.x22r[idx]  = tmp5;
+		  netcx.x22i[idx]  = tmp6;
+
+		  if( (netcx.ntyp[idx] == 1) || (tmp1 > 0.0) )
+			continue; /* continue card input loop */
+
+		  netcx.ntyp[idx] = 3;
+		  netcx.x11r[idx] = -tmp1;
+		  continue; /* continue card input loop */
+
+		} /* case 12: case 17: */
+
+	  case PQ: case PT: /* "pq" and "pt" cards ignored, no printing */
+		fprintf( stderr,
+			"xnec2c: Read_Commands(): PQ and PT cards are ignored\n"
+			"Printing to file not implemented\n" );
+		stop( _("Read_Commands(): PQ and PT cards are ignored\n"\
+			  "Printing to file not implemented"), ERR_OK );
+		continue; /* continue card input loop */
+
+	  case RP: /* "rp" card, standard observation angle parameters */
+		if( itmp1 == 1 )
+		{
+		  fprintf( stderr,
+			  "xnec2c: Read_Commands(): Surface wave option (I1=1)\n"
+			  "of RP command not implemented\n" );
+		  stop( _("Read_Commands(): Surface wave option (I1=1)\n"\
+				"of RP command not implemented"), ERR_OK );
+		  return( FALSE );
+		}
+
+		gnd.ifar = itmp1;
+		fpat.nth = itmp2;
+		fpat.nph = itmp3;
+
+		if( fpat.nth <= 0)
+		  fpat.nth=1;
+		if( fpat.nph <= 0)
+		  fpat.nph=1;
+
+		fpat.ipd  = itmp4 / 10;
+		fpat.iavp = itmp4 - fpat.ipd*10;
+		fpat.inor = fpat.ipd / 10;
+		fpat.ipd  = fpat.ipd - fpat.inor*10;
+		fpat.iax  = fpat.inor / 10;
+		fpat.inor = fpat.inor - fpat.iax*10;
+
+		if( fpat.iavp )
+		{
+		  fprintf( stderr,
+			  "xnec2c: Read_Commands(): Gain averaging (XNDA ***1 or ***2)\n"
+			  "of RP command not implemented\n" );
+		  stop( _("Read_Commands(): Gain averaging (XNDA ***1 or ***2)\n"\
+				"of RP command not supported"), ERR_OK );
+		  return( FALSE );
+		}
+		if( fpat.iax != 0) fpat.iax = 1;
+		if( fpat.ipd != 0) fpat.ipd = 1;
+		if( (fpat.nth < 2) || (fpat.nph < 1) || (gnd.ifar == 1) )
+		  ClearFlag( ENABLE_RDPAT );
+		else
+		  SetFlag( ENABLE_RDPAT );
+
+		fpat.thets = tmp1;
+		fpat.phis  = tmp2;
+		fpat.dth   = tmp3;
+		fpat.dph   = tmp4;
+		fpat.rfld  = tmp5;
+		fpat.gnor  = tmp6;
+
+		/* Theta must be less than 90 if ground present */
+		tmp1 = (double)(fpat.nth - 1) * fpat.dth + fpat.thets;
+		if( (gnd.ksymp == 2) && (gnd.ifar != 1) && (tmp1 > 90.0) )
+		{
+		  fprintf( stderr,
+			  "xnec2c: Read_Commands(): Theta > 90 deg. with ground specified\n"
+			  "Please check RP card data and correct\n" );
+		  stop( _("Read_Commands(): Theta > 90 deg. with ground specified\n"\
+				"Please check RP card data and correct"), ERR_OK );
+		  return( FALSE );
+		}
+
+		/* Because of the interactive GUI, program
+		 * execution is not triggered by any card */
+		continue; /* continue card input loop */
+
+	  case SY: /* "sy" TODO Compatibility with 4nec2.
+				  Too difficult, may never happen :-( */
+		continue;
+
+	  case XQ: /* "xq" execute card */
+		/* Because of the interactive GUI, program
+		 * execution is not triggered by any card.
+		 * XQ now is the same as EN because of above */
+		if( itmp1 == 0 )
+		  break; /* No rad pat, stop reading commands */
+
+		/* Read radiation pattern parameters */
+		gnd.ifar  = 0;
+		fpat.rfld = 0.0;
+		fpat.ipd  = 0;
+		fpat.iavp = 0;
+		fpat.inor = 0;
+		fpat.iax  = 0;
+		fpat.nth  = 91;
+		fpat.nph  = 1;
+		fpat.thets= 0.0;
+		fpat.phis = 0.0;
+		fpat.dth  = 1.0;
+		fpat.dph  = 0.0;
+
+		if( itmp1 == 2)
+		  fpat.phis = 90.0;
+		else if( itmp1 == 3)
+		{
+		  fpat.nph = 2;
+		  fpat.dph = 90.0;
+		}
+
+		SetFlag( ENABLE_RDPAT );
+
+		/* Because of the interactive GUI, program
+		 * execution is not triggered by any card.
+		 * XQ now is the same as EN because of above */
+		break;
+
+	  default:
+		fprintf( stderr,
+			"xnec2c: Read_Commands(): faulty data "
+			"card label after geometry section\n" );
+		stop( _("Read_Commands(): Faulty data card\n"\
+			  "label after geometry section"), ERR_OK );
+		return( FALSE );
+	} /* switch( ain_num ) */
+
+	/* Allocate radiation pattern buffers */
+	if( isFlagSet(ENABLE_RDPAT) )
+	  Alloc_Rdpattern_Buffers( calc_data.nfrq+1, fpat.nth, fpat.nph );
+
+	return( TRUE );
+  } /* while( TRUE ) */
+
+} /* Read_Commands() */
+
+/*-----------------------------------------------------------------------*/
+
+  gboolean
+readmn( char *mn, int *i1, int *i2, int *i3, int *i4,
+	double *f1, double *f2, double *f3,
+	double *f4, double *f5, double *f6 )
+{
+  char
+	*line_buf = NULL,
+	*startptr = NULL,
+	*endptr   = NULL;
+  int len, i, idx;
+  int nint = 4, nflt = 6;
+  int iarr[4] = { 0, 0, 0, 0 };
+  double rarr[6] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+  int eof; /* EOF error flag */
+
+
+  /* Clear return values */
+  *i1 = *i2 = *i3 = *i4 = 0;
+  *f1 = *f2 = *f3 = *f4 = *f5 = *f6 = 0.0;
+
+  /* read a line from input file */
+  mem_alloc((void *)&line_buf, LINE_LEN, "in readgm()");
+  if( line_buf == NULL ) return( FALSE );
+  startptr = line_buf;
+  eof = Load_Line( line_buf, input_fp );
+  if( eof == EOF )
+  {
+	Strlcpy( mn, "EN", strlen("EN")+1 );
+	fprintf( stderr,
+		"xnec2c: readmn(): command data card error\n"
+		"Unexpected EOF while reading input file - appending EN card\n" );
+	stop( _("readmn(): Command data card error\n"\
+		  "Unexpected EOF while reading input file\n"\
+			"Uppending a default EN card"), ERR_OK );
+	free_ptr( (void *)&startptr );
+	return( FALSE );
+  }
+
+  /* get line length */
+  len = (int)strlen( line_buf );
+
+  /* abort if card's mnemonic too short or missing */
+  if( len < 2 )
+  {
+	Strlcpy( mn, "XX", strlen("XX")+1 );
+	fprintf( stderr,
+		"xnec2c: readmn(): command data card error\n"
+		"card's mnemonic code too short or missing\n" );
+	stop( _("readmn(): Command data card error\n"\
+		  "Mnemonic code too short or missing"), ERR_OK );
+	free_ptr( (void *)&startptr );
+	return( FALSE );
+  }
+
+  /* extract card's mnemonic code */
+  Strlcpy( mn, line_buf, 3 );
+
+  /* Return if only mnemonic on card */
+  if( len == 2 )
+  {
+	free_ptr( (void *)&startptr );
+	return( TRUE );
+  }
+
+  /* Compatibility with NEC4, comments between data cards */
+  if( strncmp(mn, "CM", 2) == 0 )
+  {
+	free_ptr( (void *)&startptr );
+	return( TRUE );
+  }
+
+  /* check line for spurious characters */
+  for( idx = 2; idx < len; idx++ )
+  {
+	if( ((line_buf[idx] >= '0') &&
+		 (line_buf[idx] <= '9')) ||
+		 (line_buf[idx] == ' ')  ||
+		 (line_buf[idx] == '.')  ||
+		 (line_buf[idx] == ',')  ||
+		 (line_buf[idx] == '+')  ||
+		 (line_buf[idx] == '-')  ||
+		 (line_buf[idx] == 'E')  ||
+		 (line_buf[idx] == 'e')  ||
+		 (line_buf[idx] == '\t') ||
+		 (line_buf[idx] == '\0') )
+	  continue;
+	else
+	  break;
+  }
+  if( idx < len )
+  {
+	fprintf( stderr,
+		"xnec2c: readmn(): command data card \"%s\" error\n"
+		"Spurious character '%c' at column %d\n",
+		mn, line_buf[idx], idx+1 );
+	stop( _("readmn(): Command data card error\n"\
+		  "Spurious character in command card"), ERR_OK );
+	free_ptr( (void *)&startptr );
+	return( FALSE );
+  }
+
+  /* read integers from line */
+  line_buf += 2;
+  for( i = 0; i < nint; i++ )
+  {
+	/* read an integer from line */
+	iarr[i] = (int)strtol( line_buf, &endptr, 10 );
+	if( *endptr == '\0' ) break;
+	line_buf = endptr + 1;
+  } /* for( i = 0; i < nint; i++ ) */
+
+  /* Return if no floats are specified in the card */
+  if( *endptr == '\0' )
+  {
+	*i1= iarr[0];
+	*i2= iarr[1];
+	*i3= iarr[2];
+	*i4= iarr[3];
+	*f1= rarr[0];
+	*f2= rarr[1];
+	*f3= rarr[2];
+	*f4= rarr[3];
+	*f5= rarr[4];
+	*f6= rarr[5];
+	free_ptr( (void *)&startptr );
+	return( TRUE );
+  }
+
+  /* read doubles from line */
+  for( i = 0; i < nflt; i++ )
+  {
+	/* read a double from line */
+	rarr[i] = Strtod( line_buf, &endptr );
+	if( *endptr == '\0' ) break;
+	line_buf = endptr + 1;
+  } /* for( i = 0; i < nflt; i++ ) */
+
+  /* Return values on normal exit */
+  *i1= iarr[0];
+  *i2= iarr[1];
+  *i3= iarr[2];
+  *i4= iarr[3];
+  *f1= rarr[0];
+  *f2= rarr[1];
+  *f3= rarr[2];
+  *f4= rarr[3];
+  *f5= rarr[4];
+  *f6= rarr[5];
+
+  free_ptr( (void *)&startptr );
+  return( TRUE );
+} /* readmn() */
+
+/*-----------------------------------------------------------------------*/
+
+  gboolean
+readgm( char *gm, int *i1, int *i2, double *x1,
+	double *y1, double *z1, double *x2,
+	double *y2, double *z2, double *rad )
+{
+  char
+	*line_buf = NULL,
+	*startptr = NULL,
+	*endptr   = NULL;
+  int len, i, idx;
+  int nint = 2, nflt = 7;
+  int iarr[2] = { 0, 0 };
+  double rarr[7] = { 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 };
+  int eof; /* EOF error flag */
+
+
+  /* Clear return values */
+  *i1 = *i2 = 0;
+  *x1 = *y1 = *z1 = *x2 = *y2 = *z2 = *rad = 0.0;
+
+  /* read a line from input file */
+  mem_alloc((void *)&line_buf, LINE_LEN, "in readgm()");
+  if( line_buf == NULL ) return( FALSE );
+  startptr = line_buf;
+  eof = Load_Line( line_buf, input_fp );
+  if( eof == EOF )
+  {
+	Strlcpy( gm, "GE", strlen("GE")+1 );
+	fprintf( stderr,
+		"xnec2c: readgm(): geometry data card error\n"
+		"Unexpected EOF while reading input file - appending GE card\n" );
+	stop( _("readgm(): Geometry data card error\n"\
+		  "Unexpected EOF while reading input file\n"\
+		  "Uppending a default GE card"), ERR_OK );
+	free_ptr( (void *)&startptr );
+	return( FALSE );
+  }
+
+  /* get line length */
+  len = (int)strlen( line_buf );
+
+  /* abort if card's mnemonic too short or missing */
+  if( len < 2 )
+  {
+	Strlcpy( gm, "XX", strlen("XX")+1 );
+	fprintf( stderr,
+		"xnec2c: readgm(): geometry data card error\n"
+		"card's mnemonic code too short or missing\n" );
+	stop( _("readgm(): Geometry data card error\n"\
+		  "Card's mnemonic code too short or missing"), ERR_OK );
+	free_ptr( (void *)&startptr );
+	return( FALSE );
+  }
+
+  /* extract card's mnemonic code */
+  Strlcpy( gm, line_buf, 3 );
+
+  /* Return if only mnemonic on card */
+  if( len == 2 )
+  {
+	free_ptr( (void *)&startptr );
+	return( TRUE );
+  }
+
+  /* Compatibility with NEC4,
+   * comments between data cards */
+  if( strcmp(gm, "CM") == 0 )
+  {
+	free_ptr( (void *)&startptr );
+	return( TRUE );
+  }
+
+  /* check line for spurious characters */
+  for( idx = 2; idx < len; idx++ )
+  {
+	if( ((line_buf[idx] >= '0') &&
+		 (line_buf[idx] <= '9')) ||
+		 (line_buf[idx] == ' ')  ||
+		 (line_buf[idx] == '.')  ||
+		 (line_buf[idx] == ',')  ||
+		 (line_buf[idx] == '+')  ||
+		 (line_buf[idx] == '-')  ||
+		 (line_buf[idx] == 'E')  ||
+		 (line_buf[idx] == 'e')  ||
+		 (line_buf[idx] == '\t') ||
+		 (line_buf[idx] == '\0') )
+	  continue;
+	else
+	  break;
+  }
+  if( idx < len )
+  {
+	fprintf( stderr,
+		"xnec2c: readgm(): geometry data card \"%s\" error\n"
+		"Spurious character '%c' at column %d\n",
+		gm, line_buf[idx], idx+1 );
+	stop( _("readmn(): Geometry data card error\n"\
+		  "Spurious character in command card"), ERR_OK );
+	free_ptr( (void *)&startptr );
+	return( FALSE );
+  }
+
+  /* read integers from line */
+  line_buf += 2;
+  for( i = 0; i < nint; i++ )
+  {
+	/* read an integer from line, reject spurious chars */
+	iarr[i] = (int)strtol( line_buf, &endptr, 10 );
+	if( *endptr == '\0' ) break;
+	line_buf = endptr + 1;
+  } /* for( i = 0; i < nint; i++ ) */
+
+  /* Return if no floats are specified in the card */
+  if( *endptr == '\0' )
+  {
+	*i1 = iarr[0];
+	*i2 = iarr[1];
+	*x1 = rarr[0];
+	*y1 = rarr[1];
+	*z1 = rarr[2];
+	*x2 = rarr[3];
+	*y2 = rarr[4];
+	*z2 = rarr[5];
+	*rad= rarr[6];
+	free_ptr( (void *)&startptr );
+	return( TRUE );
+  }
+
+  /* read doubles from line */
+  for( i = 0; i < nflt; i++ )
+  {
+	/* read a double from line */
+	rarr[i] = Strtod( line_buf, &endptr );
+	if( *endptr == '\0' ) break;
+	line_buf = endptr + 1;
+  } /* for( i = 0; i < nflt; i++ ) */
+
+  /* Return values on normal exit */
+  *i1  = iarr[0];
+  *i2  = iarr[1];
+  *x1  = rarr[0];
+  *y1  = rarr[1];
+  *z1  = rarr[2];
+  *x2  = rarr[3];
+  *y2  = rarr[4];
+  *z2  = rarr[5];
+  *rad = rarr[6];
+
+  free_ptr( (void *)&startptr );
+  return( TRUE );
+} /* readgm() */
+
+/*-----------------------------------------------------------------------*/
+
+/* datagn is the main routine for input of geometry data. */
+  gboolean
+datagn( void )
+{
+  char gm[3];
+
+  /* input card mnemonic list */
+  char *atst[] =
+  {
+	"GW", "GX", "GR", "GS", "GE","GM", "SP",\
+	"SM", "GA", "SC", "GH", "GF", "CT"
+  };
+
+  int nwire, isct, itg, iy=0, iz;
+  size_t mreq;
+  int ix, i, ns, gm_num; /* geometry card id as a number */
+  double rad, xs1, xs2, ys1, ys2, zs1, zs2;
+  double x3=0, y3=0, z3=0, x4=0, y4=0, z4=0;
+  double xw1, xw2, yw1, yw2, zw1, zw2;
+  double dummy;
+
+  data.ipsym=0;
+  nwire=0;
+  data.n=0;
+  data.np=0;
+  data.m=0;
+  data.mp=0;
+  isct=0;
+  structure_proj_params.r_max = 0.0;
+
+  /* read geometry data card and branch to */
+  /* section for operation requested */
+  do
+  {
+	if( !readgm(gm, &itg, &ns, &xw1, &yw1, &zw1, &xw2, &yw2, &zw2, &rad) )
+	  return( FALSE );
+
+	/* identify card id mnemonic */
+	for( gm_num = 0; gm_num < NUM_GEOMN; gm_num++ )
+	  if( strncmp( gm, atst[gm_num], 2) == 0 )
+		break;
+
+	if( gm_num != 9 ) isct=0;
+
+	switch( gm_num )
+	{
+	  case GW: /* "gw" card, generate segment data for straight wire. */
+		if( Tag_Seg_Error(itg, ns) ) return( FALSE );
+		nwire++;
+
+		if( rad != 0.0)
+		{
+		  xs1=1.0;
+		  ys1=1.0;
+		}
+		else
+		{
+		  if( !readgm(gm, &ix, &iy, &xs1, &ys1, &zs1,
+			  &dummy, &dummy, &dummy, &dummy) )
+			  return( FALSE );
+
+		  if( strcmp(gm, "GC" ) != 0 )
+		  {
+			fprintf( stderr,
+				"xnec2c: datagn(): geometry data card error "
+				"no GC card for tapered wire\n" );
+			stop( _("datagn(): Geometry data error\n"\
+				  "No GC card for tapered wire"), ERR_OK );
+			return( FALSE );
+		  }
+
+		  if( (ys1 == 0.0) || (zs1 == 0.0) )
+		  {
+			fprintf( stderr, "xnec2c: datagn(): geometry GC data card error\n" );
+			stop( _("datagn(): Geometry GC data card error"), ERR_OK );
+			return( FALSE );
+		  }
+
+		  rad= ys1;
+		  ys1= pow( (zs1/ys1), (1.0/(ns-1.0)) );
+		}
+
+		wire( xw1, yw1, zw1, xw2, yw2, zw2, rad, xs1, ys1, ns, itg);
+		continue;
+
+		/* reflect structure along x,y, or z */
+		/* axes or rotate to form cylinder.  */
+	  case GX: /* _("gx") card */
+		if( (ns < 0) || (itg < 0) )
+		{
+		  fprintf( stderr, "xnec2c: datagn(): geometry GX data card error\n" );
+		  stop( _("datagn(): Geometry GX data card error"), ERR_OK );
+		  return( FALSE );
+		}
+
+		iy= ns/10;
+		iz= ns- iy*10;
+		ix= iy/10;
+		iy= iy- ix*10;
+
+		if( ix != 0)
+		  ix=1;
+		if( iy != 0)
+		  iy=1;
+		if( iz != 0)
+		  iz=1;
+
+		if( !reflc(ix, iy, iz, itg, ns) )
+		  return( FALSE );
+		continue;
+
+	  case GR: /* "gr" card */
+		if( (ns < 0) || (itg < 0) )
+		{
+		  fprintf( stderr, "xnec2c: datagn(): geometry GR data card error\n" );
+		  stop( _("datagn(): Geometry GR data card error"), ERR_OK );
+		  return( FALSE );
+		}
+
+		ix=-1;
+		iz = 0;
+		if( !reflc(ix, iy, iz, itg, ns) )
+		  return( FALSE );
+		continue;
+
+	  case GS: /* "gs" card, scale structure dimensions by factor xw1 */
+
+		if( (itg > 0) && (ns > 0) && (ns >= itg) )
+		  for( i = 0; i < data.n; i++ )
+		  {
+			if( (data.itag[i] >= itg) && (data.itag[i] <= ns) )
+			{
+			  data.x1[i]= data.x1[i]* xw1;
+			  data.y1[i]= data.y1[i]* xw1;
+			  data.z1[i]= data.z1[i]* xw1;
+			  data.x2[i]= data.x2[i]* xw1;
+			  data.y2[i]= data.y2[i]* xw1;
+			  data.z2[i]= data.z2[i]* xw1;
+			  data.bi[i]= data.bi[i]* xw1;
+			}
+		  }
+		else for( i = 0; i < data.n; i++ )
+		{
+		  data.x1[i]= data.x1[i]* xw1;
+		  data.y1[i]= data.y1[i]* xw1;
+		  data.z1[i]= data.z1[i]* xw1;
+		  data.x2[i]= data.x2[i]* xw1;
+		  data.y2[i]= data.y2[i]* xw1;
+		  data.z2[i]= data.z2[i]* xw1;
+		  data.bi[i]= data.bi[i]* xw1;
+		}
+
+		yw1= xw1* xw1;
+		for( i = 0; i < data.m; i++ )
+		{
+		  data.px[i] = data.px[i]* xw1;
+		  data.py[i] = data.py[i]* xw1;
+		  data.pz[i] = data.pz[i]* xw1;
+		  data.pbi[i]= data.pbi[i]* yw1;
+		}
+		continue;
+
+	  case GE: /* "ge" card, terminate structure geometry input. */
+		/* My addition, for drawing */
+		if( ((data.n > 0) || (data.m > 0)) && !CHILD )
+		  Init_Struct_Drawing();
+		else if( (data.n == 0) && (data.m == 0) )
+		{
+		  stop( _("No geometry data cards"), ERR_OK );
+		  return( FALSE );
+		}
+
+		if( !conect(itg) ) return( FALSE );
+
+		if( data.n != 0)
+		{
+		  /* Allocate wire buffers */
+		  mreq = (size_t)data.n * sizeof(double);
+		  mem_realloc( (void *)&data.si,   mreq, "in input.c" );
+		  mem_realloc( (void *)&data.sab,  mreq, "in input.c" );
+		  mem_realloc( (void *)&data.cab,  mreq, "in input.c" );
+		  mem_realloc( (void *)&data.salp, mreq, "in input.c" );
+		  mem_realloc( (void *)&data.x, mreq, "in input.c" );
+		  mem_realloc( (void *)&data.y, mreq, "in input.c" );
+		  mem_realloc( (void *)&data.z, mreq, "in input.c" );
+
+		  for( i = 0; i < data.n; i++ )
+		  {
+			xw1= data.x2[i]- data.x1[i];
+			yw1= data.y2[i]- data.y1[i];
+			zw1= data.z2[i]- data.z1[i];
+			data.x[i]=( data.x1[i]+ data.x2[i])/2.0;
+			data.y[i]=( data.y1[i]+ data.y2[i])/2.0;
+			data.z[i]=( data.z1[i]+ data.z2[i])/2.0;
+			xw2= xw1* xw1+ yw1* yw1+ zw1* zw1;
+			yw2= sqrt( xw2);
+			yw2=( xw2/ yw2+ yw2)*.5;
+			data.si[i]= yw2;
+			data.cab[i]= xw1/ yw2;
+			data.sab[i]= yw1/ yw2;
+			xw2= zw1/ yw2;
+
+			if( xw2 > 1.0)
+			  xw2=1.0;
+			if( xw2 < -1.0)
+			  xw2=-1.0;
+
+			data.salp[i]= xw2;
+			xw2= asin( xw2)* TD;
+			yw2= atan2( yw1, xw1)* TD;
+
+			if( (data.si[i] <= 1.0e-20) || (data.bi[i] <= 0.0) )
+			{
+			  fprintf( stderr, "xnec2c: datagn(): segment data error\n" );
+			  stop( _("datagn(): Segment data error"), ERR_OK );
+			  return( FALSE );
+			}
+
+		  } /* for( i = 0; i < data.n; i++ ) */
+
+		} /* if( data.n != 0) */
+
+		if( data.m != 0)
+		{
+		  for( i = 0; i < data.m; i++ )
+		  {
+			xw1=( data.t1y[i]* data.t2z[i] -
+				data.t1z[i]* data.t2y[i])* data.psalp[i];
+			yw1=( data.t1z[i]* data.t2x[i] -
+				data.t1x[i]* data.t2z[i])* data.psalp[i];
+			zw1=( data.t1x[i]* data.t2y[i] -
+				data.t1y[i]* data.t2x[i])* data.psalp[i];
+		  } /* for( i = 0; i < data.m; i++ ) */
+
+		} /* if( data.m != 0) */
+
+		data.npm  = data.n+data.m;
+		data.np2m = data.n+2*data.m;
+		data.np3m = data.n+3*data.m;
+
+		return( TRUE );
+
+		/* "gm" card, move structure or reproduce */
+		/* original structure in new positions.   */
+	  case GM:
+		{
+		  int tgf = (int)(rad + 0.5);
+		  if( (tgf < 0) || (ns < 0) || (rad < 0.0) )
+		  {
+			fprintf( stderr, "xnec2c: datagn(): move GM data card error\n" );
+			stop( _("datagn(): Move GM data card error"), ERR_OK );
+			return( FALSE );
+		  }
+		  xw1= xw1* TA;
+		  yw1= yw1* TA;
+		  zw1= zw1* TA;
+		  if( !move(xw1, yw1, zw1, xw2, yw2, zw2, (int)(rad+.5), ns, itg) )
+			return( FALSE );
+		}
+		continue;
+
+	  case SP: /* "sp" card, generate single new patch */
+		ns++;
+
+		if( itg != 0)
+		{
+		  fprintf( stderr, "xnec2c: datagn(): patch data card error\n" );
+		  stop( _("datagn(): Patch data card error"), ERR_OK );
+		  return( FALSE );
+		}
+
+		if( (ns == 2) || (ns == 4) )
+		  isct=1;
+
+		if( ns > 1)
+		{
+		  if( !readgm(gm, &ix, &iy, &x3, &y3,
+				&z3, &x4, &y4, &z4, &dummy) )
+			return( FALSE );
+
+		  if( (ns == 2) || (itg > 0) )
+		  {
+			x4= xw1+ x3- xw2;
+			y4= yw1+ y3- yw2;
+			z4= zw1+ z3- zw2;
+		  }
+
+		  if( strcmp(gm, "SC") != 0 )
+		  {
+			fprintf( stderr, "xnec2c: datagn(): patch data error\n" );
+			stop( _("datagn(): Patch data error"), ERR_OK );
+			return( FALSE );
+		  }
+
+		} /* if( ns > 1) */
+		else
+		{
+		  xw2= xw2* TA;
+		  yw2= yw2* TA;
+		}
+
+		if( !patch( itg, ns, xw1, yw1, zw1, xw2,
+			yw2, zw2, x3, y3, z3, x4, y4, z4) )
+			return( FALSE );
+		continue;
+
+	  case SM: /* "sm" card, generate multiple-patch surface */
+		if( (itg < 1) || (ns < 1) )
+		{
+		  fprintf( stderr, "datagn(): xnec2c: patch card data error\n" );
+		  stop( _("datagn(): Patch data card error"), ERR_OK );
+		  return( FALSE );
+		}
+
+		if( !readgm(gm, &ix, &iy, &x3, &y3,
+			  &z3, &x4, &y4, &z4, &dummy) )
+		  return( FALSE );
+
+		if( (ns == 2) || (itg > 0) )
+		{
+		  x4= xw1+ x3- xw2;
+		  y4= yw1+ y3- yw2;
+		  z4= zw1+ z3- zw2;
+		}
+
+		if( strcmp(gm, "SC" ) != 0 )
+		{
+		  fprintf( stderr, "xnec2c: datagn(): patch card data error\n" );
+		  stop( _("datagn(): Patch data card error"), ERR_OK );
+		  return( FALSE );
+		}
+
+		if( !patch(itg, ns, xw1, yw1, zw1, xw2,
+			yw2, zw2, x3, y3, z3, x4, y4, z4) )
+		  return( FALSE );
+		continue;
+
+	  case GA: /* "ga" card, generate segment data for wire arc */
+		if( Tag_Seg_Error(itg, ns) ) return( FALSE );
+		nwire++;
+		if( !arc(itg, ns, xw1, yw1, zw1, xw2) ) return( FALSE );
+		continue;
+
+	  case SC: /* "sc" card */
+		if( isct == 0)
+		{
+		  fprintf( stderr, "xnec2c: datagn(): patch data card error\n" );
+		  stop( _("datagn(): Patch data card error"), ERR_OK );
+		  return( FALSE );
+		}
+
+		ns++;
+
+		if( (itg != 0) || ((ns != 2) && (ns != 4)) )
+		{
+		  fprintf( stderr, "xnec2c: datagn(): patch data card error\n" );
+		  stop( _("datagn(): Patch data card error"), ERR_OK );
+		  return( FALSE );
+		}
+
+		xs1= x4;
+		ys1= y4;
+		zs1= z4;
+		xs2= x3;
+		ys2= y3;
+		zs2= z3;
+		x3= xw1;
+		y3= yw1;
+		z3= zw1;
+
+		if( ns == 4)
+		{
+		  x4= xw2;
+		  y4= yw2;
+		  z4= zw2;
+		}
+
+		xw1= xs1;
+		yw1= ys1;
+		zw1= zs1;
+		xw2= xs2;
+		yw2= ys2;
+		zw2= zs2;
+
+		if( ns != 4)
+		{
+		  x4= xw1+ x3- xw2;
+		  y4= yw1+ y3- yw2;
+		  z4= zw1+ z3- zw2;
+		}
+
+		if( !patch(itg, ns, xw1, yw1, zw1, xw2,
+			yw2, zw2, x3, y3, z3, x4, y4, z4) )
+		  return( FALSE );
+		continue;
+
+	  case GH: /* "gh" card, generate helix */
+		if( Tag_Seg_Error(itg, ns) ) return( FALSE );
+		nwire++;
+		helix( xw1, yw1, zw1, xw2, yw2, zw2, rad, ns, itg);
+		continue;
+
+	  case GF: /* "gf" card, not supported */
+		fprintf( stderr, "xnec2c: datagn(): \"GF\" card (NGF solution) "
+				"is not supported\n" );
+		stop( _("datagn(): \"GF\" card (NGF solution)\n"\
+			  "is not supported"), ERR_OK );
+		return( FALSE );
+
+	  case CT: /* Ignore in-data comments (NEC4 compatibility) */
+		fprintf( stderr, "xnec2c: datagn(): ignoring CM card in geometry\n" );
+		stop( _("datagn(): Ignoring CM card in geometry"), ERR_OK );
+		continue;
+
+	  default: /* error message */
+		fprintf( stderr, "xnec2c: datagn(): geometry data card error\n" );
+		fprintf( stderr,
+			"%2s %3d %5d %10.5f %10.5f %10.5f"
+			" %10.5f %10.5f %10.5f %10.5f\n",
+			gm, itg, ns, xw1, yw1, zw1, xw2, yw2, zw2, rad );
+
+		stop( _("datagn(): Geometry data card error"), ERR_OK );
+		return( FALSE );
+
+	} /* switch( gm_num ) */
+
+  } /* do */
+  while( TRUE );
+
+} /* datagn() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Tag_Seg_Error()
+ *
+ * Checks tag and segments number are valid (>1)
+ */
+  gboolean
+Tag_Seg_Error( int tag, int segs )
+{
+  gboolean retv = FALSE;
+
+  if( tag <= 0 )
+  {
+	fprintf( stderr,
+		"xnec2c: Tag_Seg_Error(): geometry data card error -"
+		"tag number is less than 1\n" );
+	stop( _("Tag_Seg_Error(): Geometry data error\n"\
+		  "Tag number is less than 1"), ERR_OK );
+	retv = TRUE;
+  }
+
+  if( segs <= 0 )
+  {
+	fprintf( stderr,
+		"xnec2c: Tag_Seg_Error(): geometry data card error - "
+		"number of segments is less than 1\n" );
+	stop( _("Tag_Seg_Error(): Geometry data error\n"\
+		  "Number of segments is less than 1"), ERR_OK );
+	retv = TRUE;
+  }
+
+  return( retv );
+}
+
+/*-----------------------------------------------------------------------*/
+
diff --git a/src/input.h b/src/input.h
new file mode 100644
index 0000000..0c9d250
--- /dev/null
+++ b/src/input.h
@@ -0,0 +1,70 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	INPUT_H
+#define	INPUT_H		1
+
+#include "common.h"
+#include "support.h"
+
+/* Command Mnemonics */
+enum CMDN_MNM
+{
+  CM = 0,
+  CP,
+  EK,
+  EN,
+  EX,
+  FR,
+  GD,
+  GN,
+  KH,
+  LD,
+  NE,
+  NH,
+  NT,
+  PQ,
+  PT,
+  RP,
+  SY,
+  TL,
+  XQ,
+  NUM_CMNDS
+};
+
+/* Geometry Mnemonics */
+enum GEOM_MNM
+{
+  GW = 0,
+  GX,
+  GR,
+  GS,
+  GE,
+  GM,
+  SP,
+  SM,
+  GA,
+  SC,
+  GH,
+  GF,
+  CT,
+  NUM_GEOMN
+};
+
+#endif
+
diff --git a/src/interface.c b/src/interface.c
new file mode 100644
index 0000000..d98a064
--- /dev/null
+++ b/src/interface.c
@@ -0,0 +1,10157 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <gdk/gdkkeysyms.h>
+#include <gtk/gtk.h>
+
+#include "callbacks.h"
+#include "interface.h"
+#include "support.h"
+
+#define GLADE_HOOKUP_OBJECT(component,widget,name) \
+  g_object_set_data_full (G_OBJECT (component), name, \
+    gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref)
+
+#define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \
+  g_object_set_data (G_OBJECT (component), name, widget)
+
+GtkWidget*
+create_main_window (void)
+{
+  GtkWidget *main_window;
+  GtkWidget *vbox1;
+  GtkWidget *hbox8;
+  GtkWidget *menubar1;
+  GtkWidget *menuitem1;
+  GtkWidget *menuitem1_menu;
+  GtkWidget *main_new;
+  GtkWidget *main_open_input;
+  GtkWidget *nec2_edit;
+  GtkWidget *main_save;
+  GtkWidget *main_save_as;
+  GtkWidget *struct_save_as_gnuplot;
+  GtkWidget *image102;
+  GtkWidget *separator1;
+  GtkWidget *main_quit;
+  GtkWidget *main_view_menuitem;
+  GtkWidget *main_view_menuitem_menu;
+  GtkWidget *main_rdpattern;
+  GtkWidget *main_freqplots;
+  GtkWidget *main_pol_menu;
+  GtkWidget *main_pol_menu_menu;
+  GSList *rdpattern_total_group = NULL;
+  GtkWidget *rdpattern_total;
+  GtkWidget *rdpattern_horizontal;
+  GtkWidget *rdpattern_vertical;
+  GtkWidget *rdpattern_right_hand;
+  GtkWidget *rdpattern_left_hand;
+  GtkWidget *common_projection;
+  GtkWidget *common_freq;
+  GtkWidget *menuitem4;
+  GtkWidget *menuitem4_menu;
+  GtkWidget *about;
+  GtkWidget *image103;
+  GtkWidget *main_hbox1;
+  GtkWidget *vseparator2;
+  GtkWidget *main_currents_togglebutton;
+  GtkWidget *main_charges_togglebutton;
+  GtkWidget *vseparator7;
+  GtkWidget *label214;
+  GtkWidget *main_loop_start;
+  GtkWidget *alignment49;
+  GtkWidget *hbox47;
+  GtkWidget *image52;
+  GtkWidget *label213;
+  GtkWidget *main_loop_pause;
+  GtkWidget *image54;
+  GtkWidget *main_loop_reset;
+  GtkWidget *image53;
+  GtkWidget *label244;
+  GtkWidget *structure_fstep_entry;
+  GtkWidget *hseparator1;
+  GtkWidget *main_hbox2;
+  GtkWidget *main_colorcode_zerolabel;
+  GtkWidget *main_colorcode_drawingarea;
+  GtkWidget *main_colorcode_maxlabel;
+  GtkWidget *main_gain_entry;
+  GtkWidget *label10;
+  GtkObject *main_freq_spinbutton_adj;
+  GtkWidget *main_freq_spinbutton;
+  GtkWidget *main_freq_label;
+  GtkWidget *main_freq_checkbutton;
+  GtkWidget *main_new_freq_button;
+  GtkWidget *image46;
+  GtkWidget *hseparator11;
+  GtkWidget *frame1;
+  GtkWidget *alignment1;
+  GtkWidget *structure_drawingarea;
+  GtkWidget *main_hbox3;
+  GtkWidget *struct_label;
+  GtkWidget *main_x_axis;
+  GtkWidget *main_y_axis;
+  GtkWidget *main_z_axis;
+  GtkWidget *main_default_view;
+  GtkWidget *image32;
+  GtkWidget *vseparator1;
+  GtkWidget *image50;
+  GtkObject *main_rotate_spinbutton_adj;
+  GtkWidget *main_rotate_spinbutton;
+  GtkWidget *image51;
+  GtkObject *main_incline_spinbutton_adj;
+  GtkWidget *main_incline_spinbutton;
+  GtkWidget *label245;
+  GtkObject *structure_zoom_spinbutton_adj;
+  GtkWidget *structure_zoom_spinbutton;
+  GtkWidget *structure_plus_button;
+  GtkWidget *image94;
+  GtkWidget *structure_minus_button;
+  GtkWidget *image95;
+  GtkWidget *structure_one_button;
+  GtkWidget *image96;
+  GtkAccelGroup *accel_group;
+  GtkTooltips *tooltips;
+
+  tooltips = gtk_tooltips_new ();
+
+  accel_group = gtk_accel_group_new ();
+
+  main_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (main_window), 4);
+  gtk_window_set_title (GTK_WINDOW (main_window), _("Xnec2c: Structure Display"));
+  gtk_window_set_gravity (GTK_WINDOW (main_window), GDK_GRAVITY_EAST);
+
+  vbox1 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox1);
+  gtk_container_add (GTK_CONTAINER (main_window), vbox1);
+
+  hbox8 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox8);
+  gtk_box_pack_start (GTK_BOX (vbox1), hbox8, FALSE, FALSE, 0);
+
+  menubar1 = gtk_menu_bar_new ();
+  gtk_widget_show (menubar1);
+  gtk_box_pack_start (GTK_BOX (hbox8), menubar1, FALSE, FALSE, 0);
+
+  menuitem1 = gtk_menu_item_new_with_mnemonic (_("_File"));
+  gtk_widget_show (menuitem1);
+  gtk_container_add (GTK_CONTAINER (menubar1), menuitem1);
+
+  menuitem1_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem1), menuitem1_menu);
+
+  main_new = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group);
+  gtk_widget_show (main_new);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), main_new);
+
+  main_open_input = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group);
+  gtk_widget_show (main_open_input);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), main_open_input);
+
+  nec2_edit = gtk_image_menu_item_new_from_stock ("gtk-edit", accel_group);
+  gtk_widget_show (nec2_edit);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), nec2_edit);
+  gtk_tooltips_set_tip (tooltips, nec2_edit, _("Edit NEC2 Input File"), NULL);
+
+  main_save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
+  gtk_widget_show (main_save);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), main_save);
+
+  main_save_as = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group);
+  gtk_widget_show (main_save_as);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), main_save_as);
+
+  struct_save_as_gnuplot = gtk_image_menu_item_new_with_mnemonic (_("Save As gnuplot"));
+  gtk_widget_show (struct_save_as_gnuplot);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), struct_save_as_gnuplot);
+
+  image102 = gtk_image_new_from_stock ("gtk-save-as", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image102);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (struct_save_as_gnuplot), image102);
+
+  separator1 = gtk_separator_menu_item_new ();
+  gtk_widget_show (separator1);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), separator1);
+  gtk_widget_set_sensitive (separator1, FALSE);
+
+  main_quit = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
+  gtk_widget_show (main_quit);
+  gtk_container_add (GTK_CONTAINER (menuitem1_menu), main_quit);
+
+  main_view_menuitem = gtk_menu_item_new_with_mnemonic (_("_View"));
+  gtk_widget_show (main_view_menuitem);
+  gtk_container_add (GTK_CONTAINER (menubar1), main_view_menuitem);
+
+  main_view_menuitem_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (main_view_menuitem), main_view_menuitem_menu);
+
+  main_rdpattern = gtk_check_menu_item_new_with_mnemonic (_("Radiation Pattern"));
+  gtk_widget_show (main_rdpattern);
+  gtk_container_add (GTK_CONTAINER (main_view_menuitem_menu), main_rdpattern);
+  gtk_tooltips_set_tip (tooltips, main_rdpattern, _("Open radiation pattern window"), NULL);
+
+  main_freqplots = gtk_check_menu_item_new_with_mnemonic (_("Frequency Plots"));
+  gtk_widget_show (main_freqplots);
+  gtk_container_add (GTK_CONTAINER (main_view_menuitem_menu), main_freqplots);
+  gtk_tooltips_set_tip (tooltips, main_freqplots, _("Open frequency data plots window"), NULL);
+
+  main_pol_menu = gtk_menu_item_new_with_mnemonic (_("Polarization"));
+  gtk_widget_show (main_pol_menu);
+  gtk_container_add (GTK_CONTAINER (main_view_menuitem_menu), main_pol_menu);
+  gtk_tooltips_set_tip (tooltips, main_pol_menu, _("Display gain data relevant to polarization"), NULL);
+
+  main_pol_menu_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (main_pol_menu), main_pol_menu_menu);
+
+  rdpattern_total = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Total"));
+  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_total));
+  gtk_widget_show (rdpattern_total);
+  gtk_container_add (GTK_CONTAINER (main_pol_menu_menu), rdpattern_total);
+  gtk_tooltips_set_tip (tooltips, rdpattern_total, _("Total gain"), NULL);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_total), TRUE);
+
+  rdpattern_horizontal = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Horizontal"));
+  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_horizontal));
+  gtk_widget_show (rdpattern_horizontal);
+  gtk_container_add (GTK_CONTAINER (main_pol_menu_menu), rdpattern_horizontal);
+  gtk_tooltips_set_tip (tooltips, rdpattern_horizontal, _("Gain in horizontal polarization"), NULL);
+
+  rdpattern_vertical = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Vertical"));
+  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_vertical));
+  gtk_widget_show (rdpattern_vertical);
+  gtk_container_add (GTK_CONTAINER (main_pol_menu_menu), rdpattern_vertical);
+  gtk_tooltips_set_tip (tooltips, rdpattern_vertical, _("Gain in vertical polarization"), NULL);
+
+  rdpattern_right_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Right Hand"));
+  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_right_hand));
+  gtk_widget_show (rdpattern_right_hand);
+  gtk_container_add (GTK_CONTAINER (main_pol_menu_menu), rdpattern_right_hand);
+  gtk_tooltips_set_tip (tooltips, rdpattern_right_hand, _("Gain in rhcp"), NULL);
+
+  rdpattern_left_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Left Hand"));
+  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_left_hand));
+  gtk_widget_show (rdpattern_left_hand);
+  gtk_container_add (GTK_CONTAINER (main_pol_menu_menu), rdpattern_left_hand);
+  gtk_tooltips_set_tip (tooltips, rdpattern_left_hand, _("Gain in lhcp"), NULL);
+
+  common_projection = gtk_check_menu_item_new_with_mnemonic (_("Common Projection"));
+  gtk_widget_show (common_projection);
+  gtk_container_add (GTK_CONTAINER (main_view_menuitem_menu), common_projection);
+  gtk_tooltips_set_tip (tooltips, common_projection, _("Synchronize projection parameters in different windows"), NULL);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (common_projection), TRUE);
+
+  common_freq = gtk_check_menu_item_new_with_mnemonic (_("Common Frequency"));
+  gtk_widget_show (common_freq);
+  gtk_container_add (GTK_CONTAINER (main_view_menuitem_menu), common_freq);
+  gtk_tooltips_set_tip (tooltips, common_freq, _("Synchronize frequency selection in different windows"), NULL);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (common_freq), TRUE);
+
+  menuitem4 = gtk_menu_item_new_with_mnemonic (_("_Help"));
+  gtk_widget_show (menuitem4);
+  gtk_container_add (GTK_CONTAINER (menubar1), menuitem4);
+
+  menuitem4_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem4), menuitem4_menu);
+
+  about = gtk_image_menu_item_new_with_mnemonic (_("About"));
+  gtk_widget_show (about);
+  gtk_container_add (GTK_CONTAINER (menuitem4_menu), about);
+
+  image103 = gtk_image_new_from_stock ("gtk-about", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image103);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (about), image103);
+
+  main_hbox1 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (main_hbox1);
+  gtk_box_pack_start (GTK_BOX (hbox8), main_hbox1, FALSE, FALSE, 0);
+
+  vseparator2 = gtk_vseparator_new ();
+  gtk_widget_show (vseparator2);
+  gtk_box_pack_start (GTK_BOX (main_hbox1), vseparator2, FALSE, FALSE, 4);
+
+  main_currents_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Currents"));
+  gtk_widget_show (main_currents_togglebutton);
+  gtk_box_pack_start (GTK_BOX (main_hbox1), main_currents_togglebutton, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, main_currents_togglebutton, _("Calculate and Display\nStructure Currents"), NULL);
+
+  main_charges_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Charges"));
+  gtk_widget_show (main_charges_togglebutton);
+  gtk_box_pack_start (GTK_BOX (main_hbox1), main_charges_togglebutton, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, main_charges_togglebutton, _("Calculate and Display\nCharge Densities"), NULL);
+
+  vseparator7 = gtk_vseparator_new ();
+  gtk_widget_show (vseparator7);
+  gtk_box_pack_start (GTK_BOX (main_hbox1), vseparator7, TRUE, TRUE, 4);
+
+  label214 = gtk_label_new (_("Frequency Loop "));
+  gtk_widget_show (label214);
+  gtk_box_pack_start (GTK_BOX (main_hbox1), label214, FALSE, FALSE, 0);
+  gtk_label_set_single_line_mode (GTK_LABEL (label214), TRUE);
+
+  main_loop_start = gtk_button_new ();
+  gtk_widget_show (main_loop_start);
+  gtk_box_pack_start (GTK_BOX (main_hbox1), main_loop_start, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, main_loop_start, _("Start Frequency Loop"), NULL);
+
+  alignment49 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment49);
+  gtk_container_add (GTK_CONTAINER (main_loop_start), alignment49);
+
+  hbox47 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox47);
+  gtk_container_add (GTK_CONTAINER (alignment49), hbox47);
+
+  image52 = gtk_image_new_from_stock ("gtk-media-play", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image52);
+  gtk_box_pack_start (GTK_BOX (hbox47), image52, FALSE, FALSE, 0);
+
+  label213 = gtk_label_new_with_mnemonic ("");
+  gtk_widget_show (label213);
+  gtk_box_pack_start (GTK_BOX (hbox47), label213, FALSE, FALSE, 0);
+
+  main_loop_pause = gtk_button_new ();
+  gtk_widget_show (main_loop_pause);
+  gtk_box_pack_start (GTK_BOX (main_hbox1), main_loop_pause, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, main_loop_pause, _("Pause Frequency Loop"), NULL);
+  gtk_widget_add_accelerator (main_loop_pause, "clicked", accel_group,
+                              GDK_h, (GdkModifierType) 0,
+                              GTK_ACCEL_VISIBLE);
+
+  image54 = gtk_image_new_from_stock ("gtk-media-pause", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image54);
+  gtk_container_add (GTK_CONTAINER (main_loop_pause), image54);
+
+  main_loop_reset = gtk_button_new ();
+  gtk_widget_show (main_loop_reset);
+  gtk_box_pack_start (GTK_BOX (main_hbox1), main_loop_reset, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, main_loop_reset, _("Reset Frequency Loop"), NULL);
+  gtk_widget_add_accelerator (main_loop_reset, "clicked", accel_group,
+                              GDK_r, (GdkModifierType) 0,
+                              GTK_ACCEL_VISIBLE);
+
+  image53 = gtk_image_new_from_stock ("gtk-media-rewind", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image53);
+  gtk_container_add (GTK_CONTAINER (main_loop_reset), image53);
+
+  label244 = gtk_label_new (_(" Step "));
+  gtk_widget_show (label244);
+  gtk_box_pack_start (GTK_BOX (main_hbox1), label244, FALSE, FALSE, 0);
+  gtk_label_set_single_line_mode (GTK_LABEL (label244), TRUE);
+
+  structure_fstep_entry = gtk_entry_new ();
+  gtk_widget_show (structure_fstep_entry);
+  gtk_box_pack_start (GTK_BOX (main_hbox1), structure_fstep_entry, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, structure_fstep_entry, _("Current Frequency Step"), NULL);
+  gtk_entry_set_max_length (GTK_ENTRY (structure_fstep_entry), 3);
+  gtk_editable_set_editable (GTK_EDITABLE (structure_fstep_entry), FALSE);
+  gtk_entry_set_text (GTK_ENTRY (structure_fstep_entry), _("1"));
+  gtk_entry_set_invisible_char (GTK_ENTRY (structure_fstep_entry), 9679);
+  gtk_entry_set_width_chars (GTK_ENTRY (structure_fstep_entry), 3);
+
+  hseparator1 = gtk_hseparator_new ();
+  gtk_widget_show (hseparator1);
+  gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, FALSE, FALSE, 4);
+
+  main_hbox2 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (main_hbox2);
+  gtk_box_pack_start (GTK_BOX (vbox1), main_hbox2, FALSE, FALSE, 0);
+  gtk_widget_set_size_request (main_hbox2, -1, 30);
+
+  main_colorcode_zerolabel = gtk_label_new (_("0"));
+  gtk_widget_show (main_colorcode_zerolabel);
+  gtk_box_pack_start (GTK_BOX (main_hbox2), main_colorcode_zerolabel, FALSE, FALSE, 2);
+  gtk_label_set_width_chars (GTK_LABEL (main_colorcode_zerolabel), 1);
+
+  main_colorcode_drawingarea = gtk_drawing_area_new ();
+  gtk_widget_show (main_colorcode_drawingarea);
+  gtk_box_pack_start (GTK_BOX (main_hbox2), main_colorcode_drawingarea, FALSE, FALSE, 0);
+  gtk_widget_set_size_request (main_colorcode_drawingarea, 160, -1);
+  gtk_tooltips_set_tip (tooltips, main_colorcode_drawingarea, _("Color Code for Structure's\nCurrent or Charge Values"), NULL);
+
+  main_colorcode_maxlabel = gtk_label_new (_("0.00"));
+  gtk_widget_show (main_colorcode_maxlabel);
+  gtk_box_pack_start (GTK_BOX (main_hbox2), main_colorcode_maxlabel, FALSE, FALSE, 0);
+  gtk_misc_set_alignment (GTK_MISC (main_colorcode_maxlabel), 0, 0.5);
+  gtk_label_set_width_chars (GTK_LABEL (main_colorcode_maxlabel), 11);
+
+  main_gain_entry = gtk_entry_new ();
+  gtk_widget_show (main_gain_entry);
+  gtk_box_pack_start (GTK_BOX (main_hbox2), main_gain_entry, FALSE, FALSE, 2);
+  gtk_tooltips_set_tip (tooltips, main_gain_entry, _("Gain in Direction of Viewer\n(Perpenticular to Screen)"), NULL);
+  gtk_entry_set_text (GTK_ENTRY (main_gain_entry), _(" - - - - -"));
+  gtk_entry_set_width_chars (GTK_ENTRY (main_gain_entry), 6);
+
+  label10 = gtk_label_new (_("dB "));
+  gtk_widget_show (label10);
+  gtk_box_pack_start (GTK_BOX (main_hbox2), label10, FALSE, FALSE, 0);
+  gtk_label_set_single_line_mode (GTK_LABEL (label10), TRUE);
+
+  main_freq_spinbutton_adj = gtk_adjustment_new (0.00999999977648, 0.00999999977648, 9999, 0.00999999977648, 10, 0);
+  main_freq_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (main_freq_spinbutton_adj), 0.0010000000475, 3);
+  gtk_widget_show (main_freq_spinbutton);
+  gtk_box_pack_start (GTK_BOX (main_hbox2), main_freq_spinbutton, FALSE, FALSE, 2);
+  gtk_tooltips_set_tip (tooltips, main_freq_spinbutton, _("Enter Frequency in MHz"), NULL);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (main_freq_spinbutton), TRUE);
+
+  main_freq_label = gtk_label_new (_("MHz "));
+  gtk_widget_show (main_freq_label);
+  gtk_box_pack_start (GTK_BOX (main_hbox2), main_freq_label, FALSE, FALSE, 0);
+  gtk_label_set_single_line_mode (GTK_LABEL (main_freq_label), TRUE);
+
+  main_freq_checkbutton = gtk_check_button_new_with_mnemonic (_("Apply"));
+  gtk_widget_show (main_freq_checkbutton);
+  gtk_box_pack_start (GTK_BOX (main_hbox2), main_freq_checkbutton, FALSE, FALSE, 2);
+  gtk_tooltips_set_tip (tooltips, main_freq_checkbutton, _("Enable Data Calculation\non Frequency Change"), NULL);
+  gtk_button_set_focus_on_click (GTK_BUTTON (main_freq_checkbutton), FALSE);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (main_freq_checkbutton), TRUE);
+
+  main_new_freq_button = gtk_button_new ();
+  gtk_widget_show (main_new_freq_button);
+  gtk_box_pack_start (GTK_BOX (main_hbox2), main_new_freq_button, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, main_new_freq_button, _("Calculate Data\nfor New Frequency"), NULL);
+  gtk_widget_add_accelerator (main_new_freq_button, "clicked", accel_group,
+                              GDK_a, (GdkModifierType) 0,
+                              GTK_ACCEL_VISIBLE);
+
+  image46 = gtk_image_new_from_stock ("gtk-apply", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image46);
+  gtk_container_add (GTK_CONTAINER (main_new_freq_button), image46);
+
+  hseparator11 = gtk_hseparator_new ();
+  gtk_widget_show (hseparator11);
+  gtk_box_pack_start (GTK_BOX (vbox1), hseparator11, FALSE, FALSE, 4);
+
+  frame1 = gtk_frame_new (NULL);
+  gtk_widget_show (frame1);
+  gtk_box_pack_start (GTK_BOX (vbox1), frame1, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame1), 4);
+
+  alignment1 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment1);
+  gtk_container_add (GTK_CONTAINER (frame1), alignment1);
+  gtk_container_set_border_width (GTK_CONTAINER (alignment1), 2);
+
+  structure_drawingarea = gtk_drawing_area_new ();
+  gtk_widget_show (structure_drawingarea);
+  gtk_container_add (GTK_CONTAINER (alignment1), structure_drawingarea);
+  gtk_widget_set_size_request (structure_drawingarea, 681, 769);
+  GTK_WIDGET_SET_FLAGS (structure_drawingarea, GTK_CAN_FOCUS);
+
+  main_hbox3 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (main_hbox3);
+  gtk_frame_set_label_widget (GTK_FRAME (frame1), main_hbox3);
+
+  struct_label = gtk_label_new (_("View Geometry"));
+  gtk_widget_show (struct_label);
+  gtk_box_pack_start (GTK_BOX (main_hbox3), struct_label, FALSE, FALSE, 0);
+  gtk_label_set_width_chars (GTK_LABEL (struct_label), 14);
+  gtk_label_set_single_line_mode (GTK_LABEL (struct_label), TRUE);
+
+  main_x_axis = gtk_button_new_with_mnemonic (_("X"));
+  gtk_widget_show (main_x_axis);
+  gtk_box_pack_start (GTK_BOX (main_hbox3), main_x_axis, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, main_x_axis, _("View Structure along X-axis"), NULL);
+  gtk_widget_add_accelerator (main_x_axis, "clicked", accel_group,
+                              GDK_x, (GdkModifierType) 0,
+                              GTK_ACCEL_VISIBLE);
+
+  main_y_axis = gtk_button_new_with_mnemonic (_("Y"));
+  gtk_widget_show (main_y_axis);
+  gtk_box_pack_start (GTK_BOX (main_hbox3), main_y_axis, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, main_y_axis, _("View Structure along Y-axis"), NULL);
+  gtk_widget_add_accelerator (main_y_axis, "clicked", accel_group,
+                              GDK_y, (GdkModifierType) 0,
+                              GTK_ACCEL_VISIBLE);
+
+  main_z_axis = gtk_button_new_with_mnemonic (_("Z"));
+  gtk_widget_show (main_z_axis);
+  gtk_box_pack_start (GTK_BOX (main_hbox3), main_z_axis, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, main_z_axis, _("View Strucure along Z-axis"), NULL);
+  gtk_widget_add_accelerator (main_z_axis, "clicked", accel_group,
+                              GDK_z, (GdkModifierType) 0,
+                              GTK_ACCEL_VISIBLE);
+
+  main_default_view = gtk_button_new ();
+  gtk_widget_show (main_default_view);
+  gtk_box_pack_start (GTK_BOX (main_hbox3), main_default_view, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, main_default_view, _("View Strucure\nin Default Projection"), NULL);
+  gtk_widget_add_accelerator (main_default_view, "clicked", accel_group,
+                              GDK_r, (GdkModifierType) 0,
+                              GTK_ACCEL_VISIBLE);
+
+  image32 = gtk_image_new_from_stock ("gtk-redo", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image32);
+  gtk_container_add (GTK_CONTAINER (main_default_view), image32);
+
+  vseparator1 = gtk_vseparator_new ();
+  gtk_widget_show (vseparator1);
+  gtk_box_pack_start (GTK_BOX (main_hbox3), vseparator1, TRUE, TRUE, 0);
+
+  image50 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image50);
+  gtk_box_pack_start (GTK_BOX (main_hbox3), image50, TRUE, TRUE, 0);
+
+  main_rotate_spinbutton_adj = gtk_adjustment_new (45, -360, 360, 1, 10, 0);
+  main_rotate_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (main_rotate_spinbutton_adj), 1, 0);
+  gtk_widget_show (main_rotate_spinbutton);
+  gtk_box_pack_start (GTK_BOX (main_hbox3), main_rotate_spinbutton, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, main_rotate_spinbutton, _("Rotate Structure\n around Z-axis"), NULL);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (main_rotate_spinbutton), TRUE);
+
+  image51 = gtk_image_new_from_stock ("gtk-go-down", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image51);
+  gtk_box_pack_start (GTK_BOX (main_hbox3), image51, TRUE, TRUE, 0);
+
+  main_incline_spinbutton_adj = gtk_adjustment_new (45, -180, 180, 1, 10, 0);
+  main_incline_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (main_incline_spinbutton_adj), 1, 0);
+  gtk_widget_show (main_incline_spinbutton);
+  gtk_box_pack_start (GTK_BOX (main_hbox3), main_incline_spinbutton, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, main_incline_spinbutton, _("Incline Structure\nto Plane of Screen"), NULL);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (main_incline_spinbutton), TRUE);
+
+  label245 = gtk_label_new (_(" Zoom % "));
+  gtk_widget_show (label245);
+  gtk_box_pack_start (GTK_BOX (main_hbox3), label245, FALSE, FALSE, 0);
+  gtk_label_set_single_line_mode (GTK_LABEL (label245), TRUE);
+
+  structure_zoom_spinbutton_adj = gtk_adjustment_new (100, 10, 999, 1, 10, 0);
+  structure_zoom_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (structure_zoom_spinbutton_adj), 1, 0);
+  gtk_widget_show (structure_zoom_spinbutton);
+  gtk_box_pack_start (GTK_BOX (main_hbox3), structure_zoom_spinbutton, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, structure_zoom_spinbutton, _("Zoom Structure Display"), NULL);
+
+  structure_plus_button = gtk_button_new ();
+  gtk_widget_show (structure_plus_button);
+  gtk_box_pack_start (GTK_BOX (main_hbox3), structure_plus_button, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, structure_plus_button, _("Zoom In"), NULL);
+
+  image94 = gtk_image_new_from_stock ("gtk-zoom-in", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image94);
+  gtk_container_add (GTK_CONTAINER (structure_plus_button), image94);
+
+  structure_minus_button = gtk_button_new ();
+  gtk_widget_show (structure_minus_button);
+  gtk_box_pack_start (GTK_BOX (main_hbox3), structure_minus_button, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, structure_minus_button, _("Zoom Out"), NULL);
+
+  image95 = gtk_image_new_from_stock ("gtk-zoom-out", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image95);
+  gtk_container_add (GTK_CONTAINER (structure_minus_button), image95);
+
+  structure_one_button = gtk_button_new ();
+  gtk_widget_show (structure_one_button);
+  gtk_box_pack_start (GTK_BOX (main_hbox3), structure_one_button, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, structure_one_button, _("Zoom to Default 1:1"), NULL);
+
+  image96 = gtk_image_new_from_stock ("gtk-zoom-100", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image96);
+  gtk_container_add (GTK_CONTAINER (structure_one_button), image96);
+
+  g_signal_connect ((gpointer) main_window, "destroy",
+                    G_CALLBACK (on_main_window_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) main_window, "delete_event",
+                    G_CALLBACK (on_main_window_delete_event),
+                    NULL);
+  g_signal_connect ((gpointer) main_new, "activate",
+                    G_CALLBACK (on_new_activate),
+                    NULL);
+  g_signal_connect ((gpointer) main_open_input, "activate",
+                    G_CALLBACK (on_open_input_activate),
+                    NULL);
+  g_signal_connect ((gpointer) nec2_edit, "activate",
+                    G_CALLBACK (on_nec2_edit_activate),
+                    NULL);
+  g_signal_connect ((gpointer) main_save, "activate",
+                    G_CALLBACK (on_main_save_activate),
+                    NULL);
+  g_signal_connect ((gpointer) main_save_as, "activate",
+                    G_CALLBACK (on_main_save_as_activate),
+                    NULL);
+  g_signal_connect ((gpointer) struct_save_as_gnuplot, "activate",
+                    G_CALLBACK (on_struct_save_as_gnuplot_activate),
+                    NULL);
+  g_signal_connect ((gpointer) main_quit, "activate",
+                    G_CALLBACK (on_quit_activate),
+                    NULL);
+  g_signal_connect ((gpointer) main_view_menuitem, "activate",
+                    G_CALLBACK (main_view_menuitem_activate),
+                    NULL);
+  g_signal_connect ((gpointer) main_rdpattern, "activate",
+                    G_CALLBACK (on_main_rdpattern_activate),
+                    NULL);
+  g_signal_connect ((gpointer) main_freqplots, "activate",
+                    G_CALLBACK (on_main_freqplots_activate),
+                    NULL);
+  g_signal_connect ((gpointer) main_pol_menu, "activate",
+                    G_CALLBACK (main_pol_menu_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_total, "activate",
+                    G_CALLBACK (on_rdpattern_total_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_horizontal, "activate",
+                    G_CALLBACK (on_rdpattern_horizontal_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_vertical, "activate",
+                    G_CALLBACK (on_rdpattern_vertical_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_right_hand, "activate",
+                    G_CALLBACK (on_rdpattern_right_hand_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_left_hand, "activate",
+                    G_CALLBACK (on_rdpattern_left_hand_activate),
+                    NULL);
+  g_signal_connect ((gpointer) common_projection, "activate",
+                    G_CALLBACK (on_common_projection_activate),
+                    NULL);
+  g_signal_connect ((gpointer) common_freq, "activate",
+                    G_CALLBACK (on_common_freq_activate),
+                    NULL);
+  g_signal_connect ((gpointer) about, "activate",
+                    G_CALLBACK (on_about_activate),
+                    NULL);
+  g_signal_connect ((gpointer) main_currents_togglebutton, "toggled",
+                    G_CALLBACK (on_main_currents_togglebutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) main_charges_togglebutton, "toggled",
+                    G_CALLBACK (on_main_charges_togglebutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) main_loop_start, "clicked",
+                    G_CALLBACK (on_loop_start_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) main_loop_pause, "clicked",
+                    G_CALLBACK (on_loop_pause_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) main_loop_reset, "clicked",
+                    G_CALLBACK (on_loop_reset_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) main_colorcode_drawingarea, "expose_event",
+                    G_CALLBACK (on_main_colorcode_drawingarea_expose_event),
+                    NULL);
+  g_signal_connect ((gpointer) main_freq_spinbutton, "value_changed",
+                    G_CALLBACK (on_main_freq_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) main_freq_checkbutton, "toggled",
+                    G_CALLBACK (on_main_freq_checkbutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) main_new_freq_button, "clicked",
+                    G_CALLBACK (on_main_new_freq_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) structure_drawingarea, "configure_event",
+                    G_CALLBACK (on_structure_drawingarea_configure_event),
+                    NULL);
+  g_signal_connect ((gpointer) structure_drawingarea, "expose_event",
+                    G_CALLBACK (on_structure_drawingarea_expose_event),
+                    NULL);
+  g_signal_connect ((gpointer) structure_drawingarea, "button_press_event",
+                    G_CALLBACK (on_structure_drawingarea_button_press_event),
+                    NULL);
+  g_signal_connect ((gpointer) structure_drawingarea, "scroll_event",
+                    G_CALLBACK (on_structure_drawingarea_scroll_event),
+                    NULL);
+  g_signal_connect ((gpointer) main_x_axis, "clicked",
+                    G_CALLBACK (on_main_x_axis_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) main_y_axis, "clicked",
+                    G_CALLBACK (on_main_y_axis_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) main_z_axis, "clicked",
+                    G_CALLBACK (on_main_z_axis_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) main_default_view, "clicked",
+                    G_CALLBACK (on_main_default_view_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) main_rotate_spinbutton, "value_changed",
+                    G_CALLBACK (on_main_rotate_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) main_incline_spinbutton, "value_changed",
+                    G_CALLBACK (on_main_incline_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) structure_zoom_spinbutton, "value_changed",
+                    G_CALLBACK (on_structure_zoom_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) structure_plus_button, "clicked",
+                    G_CALLBACK (on_structure_plus_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) structure_minus_button, "clicked",
+                    G_CALLBACK (on_structure_minus_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) structure_one_button, "clicked",
+                    G_CALLBACK (on_structure_one_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (main_window, main_window, "main_window");
+  GLADE_HOOKUP_OBJECT (main_window, vbox1, "vbox1");
+  GLADE_HOOKUP_OBJECT (main_window, hbox8, "hbox8");
+  GLADE_HOOKUP_OBJECT (main_window, menubar1, "menubar1");
+  GLADE_HOOKUP_OBJECT (main_window, menuitem1, "menuitem1");
+  GLADE_HOOKUP_OBJECT (main_window, menuitem1_menu, "menuitem1_menu");
+  GLADE_HOOKUP_OBJECT (main_window, main_new, "main_new");
+  GLADE_HOOKUP_OBJECT (main_window, main_open_input, "main_open_input");
+  GLADE_HOOKUP_OBJECT (main_window, nec2_edit, "nec2_edit");
+  GLADE_HOOKUP_OBJECT (main_window, main_save, "main_save");
+  GLADE_HOOKUP_OBJECT (main_window, main_save_as, "main_save_as");
+  GLADE_HOOKUP_OBJECT (main_window, struct_save_as_gnuplot, "struct_save_as_gnuplot");
+  GLADE_HOOKUP_OBJECT (main_window, image102, "image102");
+  GLADE_HOOKUP_OBJECT (main_window, separator1, "separator1");
+  GLADE_HOOKUP_OBJECT (main_window, main_quit, "main_quit");
+  GLADE_HOOKUP_OBJECT (main_window, main_view_menuitem, "main_view_menuitem");
+  GLADE_HOOKUP_OBJECT (main_window, main_view_menuitem_menu, "main_view_menuitem_menu");
+  GLADE_HOOKUP_OBJECT (main_window, main_rdpattern, "main_rdpattern");
+  GLADE_HOOKUP_OBJECT (main_window, main_freqplots, "main_freqplots");
+  GLADE_HOOKUP_OBJECT (main_window, main_pol_menu, "main_pol_menu");
+  GLADE_HOOKUP_OBJECT (main_window, main_pol_menu_menu, "main_pol_menu_menu");
+  GLADE_HOOKUP_OBJECT (main_window, rdpattern_total, "rdpattern_total");
+  GLADE_HOOKUP_OBJECT (main_window, rdpattern_horizontal, "rdpattern_horizontal");
+  GLADE_HOOKUP_OBJECT (main_window, rdpattern_vertical, "rdpattern_vertical");
+  GLADE_HOOKUP_OBJECT (main_window, rdpattern_right_hand, "rdpattern_right_hand");
+  GLADE_HOOKUP_OBJECT (main_window, rdpattern_left_hand, "rdpattern_left_hand");
+  GLADE_HOOKUP_OBJECT (main_window, common_projection, "common_projection");
+  GLADE_HOOKUP_OBJECT (main_window, common_freq, "common_freq");
+  GLADE_HOOKUP_OBJECT (main_window, menuitem4, "menuitem4");
+  GLADE_HOOKUP_OBJECT (main_window, menuitem4_menu, "menuitem4_menu");
+  GLADE_HOOKUP_OBJECT (main_window, about, "about");
+  GLADE_HOOKUP_OBJECT (main_window, image103, "image103");
+  GLADE_HOOKUP_OBJECT (main_window, main_hbox1, "main_hbox1");
+  GLADE_HOOKUP_OBJECT (main_window, vseparator2, "vseparator2");
+  GLADE_HOOKUP_OBJECT (main_window, main_currents_togglebutton, "main_currents_togglebutton");
+  GLADE_HOOKUP_OBJECT (main_window, main_charges_togglebutton, "main_charges_togglebutton");
+  GLADE_HOOKUP_OBJECT (main_window, vseparator7, "vseparator7");
+  GLADE_HOOKUP_OBJECT (main_window, label214, "label214");
+  GLADE_HOOKUP_OBJECT (main_window, main_loop_start, "main_loop_start");
+  GLADE_HOOKUP_OBJECT (main_window, alignment49, "alignment49");
+  GLADE_HOOKUP_OBJECT (main_window, hbox47, "hbox47");
+  GLADE_HOOKUP_OBJECT (main_window, image52, "image52");
+  GLADE_HOOKUP_OBJECT (main_window, label213, "label213");
+  GLADE_HOOKUP_OBJECT (main_window, main_loop_pause, "main_loop_pause");
+  GLADE_HOOKUP_OBJECT (main_window, image54, "image54");
+  GLADE_HOOKUP_OBJECT (main_window, main_loop_reset, "main_loop_reset");
+  GLADE_HOOKUP_OBJECT (main_window, image53, "image53");
+  GLADE_HOOKUP_OBJECT (main_window, label244, "label244");
+  GLADE_HOOKUP_OBJECT (main_window, structure_fstep_entry, "structure_fstep_entry");
+  GLADE_HOOKUP_OBJECT (main_window, hseparator1, "hseparator1");
+  GLADE_HOOKUP_OBJECT (main_window, main_hbox2, "main_hbox2");
+  GLADE_HOOKUP_OBJECT (main_window, main_colorcode_zerolabel, "main_colorcode_zerolabel");
+  GLADE_HOOKUP_OBJECT (main_window, main_colorcode_drawingarea, "main_colorcode_drawingarea");
+  GLADE_HOOKUP_OBJECT (main_window, main_colorcode_maxlabel, "main_colorcode_maxlabel");
+  GLADE_HOOKUP_OBJECT (main_window, main_gain_entry, "main_gain_entry");
+  GLADE_HOOKUP_OBJECT (main_window, label10, "label10");
+  GLADE_HOOKUP_OBJECT (main_window, main_freq_spinbutton, "main_freq_spinbutton");
+  GLADE_HOOKUP_OBJECT (main_window, main_freq_label, "main_freq_label");
+  GLADE_HOOKUP_OBJECT (main_window, main_freq_checkbutton, "main_freq_checkbutton");
+  GLADE_HOOKUP_OBJECT (main_window, main_new_freq_button, "main_new_freq_button");
+  GLADE_HOOKUP_OBJECT (main_window, image46, "image46");
+  GLADE_HOOKUP_OBJECT (main_window, hseparator11, "hseparator11");
+  GLADE_HOOKUP_OBJECT (main_window, frame1, "frame1");
+  GLADE_HOOKUP_OBJECT (main_window, alignment1, "alignment1");
+  GLADE_HOOKUP_OBJECT (main_window, structure_drawingarea, "structure_drawingarea");
+  GLADE_HOOKUP_OBJECT (main_window, main_hbox3, "main_hbox3");
+  GLADE_HOOKUP_OBJECT (main_window, struct_label, "struct_label");
+  GLADE_HOOKUP_OBJECT (main_window, main_x_axis, "main_x_axis");
+  GLADE_HOOKUP_OBJECT (main_window, main_y_axis, "main_y_axis");
+  GLADE_HOOKUP_OBJECT (main_window, main_z_axis, "main_z_axis");
+  GLADE_HOOKUP_OBJECT (main_window, main_default_view, "main_default_view");
+  GLADE_HOOKUP_OBJECT (main_window, image32, "image32");
+  GLADE_HOOKUP_OBJECT (main_window, vseparator1, "vseparator1");
+  GLADE_HOOKUP_OBJECT (main_window, image50, "image50");
+  GLADE_HOOKUP_OBJECT (main_window, main_rotate_spinbutton, "main_rotate_spinbutton");
+  GLADE_HOOKUP_OBJECT (main_window, image51, "image51");
+  GLADE_HOOKUP_OBJECT (main_window, main_incline_spinbutton, "main_incline_spinbutton");
+  GLADE_HOOKUP_OBJECT (main_window, label245, "label245");
+  GLADE_HOOKUP_OBJECT (main_window, structure_zoom_spinbutton, "structure_zoom_spinbutton");
+  GLADE_HOOKUP_OBJECT (main_window, structure_plus_button, "structure_plus_button");
+  GLADE_HOOKUP_OBJECT (main_window, image94, "image94");
+  GLADE_HOOKUP_OBJECT (main_window, structure_minus_button, "structure_minus_button");
+  GLADE_HOOKUP_OBJECT (main_window, image95, "image95");
+  GLADE_HOOKUP_OBJECT (main_window, structure_one_button, "structure_one_button");
+  GLADE_HOOKUP_OBJECT (main_window, image96, "image96");
+  GLADE_HOOKUP_OBJECT_NO_REF (main_window, tooltips, "tooltips");
+
+  gtk_window_add_accel_group (GTK_WINDOW (main_window), accel_group);
+
+  return main_window;
+}
+
+GtkWidget*
+create_filechooserdialog (void)
+{
+  GtkWidget *filechooserdialog;
+  GtkWidget *dialog_vbox1;
+  GtkWidget *dialog_action_area1;
+  GtkWidget *filechoser_cancel;
+  GtkWidget *filechooser_open;
+
+  filechooserdialog = gtk_file_chooser_dialog_new (_("xnec2c"), NULL, GTK_FILE_CHOOSER_ACTION_OPEN, NULL, NULL);
+  gtk_container_set_border_width (GTK_CONTAINER (filechooserdialog), 5);
+  g_object_set (filechooserdialog, "show-hidden", TRUE, NULL);
+  gtk_window_set_position (GTK_WINDOW (filechooserdialog), GTK_WIN_POS_MOUSE);
+  gtk_window_set_role (GTK_WINDOW (filechooserdialog), "GtkFileChooserDialog");
+  gtk_window_set_type_hint (GTK_WINDOW (filechooserdialog), GDK_WINDOW_TYPE_HINT_DIALOG);
+
+  dialog_vbox1 = GTK_DIALOG (filechooserdialog)->vbox;
+  gtk_widget_show (dialog_vbox1);
+
+  dialog_action_area1 = GTK_DIALOG (filechooserdialog)->action_area;
+  gtk_widget_show (dialog_action_area1);
+  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area1), GTK_BUTTONBOX_END);
+
+  filechoser_cancel = gtk_button_new_from_stock ("gtk-cancel");
+  gtk_widget_show (filechoser_cancel);
+  gtk_dialog_add_action_widget (GTK_DIALOG (filechooserdialog), filechoser_cancel, GTK_RESPONSE_CANCEL);
+  gtk_container_set_border_width (GTK_CONTAINER (filechoser_cancel), 2);
+  GTK_WIDGET_SET_FLAGS (filechoser_cancel, GTK_CAN_DEFAULT);
+
+  filechooser_open = gtk_button_new_from_stock ("gtk-open");
+  gtk_widget_show (filechooser_open);
+  gtk_dialog_add_action_widget (GTK_DIALOG (filechooserdialog), filechooser_open, GTK_RESPONSE_OK);
+  gtk_container_set_border_width (GTK_CONTAINER (filechooser_open), 2);
+  GTK_WIDGET_SET_FLAGS (filechooser_open, GTK_CAN_DEFAULT);
+
+  g_signal_connect ((gpointer) filechooserdialog, "response",
+                    G_CALLBACK (on_filechooserdialog_response),
+                    NULL);
+  g_signal_connect ((gpointer) filechoser_cancel, "clicked",
+                    G_CALLBACK (on_filechoser_cancel_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (filechooserdialog, filechooserdialog, "filechooserdialog");
+  GLADE_HOOKUP_OBJECT_NO_REF (filechooserdialog, dialog_vbox1, "dialog_vbox1");
+  GLADE_HOOKUP_OBJECT_NO_REF (filechooserdialog, dialog_action_area1, "dialog_action_area1");
+  GLADE_HOOKUP_OBJECT (filechooserdialog, filechoser_cancel, "filechoser_cancel");
+  GLADE_HOOKUP_OBJECT (filechooserdialog, filechooser_open, "filechooser_open");
+
+  gtk_widget_grab_default (filechooser_open);
+  return filechooserdialog;
+}
+
+GtkWidget*
+create_fileselection (void)
+{
+  GtkWidget *fileselection;
+  GtkWidget *ok_button1;
+  GtkWidget *fileselection_cancel;
+
+  fileselection = gtk_file_selection_new (_("Select File"));
+  gtk_container_set_border_width (GTK_CONTAINER (fileselection), 10);
+  gtk_window_set_position (GTK_WINDOW (fileselection), GTK_WIN_POS_MOUSE);
+  gtk_window_set_type_hint (GTK_WINDOW (fileselection), GDK_WINDOW_TYPE_HINT_DIALOG);
+
+  ok_button1 = GTK_FILE_SELECTION (fileselection)->ok_button;
+  gtk_widget_show (ok_button1);
+  GTK_WIDGET_SET_FLAGS (ok_button1, GTK_CAN_DEFAULT);
+
+  fileselection_cancel = GTK_FILE_SELECTION (fileselection)->cancel_button;
+  gtk_widget_show (fileselection_cancel);
+  GTK_WIDGET_SET_FLAGS (fileselection_cancel, GTK_CAN_DEFAULT);
+
+  g_signal_connect ((gpointer) fileselection, "response",
+                    G_CALLBACK (on_fileselection_response),
+                    NULL);
+  g_signal_connect ((gpointer) fileselection_cancel, "clicked",
+                    G_CALLBACK (on_fileselection_cancel_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (fileselection, fileselection, "fileselection");
+  GLADE_HOOKUP_OBJECT_NO_REF (fileselection, ok_button1, "ok_button1");
+  GLADE_HOOKUP_OBJECT_NO_REF (fileselection, fileselection_cancel, "fileselection_cancel");
+
+  return fileselection;
+}
+
+GtkWidget*
+create_freqplots_window (void)
+{
+  GtkWidget *freqplots_window;
+  GtkWidget *vbox2;
+  GtkWidget *freqplots_hbox1;
+  GtkWidget *menubar2;
+  GtkWidget *menuitem5;
+  GtkWidget *menuitem5_menu;
+  GtkWidget *freqplots_new;
+  GtkWidget *freqplots_open_input;
+  GtkWidget *freqplots_save;
+  GtkWidget *freqplots_save_as;
+  GtkWidget *freqplots_save_as_gnuplot;
+  GtkWidget *separatormenuitem2;
+  GtkWidget *freqplots_quit;
+  GtkWidget *view_menuitem;
+  GtkWidget *view_menuitem_menu;
+  GtkWidget *freqplots_pol_menu;
+  GtkWidget *freqplots_pol_menu_menu;
+  GSList *rdpattern_total_group = NULL;
+  GtkWidget *rdpattern_total;
+  GtkWidget *rdpattern_horizontal;
+  GtkWidget *rdpattern_vertical;
+  GtkWidget *rdpattern_right_hand;
+  GtkWidget *rdpattern_left_hand;
+  GtkWidget *net_gain;
+  GtkWidget *hbox10;
+  GtkWidget *freqplots_gmax_togglebutton;
+  GtkWidget *freqplots_gdir_togglebutton;
+  GtkWidget *freqplots_gviewer_togglebutton;
+  GtkWidget *freqplots_vswr_togglebutton;
+  GtkWidget *freqplots_zrlzim_togglebutton;
+  GtkWidget *freqplots_zmgzph_togglebutton;
+  GtkWidget *label215;
+  GtkWidget *plot_loop_start;
+  GtkWidget *image61;
+  GtkWidget *plot_loop_pause;
+  GtkWidget *image64;
+  GtkWidget *plot_loop_reset;
+  GtkWidget *image63;
+  GtkWidget *hseparator4;
+  GtkWidget *hbox15;
+  GtkWidget *label16;
+  GtkWidget *freqplots_fmhz_entry;
+  GtkWidget *label12;
+  GtkWidget *freqplots_maxgain_entry;
+  GtkWidget *label13;
+  GtkWidget *freqplots_vswr_entry;
+  GtkWidget *label14;
+  GtkWidget *freqplots_zreal_entry;
+  GtkWidget *label15;
+  GtkWidget *freqplots_zimag_entry;
+  GtkWidget *label212;
+  GtkObject *freqplots_zo_spinbutton_adj;
+  GtkWidget *freqplots_zo_spinbutton;
+  GtkWidget *frame2;
+  GtkWidget *alignment2;
+  GtkWidget *freqplots_drawingarea;
+  GtkWidget *freqplots_label;
+  GtkAccelGroup *accel_group;
+  GtkTooltips *tooltips;
+
+  tooltips = gtk_tooltips_new ();
+
+  accel_group = gtk_accel_group_new ();
+
+  freqplots_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (freqplots_window), 4);
+  gtk_window_set_title (GTK_WINDOW (freqplots_window), _("Xnec2c: Frequency Data Plots"));
+  gtk_window_set_gravity (GTK_WINDOW (freqplots_window), GDK_GRAVITY_EAST);
+
+  vbox2 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox2);
+  gtk_container_add (GTK_CONTAINER (freqplots_window), vbox2);
+
+  freqplots_hbox1 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (freqplots_hbox1);
+  gtk_box_pack_start (GTK_BOX (vbox2), freqplots_hbox1, FALSE, FALSE, 0);
+
+  menubar2 = gtk_menu_bar_new ();
+  gtk_widget_show (menubar2);
+  gtk_box_pack_start (GTK_BOX (freqplots_hbox1), menubar2, FALSE, FALSE, 0);
+
+  menuitem5 = gtk_menu_item_new_with_mnemonic (_("_File"));
+  gtk_widget_show (menuitem5);
+  gtk_container_add (GTK_CONTAINER (menubar2), menuitem5);
+
+  menuitem5_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem5), menuitem5_menu);
+
+  freqplots_new = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group);
+  gtk_widget_show (freqplots_new);
+  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_new);
+
+  freqplots_open_input = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group);
+  gtk_widget_show (freqplots_open_input);
+  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_open_input);
+
+  freqplots_save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
+  gtk_widget_show (freqplots_save);
+  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_save);
+
+  freqplots_save_as = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group);
+  gtk_widget_show (freqplots_save_as);
+  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_save_as);
+
+  freqplots_save_as_gnuplot = gtk_menu_item_new_with_mnemonic (_("Save As gnuplot"));
+  gtk_widget_show (freqplots_save_as_gnuplot);
+  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_save_as_gnuplot);
+
+  separatormenuitem2 = gtk_separator_menu_item_new ();
+  gtk_widget_show (separatormenuitem2);
+  gtk_container_add (GTK_CONTAINER (menuitem5_menu), separatormenuitem2);
+  gtk_widget_set_sensitive (separatormenuitem2, FALSE);
+
+  freqplots_quit = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
+  gtk_widget_show (freqplots_quit);
+  gtk_container_add (GTK_CONTAINER (menuitem5_menu), freqplots_quit);
+
+  view_menuitem = gtk_menu_item_new_with_mnemonic (_("_View"));
+  gtk_widget_show (view_menuitem);
+  gtk_container_add (GTK_CONTAINER (menubar2), view_menuitem);
+
+  view_menuitem_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (view_menuitem), view_menuitem_menu);
+
+  freqplots_pol_menu = gtk_menu_item_new_with_mnemonic (_("Polarization"));
+  gtk_widget_show (freqplots_pol_menu);
+  gtk_container_add (GTK_CONTAINER (view_menuitem_menu), freqplots_pol_menu);
+  gtk_tooltips_set_tip (tooltips, freqplots_pol_menu, _("Disply gain data relevant to polarization"), NULL);
+
+  freqplots_pol_menu_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (freqplots_pol_menu), freqplots_pol_menu_menu);
+
+  rdpattern_total = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Total"));
+  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_total));
+  gtk_widget_show (rdpattern_total);
+  gtk_container_add (GTK_CONTAINER (freqplots_pol_menu_menu), rdpattern_total);
+  gtk_tooltips_set_tip (tooltips, rdpattern_total, _("Total gain"), NULL);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_total), TRUE);
+
+  rdpattern_horizontal = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Horizontal"));
+  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_horizontal));
+  gtk_widget_show (rdpattern_horizontal);
+  gtk_container_add (GTK_CONTAINER (freqplots_pol_menu_menu), rdpattern_horizontal);
+  gtk_tooltips_set_tip (tooltips, rdpattern_horizontal, _("Gain in horizontal polarization"), NULL);
+
+  rdpattern_vertical = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Vertical"));
+  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_vertical));
+  gtk_widget_show (rdpattern_vertical);
+  gtk_container_add (GTK_CONTAINER (freqplots_pol_menu_menu), rdpattern_vertical);
+  gtk_tooltips_set_tip (tooltips, rdpattern_vertical, _("Plot gain in vertical polarization"), NULL);
+
+  rdpattern_right_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Right Hand"));
+  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_right_hand));
+  gtk_widget_show (rdpattern_right_hand);
+  gtk_container_add (GTK_CONTAINER (freqplots_pol_menu_menu), rdpattern_right_hand);
+  gtk_tooltips_set_tip (tooltips, rdpattern_right_hand, _("Plot gain in rhcp"), NULL);
+
+  rdpattern_left_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Left Hand"));
+  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_left_hand));
+  gtk_widget_show (rdpattern_left_hand);
+  gtk_container_add (GTK_CONTAINER (freqplots_pol_menu_menu), rdpattern_left_hand);
+  gtk_tooltips_set_tip (tooltips, rdpattern_left_hand, _("Plot gain in lhcp"), NULL);
+
+  net_gain = gtk_check_menu_item_new_with_mnemonic (_("Net Gain"));
+  gtk_widget_show (net_gain);
+  gtk_container_add (GTK_CONTAINER (view_menuitem_menu), net_gain);
+  gtk_tooltips_set_tip (tooltips, net_gain, _("Display Net Gain towards Viewer"), NULL);
+
+  hbox10 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox10);
+  gtk_box_pack_start (GTK_BOX (freqplots_hbox1), hbox10, FALSE, FALSE, 0);
+
+  freqplots_gmax_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Max Gain"));
+  gtk_widget_show (freqplots_gmax_togglebutton);
+  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_gmax_togglebutton, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, freqplots_gmax_togglebutton, _("Plot maximum gain over frequency range"), NULL);
+
+  freqplots_gdir_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Direct."));
+  gtk_widget_show (freqplots_gdir_togglebutton);
+  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_gdir_togglebutton, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, freqplots_gdir_togglebutton, _("Plot direction of maximum gain"), NULL);
+
+  freqplots_gviewer_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Viewer"));
+  gtk_widget_show (freqplots_gviewer_togglebutton);
+  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_gviewer_togglebutton, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, freqplots_gviewer_togglebutton, _("Plot gain in direction of viewer\n(perpenticular to screen)"), NULL);
+
+  freqplots_vswr_togglebutton = gtk_toggle_button_new_with_mnemonic (_("VSWR"));
+  gtk_widget_show (freqplots_vswr_togglebutton);
+  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_vswr_togglebutton, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, freqplots_vswr_togglebutton, _("Plot VSWR over frequency"), NULL);
+
+  freqplots_zrlzim_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Zr/Zi"));
+  gtk_widget_show (freqplots_zrlzim_togglebutton);
+  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_zrlzim_togglebutton, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, freqplots_zrlzim_togglebutton, _("Plot real and imaginary input impedances"), NULL);
+
+  freqplots_zmgzph_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Zm/Zph"));
+  gtk_widget_show (freqplots_zmgzph_togglebutton);
+  gtk_box_pack_start (GTK_BOX (hbox10), freqplots_zmgzph_togglebutton, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, freqplots_zmgzph_togglebutton, _("Plot magnitude and phase of input impedance"), NULL);
+
+  label215 = gtk_label_new (_("  Freq Loop "));
+  gtk_widget_show (label215);
+  gtk_box_pack_start (GTK_BOX (hbox10), label215, FALSE, FALSE, 0);
+
+  plot_loop_start = gtk_button_new ();
+  gtk_widget_show (plot_loop_start);
+  gtk_box_pack_start (GTK_BOX (freqplots_hbox1), plot_loop_start, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, plot_loop_start, _("Start Frequency Loop"), NULL);
+
+  image61 = gtk_image_new_from_stock ("gtk-media-play", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image61);
+  gtk_container_add (GTK_CONTAINER (plot_loop_start), image61);
+
+  plot_loop_pause = gtk_button_new ();
+  gtk_widget_show (plot_loop_pause);
+  gtk_box_pack_start (GTK_BOX (freqplots_hbox1), plot_loop_pause, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, plot_loop_pause, _("Pause Frequency Loop"), NULL);
+
+  image64 = gtk_image_new_from_stock ("gtk-media-pause", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image64);
+  gtk_container_add (GTK_CONTAINER (plot_loop_pause), image64);
+
+  plot_loop_reset = gtk_button_new ();
+  gtk_widget_show (plot_loop_reset);
+  gtk_box_pack_start (GTK_BOX (freqplots_hbox1), plot_loop_reset, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, plot_loop_reset, _("Reset Frequency Loop"), NULL);
+
+  image63 = gtk_image_new_from_stock ("gtk-media-rewind", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image63);
+  gtk_container_add (GTK_CONTAINER (plot_loop_reset), image63);
+
+  hseparator4 = gtk_hseparator_new ();
+  gtk_widget_show (hseparator4);
+  gtk_box_pack_start (GTK_BOX (vbox2), hseparator4, FALSE, FALSE, 4);
+
+  hbox15 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox15);
+  gtk_box_pack_start (GTK_BOX (vbox2), hbox15, FALSE, FALSE, 0);
+  gtk_widget_set_size_request (hbox15, -1, 30);
+
+  label16 = gtk_label_new (_("F MHz"));
+  gtk_widget_show (label16);
+  gtk_box_pack_start (GTK_BOX (hbox15), label16, FALSE, FALSE, 0);
+
+  freqplots_fmhz_entry = gtk_entry_new ();
+  gtk_widget_show (freqplots_fmhz_entry);
+  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_fmhz_entry, FALSE, FALSE, 0);
+  gtk_entry_set_text (GTK_ENTRY (freqplots_fmhz_entry), _(" - - - - - - -"));
+  gtk_entry_set_width_chars (GTK_ENTRY (freqplots_fmhz_entry), 8);
+
+  label12 = gtk_label_new (_(" Max Gain"));
+  gtk_widget_show (label12);
+  gtk_box_pack_start (GTK_BOX (hbox15), label12, FALSE, FALSE, 0);
+
+  freqplots_maxgain_entry = gtk_entry_new ();
+  gtk_widget_show (freqplots_maxgain_entry);
+  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_maxgain_entry, FALSE, FALSE, 0);
+  gtk_entry_set_text (GTK_ENTRY (freqplots_maxgain_entry), _(" - - - - -"));
+  gtk_entry_set_width_chars (GTK_ENTRY (freqplots_maxgain_entry), 6);
+
+  label13 = gtk_label_new (_(" VSWR"));
+  gtk_widget_show (label13);
+  gtk_box_pack_start (GTK_BOX (hbox15), label13, FALSE, FALSE, 1);
+
+  freqplots_vswr_entry = gtk_entry_new ();
+  gtk_widget_show (freqplots_vswr_entry);
+  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_vswr_entry, FALSE, FALSE, 0);
+  gtk_entry_set_text (GTK_ENTRY (freqplots_vswr_entry), _(" - - - -"));
+  gtk_entry_set_width_chars (GTK_ENTRY (freqplots_vswr_entry), 5);
+
+  label14 = gtk_label_new (_(" Zreal"));
+  gtk_widget_show (label14);
+  gtk_box_pack_start (GTK_BOX (hbox15), label14, FALSE, FALSE, 1);
+
+  freqplots_zreal_entry = gtk_entry_new ();
+  gtk_widget_show (freqplots_zreal_entry);
+  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_zreal_entry, FALSE, FALSE, 0);
+  gtk_entry_set_text (GTK_ENTRY (freqplots_zreal_entry), _(" - - - -"));
+  gtk_entry_set_width_chars (GTK_ENTRY (freqplots_zreal_entry), 5);
+
+  label15 = gtk_label_new (_(" Zim"));
+  gtk_widget_show (label15);
+  gtk_box_pack_start (GTK_BOX (hbox15), label15, FALSE, FALSE, 1);
+
+  freqplots_zimag_entry = gtk_entry_new ();
+  gtk_widget_show (freqplots_zimag_entry);
+  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_zimag_entry, FALSE, FALSE, 0);
+  gtk_entry_set_text (GTK_ENTRY (freqplots_zimag_entry), _(" - - - -"));
+  gtk_entry_set_width_chars (GTK_ENTRY (freqplots_zimag_entry), 5);
+
+  label212 = gtk_label_new (_(" Zo"));
+  gtk_widget_show (label212);
+  gtk_box_pack_start (GTK_BOX (hbox15), label212, FALSE, FALSE, 0);
+
+  freqplots_zo_spinbutton_adj = gtk_adjustment_new (50, 1, 999, 0.10000000149, 10, 0);
+  freqplots_zo_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (freqplots_zo_spinbutton_adj), 0.20000000298, 1);
+  gtk_widget_show (freqplots_zo_spinbutton);
+  gtk_box_pack_start (GTK_BOX (hbox15), freqplots_zo_spinbutton, FALSE, FALSE, 4);
+  gtk_tooltips_set_tip (tooltips, freqplots_zo_spinbutton, _("Specify Zo of transmission line"), NULL);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (freqplots_zo_spinbutton), TRUE);
+
+  frame2 = gtk_frame_new (NULL);
+  gtk_widget_show (frame2);
+  gtk_box_pack_start (GTK_BOX (vbox2), frame2, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame2), 4);
+
+  alignment2 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment2);
+  gtk_container_add (GTK_CONTAINER (frame2), alignment2);
+  gtk_container_set_border_width (GTK_CONTAINER (alignment2), 2);
+
+  freqplots_drawingarea = gtk_drawing_area_new ();
+  gtk_widget_show (freqplots_drawingarea);
+  gtk_container_add (GTK_CONTAINER (alignment2), freqplots_drawingarea);
+  gtk_widget_set_size_request (freqplots_drawingarea, 681, 769);
+  GTK_WIDGET_SET_FLAGS (freqplots_drawingarea, GTK_CAN_FOCUS);
+  gtk_widget_set_events (freqplots_drawingarea, GDK_BUTTON_PRESS_MASK);
+
+  freqplots_label = gtk_label_new (_("Structure Data Plots"));
+  gtk_widget_show (freqplots_label);
+  gtk_frame_set_label_widget (GTK_FRAME (frame2), freqplots_label);
+  gtk_misc_set_padding (GTK_MISC (freqplots_label), 4, 0);
+
+  g_signal_connect ((gpointer) freqplots_window, "delete_event",
+                    G_CALLBACK (on_freqplots_window_delete_event),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_window, "destroy",
+                    G_CALLBACK (on_freqplots_window_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_new, "activate",
+                    G_CALLBACK (on_new_activate),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_open_input, "activate",
+                    G_CALLBACK (on_open_input_activate),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_save, "activate",
+                    G_CALLBACK (on_freqplots_save_activate),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_save_as, "activate",
+                    G_CALLBACK (on_freqplots_save_as_activate),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_save_as_gnuplot, "activate",
+                    G_CALLBACK (on_freqplots_save_as_gnuplot_activate),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_quit, "activate",
+                    G_CALLBACK (on_quit_activate),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_pol_menu, "activate",
+                    G_CALLBACK (freqplots_pol_menu_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_total, "activate",
+                    G_CALLBACK (on_rdpattern_total_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_horizontal, "activate",
+                    G_CALLBACK (on_rdpattern_horizontal_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_vertical, "activate",
+                    G_CALLBACK (on_rdpattern_vertical_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_right_hand, "activate",
+                    G_CALLBACK (on_rdpattern_right_hand_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_left_hand, "activate",
+                    G_CALLBACK (on_rdpattern_left_hand_activate),
+                    NULL);
+  g_signal_connect ((gpointer) net_gain, "activate",
+                    G_CALLBACK (on_net_gain_activate),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_gmax_togglebutton, "toggled",
+                    G_CALLBACK (on_freqplots_gmax_togglebutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_gdir_togglebutton, "toggled",
+                    G_CALLBACK (on_freqplots_gdir_togglebutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_gviewer_togglebutton, "toggled",
+                    G_CALLBACK (on_freqplots_gviewer_togglebutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_vswr_togglebutton, "toggled",
+                    G_CALLBACK (on_freqplots_vswr_togglebutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_zrlzim_togglebutton, "toggled",
+                    G_CALLBACK (on_freqplots_zrlzim_togglebutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_zmgzph_togglebutton, "toggled",
+                    G_CALLBACK (on_freqplots_zmgzph_togglebutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) plot_loop_start, "clicked",
+                    G_CALLBACK (on_loop_start_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) plot_loop_pause, "clicked",
+                    G_CALLBACK (on_loop_pause_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) plot_loop_reset, "clicked",
+                    G_CALLBACK (on_loop_reset_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_zo_spinbutton, "value_changed",
+                    G_CALLBACK (on_freqplots_zo_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_drawingarea, "expose_event",
+                    G_CALLBACK (on_freqplots_drawingarea_expose_event),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_drawingarea, "configure_event",
+                    G_CALLBACK (on_freqplots_drawingarea_configure_event),
+                    NULL);
+  g_signal_connect ((gpointer) freqplots_drawingarea, "button_press_event",
+                    G_CALLBACK (on_freqplots_drawingarea_button_press_event),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (freqplots_window, freqplots_window, "freqplots_window");
+  GLADE_HOOKUP_OBJECT (freqplots_window, vbox2, "vbox2");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_hbox1, "freqplots_hbox1");
+  GLADE_HOOKUP_OBJECT (freqplots_window, menubar2, "menubar2");
+  GLADE_HOOKUP_OBJECT (freqplots_window, menuitem5, "menuitem5");
+  GLADE_HOOKUP_OBJECT (freqplots_window, menuitem5_menu, "menuitem5_menu");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_new, "freqplots_new");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_open_input, "freqplots_open_input");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_save, "freqplots_save");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_save_as, "freqplots_save_as");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_save_as_gnuplot, "freqplots_save_as_gnuplot");
+  GLADE_HOOKUP_OBJECT (freqplots_window, separatormenuitem2, "separatormenuitem2");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_quit, "freqplots_quit");
+  GLADE_HOOKUP_OBJECT (freqplots_window, view_menuitem, "view_menuitem");
+  GLADE_HOOKUP_OBJECT (freqplots_window, view_menuitem_menu, "view_menuitem_menu");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_pol_menu, "freqplots_pol_menu");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_pol_menu_menu, "freqplots_pol_menu_menu");
+  GLADE_HOOKUP_OBJECT (freqplots_window, rdpattern_total, "rdpattern_total");
+  GLADE_HOOKUP_OBJECT (freqplots_window, rdpattern_horizontal, "rdpattern_horizontal");
+  GLADE_HOOKUP_OBJECT (freqplots_window, rdpattern_vertical, "rdpattern_vertical");
+  GLADE_HOOKUP_OBJECT (freqplots_window, rdpattern_right_hand, "rdpattern_right_hand");
+  GLADE_HOOKUP_OBJECT (freqplots_window, rdpattern_left_hand, "rdpattern_left_hand");
+  GLADE_HOOKUP_OBJECT (freqplots_window, net_gain, "net_gain");
+  GLADE_HOOKUP_OBJECT (freqplots_window, hbox10, "hbox10");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_gmax_togglebutton, "freqplots_gmax_togglebutton");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_gdir_togglebutton, "freqplots_gdir_togglebutton");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_gviewer_togglebutton, "freqplots_gviewer_togglebutton");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_vswr_togglebutton, "freqplots_vswr_togglebutton");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_zrlzim_togglebutton, "freqplots_zrlzim_togglebutton");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_zmgzph_togglebutton, "freqplots_zmgzph_togglebutton");
+  GLADE_HOOKUP_OBJECT (freqplots_window, label215, "label215");
+  GLADE_HOOKUP_OBJECT (freqplots_window, plot_loop_start, "plot_loop_start");
+  GLADE_HOOKUP_OBJECT (freqplots_window, image61, "image61");
+  GLADE_HOOKUP_OBJECT (freqplots_window, plot_loop_pause, "plot_loop_pause");
+  GLADE_HOOKUP_OBJECT (freqplots_window, image64, "image64");
+  GLADE_HOOKUP_OBJECT (freqplots_window, plot_loop_reset, "plot_loop_reset");
+  GLADE_HOOKUP_OBJECT (freqplots_window, image63, "image63");
+  GLADE_HOOKUP_OBJECT (freqplots_window, hseparator4, "hseparator4");
+  GLADE_HOOKUP_OBJECT (freqplots_window, hbox15, "hbox15");
+  GLADE_HOOKUP_OBJECT (freqplots_window, label16, "label16");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_fmhz_entry, "freqplots_fmhz_entry");
+  GLADE_HOOKUP_OBJECT (freqplots_window, label12, "label12");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_maxgain_entry, "freqplots_maxgain_entry");
+  GLADE_HOOKUP_OBJECT (freqplots_window, label13, "label13");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_vswr_entry, "freqplots_vswr_entry");
+  GLADE_HOOKUP_OBJECT (freqplots_window, label14, "label14");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_zreal_entry, "freqplots_zreal_entry");
+  GLADE_HOOKUP_OBJECT (freqplots_window, label15, "label15");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_zimag_entry, "freqplots_zimag_entry");
+  GLADE_HOOKUP_OBJECT (freqplots_window, label212, "label212");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_zo_spinbutton, "freqplots_zo_spinbutton");
+  GLADE_HOOKUP_OBJECT (freqplots_window, frame2, "frame2");
+  GLADE_HOOKUP_OBJECT (freqplots_window, alignment2, "alignment2");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_drawingarea, "freqplots_drawingarea");
+  GLADE_HOOKUP_OBJECT (freqplots_window, freqplots_label, "freqplots_label");
+  GLADE_HOOKUP_OBJECT_NO_REF (freqplots_window, tooltips, "tooltips");
+
+  gtk_window_add_accel_group (GTK_WINDOW (freqplots_window), accel_group);
+
+  return freqplots_window;
+}
+
+GtkWidget*
+create_rdpattern_window (void)
+{
+  GtkWidget *rdpattern_window;
+  GtkWidget *vbox3;
+  GtkWidget *hbox11;
+  GtkWidget *menubar3;
+  GtkWidget *menuitem9;
+  GtkWidget *menuitem9_menu;
+  GtkWidget *rdpattern_new;
+  GtkWidget *rdpattern_open;
+  GtkWidget *rdpattern_save;
+  GtkWidget *rdpattern_save_as;
+  GtkWidget *rdpattern_save_as_gnuplot;
+  GtkWidget *image101;
+  GtkWidget *separatormenuitem3;
+  GtkWidget *rdpattern_quit;
+  GtkWidget *rdpattern_view_menuitem;
+  GtkWidget *rdpattern_view_menuitem_menu;
+  GtkWidget *rdpattern_pol_menu;
+  GtkWidget *rdpattern_pol_menu_menu;
+  GSList *rdpattern_total_group = NULL;
+  GtkWidget *rdpattern_total;
+  GtkWidget *rdpattern_horizontal;
+  GtkWidget *rdpattern_vertical;
+  GtkWidget *rdpattern_right_hand;
+  GtkWidget *rdpattern_left_hand;
+  GtkWidget *rdpattern_gain_scaling;
+  GtkWidget *rdpattern_gain_scaling_menu;
+  GSList *rdpattern_linear_power_group = NULL;
+  GtkWidget *rdpattern_linear_power;
+  GtkWidget *rdpattern_linear_voltage;
+  GtkWidget *rdpattern_arrl_style;
+  GtkWidget *rdpattern_logarithmic;
+  GtkWidget *near_field;
+  GtkWidget *near_field_menu;
+  GtkWidget *rdpattern_e_field;
+  GtkWidget *rdpattern_h_field;
+  GtkWidget *rdpattern_poynting_vector;
+  GtkWidget *rdpattern_animate;
+  GtkWidget *total_field;
+  GtkWidget *total_field_menu;
+  GSList *near_peak_value_group = NULL;
+  GtkWidget *near_peak_value;
+  GtkWidget *near_snapshot;
+  GtkWidget *common_projection;
+  GtkWidget *common_freq;
+  GtkWidget *rdpattern_overlay_structure;
+  GtkWidget *vseparator8;
+  GtkWidget *rdpattern_hbox1;
+  GtkWidget *rdpattern_gain_togglebutton;
+  GtkWidget *rdpattern_eh_togglebutton;
+  GtkWidget *vseparator9;
+  GtkWidget *label216;
+  GtkWidget *rdpatttern_loop_start;
+  GtkWidget *image59;
+  GtkWidget *rdpattern_loop_pause;
+  GtkWidget *image60;
+  GtkWidget *rdpattern_loop_reset;
+  GtkWidget *image58;
+  GtkWidget *label246;
+  GtkWidget *rdpattern_fstep_entry;
+  GtkWidget *hseparator3;
+  GtkWidget *rdpattern_hbox2;
+  GtkWidget *rdpattern_colorcode_minlabel;
+  GtkWidget *rdpattern_colorcode_drawingarea;
+  GtkWidget *rdpattern_colorcode_maxlabel;
+  GtkWidget *rdpattern_viewer_gain;
+  GtkWidget *label11;
+  GtkObject *rdpattern_freq_spinbutton_adj;
+  GtkWidget *rdpattern_freq_spinbutton;
+  GtkWidget *rdpattern_freq_label;
+  GtkWidget *rdpattern_freq_checkbutton;
+  GtkWidget *rdpattern_new_freq_button;
+  GtkWidget *image49;
+  GtkWidget *hseparator12;
+  GtkWidget *rdpattern_label;
+  GtkWidget *frame3;
+  GtkWidget *alignment3;
+  GtkWidget *rdpattern_drawingarea;
+  GtkWidget *rdpattern_hbox3;
+  GtkWidget *label248;
+  GtkWidget *rdpattern_x_axis;
+  GtkWidget *rdpattern_y_axis;
+  GtkWidget *rdpattern_z_axis;
+  GtkWidget *rdpattern_default_view;
+  GtkWidget *image34;
+  GtkWidget *image55;
+  GtkObject *rdpattern_rotate_spinbutton_adj;
+  GtkWidget *rdpattern_rotate_spinbutton;
+  GtkWidget *image56;
+  GtkObject *rdpattern_incline_spinbutton_adj;
+  GtkWidget *rdpattern_incline_spinbutton;
+  GtkWidget *label247;
+  GtkObject *rdpattern_zoom_spinbutton_adj;
+  GtkWidget *rdpattern_zoom_spinbutton;
+  GtkWidget *rdpattern_plus_button;
+  GtkWidget *image98;
+  GtkWidget *rdpattern_minus_button;
+  GtkWidget *image99;
+  GtkWidget *rdpattern_one_button;
+  GtkWidget *image100;
+  GtkAccelGroup *accel_group;
+  GtkTooltips *tooltips;
+
+  tooltips = gtk_tooltips_new ();
+
+  accel_group = gtk_accel_group_new ();
+
+  rdpattern_window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (rdpattern_window), 4);
+  gtk_window_set_title (GTK_WINDOW (rdpattern_window), _("Xnec2c: Radiation Patterns"));
+  gtk_window_set_gravity (GTK_WINDOW (rdpattern_window), GDK_GRAVITY_WEST);
+
+  vbox3 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox3);
+  gtk_container_add (GTK_CONTAINER (rdpattern_window), vbox3);
+
+  hbox11 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox11);
+  gtk_box_pack_start (GTK_BOX (vbox3), hbox11, FALSE, FALSE, 0);
+
+  menubar3 = gtk_menu_bar_new ();
+  gtk_widget_show (menubar3);
+  gtk_box_pack_start (GTK_BOX (hbox11), menubar3, FALSE, FALSE, 0);
+
+  menuitem9 = gtk_menu_item_new_with_mnemonic (_("_File"));
+  gtk_widget_show (menuitem9);
+  gtk_container_add (GTK_CONTAINER (menubar3), menuitem9);
+
+  menuitem9_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (menuitem9), menuitem9_menu);
+
+  rdpattern_new = gtk_image_menu_item_new_from_stock ("gtk-new", accel_group);
+  gtk_widget_show (rdpattern_new);
+  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_new);
+
+  rdpattern_open = gtk_image_menu_item_new_from_stock ("gtk-open", accel_group);
+  gtk_widget_show (rdpattern_open);
+  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_open);
+
+  rdpattern_save = gtk_image_menu_item_new_from_stock ("gtk-save", accel_group);
+  gtk_widget_show (rdpattern_save);
+  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_save);
+
+  rdpattern_save_as = gtk_image_menu_item_new_from_stock ("gtk-save-as", accel_group);
+  gtk_widget_show (rdpattern_save_as);
+  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_save_as);
+
+  rdpattern_save_as_gnuplot = gtk_image_menu_item_new_with_mnemonic (_("Save As gnuplot"));
+  gtk_widget_show (rdpattern_save_as_gnuplot);
+  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_save_as_gnuplot);
+
+  image101 = gtk_image_new_from_stock ("gtk-save-as", GTK_ICON_SIZE_MENU);
+  gtk_widget_show (image101);
+  gtk_image_menu_item_set_image (GTK_IMAGE_MENU_ITEM (rdpattern_save_as_gnuplot), image101);
+
+  separatormenuitem3 = gtk_separator_menu_item_new ();
+  gtk_widget_show (separatormenuitem3);
+  gtk_container_add (GTK_CONTAINER (menuitem9_menu), separatormenuitem3);
+  gtk_widget_set_sensitive (separatormenuitem3, FALSE);
+
+  rdpattern_quit = gtk_image_menu_item_new_from_stock ("gtk-quit", accel_group);
+  gtk_widget_show (rdpattern_quit);
+  gtk_container_add (GTK_CONTAINER (menuitem9_menu), rdpattern_quit);
+
+  rdpattern_view_menuitem = gtk_menu_item_new_with_mnemonic (_("_View"));
+  gtk_widget_show (rdpattern_view_menuitem);
+  gtk_container_add (GTK_CONTAINER (menubar3), rdpattern_view_menuitem);
+
+  rdpattern_view_menuitem_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (rdpattern_view_menuitem), rdpattern_view_menuitem_menu);
+
+  rdpattern_pol_menu = gtk_menu_item_new_with_mnemonic (_("Polarization"));
+  gtk_widget_show (rdpattern_pol_menu);
+  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), rdpattern_pol_menu);
+  gtk_tooltips_set_tip (tooltips, rdpattern_pol_menu, _("Display gain data relevant to polarization"), NULL);
+
+  rdpattern_pol_menu_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (rdpattern_pol_menu), rdpattern_pol_menu_menu);
+
+  rdpattern_total = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Total"));
+  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_total));
+  gtk_widget_show (rdpattern_total);
+  gtk_container_add (GTK_CONTAINER (rdpattern_pol_menu_menu), rdpattern_total);
+  gtk_tooltips_set_tip (tooltips, rdpattern_total, _("Total gain"), NULL);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_total), TRUE);
+
+  rdpattern_horizontal = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Horizontal"));
+  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_horizontal));
+  gtk_widget_show (rdpattern_horizontal);
+  gtk_container_add (GTK_CONTAINER (rdpattern_pol_menu_menu), rdpattern_horizontal);
+  gtk_tooltips_set_tip (tooltips, rdpattern_horizontal, _("Gain in horizontal polarization"), NULL);
+
+  rdpattern_vertical = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Vertical"));
+  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_vertical));
+  gtk_widget_show (rdpattern_vertical);
+  gtk_container_add (GTK_CONTAINER (rdpattern_pol_menu_menu), rdpattern_vertical);
+  gtk_tooltips_set_tip (tooltips, rdpattern_vertical, _("Gain in vertical polarization"), NULL);
+
+  rdpattern_right_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Right Hand"));
+  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_right_hand));
+  gtk_widget_show (rdpattern_right_hand);
+  gtk_container_add (GTK_CONTAINER (rdpattern_pol_menu_menu), rdpattern_right_hand);
+  gtk_tooltips_set_tip (tooltips, rdpattern_right_hand, _("Gain in rhcp"), NULL);
+
+  rdpattern_left_hand = gtk_radio_menu_item_new_with_mnemonic (rdpattern_total_group, _("Left Hand"));
+  rdpattern_total_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_left_hand));
+  gtk_widget_show (rdpattern_left_hand);
+  gtk_container_add (GTK_CONTAINER (rdpattern_pol_menu_menu), rdpattern_left_hand);
+  gtk_tooltips_set_tip (tooltips, rdpattern_left_hand, _("Gain in lhcp"), NULL);
+
+  rdpattern_gain_scaling = gtk_menu_item_new_with_mnemonic (_("Gain Scaling"));
+  gtk_widget_show (rdpattern_gain_scaling);
+  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), rdpattern_gain_scaling);
+  gtk_tooltips_set_tip (tooltips, rdpattern_gain_scaling, _("Select a style of gain scaling"), NULL);
+
+  rdpattern_gain_scaling_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (rdpattern_gain_scaling), rdpattern_gain_scaling_menu);
+
+  rdpattern_linear_power = gtk_radio_menu_item_new_with_mnemonic (rdpattern_linear_power_group, _("Linear Power"));
+  rdpattern_linear_power_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_linear_power));
+  gtk_widget_show (rdpattern_linear_power);
+  gtk_container_add (GTK_CONTAINER (rdpattern_gain_scaling_menu), rdpattern_linear_power);
+  gtk_tooltips_set_tip (tooltips, rdpattern_linear_power, _("Linear power scaling"), NULL);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_linear_power), TRUE);
+
+  rdpattern_linear_voltage = gtk_radio_menu_item_new_with_mnemonic (rdpattern_linear_power_group, _("Linear Voltage"));
+  rdpattern_linear_power_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_linear_voltage));
+  gtk_widget_show (rdpattern_linear_voltage);
+  gtk_container_add (GTK_CONTAINER (rdpattern_gain_scaling_menu), rdpattern_linear_voltage);
+  gtk_tooltips_set_tip (tooltips, rdpattern_linear_voltage, _("Linear field voltage scaling"), NULL);
+
+  rdpattern_arrl_style = gtk_radio_menu_item_new_with_mnemonic (rdpattern_linear_power_group, _("ARRL Style"));
+  rdpattern_linear_power_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_arrl_style));
+  gtk_widget_show (rdpattern_arrl_style);
+  gtk_container_add (GTK_CONTAINER (rdpattern_gain_scaling_menu), rdpattern_arrl_style);
+  gtk_tooltips_set_tip (tooltips, rdpattern_arrl_style, _("Scale gain in ARRL style"), NULL);
+
+  rdpattern_logarithmic = gtk_radio_menu_item_new_with_mnemonic (rdpattern_linear_power_group, _("Logarithmic"));
+  rdpattern_linear_power_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (rdpattern_logarithmic));
+  gtk_widget_show (rdpattern_logarithmic);
+  gtk_container_add (GTK_CONTAINER (rdpattern_gain_scaling_menu), rdpattern_logarithmic);
+  gtk_tooltips_set_tip (tooltips, rdpattern_logarithmic, _("Logarithmic gain scaling"), NULL);
+
+  near_field = gtk_menu_item_new_with_mnemonic (_("Near Field"));
+  gtk_widget_show (near_field);
+  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), near_field);
+
+  near_field_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (near_field), near_field_menu);
+
+  rdpattern_e_field = gtk_check_menu_item_new_with_mnemonic (_("Near E Field"));
+  gtk_widget_show (rdpattern_e_field);
+  gtk_container_add (GTK_CONTAINER (near_field_menu), rdpattern_e_field);
+  gtk_tooltips_set_tip (tooltips, rdpattern_e_field, _("Display near E field"), NULL);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_e_field), TRUE);
+
+  rdpattern_h_field = gtk_check_menu_item_new_with_mnemonic (_("Near H Field"));
+  gtk_widget_show (rdpattern_h_field);
+  gtk_container_add (GTK_CONTAINER (near_field_menu), rdpattern_h_field);
+  gtk_tooltips_set_tip (tooltips, rdpattern_h_field, _("Display near H field"), NULL);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_h_field), TRUE);
+
+  rdpattern_poynting_vector = gtk_check_menu_item_new_with_mnemonic (_("Poynting Vector"));
+  gtk_widget_show (rdpattern_poynting_vector);
+  gtk_container_add (GTK_CONTAINER (near_field_menu), rdpattern_poynting_vector);
+  gtk_tooltips_set_tip (tooltips, rdpattern_poynting_vector, _("Display Poynting vector"), NULL);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (rdpattern_poynting_vector), TRUE);
+
+  rdpattern_animate = gtk_menu_item_new_with_mnemonic (_("Animate Dialog"));
+  gtk_widget_show (rdpattern_animate);
+  gtk_container_add (GTK_CONTAINER (near_field_menu), rdpattern_animate);
+
+  total_field = gtk_menu_item_new_with_mnemonic (_("Total Field"));
+  gtk_widget_show (total_field);
+  gtk_container_add (GTK_CONTAINER (near_field_menu), total_field);
+
+  total_field_menu = gtk_menu_new ();
+  gtk_menu_item_set_submenu (GTK_MENU_ITEM (total_field), total_field_menu);
+
+  near_peak_value = gtk_radio_menu_item_new_with_mnemonic (near_peak_value_group, _("Peak Value"));
+  near_peak_value_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (near_peak_value));
+  gtk_widget_show (near_peak_value);
+  gtk_container_add (GTK_CONTAINER (total_field_menu), near_peak_value);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (near_peak_value), TRUE);
+
+  near_snapshot = gtk_radio_menu_item_new_with_mnemonic (near_peak_value_group, _("Snapshot"));
+  near_peak_value_group = gtk_radio_menu_item_get_group (GTK_RADIO_MENU_ITEM (near_snapshot));
+  gtk_widget_show (near_snapshot);
+  gtk_container_add (GTK_CONTAINER (total_field_menu), near_snapshot);
+
+  common_projection = gtk_check_menu_item_new_with_mnemonic (_("Common Projection"));
+  gtk_widget_show (common_projection);
+  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), common_projection);
+  gtk_tooltips_set_tip (tooltips, common_projection, _("Synchronize projection parametrs in different windows"), NULL);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (common_projection), TRUE);
+
+  common_freq = gtk_check_menu_item_new_with_mnemonic (_("Common Frequency"));
+  gtk_widget_show (common_freq);
+  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), common_freq);
+  gtk_tooltips_set_tip (tooltips, common_freq, _("Synchronize frequency selection in different windows"), NULL);
+  gtk_check_menu_item_set_active (GTK_CHECK_MENU_ITEM (common_freq), TRUE);
+
+  rdpattern_overlay_structure = gtk_check_menu_item_new_with_mnemonic (_("Overlay Structure"));
+  gtk_widget_show (rdpattern_overlay_structure);
+  gtk_container_add (GTK_CONTAINER (rdpattern_view_menuitem_menu), rdpattern_overlay_structure);
+
+  vseparator8 = gtk_vseparator_new ();
+  gtk_widget_show (vseparator8);
+  gtk_box_pack_start (GTK_BOX (hbox11), vseparator8, FALSE, FALSE, 4);
+
+  rdpattern_hbox1 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (rdpattern_hbox1);
+  gtk_box_pack_start (GTK_BOX (hbox11), rdpattern_hbox1, FALSE, FALSE, 0);
+
+  rdpattern_gain_togglebutton = gtk_toggle_button_new_with_mnemonic (_("Gain Pattern"));
+  gtk_widget_show (rdpattern_gain_togglebutton);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_gain_togglebutton, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpattern_gain_togglebutton, _("Calculate and display radiation pattern"), NULL);
+
+  rdpattern_eh_togglebutton = gtk_toggle_button_new_with_mnemonic (_("E/H Fields"));
+  gtk_widget_show (rdpattern_eh_togglebutton);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_eh_togglebutton, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpattern_eh_togglebutton, _("Calculate and display the near E/H fields"), NULL);
+
+  vseparator9 = gtk_vseparator_new ();
+  gtk_widget_show (vseparator9);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), vseparator9, FALSE, FALSE, 4);
+
+  label216 = gtk_label_new (_("Frequency Loop "));
+  gtk_widget_show (label216);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), label216, FALSE, FALSE, 0);
+  gtk_label_set_single_line_mode (GTK_LABEL (label216), TRUE);
+
+  rdpatttern_loop_start = gtk_button_new ();
+  gtk_widget_show (rdpatttern_loop_start);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpatttern_loop_start, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpatttern_loop_start, _("Start Frequency Loop"), NULL);
+
+  image59 = gtk_image_new_from_stock ("gtk-media-play", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image59);
+  gtk_container_add (GTK_CONTAINER (rdpatttern_loop_start), image59);
+
+  rdpattern_loop_pause = gtk_button_new ();
+  gtk_widget_show (rdpattern_loop_pause);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_loop_pause, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpattern_loop_pause, _("Pause Frequency Loop"), NULL);
+
+  image60 = gtk_image_new_from_stock ("gtk-media-pause", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image60);
+  gtk_container_add (GTK_CONTAINER (rdpattern_loop_pause), image60);
+
+  rdpattern_loop_reset = gtk_button_new ();
+  gtk_widget_show (rdpattern_loop_reset);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_loop_reset, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpattern_loop_reset, _("Reset Frequency Loop"), NULL);
+
+  image58 = gtk_image_new_from_stock ("gtk-media-rewind", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image58);
+  gtk_container_add (GTK_CONTAINER (rdpattern_loop_reset), image58);
+
+  label246 = gtk_label_new (_(" Step "));
+  gtk_widget_show (label246);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), label246, FALSE, FALSE, 0);
+  gtk_label_set_single_line_mode (GTK_LABEL (label246), TRUE);
+
+  rdpattern_fstep_entry = gtk_entry_new ();
+  gtk_widget_show (rdpattern_fstep_entry);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox1), rdpattern_fstep_entry, TRUE, TRUE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpattern_fstep_entry, _("Current Frequency Step"), NULL);
+  gtk_entry_set_max_length (GTK_ENTRY (rdpattern_fstep_entry), 3);
+  gtk_editable_set_editable (GTK_EDITABLE (rdpattern_fstep_entry), FALSE);
+  gtk_entry_set_text (GTK_ENTRY (rdpattern_fstep_entry), _("1"));
+  gtk_entry_set_invisible_char (GTK_ENTRY (rdpattern_fstep_entry), 9679);
+  gtk_entry_set_width_chars (GTK_ENTRY (rdpattern_fstep_entry), 3);
+
+  hseparator3 = gtk_hseparator_new ();
+  gtk_widget_show (hseparator3);
+  gtk_box_pack_start (GTK_BOX (vbox3), hseparator3, FALSE, FALSE, 4);
+
+  rdpattern_hbox2 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (rdpattern_hbox2);
+  gtk_box_pack_start (GTK_BOX (vbox3), rdpattern_hbox2, FALSE, FALSE, 0);
+  gtk_widget_set_size_request (rdpattern_hbox2, -1, 30);
+
+  rdpattern_colorcode_minlabel = gtk_label_new (_("0.0"));
+  gtk_widget_show (rdpattern_colorcode_minlabel);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_colorcode_minlabel, FALSE, FALSE, 1);
+  gtk_label_set_width_chars (GTK_LABEL (rdpattern_colorcode_minlabel), 5);
+
+  rdpattern_colorcode_drawingarea = gtk_drawing_area_new ();
+  gtk_widget_show (rdpattern_colorcode_drawingarea);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_colorcode_drawingarea, FALSE, FALSE, 1);
+  gtk_widget_set_size_request (rdpattern_colorcode_drawingarea, 160, -1);
+  gtk_tooltips_set_tip (tooltips, rdpattern_colorcode_drawingarea, _("Color code for Gain or E/H field values"), NULL);
+
+  rdpattern_colorcode_maxlabel = gtk_label_new (_("0.00"));
+  gtk_widget_show (rdpattern_colorcode_maxlabel);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_colorcode_maxlabel, FALSE, FALSE, 1);
+  gtk_misc_set_alignment (GTK_MISC (rdpattern_colorcode_maxlabel), 0, 0.5);
+  gtk_label_set_width_chars (GTK_LABEL (rdpattern_colorcode_maxlabel), 9);
+
+  rdpattern_viewer_gain = gtk_entry_new ();
+  gtk_widget_show (rdpattern_viewer_gain);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_viewer_gain, FALSE, FALSE, 1);
+  gtk_tooltips_set_tip (tooltips, rdpattern_viewer_gain, _("Gain in direction of viewer\n(perpenticular to screen)"), NULL);
+  gtk_entry_set_text (GTK_ENTRY (rdpattern_viewer_gain), _(" - - - - -"));
+  gtk_entry_set_width_chars (GTK_ENTRY (rdpattern_viewer_gain), 6);
+
+  label11 = gtk_label_new (_("dB"));
+  gtk_widget_show (label11);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), label11, FALSE, FALSE, 1);
+  gtk_label_set_single_line_mode (GTK_LABEL (label11), TRUE);
+
+  rdpattern_freq_spinbutton_adj = gtk_adjustment_new (0.00999999977648, 0.00999999977648, 9999, 0.00999999977648, 10, 0);
+  rdpattern_freq_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (rdpattern_freq_spinbutton_adj), 0.0010000000475, 3);
+  gtk_widget_show (rdpattern_freq_spinbutton);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_freq_spinbutton, FALSE, FALSE, 1);
+  gtk_tooltips_set_tip (tooltips, rdpattern_freq_spinbutton, _("Enter frequency in MHz"), NULL);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (rdpattern_freq_spinbutton), TRUE);
+
+  rdpattern_freq_label = gtk_label_new (_("MHz"));
+  gtk_widget_show (rdpattern_freq_label);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_freq_label, FALSE, FALSE, 1);
+  gtk_misc_set_padding (GTK_MISC (rdpattern_freq_label), 4, 0);
+  gtk_label_set_single_line_mode (GTK_LABEL (rdpattern_freq_label), TRUE);
+
+  rdpattern_freq_checkbutton = gtk_check_button_new_with_mnemonic (_("Apply"));
+  gtk_widget_show (rdpattern_freq_checkbutton);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_freq_checkbutton, FALSE, FALSE, 2);
+  gtk_tooltips_set_tip (tooltips, rdpattern_freq_checkbutton, _("Enable data calculation on frequency change"), NULL);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (rdpattern_freq_checkbutton), TRUE);
+
+  rdpattern_new_freq_button = gtk_button_new ();
+  gtk_widget_show (rdpattern_new_freq_button);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox2), rdpattern_new_freq_button, FALSE, FALSE, 2);
+  gtk_tooltips_set_tip (tooltips, rdpattern_new_freq_button, _("Calculate data for new frequency"), NULL);
+
+  image49 = gtk_image_new_from_stock ("gtk-apply", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image49);
+  gtk_container_add (GTK_CONTAINER (rdpattern_new_freq_button), image49);
+
+  hseparator12 = gtk_hseparator_new ();
+  gtk_widget_show (hseparator12);
+  gtk_box_pack_start (GTK_BOX (vbox3), hseparator12, FALSE, FALSE, 4);
+
+  rdpattern_label = gtk_label_new (_("Radiation Patterns"));
+  gtk_widget_show (rdpattern_label);
+  gtk_box_pack_start (GTK_BOX (vbox3), rdpattern_label, FALSE, FALSE, 0);
+  gtk_label_set_width_chars (GTK_LABEL (rdpattern_label), 14);
+  gtk_label_set_single_line_mode (GTK_LABEL (rdpattern_label), TRUE);
+
+  frame3 = gtk_frame_new (NULL);
+  gtk_widget_show (frame3);
+  gtk_box_pack_start (GTK_BOX (vbox3), frame3, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame3), 4);
+
+  alignment3 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment3);
+  gtk_container_add (GTK_CONTAINER (frame3), alignment3);
+  gtk_container_set_border_width (GTK_CONTAINER (alignment3), 2);
+
+  rdpattern_drawingarea = gtk_drawing_area_new ();
+  gtk_widget_show (rdpattern_drawingarea);
+  gtk_container_add (GTK_CONTAINER (alignment3), rdpattern_drawingarea);
+  gtk_widget_set_size_request (rdpattern_drawingarea, 681, 769);
+  GTK_WIDGET_SET_FLAGS (rdpattern_drawingarea, GTK_CAN_FOCUS);
+
+  rdpattern_hbox3 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (rdpattern_hbox3);
+  gtk_frame_set_label_widget (GTK_FRAME (frame3), rdpattern_hbox3);
+
+  label248 = gtk_label_new (_("View Radiation"));
+  gtk_widget_show (label248);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), label248, FALSE, FALSE, 0);
+  gtk_label_set_width_chars (GTK_LABEL (label248), 14);
+
+  rdpattern_x_axis = gtk_button_new_with_mnemonic (_("X"));
+  gtk_widget_show (rdpattern_x_axis);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_x_axis, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpattern_x_axis, _("View radiation pattern along X-axis"), NULL);
+  gtk_widget_add_accelerator (rdpattern_x_axis, "clicked", accel_group,
+                              GDK_X, (GdkModifierType) 0,
+                              GTK_ACCEL_VISIBLE);
+
+  rdpattern_y_axis = gtk_button_new_with_mnemonic (_("Y"));
+  gtk_widget_show (rdpattern_y_axis);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_y_axis, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpattern_y_axis, _("View radiation pattern along Y-axis"), NULL);
+  gtk_widget_add_accelerator (rdpattern_y_axis, "clicked", accel_group,
+                              GDK_Y, (GdkModifierType) 0,
+                              GTK_ACCEL_VISIBLE);
+
+  rdpattern_z_axis = gtk_button_new_with_mnemonic (_("Z"));
+  gtk_widget_show (rdpattern_z_axis);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_z_axis, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpattern_z_axis, _("View radiation pattern along Z-axis"), NULL);
+  gtk_widget_add_accelerator (rdpattern_z_axis, "clicked", accel_group,
+                              GDK_Z, (GdkModifierType) 0,
+                              GTK_ACCEL_VISIBLE);
+
+  rdpattern_default_view = gtk_button_new ();
+  gtk_widget_show (rdpattern_default_view);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_default_view, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpattern_default_view, _("View radiation pattern in default projection"), NULL);
+
+  image34 = gtk_image_new_from_stock ("gtk-redo", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image34);
+  gtk_container_add (GTK_CONTAINER (rdpattern_default_view), image34);
+
+  image55 = gtk_image_new_from_stock ("gtk-refresh", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image55);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), image55, TRUE, TRUE, 0);
+
+  rdpattern_rotate_spinbutton_adj = gtk_adjustment_new (45, -360, 360, 1, 10, 0);
+  rdpattern_rotate_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (rdpattern_rotate_spinbutton_adj), 1, 0);
+  gtk_widget_show (rdpattern_rotate_spinbutton);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_rotate_spinbutton, TRUE, TRUE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpattern_rotate_spinbutton, _("Rotate radiation pattern around Z-axis"), NULL);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (rdpattern_rotate_spinbutton), TRUE);
+
+  image56 = gtk_image_new_from_stock ("gtk-go-down", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image56);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), image56, TRUE, TRUE, 0);
+
+  rdpattern_incline_spinbutton_adj = gtk_adjustment_new (45, -180, 180, 1, 10, 0);
+  rdpattern_incline_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (rdpattern_incline_spinbutton_adj), 1, 0);
+  gtk_widget_show (rdpattern_incline_spinbutton);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_incline_spinbutton, TRUE, TRUE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpattern_incline_spinbutton, _("Incline radiation pattern to plane of screen"), NULL);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (rdpattern_incline_spinbutton), TRUE);
+
+  label247 = gtk_label_new (_(" Zoom % "));
+  gtk_widget_show (label247);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), label247, FALSE, FALSE, 0);
+  gtk_label_set_single_line_mode (GTK_LABEL (label247), TRUE);
+
+  rdpattern_zoom_spinbutton_adj = gtk_adjustment_new (100, 10, 999, 1, 10, 0);
+  rdpattern_zoom_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (rdpattern_zoom_spinbutton_adj), 1, 0);
+  gtk_widget_show (rdpattern_zoom_spinbutton);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_zoom_spinbutton, TRUE, TRUE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpattern_zoom_spinbutton, _("Zoom Structure Display"), NULL);
+
+  rdpattern_plus_button = gtk_button_new ();
+  gtk_widget_show (rdpattern_plus_button);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_plus_button, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpattern_plus_button, _("Zoom In"), NULL);
+
+  image98 = gtk_image_new_from_stock ("gtk-zoom-in", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image98);
+  gtk_container_add (GTK_CONTAINER (rdpattern_plus_button), image98);
+
+  rdpattern_minus_button = gtk_button_new ();
+  gtk_widget_show (rdpattern_minus_button);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_minus_button, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpattern_minus_button, _("Zoom Out"), NULL);
+
+  image99 = gtk_image_new_from_stock ("gtk-zoom-out", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image99);
+  gtk_container_add (GTK_CONTAINER (rdpattern_minus_button), image99);
+
+  rdpattern_one_button = gtk_button_new ();
+  gtk_widget_show (rdpattern_one_button);
+  gtk_box_pack_start (GTK_BOX (rdpattern_hbox3), rdpattern_one_button, FALSE, FALSE, 0);
+  gtk_tooltips_set_tip (tooltips, rdpattern_one_button, _("Zoom to Default 1:1"), NULL);
+
+  image100 = gtk_image_new_from_stock ("gtk-zoom-100", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image100);
+  gtk_container_add (GTK_CONTAINER (rdpattern_one_button), image100);
+
+  g_signal_connect ((gpointer) rdpattern_window, "delete_event",
+                    G_CALLBACK (on_rdpattern_window_delete_event),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_window, "destroy",
+                    G_CALLBACK (on_rdpattern_window_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_new, "activate",
+                    G_CALLBACK (on_new_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_open, "activate",
+                    G_CALLBACK (on_open_input_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_save, "activate",
+                    G_CALLBACK (on_rdpattern_save_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_save_as, "activate",
+                    G_CALLBACK (on_rdpattern_save_as_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_save_as_gnuplot, "activate",
+                    G_CALLBACK (on_rdpattern_save_as_gnuplot_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_quit, "activate",
+                    G_CALLBACK (on_quit_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_view_menuitem, "activate",
+                    G_CALLBACK (rdpattern_view_menuitem_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_pol_menu, "activate",
+                    G_CALLBACK (rdpattern_pol_menu_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_total, "activate",
+                    G_CALLBACK (on_rdpattern_total_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_horizontal, "activate",
+                    G_CALLBACK (on_rdpattern_horizontal_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_vertical, "activate",
+                    G_CALLBACK (on_rdpattern_vertical_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_right_hand, "activate",
+                    G_CALLBACK (on_rdpattern_right_hand_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_left_hand, "activate",
+                    G_CALLBACK (on_rdpattern_left_hand_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_linear_power, "activate",
+                    G_CALLBACK (on_rdpattern_linear_power_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_linear_voltage, "activate",
+                    G_CALLBACK (on_rdpattern_linear_voltage_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_arrl_style, "activate",
+                    G_CALLBACK (on_rdpattern_arrl_style_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_logarithmic, "activate",
+                    G_CALLBACK (on_rdpattern_logarithmic_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_e_field, "activate",
+                    G_CALLBACK (on_rdpattern_e_field_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_h_field, "activate",
+                    G_CALLBACK (on_rdpattern_h_field_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_poynting_vector, "activate",
+                    G_CALLBACK (on_rdpattern_poynting_vector_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_animate, "activate",
+                    G_CALLBACK (on_rdpattern_animate_activate),
+                    NULL);
+  g_signal_connect ((gpointer) near_peak_value, "activate",
+                    G_CALLBACK (on_near_peak_value_activate),
+                    NULL);
+  g_signal_connect ((gpointer) near_snapshot, "activate",
+                    G_CALLBACK (on_near_snapshot_activate),
+                    NULL);
+  g_signal_connect ((gpointer) common_projection, "activate",
+                    G_CALLBACK (on_common_projection_activate),
+                    NULL);
+  g_signal_connect ((gpointer) common_freq, "activate",
+                    G_CALLBACK (on_common_freq_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_overlay_structure, "activate",
+                    G_CALLBACK (on_rdpattern_overlay_structure_activate),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_gain_togglebutton, "toggled",
+                    G_CALLBACK (on_rdpattern_gain_togglebutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_eh_togglebutton, "toggled",
+                    G_CALLBACK (on_rdpattern_eh_togglebutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) rdpatttern_loop_start, "clicked",
+                    G_CALLBACK (on_loop_start_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_loop_pause, "clicked",
+                    G_CALLBACK (on_loop_pause_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_loop_reset, "clicked",
+                    G_CALLBACK (on_loop_reset_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_colorcode_drawingarea, "expose_event",
+                    G_CALLBACK (on_rdpattern_colorcode_drawingarea_expose_event),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_freq_spinbutton, "value_changed",
+                    G_CALLBACK (on_rdpattern_freq_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_new_freq_button, "clicked",
+                    G_CALLBACK (on_rdpattern_new_freq_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_drawingarea, "configure_event",
+                    G_CALLBACK (on_rdpattern_drawingarea_configure_event),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_drawingarea, "expose_event",
+                    G_CALLBACK (on_rdpattern_drawingarea_expose_event),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_drawingarea, "button_press_event",
+                    G_CALLBACK (on_rdpattern_drawingarea_button_press_event),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_drawingarea, "scroll_event",
+                    G_CALLBACK (on_rdpattern_drawingarea_scroll_event),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_x_axis, "clicked",
+                    G_CALLBACK (on_rdpattern_x_axis_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_y_axis, "clicked",
+                    G_CALLBACK (on_rdpattern_y_axis_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_z_axis, "clicked",
+                    G_CALLBACK (on_rdpattern_z_axis_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_default_view, "clicked",
+                    G_CALLBACK (on_rdpattern_default_view_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_rotate_spinbutton, "value_changed",
+                    G_CALLBACK (on_rdpattern_rotate_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_incline_spinbutton, "value_changed",
+                    G_CALLBACK (on_rdpattern_incline_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_zoom_spinbutton, "value_changed",
+                    G_CALLBACK (on_rdpattern_zoom_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_plus_button, "clicked",
+                    G_CALLBACK (on_rdpattern_plus_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_minus_button, "clicked",
+                    G_CALLBACK (on_rdpattern_minus_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) rdpattern_one_button, "clicked",
+                    G_CALLBACK (on_rdpattern_one_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (rdpattern_window, rdpattern_window, "rdpattern_window");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, vbox3, "vbox3");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, hbox11, "hbox11");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, menubar3, "menubar3");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, menuitem9, "menuitem9");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, menuitem9_menu, "menuitem9_menu");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_new, "rdpattern_new");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_open, "rdpattern_open");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_save, "rdpattern_save");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_save_as, "rdpattern_save_as");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_save_as_gnuplot, "rdpattern_save_as_gnuplot");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, image101, "image101");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, separatormenuitem3, "separatormenuitem3");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_quit, "rdpattern_quit");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_view_menuitem, "rdpattern_view_menuitem");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_view_menuitem_menu, "rdpattern_view_menuitem_menu");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_pol_menu, "rdpattern_pol_menu");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_pol_menu_menu, "rdpattern_pol_menu_menu");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_total, "rdpattern_total");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_horizontal, "rdpattern_horizontal");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_vertical, "rdpattern_vertical");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_right_hand, "rdpattern_right_hand");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_left_hand, "rdpattern_left_hand");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_gain_scaling, "rdpattern_gain_scaling");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_gain_scaling_menu, "rdpattern_gain_scaling_menu");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_linear_power, "rdpattern_linear_power");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_linear_voltage, "rdpattern_linear_voltage");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_arrl_style, "rdpattern_arrl_style");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_logarithmic, "rdpattern_logarithmic");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, near_field, "near_field");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, near_field_menu, "near_field_menu");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_e_field, "rdpattern_e_field");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_h_field, "rdpattern_h_field");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_poynting_vector, "rdpattern_poynting_vector");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_animate, "rdpattern_animate");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, total_field, "total_field");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, total_field_menu, "total_field_menu");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, near_peak_value, "near_peak_value");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, near_snapshot, "near_snapshot");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, common_projection, "common_projection");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, common_freq, "common_freq");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_overlay_structure, "rdpattern_overlay_structure");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, vseparator8, "vseparator8");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_hbox1, "rdpattern_hbox1");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_gain_togglebutton, "rdpattern_gain_togglebutton");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_eh_togglebutton, "rdpattern_eh_togglebutton");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, vseparator9, "vseparator9");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, label216, "label216");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpatttern_loop_start, "rdpatttern_loop_start");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, image59, "image59");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_loop_pause, "rdpattern_loop_pause");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, image60, "image60");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_loop_reset, "rdpattern_loop_reset");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, image58, "image58");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, label246, "label246");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_fstep_entry, "rdpattern_fstep_entry");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, hseparator3, "hseparator3");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_hbox2, "rdpattern_hbox2");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_colorcode_minlabel, "rdpattern_colorcode_minlabel");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_colorcode_drawingarea, "rdpattern_colorcode_drawingarea");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_colorcode_maxlabel, "rdpattern_colorcode_maxlabel");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_viewer_gain, "rdpattern_viewer_gain");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, label11, "label11");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_freq_spinbutton, "rdpattern_freq_spinbutton");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_freq_label, "rdpattern_freq_label");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_freq_checkbutton, "rdpattern_freq_checkbutton");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_new_freq_button, "rdpattern_new_freq_button");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, image49, "image49");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, hseparator12, "hseparator12");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_label, "rdpattern_label");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, frame3, "frame3");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, alignment3, "alignment3");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_drawingarea, "rdpattern_drawingarea");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_hbox3, "rdpattern_hbox3");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, label248, "label248");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_x_axis, "rdpattern_x_axis");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_y_axis, "rdpattern_y_axis");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_z_axis, "rdpattern_z_axis");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_default_view, "rdpattern_default_view");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, image34, "image34");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, image55, "image55");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_rotate_spinbutton, "rdpattern_rotate_spinbutton");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, image56, "image56");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_incline_spinbutton, "rdpattern_incline_spinbutton");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, label247, "label247");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_zoom_spinbutton, "rdpattern_zoom_spinbutton");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_plus_button, "rdpattern_plus_button");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, image98, "image98");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_minus_button, "rdpattern_minus_button");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, image99, "image99");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, rdpattern_one_button, "rdpattern_one_button");
+  GLADE_HOOKUP_OBJECT (rdpattern_window, image100, "image100");
+  GLADE_HOOKUP_OBJECT_NO_REF (rdpattern_window, tooltips, "tooltips");
+
+  gtk_window_add_accel_group (GTK_WINDOW (rdpattern_window), accel_group);
+
+  return rdpattern_window;
+}
+
+GtkWidget*
+create_quit_dialog (void)
+{
+  GtkWidget *quit_dialog;
+  GtkWidget *dialog_vbox2;
+  GtkWidget *hbox12;
+  GtkWidget *image36;
+  GtkWidget *quit_label;
+  GtkWidget *dialog_action_area2;
+  GtkWidget *quit_cancelbutton;
+  GtkWidget *quit_okbutton;
+
+  quit_dialog = gtk_dialog_new ();
+  gtk_container_set_border_width (GTK_CONTAINER (quit_dialog), 2);
+  gtk_window_set_title (GTK_WINDOW (quit_dialog), _("Confirmation"));
+  gtk_window_set_position (GTK_WINDOW (quit_dialog), GTK_WIN_POS_MOUSE);
+  gtk_window_set_modal (GTK_WINDOW (quit_dialog), TRUE);
+  gtk_window_set_type_hint (GTK_WINDOW (quit_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
+
+  dialog_vbox2 = GTK_DIALOG (quit_dialog)->vbox;
+  gtk_widget_show (dialog_vbox2);
+
+  hbox12 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox12);
+  gtk_box_pack_start (GTK_BOX (dialog_vbox2), hbox12, TRUE, TRUE, 0);
+
+  image36 = gtk_image_new_from_stock ("gtk-dialog-question", GTK_ICON_SIZE_DIALOG);
+  gtk_widget_show (image36);
+  gtk_box_pack_start (GTK_BOX (hbox12), image36, TRUE, TRUE, 0);
+  gtk_misc_set_padding (GTK_MISC (image36), 4, 4);
+
+  quit_label = gtk_label_new (_("Quit xnec2c?"));
+  gtk_widget_show (quit_label);
+  gtk_box_pack_start (GTK_BOX (hbox12), quit_label, FALSE, FALSE, 0);
+  gtk_misc_set_padding (GTK_MISC (quit_label), 4, 0);
+
+  dialog_action_area2 = GTK_DIALOG (quit_dialog)->action_area;
+  gtk_widget_show (dialog_action_area2);
+  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area2), GTK_BUTTONBOX_END);
+
+  quit_cancelbutton = gtk_button_new_from_stock ("gtk-cancel");
+  gtk_widget_show (quit_cancelbutton);
+  gtk_dialog_add_action_widget (GTK_DIALOG (quit_dialog), quit_cancelbutton, GTK_RESPONSE_CANCEL);
+  gtk_container_set_border_width (GTK_CONTAINER (quit_cancelbutton), 2);
+  GTK_WIDGET_SET_FLAGS (quit_cancelbutton, GTK_CAN_DEFAULT);
+
+  quit_okbutton = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (quit_okbutton);
+  gtk_dialog_add_action_widget (GTK_DIALOG (quit_dialog), quit_okbutton, GTK_RESPONSE_OK);
+  gtk_container_set_border_width (GTK_CONTAINER (quit_okbutton), 2);
+  GTK_WIDGET_SET_FLAGS (quit_okbutton, GTK_CAN_DEFAULT);
+
+  g_signal_connect ((gpointer) quit_dialog, "destroy",
+                    G_CALLBACK (on_quit_dialog_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) quit_cancelbutton, "clicked",
+                    G_CALLBACK (on_quit_cancelbutton_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) quit_okbutton, "clicked",
+                    G_CALLBACK (on_quit_okbutton_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (quit_dialog, quit_dialog, "quit_dialog");
+  GLADE_HOOKUP_OBJECT_NO_REF (quit_dialog, dialog_vbox2, "dialog_vbox2");
+  GLADE_HOOKUP_OBJECT (quit_dialog, hbox12, "hbox12");
+  GLADE_HOOKUP_OBJECT (quit_dialog, image36, "image36");
+  GLADE_HOOKUP_OBJECT (quit_dialog, quit_label, "quit_label");
+  GLADE_HOOKUP_OBJECT_NO_REF (quit_dialog, dialog_action_area2, "dialog_action_area2");
+  GLADE_HOOKUP_OBJECT (quit_dialog, quit_cancelbutton, "quit_cancelbutton");
+  GLADE_HOOKUP_OBJECT (quit_dialog, quit_okbutton, "quit_okbutton");
+
+  return quit_dialog;
+}
+
+GtkWidget*
+create_error_dialog (void)
+{
+  GtkWidget *error_dialog;
+  GtkWidget *dialog_vbox4;
+  GtkWidget *hbox14;
+  GtkWidget *image38;
+  GtkWidget *error_label;
+  GtkWidget *dialog_action_area4;
+  GtkWidget *error_quitbutton;
+  GtkWidget *error_okbutton;
+  GtkWidget *error_stopbutton;
+
+  error_dialog = gtk_dialog_new ();
+  gtk_window_set_title (GTK_WINDOW (error_dialog), _("Error"));
+  gtk_window_set_position (GTK_WINDOW (error_dialog), GTK_WIN_POS_CENTER);
+  gtk_window_set_modal (GTK_WINDOW (error_dialog), TRUE);
+  gtk_window_set_type_hint (GTK_WINDOW (error_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
+
+  dialog_vbox4 = GTK_DIALOG (error_dialog)->vbox;
+  gtk_widget_show (dialog_vbox4);
+
+  hbox14 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox14);
+  gtk_box_pack_start (GTK_BOX (dialog_vbox4), hbox14, TRUE, TRUE, 0);
+
+  image38 = gtk_image_new_from_stock ("gtk-dialog-error", GTK_ICON_SIZE_DIALOG);
+  gtk_widget_show (image38);
+  gtk_box_pack_start (GTK_BOX (hbox14), image38, TRUE, TRUE, 0);
+  gtk_misc_set_padding (GTK_MISC (image38), 4, 4);
+
+  error_label = gtk_label_new (_("Error"));
+  gtk_widget_show (error_label);
+  gtk_box_pack_start (GTK_BOX (hbox14), error_label, FALSE, FALSE, 0);
+  gtk_misc_set_padding (GTK_MISC (error_label), 4, 0);
+
+  dialog_action_area4 = GTK_DIALOG (error_dialog)->action_area;
+  gtk_widget_show (dialog_action_area4);
+  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area4), GTK_BUTTONBOX_END);
+
+  error_quitbutton = gtk_button_new_from_stock ("gtk-quit");
+  gtk_widget_show (error_quitbutton);
+  gtk_dialog_add_action_widget (GTK_DIALOG (error_dialog), error_quitbutton, GTK_RESPONSE_OK);
+  gtk_container_set_border_width (GTK_CONTAINER (error_quitbutton), 2);
+  GTK_WIDGET_SET_FLAGS (error_quitbutton, GTK_CAN_DEFAULT);
+
+  error_okbutton = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (error_okbutton);
+  gtk_dialog_add_action_widget (GTK_DIALOG (error_dialog), error_okbutton, GTK_RESPONSE_OK);
+  gtk_container_set_border_width (GTK_CONTAINER (error_okbutton), 2);
+  GTK_WIDGET_SET_FLAGS (error_okbutton, GTK_CAN_DEFAULT);
+
+  error_stopbutton = gtk_button_new_from_stock ("gtk-stop");
+  gtk_widget_show (error_stopbutton);
+  gtk_dialog_add_action_widget (GTK_DIALOG (error_dialog), error_stopbutton, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (error_stopbutton), 2);
+  GTK_WIDGET_SET_FLAGS (error_stopbutton, GTK_CAN_DEFAULT);
+
+  g_signal_connect ((gpointer) error_dialog, "delete_event",
+                    G_CALLBACK (on_error_dialog_delete_event),
+                    NULL);
+  g_signal_connect ((gpointer) error_quitbutton, "clicked",
+                    G_CALLBACK (on_error_quitbutton_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) error_okbutton, "clicked",
+                    G_CALLBACK (on_error_okbutton_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) error_stopbutton, "clicked",
+                    G_CALLBACK (on_error_stopbutton_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (error_dialog, error_dialog, "error_dialog");
+  GLADE_HOOKUP_OBJECT_NO_REF (error_dialog, dialog_vbox4, "dialog_vbox4");
+  GLADE_HOOKUP_OBJECT (error_dialog, hbox14, "hbox14");
+  GLADE_HOOKUP_OBJECT (error_dialog, image38, "image38");
+  GLADE_HOOKUP_OBJECT (error_dialog, error_label, "error_label");
+  GLADE_HOOKUP_OBJECT_NO_REF (error_dialog, dialog_action_area4, "dialog_action_area4");
+  GLADE_HOOKUP_OBJECT (error_dialog, error_quitbutton, "error_quitbutton");
+  GLADE_HOOKUP_OBJECT (error_dialog, error_okbutton, "error_okbutton");
+  GLADE_HOOKUP_OBJECT (error_dialog, error_stopbutton, "error_stopbutton");
+
+  return error_dialog;
+}
+
+GtkWidget*
+create_animate_dialog (void)
+{
+  GtkWidget *animate_dialog;
+  GtkWidget *dialog_vbox5;
+  GtkWidget *table1;
+  GtkWidget *label17;
+  GtkWidget *label18;
+  GtkObject *animate_steps_spinbutton_adj;
+  GtkWidget *animate_steps_spinbutton;
+  GtkObject *animate_freq_spinbutton_adj;
+  GtkWidget *animate_freq_spinbutton;
+  GtkWidget *dialog_action_area5;
+  GtkWidget *animation_applybutton;
+  GtkWidget *animation_cancelbutton;
+  GtkWidget *animation_okbutton;
+  GtkTooltips *tooltips;
+
+  tooltips = gtk_tooltips_new ();
+
+  animate_dialog = gtk_dialog_new ();
+  gtk_window_set_title (GTK_WINDOW (animate_dialog), _("Near Field Animation"));
+  gtk_window_set_position (GTK_WINDOW (animate_dialog), GTK_WIN_POS_MOUSE);
+  gtk_window_set_type_hint (GTK_WINDOW (animate_dialog), GDK_WINDOW_TYPE_HINT_DIALOG);
+
+  dialog_vbox5 = GTK_DIALOG (animate_dialog)->vbox;
+  gtk_widget_show (dialog_vbox5);
+
+  table1 = gtk_table_new (2, 2, FALSE);
+  gtk_widget_show (table1);
+  gtk_box_pack_start (GTK_BOX (dialog_vbox5), table1, TRUE, TRUE, 0);
+
+  label17 = gtk_label_new (_("Steps/Cycle"));
+  gtk_widget_show (label17);
+  gtk_table_attach (GTK_TABLE (table1), label17, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 0);
+  gtk_misc_set_alignment (GTK_MISC (label17), 0, 0.5);
+  gtk_misc_set_padding (GTK_MISC (label17), 2, 2);
+
+  label18 = gtk_label_new (_("Animate Frequency (Hz)"));
+  gtk_widget_show (label18);
+  gtk_table_attach (GTK_TABLE (table1), label18, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 0);
+  gtk_misc_set_alignment (GTK_MISC (label18), 0, 0.5);
+  gtk_misc_set_padding (GTK_MISC (label18), 2, 2);
+
+  animate_steps_spinbutton_adj = gtk_adjustment_new (36, 12, 360, 1, 10, 0);
+  animate_steps_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (animate_steps_spinbutton_adj), 1, 0);
+  gtk_widget_show (animate_steps_spinbutton);
+  gtk_table_attach (GTK_TABLE (table1), animate_steps_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 4);
+  gtk_tooltips_set_tip (tooltips, animate_steps_spinbutton, _("Steps per Cycle of Excitation"), NULL);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (animate_steps_spinbutton), TRUE);
+
+  animate_freq_spinbutton_adj = gtk_adjustment_new (1, 0.10000000149, 10, 0.10000000149, 10, 0);
+  animate_freq_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (animate_freq_spinbutton_adj), 1, 1);
+  gtk_widget_show (animate_freq_spinbutton);
+  gtk_table_attach (GTK_TABLE (table1), animate_freq_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 4);
+  gtk_tooltips_set_tip (tooltips, animate_freq_spinbutton, _("Frequency of Excitaion Animation"), NULL);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (animate_freq_spinbutton), TRUE);
+
+  dialog_action_area5 = GTK_DIALOG (animate_dialog)->action_area;
+  gtk_widget_show (dialog_action_area5);
+  gtk_button_box_set_layout (GTK_BUTTON_BOX (dialog_action_area5), GTK_BUTTONBOX_END);
+
+  animation_applybutton = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (animation_applybutton);
+  gtk_dialog_add_action_widget (GTK_DIALOG (animate_dialog), animation_applybutton, GTK_RESPONSE_APPLY);
+  gtk_container_set_border_width (GTK_CONTAINER (animation_applybutton), 2);
+  GTK_WIDGET_SET_FLAGS (animation_applybutton, GTK_CAN_DEFAULT);
+
+  animation_cancelbutton = gtk_button_new_from_stock ("gtk-cancel");
+  gtk_widget_show (animation_cancelbutton);
+  gtk_dialog_add_action_widget (GTK_DIALOG (animate_dialog), animation_cancelbutton, GTK_RESPONSE_CANCEL);
+  gtk_container_set_border_width (GTK_CONTAINER (animation_cancelbutton), 2);
+  GTK_WIDGET_SET_FLAGS (animation_cancelbutton, GTK_CAN_DEFAULT);
+
+  animation_okbutton = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (animation_okbutton);
+  gtk_dialog_add_action_widget (GTK_DIALOG (animate_dialog), animation_okbutton, GTK_RESPONSE_OK);
+  gtk_container_set_border_width (GTK_CONTAINER (animation_okbutton), 2);
+  GTK_WIDGET_SET_FLAGS (animation_okbutton, GTK_CAN_DEFAULT);
+
+  g_signal_connect ((gpointer) animate_dialog, "destroy",
+                    G_CALLBACK (on_animate_dialog_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) animation_applybutton, "clicked",
+                    G_CALLBACK (on_animation_applybutton_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) animation_cancelbutton, "clicked",
+                    G_CALLBACK (on_animation_cancelbutton_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) animation_okbutton, "clicked",
+                    G_CALLBACK (on_animation_okbutton_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (animate_dialog, animate_dialog, "animate_dialog");
+  GLADE_HOOKUP_OBJECT_NO_REF (animate_dialog, dialog_vbox5, "dialog_vbox5");
+  GLADE_HOOKUP_OBJECT (animate_dialog, table1, "table1");
+  GLADE_HOOKUP_OBJECT (animate_dialog, label17, "label17");
+  GLADE_HOOKUP_OBJECT (animate_dialog, label18, "label18");
+  GLADE_HOOKUP_OBJECT (animate_dialog, animate_steps_spinbutton, "animate_steps_spinbutton");
+  GLADE_HOOKUP_OBJECT (animate_dialog, animate_freq_spinbutton, "animate_freq_spinbutton");
+  GLADE_HOOKUP_OBJECT_NO_REF (animate_dialog, dialog_action_area5, "dialog_action_area5");
+  GLADE_HOOKUP_OBJECT (animate_dialog, animation_applybutton, "animation_applybutton");
+  GLADE_HOOKUP_OBJECT (animate_dialog, animation_cancelbutton, "animation_cancelbutton");
+  GLADE_HOOKUP_OBJECT (animate_dialog, animation_okbutton, "animation_okbutton");
+  GLADE_HOOKUP_OBJECT_NO_REF (animate_dialog, tooltips, "tooltips");
+
+  gtk_widget_grab_focus (animation_okbutton);
+  return animate_dialog;
+}
+
+GtkWidget*
+create_nec2_editor (void)
+{
+  GtkWidget *nec2_editor;
+  GtkWidget *vbox4;
+  GtkWidget *hbox16;
+  GtkWidget *frame8;
+  GtkWidget *alignment8;
+  GtkWidget *hbox17;
+  GtkWidget *nec2_row_add;
+  GtkWidget *nec2_row_remv;
+  GtkWidget *nec2_treeview_clear;
+  GtkWidget *label23;
+  GtkWidget *frame7;
+  GtkWidget *alignment7;
+  GtkWidget *hbox18;
+  GtkWidget *nec2_save_as;
+  GtkWidget *nec2_save;
+  GtkWidget *nec2_apply_checkbutton;
+  GtkWidget *nec2_revert;
+  GtkWidget *label22;
+  GtkWidget *frame6;
+  GtkWidget *alignment6;
+  GtkWidget *scrolledwindow5;
+  GtkWidget *nec2_cmnt_treeview;
+  GtkWidget *label21;
+  GtkWidget *frame9;
+  GtkWidget *alignment9;
+  GtkWidget *table34;
+  GtkWidget *gw;
+  GtkWidget *ga;
+  GtkWidget *gh;
+  GtkWidget *sp;
+  GtkWidget *gr;
+  GtkWidget *gm;
+  GtkWidget *gx;
+  GtkWidget *gs;
+  GtkWidget *label24;
+  GtkWidget *frame5;
+  GtkWidget *alignment5;
+  GtkWidget *scrolledwindow4;
+  GtkWidget *nec2_geom_treeview;
+  GtkWidget *label20;
+  GtkWidget *frame10;
+  GtkWidget *alignment10;
+  GtkWidget *table4;
+  GtkWidget *ex;
+  GtkWidget *fr;
+  GtkWidget *gn;
+  GtkWidget *rp;
+  GtkWidget *ld;
+  GtkWidget *nt;
+  GtkWidget *tl;
+  GtkWidget *ne;
+  GtkWidget *xq;
+  GtkWidget *kh;
+  GtkWidget *ek;
+  GtkWidget *gd;
+  GtkWidget *label25;
+  GtkWidget *frame4;
+  GtkWidget *alignment4;
+  GtkWidget *scrolledwindow3;
+  GtkWidget *nec2_cmnd_treeview;
+  GtkWidget *label19;
+
+  nec2_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (nec2_editor), 4);
+  gtk_window_set_title (GTK_WINDOW (nec2_editor), _("Xnec2c: NEC2 Input File Editor"));
+  gtk_window_set_gravity (GTK_WINDOW (nec2_editor), GDK_GRAVITY_WEST);
+
+  vbox4 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox4);
+  gtk_container_add (GTK_CONTAINER (nec2_editor), vbox4);
+
+  hbox16 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox16);
+  gtk_box_pack_start (GTK_BOX (vbox4), hbox16, FALSE, TRUE, 0);
+
+  frame8 = gtk_frame_new (NULL);
+  gtk_widget_show (frame8);
+  gtk_box_pack_start (GTK_BOX (hbox16), frame8, FALSE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame8), 2);
+
+  alignment8 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment8);
+  gtk_container_add (GTK_CONTAINER (frame8), alignment8);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment8), 0, 0, 12, 0);
+
+  hbox17 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox17);
+  gtk_container_add (GTK_CONTAINER (alignment8), hbox17);
+
+  nec2_row_add = gtk_button_new_from_stock ("gtk-add");
+  gtk_widget_show (nec2_row_add);
+  gtk_box_pack_start (GTK_BOX (hbox17), nec2_row_add, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nec2_row_add), 2);
+
+  nec2_row_remv = gtk_button_new_from_stock ("gtk-remove");
+  gtk_widget_show (nec2_row_remv);
+  gtk_box_pack_start (GTK_BOX (hbox17), nec2_row_remv, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nec2_row_remv), 2);
+
+  nec2_treeview_clear = gtk_button_new_from_stock ("gtk-clear");
+  gtk_widget_show (nec2_treeview_clear);
+  gtk_box_pack_start (GTK_BOX (hbox17), nec2_treeview_clear, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nec2_treeview_clear), 2);
+
+  label23 = gtk_label_new (_("Edit Tree View Rows"));
+  gtk_widget_show (label23);
+  gtk_frame_set_label_widget (GTK_FRAME (frame8), label23);
+  gtk_misc_set_padding (GTK_MISC (label23), 2, 0);
+
+  frame7 = gtk_frame_new (NULL);
+  gtk_widget_show (frame7);
+  gtk_box_pack_start (GTK_BOX (hbox16), frame7, FALSE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame7), 2);
+
+  alignment7 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment7);
+  gtk_container_add (GTK_CONTAINER (frame7), alignment7);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment7), 0, 0, 12, 0);
+
+  hbox18 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox18);
+  gtk_container_add (GTK_CONTAINER (alignment7), hbox18);
+
+  nec2_save_as = gtk_button_new_from_stock ("gtk-save-as");
+  gtk_widget_show (nec2_save_as);
+  gtk_box_pack_start (GTK_BOX (hbox18), nec2_save_as, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nec2_save_as), 2);
+
+  nec2_save = gtk_button_new_from_stock ("gtk-save");
+  gtk_widget_show (nec2_save);
+  gtk_box_pack_start (GTK_BOX (hbox18), nec2_save, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nec2_save), 2);
+
+  nec2_apply_checkbutton = gtk_check_button_new_with_mnemonic ("gtk-apply");
+  gtk_button_set_use_stock (GTK_BUTTON (nec2_apply_checkbutton), TRUE);
+  gtk_widget_show (nec2_apply_checkbutton);
+  gtk_box_pack_start (GTK_BOX (hbox18), nec2_apply_checkbutton, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nec2_apply_checkbutton), 2);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (nec2_apply_checkbutton), TRUE);
+
+  nec2_revert = gtk_button_new_from_stock ("gtk-revert-to-saved");
+  gtk_widget_show (nec2_revert);
+  gtk_box_pack_start (GTK_BOX (hbox18), nec2_revert, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nec2_revert), 2);
+  gtk_button_set_focus_on_click (GTK_BUTTON (nec2_revert), FALSE);
+
+  label22 = gtk_label_new (_("NEC2 Input File"));
+  gtk_widget_show (label22);
+  gtk_frame_set_label_widget (GTK_FRAME (frame7), label22);
+  gtk_misc_set_padding (GTK_MISC (label22), 2, 0);
+
+  frame6 = gtk_frame_new (NULL);
+  gtk_widget_show (frame6);
+  gtk_box_pack_start (GTK_BOX (vbox4), frame6, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame6), 2);
+
+  alignment6 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment6);
+  gtk_container_add (GTK_CONTAINER (frame6), alignment6);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment6), 0, 0, 12, 0);
+
+  scrolledwindow5 = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_show (scrolledwindow5);
+  gtk_container_add (GTK_CONTAINER (alignment6), scrolledwindow5);
+  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow5), GTK_SHADOW_IN);
+
+  nec2_cmnt_treeview = gtk_tree_view_new ();
+  gtk_widget_show (nec2_cmnt_treeview);
+  gtk_container_add (GTK_CONTAINER (scrolledwindow5), nec2_cmnt_treeview);
+  gtk_widget_set_size_request (nec2_cmnt_treeview, -1, 170);
+  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (nec2_cmnt_treeview), TRUE);
+  gtk_tree_view_set_reorderable (GTK_TREE_VIEW (nec2_cmnt_treeview), TRUE);
+
+  label21 = gtk_label_new (_("Comments"));
+  gtk_widget_show (label21);
+  gtk_frame_set_label_widget (GTK_FRAME (frame6), label21);
+  gtk_misc_set_padding (GTK_MISC (label21), 2, 0);
+
+  frame9 = gtk_frame_new (NULL);
+  gtk_widget_show (frame9);
+  gtk_box_pack_start (GTK_BOX (vbox4), frame9, FALSE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame9), 2);
+
+  alignment9 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment9);
+  gtk_container_add (GTK_CONTAINER (frame9), alignment9);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment9), 0, 0, 12, 0);
+
+  table34 = gtk_table_new (2, 8, FALSE);
+  gtk_widget_show (table34);
+  gtk_container_add (GTK_CONTAINER (alignment9), table34);
+
+  gw = gtk_button_new_with_mnemonic (_("Wire"));
+  gtk_widget_show (gw);
+  gtk_table_attach (GTK_TABLE (table34), gw, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (gw), 2);
+
+  ga = gtk_button_new_with_mnemonic (_("Arc"));
+  gtk_widget_show (ga);
+  gtk_table_attach (GTK_TABLE (table34), ga, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ga), 2);
+
+  gh = gtk_button_new_with_mnemonic (_("Helix"));
+  gtk_widget_show (gh);
+  gtk_table_attach (GTK_TABLE (table34), gh, 2, 3, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (gh), 2);
+
+  sp = gtk_button_new_with_mnemonic (_("Patch"));
+  gtk_widget_show (sp);
+  gtk_table_attach (GTK_TABLE (table34), sp, 3, 4, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (sp), 2);
+
+  gr = gtk_button_new_with_mnemonic (_("Cylinder"));
+  gtk_widget_show (gr);
+  gtk_table_attach (GTK_TABLE (table34), gr, 4, 5, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (gr), 2);
+
+  gm = gtk_button_new_with_mnemonic (_("Move"));
+  gtk_widget_show (gm);
+  gtk_table_attach (GTK_TABLE (table34), gm, 5, 6, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (gm), 2);
+
+  gx = gtk_button_new_with_mnemonic (_("Reflect"));
+  gtk_widget_show (gx);
+  gtk_table_attach (GTK_TABLE (table34), gx, 6, 7, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (gx), 2);
+
+  gs = gtk_button_new_with_mnemonic (_("Scale"));
+  gtk_widget_show (gs);
+  gtk_table_attach (GTK_TABLE (table34), gs, 7, 8, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (gs), 2);
+
+  label24 = gtk_label_new (_("Edit Geometry Data"));
+  gtk_widget_show (label24);
+  gtk_frame_set_label_widget (GTK_FRAME (frame9), label24);
+  gtk_misc_set_padding (GTK_MISC (label24), 2, 0);
+
+  frame5 = gtk_frame_new (NULL);
+  gtk_widget_show (frame5);
+  gtk_box_pack_start (GTK_BOX (vbox4), frame5, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame5), 2);
+
+  alignment5 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment5);
+  gtk_container_add (GTK_CONTAINER (frame5), alignment5);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment5), 0, 0, 12, 0);
+
+  scrolledwindow4 = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_show (scrolledwindow4);
+  gtk_container_add (GTK_CONTAINER (alignment5), scrolledwindow4);
+  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow4), GTK_SHADOW_IN);
+
+  nec2_geom_treeview = gtk_tree_view_new ();
+  gtk_widget_show (nec2_geom_treeview);
+  gtk_container_add (GTK_CONTAINER (scrolledwindow4), nec2_geom_treeview);
+  gtk_widget_set_size_request (nec2_geom_treeview, -1, 170);
+  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (nec2_geom_treeview), TRUE);
+  gtk_tree_view_set_reorderable (GTK_TREE_VIEW (nec2_geom_treeview), TRUE);
+
+  label20 = gtk_label_new (_("Geometry"));
+  gtk_widget_show (label20);
+  gtk_frame_set_label_widget (GTK_FRAME (frame5), label20);
+  gtk_misc_set_padding (GTK_MISC (label20), 2, 0);
+
+  frame10 = gtk_frame_new (NULL);
+  gtk_widget_show (frame10);
+  gtk_box_pack_start (GTK_BOX (vbox4), frame10, FALSE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame10), 2);
+
+  alignment10 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment10);
+  gtk_container_add (GTK_CONTAINER (frame10), alignment10);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment10), 0, 0, 12, 0);
+
+  table4 = gtk_table_new (2, 6, FALSE);
+  gtk_widget_show (table4);
+  gtk_container_add (GTK_CONTAINER (alignment10), table4);
+
+  ex = gtk_button_new_with_mnemonic (_("Excitation"));
+  gtk_widget_show (ex);
+  gtk_table_attach (GTK_TABLE (table4), ex, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ex), 2);
+
+  fr = gtk_button_new_with_mnemonic (_("Frequency"));
+  gtk_widget_show (fr);
+  gtk_table_attach (GTK_TABLE (table4), fr, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (fr), 2);
+
+  gn = gtk_button_new_with_mnemonic (_("Ground (GN)"));
+  gtk_widget_show (gn);
+  gtk_table_attach (GTK_TABLE (table4), gn, 2, 3, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (gn), 2);
+
+  rp = gtk_button_new_with_mnemonic (_("Radiation"));
+  gtk_widget_show (rp);
+  gtk_table_attach (GTK_TABLE (table4), rp, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (rp), 2);
+
+  ld = gtk_button_new_with_mnemonic (_("Loading"));
+  gtk_widget_show (ld);
+  gtk_table_attach (GTK_TABLE (table4), ld, 3, 4, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ld), 2);
+
+  nt = gtk_button_new_with_mnemonic (_("Network"));
+  gtk_widget_show (nt);
+  gtk_table_attach (GTK_TABLE (table4), nt, 4, 5, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nt), 2);
+
+  tl = gtk_button_new_with_mnemonic (_("Trans. Line"));
+  gtk_widget_show (tl);
+  gtk_table_attach (GTK_TABLE (table4), tl, 5, 6, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (tl), 2);
+
+  ne = gtk_button_new_with_mnemonic (_("Near Fields"));
+  gtk_widget_show (ne);
+  gtk_table_attach (GTK_TABLE (table4), ne, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ne), 2);
+
+  xq = gtk_button_new_with_mnemonic (_("Execute"));
+  gtk_widget_show (xq);
+  gtk_table_attach (GTK_TABLE (table4), xq, 5, 6, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (xq), 2);
+
+  kh = gtk_button_new_with_mnemonic (_("Interaction"));
+  gtk_widget_show (kh);
+  gtk_table_attach (GTK_TABLE (table4), kh, 4, 5, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (kh), 2);
+
+  ek = gtk_button_new_with_mnemonic (_("Kernel"));
+  gtk_widget_show (ek);
+  gtk_table_attach (GTK_TABLE (table4), ek, 3, 4, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ek), 2);
+
+  gd = gtk_button_new_with_mnemonic (_("Ground (GD)"));
+  gtk_widget_show (gd);
+  gtk_table_attach (GTK_TABLE (table4), gd, 2, 3, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (gd), 2);
+
+  label25 = gtk_label_new (_("Edit Control Commands"));
+  gtk_widget_show (label25);
+  gtk_frame_set_label_widget (GTK_FRAME (frame10), label25);
+  gtk_misc_set_padding (GTK_MISC (label25), 2, 0);
+
+  frame4 = gtk_frame_new (NULL);
+  gtk_widget_show (frame4);
+  gtk_box_pack_start (GTK_BOX (vbox4), frame4, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame4), 2);
+
+  alignment4 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment4);
+  gtk_container_add (GTK_CONTAINER (frame4), alignment4);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment4), 0, 0, 12, 0);
+
+  scrolledwindow3 = gtk_scrolled_window_new (NULL, NULL);
+  gtk_widget_show (scrolledwindow3);
+  gtk_container_add (GTK_CONTAINER (alignment4), scrolledwindow3);
+  gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scrolledwindow3), GTK_SHADOW_IN);
+
+  nec2_cmnd_treeview = gtk_tree_view_new ();
+  gtk_widget_show (nec2_cmnd_treeview);
+  gtk_container_add (GTK_CONTAINER (scrolledwindow3), nec2_cmnd_treeview);
+  gtk_widget_set_size_request (nec2_cmnd_treeview, -1, 170);
+  gtk_tree_view_set_rules_hint (GTK_TREE_VIEW (nec2_cmnd_treeview), TRUE);
+  gtk_tree_view_set_reorderable (GTK_TREE_VIEW (nec2_cmnd_treeview), TRUE);
+
+  label19 = gtk_label_new (_("Commands"));
+  gtk_widget_show (label19);
+  gtk_frame_set_label_widget (GTK_FRAME (frame4), label19);
+  gtk_misc_set_padding (GTK_MISC (label19), 2, 0);
+
+  g_signal_connect ((gpointer) nec2_editor, "delete_event",
+                    G_CALLBACK (on_nec2_editor_delete_event),
+                    NULL);
+  g_signal_connect ((gpointer) nec2_editor, "destroy",
+                    G_CALLBACK (on_nec2_editor_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) nec2_row_add, "clicked",
+                    G_CALLBACK (on_nec2_row_add_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) nec2_row_remv, "clicked",
+                    G_CALLBACK (on_nec2_row_remv_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) nec2_treeview_clear, "clicked",
+                    G_CALLBACK (on_nec2_treeview_clear_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) nec2_save_as, "clicked",
+                    G_CALLBACK (on_nec2_save_as_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) nec2_save, "clicked",
+                    G_CALLBACK (on_nec2_save_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) nec2_revert, "clicked",
+                    G_CALLBACK (on_nec2_revert_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) nec2_cmnt_treeview, "button_press_event",
+                    G_CALLBACK (on_nec2_cmnt_treeview_button_press_event),
+                    NULL);
+  g_signal_connect ((gpointer) gw, "clicked",
+                    G_CALLBACK (on_gw_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) ga, "clicked",
+                    G_CALLBACK (on_ga_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) gh, "clicked",
+                    G_CALLBACK (on_gh_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) sp, "clicked",
+                    G_CALLBACK (on_sp_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) gr, "clicked",
+                    G_CALLBACK (on_gr_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) gm, "clicked",
+                    G_CALLBACK (on_gm_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) gx, "clicked",
+                    G_CALLBACK (on_gx_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) gs, "clicked",
+                    G_CALLBACK (on_gs_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) nec2_geom_treeview, "button_press_event",
+                    G_CALLBACK (on_nec2_geom_treeview_button_press_event),
+                    NULL);
+  g_signal_connect ((gpointer) ex, "clicked",
+                    G_CALLBACK (on_ex_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) fr, "clicked",
+                    G_CALLBACK (on_fr_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) gn, "clicked",
+                    G_CALLBACK (on_gn_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) rp, "clicked",
+                    G_CALLBACK (on_rp_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) ld, "clicked",
+                    G_CALLBACK (on_ld_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) nt, "clicked",
+                    G_CALLBACK (on_nt_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) tl, "clicked",
+                    G_CALLBACK (on_tl_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) ne, "clicked",
+                    G_CALLBACK (on_ne_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) xq, "clicked",
+                    G_CALLBACK (on_xq_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) kh, "clicked",
+                    G_CALLBACK (on_kh_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) ek, "clicked",
+                    G_CALLBACK (on_ek_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) gd, "clicked",
+                    G_CALLBACK (on_gd_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) nec2_cmnd_treeview, "button_press_event",
+                    G_CALLBACK (on_nec2_cmnd_treeview_button_press_event),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (nec2_editor, nec2_editor, "nec2_editor");
+  GLADE_HOOKUP_OBJECT (nec2_editor, vbox4, "vbox4");
+  GLADE_HOOKUP_OBJECT (nec2_editor, hbox16, "hbox16");
+  GLADE_HOOKUP_OBJECT (nec2_editor, frame8, "frame8");
+  GLADE_HOOKUP_OBJECT (nec2_editor, alignment8, "alignment8");
+  GLADE_HOOKUP_OBJECT (nec2_editor, hbox17, "hbox17");
+  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_row_add, "nec2_row_add");
+  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_row_remv, "nec2_row_remv");
+  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_treeview_clear, "nec2_treeview_clear");
+  GLADE_HOOKUP_OBJECT (nec2_editor, label23, "label23");
+  GLADE_HOOKUP_OBJECT (nec2_editor, frame7, "frame7");
+  GLADE_HOOKUP_OBJECT (nec2_editor, alignment7, "alignment7");
+  GLADE_HOOKUP_OBJECT (nec2_editor, hbox18, "hbox18");
+  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_save_as, "nec2_save_as");
+  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_save, "nec2_save");
+  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_apply_checkbutton, "nec2_apply_checkbutton");
+  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_revert, "nec2_revert");
+  GLADE_HOOKUP_OBJECT (nec2_editor, label22, "label22");
+  GLADE_HOOKUP_OBJECT (nec2_editor, frame6, "frame6");
+  GLADE_HOOKUP_OBJECT (nec2_editor, alignment6, "alignment6");
+  GLADE_HOOKUP_OBJECT (nec2_editor, scrolledwindow5, "scrolledwindow5");
+  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_cmnt_treeview, "nec2_cmnt_treeview");
+  GLADE_HOOKUP_OBJECT (nec2_editor, label21, "label21");
+  GLADE_HOOKUP_OBJECT (nec2_editor, frame9, "frame9");
+  GLADE_HOOKUP_OBJECT (nec2_editor, alignment9, "alignment9");
+  GLADE_HOOKUP_OBJECT (nec2_editor, table34, "table34");
+  GLADE_HOOKUP_OBJECT (nec2_editor, gw, "gw");
+  GLADE_HOOKUP_OBJECT (nec2_editor, ga, "ga");
+  GLADE_HOOKUP_OBJECT (nec2_editor, gh, "gh");
+  GLADE_HOOKUP_OBJECT (nec2_editor, sp, "sp");
+  GLADE_HOOKUP_OBJECT (nec2_editor, gr, "gr");
+  GLADE_HOOKUP_OBJECT (nec2_editor, gm, "gm");
+  GLADE_HOOKUP_OBJECT (nec2_editor, gx, "gx");
+  GLADE_HOOKUP_OBJECT (nec2_editor, gs, "gs");
+  GLADE_HOOKUP_OBJECT (nec2_editor, label24, "label24");
+  GLADE_HOOKUP_OBJECT (nec2_editor, frame5, "frame5");
+  GLADE_HOOKUP_OBJECT (nec2_editor, alignment5, "alignment5");
+  GLADE_HOOKUP_OBJECT (nec2_editor, scrolledwindow4, "scrolledwindow4");
+  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_geom_treeview, "nec2_geom_treeview");
+  GLADE_HOOKUP_OBJECT (nec2_editor, label20, "label20");
+  GLADE_HOOKUP_OBJECT (nec2_editor, frame10, "frame10");
+  GLADE_HOOKUP_OBJECT (nec2_editor, alignment10, "alignment10");
+  GLADE_HOOKUP_OBJECT (nec2_editor, table4, "table4");
+  GLADE_HOOKUP_OBJECT (nec2_editor, ex, "ex");
+  GLADE_HOOKUP_OBJECT (nec2_editor, fr, "fr");
+  GLADE_HOOKUP_OBJECT (nec2_editor, gn, "gn");
+  GLADE_HOOKUP_OBJECT (nec2_editor, rp, "rp");
+  GLADE_HOOKUP_OBJECT (nec2_editor, ld, "ld");
+  GLADE_HOOKUP_OBJECT (nec2_editor, nt, "nt");
+  GLADE_HOOKUP_OBJECT (nec2_editor, tl, "tl");
+  GLADE_HOOKUP_OBJECT (nec2_editor, ne, "ne");
+  GLADE_HOOKUP_OBJECT (nec2_editor, xq, "xq");
+  GLADE_HOOKUP_OBJECT (nec2_editor, kh, "kh");
+  GLADE_HOOKUP_OBJECT (nec2_editor, ek, "ek");
+  GLADE_HOOKUP_OBJECT (nec2_editor, gd, "gd");
+  GLADE_HOOKUP_OBJECT (nec2_editor, label25, "label25");
+  GLADE_HOOKUP_OBJECT (nec2_editor, frame4, "frame4");
+  GLADE_HOOKUP_OBJECT (nec2_editor, alignment4, "alignment4");
+  GLADE_HOOKUP_OBJECT (nec2_editor, scrolledwindow3, "scrolledwindow3");
+  GLADE_HOOKUP_OBJECT (nec2_editor, nec2_cmnd_treeview, "nec2_cmnd_treeview");
+  GLADE_HOOKUP_OBJECT (nec2_editor, label19, "label19");
+
+  return nec2_editor;
+}
+
+GtkWidget*
+create_wire_editor (void)
+{
+  GtkWidget *wire_editor;
+  GtkWidget *vbox5;
+  GtkWidget *frame11;
+  GtkWidget *table2;
+  GtkWidget *label29;
+  GtkWidget *label30;
+  GtkWidget *label31;
+  GtkWidget *label32;
+  GtkWidget *label33;
+  GtkWidget *label34;
+  GtkWidget *label36;
+  GtkWidget *label37;
+  GtkWidget *label38;
+  GtkObject *wire_tagnum_spinbutton_adj;
+  GtkWidget *wire_tagnum_spinbutton;
+  GtkObject *wire_numseg_spinbutton_adj;
+  GtkWidget *wire_numseg_spinbutton;
+  GtkObject *wire_pcl_spinbutton_adj;
+  GtkWidget *wire_pcl_spinbutton;
+  GtkObject *wire_x1_spinbutton_adj;
+  GtkWidget *wire_x1_spinbutton;
+  GtkObject *wire_y1_spinbutton_adj;
+  GtkWidget *wire_y1_spinbutton;
+  GtkObject *wire_z1_spinbutton_adj;
+  GtkWidget *wire_z1_spinbutton;
+  GtkObject *wire_z2_spinbutton_adj;
+  GtkWidget *wire_z2_spinbutton;
+  GtkObject *wire_y2_spinbutton_adj;
+  GtkWidget *wire_y2_spinbutton;
+  GtkObject *wire_x2_spinbutton_adj;
+  GtkWidget *wire_x2_spinbutton;
+  GtkWidget *label28;
+  GtkObject *wire_dia_spinbutton_adj;
+  GtkWidget *wire_dia_spinbutton;
+  GtkWidget *label35;
+  GtkWidget *label39;
+  GtkObject *wire_len_spinbutton_adj;
+  GtkWidget *wire_len_spinbutton;
+  GtkWidget *label44;
+  GtkObject *wire_res_spinbutton_adj;
+  GtkWidget *wire_res_spinbutton;
+  GtkWidget *wire_taper_checkbutton;
+  GtkWidget *wire_taperframe;
+  GtkWidget *alignment12;
+  GtkWidget *table3;
+  GtkWidget *label40;
+  GtkWidget *label41;
+  GtkWidget *label42;
+  GtkWidget *label43;
+  GtkObject *wire_rdia_spinbutton_adj;
+  GtkWidget *wire_rdia_spinbutton;
+  GtkObject *wire_dian_spinbutton_adj;
+  GtkWidget *wire_dian_spinbutton;
+  GtkObject *wire_dia1_spinbutton_adj;
+  GtkWidget *wire_dia1_spinbutton;
+  GtkObject *wire_rlen_spinbutton_adj;
+  GtkWidget *wire_rlen_spinbutton;
+  GtkWidget *label27;
+  GtkWidget *hbox21;
+  GtkWidget *wire_new_button;
+  GtkWidget *wire_cancel_button;
+  GtkWidget *alignment50;
+  GtkWidget *hbox48;
+  GtkWidget *image70;
+  GtkWidget *label222;
+  GtkWidget *wire_apply_button;
+  GtkWidget *wire_ok_button;
+
+  wire_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (wire_editor), 4);
+  gtk_window_set_title (GTK_WINDOW (wire_editor), _("Wire Element (GW & GC cards)"));
+
+  vbox5 = gtk_vbox_new (FALSE, 2);
+  gtk_widget_show (vbox5);
+  gtk_container_add (GTK_CONTAINER (wire_editor), vbox5);
+
+  frame11 = gtk_frame_new (NULL);
+  gtk_widget_show (frame11);
+  gtk_box_pack_start (GTK_BOX (vbox5), frame11, TRUE, TRUE, 2);
+  gtk_container_set_border_width (GTK_CONTAINER (frame11), 4);
+
+  table2 = gtk_table_new (6, 4, FALSE);
+  gtk_widget_show (table2);
+  gtk_container_add (GTK_CONTAINER (frame11), table2);
+  gtk_table_set_row_spacings (GTK_TABLE (table2), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table2), 2);
+
+  label29 = gtk_label_new (_("No. Segments"));
+  gtk_widget_show (label29);
+  gtk_table_attach (GTK_TABLE (table2), label29, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label29), 0.1, 0.5);
+
+  label30 = gtk_label_new (_("Segs % lambda"));
+  gtk_widget_show (label30);
+  gtk_table_attach (GTK_TABLE (table2), label30, 2, 3, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label30), 0.1, 0.5);
+
+  label31 = gtk_label_new ("");
+  gtk_widget_show (label31);
+  gtk_table_attach (GTK_TABLE (table2), label31, 3, 4, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label31), 0.1, 0.5);
+
+  label32 = gtk_label_new (_("Wire X1"));
+  gtk_widget_show (label32);
+  gtk_table_attach (GTK_TABLE (table2), label32, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label32), 0.1, 0.5);
+
+  label33 = gtk_label_new (_("Wire Y1"));
+  gtk_widget_show (label33);
+  gtk_table_attach (GTK_TABLE (table2), label33, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  GTK_WIDGET_SET_FLAGS (label33, GTK_CAN_FOCUS);
+  gtk_label_set_selectable (GTK_LABEL (label33), TRUE);
+  gtk_misc_set_alignment (GTK_MISC (label33), 0.1, 0.5);
+
+  label34 = gtk_label_new (_("Wire Z1"));
+  gtk_widget_show (label34);
+  gtk_table_attach (GTK_TABLE (table2), label34, 2, 3, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label34), 0.1, 0.5);
+
+  label36 = gtk_label_new (_("Wire X2"));
+  gtk_widget_show (label36);
+  gtk_table_attach (GTK_TABLE (table2), label36, 0, 1, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label36), 0.1, 0.5);
+
+  label37 = gtk_label_new (_("Wire Y2"));
+  gtk_widget_show (label37);
+  gtk_table_attach (GTK_TABLE (table2), label37, 1, 2, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label37), 0.1, 0.5);
+
+  label38 = gtk_label_new (_("Wire Z2"));
+  gtk_widget_show (label38);
+  gtk_table_attach (GTK_TABLE (table2), label38, 2, 3, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label38), 0.1, 0.5);
+
+  wire_tagnum_spinbutton_adj = gtk_adjustment_new (1, 1, 100000, 1, 10, 0);
+  wire_tagnum_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_tagnum_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (wire_tagnum_spinbutton);
+  gtk_table_attach (GTK_TABLE (table2), wire_tagnum_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_tagnum_spinbutton), TRUE);
+
+  wire_numseg_spinbutton_adj = gtk_adjustment_new (15, 1, 100000, 1, 10, 0);
+  wire_numseg_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_numseg_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (wire_numseg_spinbutton);
+  gtk_table_attach (GTK_TABLE (table2), wire_numseg_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_numseg_spinbutton), TRUE);
+
+  wire_pcl_spinbutton_adj = gtk_adjustment_new (5, 0.0010000000475, 30, 9.99999974738e-06, 10, 0);
+  wire_pcl_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_pcl_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (wire_pcl_spinbutton);
+  gtk_table_attach (GTK_TABLE (table2), wire_pcl_spinbutton, 2, 3, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_pcl_spinbutton), TRUE);
+
+  wire_x1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  wire_x1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_x1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (wire_x1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table2), wire_x1_spinbutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_x1_spinbutton), TRUE);
+
+  wire_y1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  wire_y1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_y1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (wire_y1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table2), wire_y1_spinbutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_y1_spinbutton), TRUE);
+
+  wire_z1_spinbutton_adj = gtk_adjustment_new (-1, -10000, 10000, 9.99999974738e-06, 10, 0);
+  wire_z1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_z1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (wire_z1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table2), wire_z1_spinbutton, 2, 3, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_z1_spinbutton), TRUE);
+
+  wire_z2_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
+  wire_z2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_z2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (wire_z2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table2), wire_z2_spinbutton, 2, 3, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_z2_spinbutton), TRUE);
+
+  wire_y2_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  wire_y2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_y2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (wire_y2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table2), wire_y2_spinbutton, 1, 2, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_y2_spinbutton), TRUE);
+
+  wire_x2_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  wire_x2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_x2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (wire_x2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table2), wire_x2_spinbutton, 0, 1, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_x2_spinbutton), TRUE);
+
+  label28 = gtk_label_new (_("Tag Number"));
+  gtk_widget_show (label28);
+  gtk_table_attach (GTK_TABLE (table2), label28, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label28), 0.1, 0.5);
+
+  wire_dia_spinbutton_adj = gtk_adjustment_new (0.00300000002608, 0, 100, 9.99999974738e-06, 10, 0);
+  wire_dia_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_dia_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (wire_dia_spinbutton);
+  gtk_table_attach (GTK_TABLE (table2), wire_dia_spinbutton, 3, 4, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_dia_spinbutton), TRUE);
+
+  label35 = gtk_label_new (_("Wire Diameter"));
+  gtk_widget_show (label35);
+  gtk_table_attach (GTK_TABLE (table2), label35, 3, 4, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label35), 0.1, 0.5);
+
+  label39 = gtk_label_new (_("Wire Length"));
+  gtk_widget_show (label39);
+  gtk_table_attach (GTK_TABLE (table2), label39, 3, 4, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label39), 0.1, 0.5);
+
+  wire_len_spinbutton_adj = gtk_adjustment_new (2, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
+  wire_len_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_len_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (wire_len_spinbutton);
+  gtk_table_attach (GTK_TABLE (table2), wire_len_spinbutton, 3, 4, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_len_spinbutton), TRUE);
+
+  label44 = gtk_label_new (_("Conductivity S/m"));
+  gtk_widget_show (label44);
+  gtk_table_attach (GTK_TABLE (table2), label44, 3, 4, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label44), 0.1, 0.5);
+
+  wire_res_spinbutton_adj = gtk_adjustment_new (0, 0, 1000000000, 9.99999974738e-06, 10, 0);
+  wire_res_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_res_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (wire_res_spinbutton);
+  gtk_table_attach (GTK_TABLE (table2), wire_res_spinbutton, 3, 4, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_res_spinbutton), TRUE);
+
+  wire_taper_checkbutton = gtk_check_button_new_with_mnemonic (_("Tapered Wire"));
+  gtk_widget_show (wire_taper_checkbutton);
+  gtk_frame_set_label_widget (GTK_FRAME (frame11), wire_taper_checkbutton);
+  gtk_container_set_border_width (GTK_CONTAINER (wire_taper_checkbutton), 2);
+
+  wire_taperframe = gtk_frame_new (NULL);
+  gtk_widget_show (wire_taperframe);
+  gtk_box_pack_start (GTK_BOX (vbox5), wire_taperframe, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (wire_taperframe), 4);
+
+  alignment12 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment12);
+  gtk_container_add (GTK_CONTAINER (wire_taperframe), alignment12);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment12), 0, 0, 12, 0);
+
+  table3 = gtk_table_new (2, 4, FALSE);
+  gtk_widget_show (table3);
+  gtk_container_add (GTK_CONTAINER (alignment12), table3);
+  gtk_table_set_row_spacings (GTK_TABLE (table3), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table3), 2);
+
+  label40 = gtk_label_new (_("Length Taper"));
+  gtk_widget_show (label40);
+  gtk_table_attach (GTK_TABLE (table3), label40, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label40), 0.1, 0.5);
+
+  label41 = gtk_label_new (_("Diameter Seg 1"));
+  gtk_widget_show (label41);
+  gtk_table_attach (GTK_TABLE (table3), label41, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label41), 0.1, 0.5);
+
+  label42 = gtk_label_new (_("Diameter Seg N"));
+  gtk_widget_show (label42);
+  gtk_table_attach (GTK_TABLE (table3), label42, 2, 3, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label42), 0.1, 0.5);
+
+  label43 = gtk_label_new (_("Diam. Taper"));
+  gtk_widget_show (label43);
+  gtk_table_attach (GTK_TABLE (table3), label43, 3, 4, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label43), 0.1, 0.5);
+
+  wire_rdia_spinbutton_adj = gtk_adjustment_new (0.920000016689, 0.5, 2, 9.99999974738e-06, 10, 0);
+  wire_rdia_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_rdia_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (wire_rdia_spinbutton);
+  gtk_table_attach (GTK_TABLE (table3), wire_rdia_spinbutton, 3, 4, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_rdia_spinbutton), TRUE);
+
+  wire_dian_spinbutton_adj = gtk_adjustment_new (0.0179999992251, 9.99999974738e-06, 100, 9.99999974738e-06, 10, 0);
+  wire_dian_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_dian_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (wire_dian_spinbutton);
+  gtk_table_attach (GTK_TABLE (table3), wire_dian_spinbutton, 2, 3, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_dian_spinbutton), TRUE);
+
+  wire_dia1_spinbutton_adj = gtk_adjustment_new (0.0309999994934, 9.99999974738e-06, 100, 9.99999974738e-06, 10, 0);
+  wire_dia1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_dia1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (wire_dia1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table3), wire_dia1_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_dia1_spinbutton), TRUE);
+
+  wire_rlen_spinbutton_adj = gtk_adjustment_new (0.920000016689, 0.5, 2, 9.99999974738e-06, 10, 0);
+  wire_rlen_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (wire_rlen_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (wire_rlen_spinbutton);
+  gtk_table_attach (GTK_TABLE (table3), wire_rlen_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (wire_rlen_spinbutton), TRUE);
+
+  label27 = gtk_label_new (_("Wire Taper Data"));
+  gtk_widget_show (label27);
+  gtk_frame_set_label_widget (GTK_FRAME (wire_taperframe), label27);
+  gtk_misc_set_padding (GTK_MISC (label27), 4, 4);
+
+  hbox21 = gtk_hbox_new (TRUE, 2);
+  gtk_widget_show (hbox21);
+  gtk_box_pack_start (GTK_BOX (vbox5), hbox21, TRUE, TRUE, 0);
+
+  wire_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (wire_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox21), wire_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (wire_new_button), 2);
+  GTK_WIDGET_SET_FLAGS (wire_new_button, GTK_CAN_DEFAULT);
+
+  wire_cancel_button = gtk_button_new ();
+  gtk_widget_show (wire_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox21), wire_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (wire_cancel_button), 2);
+  GTK_WIDGET_SET_FLAGS (wire_cancel_button, GTK_CAN_DEFAULT);
+
+  alignment50 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment50);
+  gtk_container_add (GTK_CONTAINER (wire_cancel_button), alignment50);
+
+  hbox48 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox48);
+  gtk_container_add (GTK_CONTAINER (alignment50), hbox48);
+
+  image70 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image70);
+  gtk_box_pack_start (GTK_BOX (hbox48), image70, FALSE, FALSE, 0);
+
+  label222 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label222);
+  gtk_box_pack_start (GTK_BOX (hbox48), label222, FALSE, FALSE, 0);
+
+  wire_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (wire_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox21), wire_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (wire_apply_button), 2);
+  GTK_WIDGET_SET_FLAGS (wire_apply_button, GTK_CAN_DEFAULT);
+
+  wire_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (wire_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox21), wire_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (wire_ok_button), 2);
+  GTK_WIDGET_SET_FLAGS (wire_ok_button, GTK_CAN_DEFAULT);
+
+  g_signal_connect ((gpointer) wire_editor, "destroy",
+                    G_CALLBACK (on_wire_editor_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) wire_tagnum_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_tagnum_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_numseg_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_pcl_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_pcl_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_x1_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_y1_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_z1_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_z2_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_y2_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_x2_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_dia_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_len_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_len_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_res_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_res_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_taper_checkbutton, "toggled",
+                    G_CALLBACK (on_wire_taper_checkbutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) wire_rdia_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_rdia_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_dian_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_dia1_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_rdia_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_rlen_spinbutton, "value_changed",
+                    G_CALLBACK (on_wire_rlen_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) wire_new_button, "clicked",
+                    G_CALLBACK (on_wire_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) wire_cancel_button, "clicked",
+                    G_CALLBACK (on_wire_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) wire_apply_button, "clicked",
+                    G_CALLBACK (on_wire_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) wire_ok_button, "clicked",
+                    G_CALLBACK (on_wire_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (wire_editor, wire_editor, "wire_editor");
+  GLADE_HOOKUP_OBJECT (wire_editor, vbox5, "vbox5");
+  GLADE_HOOKUP_OBJECT (wire_editor, frame11, "frame11");
+  GLADE_HOOKUP_OBJECT (wire_editor, table2, "table2");
+  GLADE_HOOKUP_OBJECT (wire_editor, label29, "label29");
+  GLADE_HOOKUP_OBJECT (wire_editor, label30, "label30");
+  GLADE_HOOKUP_OBJECT (wire_editor, label31, "label31");
+  GLADE_HOOKUP_OBJECT (wire_editor, label32, "label32");
+  GLADE_HOOKUP_OBJECT (wire_editor, label33, "label33");
+  GLADE_HOOKUP_OBJECT (wire_editor, label34, "label34");
+  GLADE_HOOKUP_OBJECT (wire_editor, label36, "label36");
+  GLADE_HOOKUP_OBJECT (wire_editor, label37, "label37");
+  GLADE_HOOKUP_OBJECT (wire_editor, label38, "label38");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_tagnum_spinbutton, "wire_tagnum_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_numseg_spinbutton, "wire_numseg_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_pcl_spinbutton, "wire_pcl_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_x1_spinbutton, "wire_x1_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_y1_spinbutton, "wire_y1_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_z1_spinbutton, "wire_z1_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_z2_spinbutton, "wire_z2_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_y2_spinbutton, "wire_y2_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_x2_spinbutton, "wire_x2_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, label28, "label28");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_dia_spinbutton, "wire_dia_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, label35, "label35");
+  GLADE_HOOKUP_OBJECT (wire_editor, label39, "label39");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_len_spinbutton, "wire_len_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, label44, "label44");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_res_spinbutton, "wire_res_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_taper_checkbutton, "wire_taper_checkbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_taperframe, "wire_taperframe");
+  GLADE_HOOKUP_OBJECT (wire_editor, alignment12, "alignment12");
+  GLADE_HOOKUP_OBJECT (wire_editor, table3, "table3");
+  GLADE_HOOKUP_OBJECT (wire_editor, label40, "label40");
+  GLADE_HOOKUP_OBJECT (wire_editor, label41, "label41");
+  GLADE_HOOKUP_OBJECT (wire_editor, label42, "label42");
+  GLADE_HOOKUP_OBJECT (wire_editor, label43, "label43");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_rdia_spinbutton, "wire_rdia_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_dian_spinbutton, "wire_dian_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_dia1_spinbutton, "wire_dia1_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_rlen_spinbutton, "wire_rlen_spinbutton");
+  GLADE_HOOKUP_OBJECT (wire_editor, label27, "label27");
+  GLADE_HOOKUP_OBJECT (wire_editor, hbox21, "hbox21");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_new_button, "wire_new_button");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_cancel_button, "wire_cancel_button");
+  GLADE_HOOKUP_OBJECT (wire_editor, alignment50, "alignment50");
+  GLADE_HOOKUP_OBJECT (wire_editor, hbox48, "hbox48");
+  GLADE_HOOKUP_OBJECT (wire_editor, image70, "image70");
+  GLADE_HOOKUP_OBJECT (wire_editor, label222, "label222");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_apply_button, "wire_apply_button");
+  GLADE_HOOKUP_OBJECT (wire_editor, wire_ok_button, "wire_ok_button");
+
+  return wire_editor;
+}
+
+GtkWidget*
+create_patch_editor (void)
+{
+  GtkWidget *patch_editor;
+  GtkWidget *vbox6;
+  GtkWidget *patch_type_frame;
+  GtkWidget *alignment13;
+  GtkWidget *hbox22;
+  GtkWidget *patch_arbitrary_radiobutton;
+  GSList *patch_arbitrary_radiobutton_group = NULL;
+  GtkWidget *patch_rectangular_radiobutton;
+  GtkWidget *patch_triangular_radiobutton;
+  GtkWidget *patch_quadrilateral_radiobutton;
+  GtkWidget *patch_surface_radiobutton;
+  GtkWidget *label45;
+  GtkWidget *patch_sm_frame;
+  GtkWidget *alignment18;
+  GtkWidget *table10;
+  GtkWidget *label87;
+  GtkWidget *label88;
+  GtkObject *patch_nx_spinbutton_adj;
+  GtkWidget *patch_nx_spinbutton;
+  GtkObject *patch_ny_spinbutton_adj;
+  GtkWidget *patch_ny_spinbutton;
+  GtkWidget *label86;
+  GtkWidget *frame13;
+  GtkWidget *alignment14;
+  GtkWidget *table5;
+  GtkWidget *patch_x1_label;
+  GtkWidget *patch_y1_label;
+  GtkWidget *patch_z1_label;
+  GtkObject *patch_x1_spinbutton_adj;
+  GtkWidget *patch_x1_spinbutton;
+  GtkObject *patch_y1_spinbutton_adj;
+  GtkWidget *patch_y1_spinbutton;
+  GtkObject *patch_z1_spinbutton_adj;
+  GtkWidget *patch_z1_spinbutton;
+  GtkObject *patch_x2_spinbutton_adj;
+  GtkWidget *patch_x2_spinbutton;
+  GtkObject *patch_y2_spinbutton_adj;
+  GtkWidget *patch_y2_spinbutton;
+  GtkObject *patch_z2_spinbutton_adj;
+  GtkWidget *patch_z2_spinbutton;
+  GtkWidget *patch_x2_label;
+  GtkWidget *patch_y2_label;
+  GtkWidget *patch_z2_label;
+  GtkWidget *label46;
+  GtkWidget *patch_sc_frame;
+  GtkWidget *alignment15;
+  GtkWidget *vbox7;
+  GtkWidget *table6;
+  GtkObject *patch_x3_spinbutton_adj;
+  GtkWidget *patch_x3_spinbutton;
+  GtkObject *patch_y3_spinbutton_adj;
+  GtkWidget *patch_y3_spinbutton;
+  GtkObject *patch_z3_spinbutton_adj;
+  GtkWidget *patch_z3_spinbutton;
+  GtkWidget *label54;
+  GtkWidget *label57;
+  GtkWidget *label58;
+  GtkWidget *patch_sc_table;
+  GtkObject *patch_x4_spinbutton_adj;
+  GtkWidget *patch_x4_spinbutton;
+  GtkObject *patch_y4_spinbutton_adj;
+  GtkWidget *patch_y4_spinbutton;
+  GtkObject *patch_z4_spinbutton_adj;
+  GtkWidget *patch_z4_spinbutton;
+  GtkWidget *label55;
+  GtkWidget *label56;
+  GtkWidget *label59;
+  GtkWidget *label47;
+  GtkWidget *hbox23;
+  GtkWidget *patch_new_button;
+  GtkWidget *patch_cancel_button;
+  GtkWidget *alignment51;
+  GtkWidget *hbox49;
+  GtkWidget *image71;
+  GtkWidget *label223;
+  GtkWidget *patch_apply_button;
+  GtkWidget *patch_ok_button;
+
+  patch_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (patch_editor), 4);
+  gtk_window_set_title (GTK_WINDOW (patch_editor), _("Patch Element (SP & SC Cards)"));
+
+  vbox6 = gtk_vbox_new (FALSE, 2);
+  gtk_widget_show (vbox6);
+  gtk_container_add (GTK_CONTAINER (patch_editor), vbox6);
+
+  patch_type_frame = gtk_frame_new (NULL);
+  gtk_widget_show (patch_type_frame);
+  gtk_box_pack_start (GTK_BOX (vbox6), patch_type_frame, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (patch_type_frame), 4);
+
+  alignment13 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment13);
+  gtk_container_add (GTK_CONTAINER (patch_type_frame), alignment13);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment13), 0, 0, 12, 0);
+
+  hbox22 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox22);
+  gtk_container_add (GTK_CONTAINER (alignment13), hbox22);
+
+  patch_arbitrary_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Arbitary"));
+  gtk_widget_show (patch_arbitrary_radiobutton);
+  gtk_box_pack_start (GTK_BOX (hbox22), patch_arbitrary_radiobutton, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (patch_arbitrary_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (patch_arbitrary_radiobutton), patch_arbitrary_radiobutton_group);
+  patch_arbitrary_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (patch_arbitrary_radiobutton));
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (patch_arbitrary_radiobutton), TRUE);
+
+  patch_rectangular_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Rectangle"));
+  gtk_widget_show (patch_rectangular_radiobutton);
+  gtk_box_pack_start (GTK_BOX (hbox22), patch_rectangular_radiobutton, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (patch_rectangular_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (patch_rectangular_radiobutton), patch_arbitrary_radiobutton_group);
+  patch_arbitrary_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (patch_rectangular_radiobutton));
+
+  patch_triangular_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Triangle"));
+  gtk_widget_show (patch_triangular_radiobutton);
+  gtk_box_pack_start (GTK_BOX (hbox22), patch_triangular_radiobutton, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (patch_triangular_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (patch_triangular_radiobutton), patch_arbitrary_radiobutton_group);
+  patch_arbitrary_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (patch_triangular_radiobutton));
+
+  patch_quadrilateral_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Quadrilateral"));
+  gtk_widget_show (patch_quadrilateral_radiobutton);
+  gtk_box_pack_start (GTK_BOX (hbox22), patch_quadrilateral_radiobutton, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (patch_quadrilateral_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (patch_quadrilateral_radiobutton), patch_arbitrary_radiobutton_group);
+  patch_arbitrary_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (patch_quadrilateral_radiobutton));
+
+  patch_surface_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Surface"));
+  gtk_widget_show (patch_surface_radiobutton);
+  gtk_box_pack_start (GTK_BOX (hbox22), patch_surface_radiobutton, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (patch_surface_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (patch_surface_radiobutton), patch_arbitrary_radiobutton_group);
+  patch_arbitrary_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (patch_surface_radiobutton));
+
+  label45 = gtk_label_new (_("Patch Type"));
+  gtk_widget_show (label45);
+  gtk_frame_set_label_widget (GTK_FRAME (patch_type_frame), label45);
+  gtk_misc_set_padding (GTK_MISC (label45), 4, 4);
+
+  patch_sm_frame = gtk_frame_new (NULL);
+  gtk_widget_show (patch_sm_frame);
+  gtk_box_pack_start (GTK_BOX (vbox6), patch_sm_frame, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (patch_sm_frame), 4);
+
+  alignment18 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment18);
+  gtk_container_add (GTK_CONTAINER (patch_sm_frame), alignment18);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment18), 0, 0, 12, 0);
+
+  table10 = gtk_table_new (2, 2, FALSE);
+  gtk_widget_show (table10);
+  gtk_container_add (GTK_CONTAINER (alignment18), table10);
+
+  label87 = gtk_label_new (_("Corners 1-2 sub-division (NX)"));
+  gtk_widget_show (label87);
+  gtk_table_attach (GTK_TABLE (table10), label87, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label87), 0.1, 0.5);
+
+  label88 = gtk_label_new (_("Corners 2-3 sub-division (NY)"));
+  gtk_widget_show (label88);
+  gtk_table_attach (GTK_TABLE (table10), label88, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label88), 0.1, 0.5);
+
+  patch_nx_spinbutton_adj = gtk_adjustment_new (8, 1, 10000, 1, 10, 0);
+  patch_nx_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_nx_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (patch_nx_spinbutton);
+  gtk_table_attach (GTK_TABLE (table10), patch_nx_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_nx_spinbutton), TRUE);
+
+  patch_ny_spinbutton_adj = gtk_adjustment_new (8, 1, 10000, 1, 10, 0);
+  patch_ny_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_ny_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (patch_ny_spinbutton);
+  gtk_table_attach (GTK_TABLE (table10), patch_ny_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_ny_spinbutton), TRUE);
+
+  label86 = gtk_label_new (_("Surface Sub-division"));
+  gtk_widget_show (label86);
+  gtk_frame_set_label_widget (GTK_FRAME (patch_sm_frame), label86);
+  gtk_misc_set_padding (GTK_MISC (label86), 4, 4);
+
+  frame13 = gtk_frame_new (NULL);
+  gtk_widget_show (frame13);
+  gtk_box_pack_start (GTK_BOX (vbox6), frame13, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame13), 4);
+
+  alignment14 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment14);
+  gtk_container_add (GTK_CONTAINER (frame13), alignment14);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment14), 0, 0, 12, 0);
+
+  table5 = gtk_table_new (4, 3, FALSE);
+  gtk_widget_show (table5);
+  gtk_container_add (GTK_CONTAINER (alignment14), table5);
+  gtk_table_set_row_spacings (GTK_TABLE (table5), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table5), 2);
+
+  patch_x1_label = gtk_label_new (_("Center - X"));
+  gtk_widget_show (patch_x1_label);
+  gtk_table_attach (GTK_TABLE (table5), patch_x1_label, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (patch_x1_label), 0.1, 0.5);
+
+  patch_y1_label = gtk_label_new (_("Center - Y"));
+  gtk_widget_show (patch_y1_label);
+  gtk_table_attach (GTK_TABLE (table5), patch_y1_label, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (patch_y1_label), 0.1, 0.5);
+
+  patch_z1_label = gtk_label_new (_("Center - Z"));
+  gtk_widget_show (patch_z1_label);
+  gtk_table_attach (GTK_TABLE (table5), patch_z1_label, 2, 3, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (patch_z1_label), 0.1, 0.5);
+
+  patch_x1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  patch_x1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_x1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (patch_x1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table5), patch_x1_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_x1_spinbutton), TRUE);
+
+  patch_y1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  patch_y1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_y1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (patch_y1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table5), patch_y1_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_y1_spinbutton), TRUE);
+
+  patch_z1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  patch_z1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_z1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (patch_z1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table5), patch_z1_spinbutton, 2, 3, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_z1_spinbutton), TRUE);
+
+  patch_x2_spinbutton_adj = gtk_adjustment_new (45, -10000, 10000, 9.99999974738e-06, 10, 0);
+  patch_x2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_x2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (patch_x2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table5), patch_x2_spinbutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_x2_spinbutton), TRUE);
+
+  patch_y2_spinbutton_adj = gtk_adjustment_new (45, -10000, 10000, 9.99999974738e-06, 10, 0);
+  patch_y2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_y2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (patch_y2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table5), patch_y2_spinbutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_y2_spinbutton), TRUE);
+
+  patch_z2_spinbutton_adj = gtk_adjustment_new (0.10000000149, -10000, 10000, 9.99999974738e-06, 10, 0);
+  patch_z2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_z2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (patch_z2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table5), patch_z2_spinbutton, 2, 3, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_z2_spinbutton), TRUE);
+
+  patch_x2_label = gtk_label_new (_("Normal - Elev."));
+  gtk_widget_show (patch_x2_label);
+  gtk_table_attach (GTK_TABLE (table5), patch_x2_label, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (patch_x2_label), 0.1, 0.5);
+
+  patch_y2_label = gtk_label_new (_("Normal - Azim."));
+  gtk_widget_show (patch_y2_label);
+  gtk_table_attach (GTK_TABLE (table5), patch_y2_label, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (patch_y2_label), 0.1, 0.5);
+
+  patch_z2_label = gtk_label_new (_("Patch Area"));
+  gtk_widget_show (patch_z2_label);
+  gtk_table_attach (GTK_TABLE (table5), patch_z2_label, 2, 3, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (patch_z2_label), 0.1, 0.5);
+
+  label46 = gtk_label_new (_("SP/SM Cards"));
+  gtk_widget_show (label46);
+  gtk_frame_set_label_widget (GTK_FRAME (frame13), label46);
+  gtk_misc_set_padding (GTK_MISC (label46), 4, 4);
+
+  patch_sc_frame = gtk_frame_new (NULL);
+  gtk_widget_show (patch_sc_frame);
+  gtk_box_pack_start (GTK_BOX (vbox6), patch_sc_frame, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (patch_sc_frame), 4);
+
+  alignment15 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment15);
+  gtk_container_add (GTK_CONTAINER (patch_sc_frame), alignment15);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment15), 0, 0, 12, 0);
+
+  vbox7 = gtk_vbox_new (FALSE, 2);
+  gtk_widget_show (vbox7);
+  gtk_container_add (GTK_CONTAINER (alignment15), vbox7);
+
+  table6 = gtk_table_new (2, 3, FALSE);
+  gtk_widget_show (table6);
+  gtk_box_pack_start (GTK_BOX (vbox7), table6, TRUE, TRUE, 0);
+  gtk_table_set_row_spacings (GTK_TABLE (table6), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table6), 2);
+
+  patch_x3_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  patch_x3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_x3_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (patch_x3_spinbutton);
+  gtk_table_attach (GTK_TABLE (table6), patch_x3_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_x3_spinbutton), TRUE);
+
+  patch_y3_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  patch_y3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_y3_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (patch_y3_spinbutton);
+  gtk_table_attach (GTK_TABLE (table6), patch_y3_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_y3_spinbutton), TRUE);
+
+  patch_z3_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  patch_z3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_z3_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (patch_z3_spinbutton);
+  gtk_table_attach (GTK_TABLE (table6), patch_z3_spinbutton, 2, 3, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_z3_spinbutton), TRUE);
+
+  label54 = gtk_label_new (_("Corner 3 - X"));
+  gtk_widget_show (label54);
+  gtk_table_attach (GTK_TABLE (table6), label54, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label54), 0.1, 0.5);
+
+  label57 = gtk_label_new (_("Corner 3 - Y"));
+  gtk_widget_show (label57);
+  gtk_table_attach (GTK_TABLE (table6), label57, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label57), 0.1, 0.5);
+
+  label58 = gtk_label_new (_("Corner 3 - Z"));
+  gtk_widget_show (label58);
+  gtk_table_attach (GTK_TABLE (table6), label58, 2, 3, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label58), 0.1, 0.5);
+
+  patch_sc_table = gtk_table_new (2, 3, FALSE);
+  gtk_widget_show (patch_sc_table);
+  gtk_box_pack_start (GTK_BOX (vbox7), patch_sc_table, TRUE, TRUE, 0);
+  gtk_table_set_row_spacings (GTK_TABLE (patch_sc_table), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (patch_sc_table), 2);
+
+  patch_x4_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  patch_x4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_x4_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (patch_x4_spinbutton);
+  gtk_table_attach (GTK_TABLE (patch_sc_table), patch_x4_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_x4_spinbutton), TRUE);
+
+  patch_y4_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  patch_y4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_y4_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (patch_y4_spinbutton);
+  gtk_table_attach (GTK_TABLE (patch_sc_table), patch_y4_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_y4_spinbutton), TRUE);
+
+  patch_z4_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  patch_z4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (patch_z4_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (patch_z4_spinbutton);
+  gtk_table_attach (GTK_TABLE (patch_sc_table), patch_z4_spinbutton, 2, 3, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (patch_z4_spinbutton), TRUE);
+
+  label55 = gtk_label_new (_("Corner 4 - X"));
+  gtk_widget_show (label55);
+  gtk_table_attach (GTK_TABLE (patch_sc_table), label55, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label55), 0.1, 0.5);
+
+  label56 = gtk_label_new (_("Corner 4 - Y"));
+  gtk_widget_show (label56);
+  gtk_table_attach (GTK_TABLE (patch_sc_table), label56, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label56), 0.1, 0.5);
+
+  label59 = gtk_label_new (_("Corner 4 - Z"));
+  gtk_widget_show (label59);
+  gtk_table_attach (GTK_TABLE (patch_sc_table), label59, 2, 3, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label59), 0.1, 0.5);
+
+  label47 = gtk_label_new (_("SC Card"));
+  gtk_widget_show (label47);
+  gtk_frame_set_label_widget (GTK_FRAME (patch_sc_frame), label47);
+  gtk_misc_set_padding (GTK_MISC (label47), 4, 4);
+
+  hbox23 = gtk_hbox_new (TRUE, 2);
+  gtk_widget_show (hbox23);
+  gtk_box_pack_start (GTK_BOX (vbox6), hbox23, TRUE, TRUE, 0);
+
+  patch_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (patch_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox23), patch_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (patch_new_button), 2);
+
+  patch_cancel_button = gtk_button_new ();
+  gtk_widget_show (patch_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox23), patch_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (patch_cancel_button), 2);
+
+  alignment51 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment51);
+  gtk_container_add (GTK_CONTAINER (patch_cancel_button), alignment51);
+
+  hbox49 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox49);
+  gtk_container_add (GTK_CONTAINER (alignment51), hbox49);
+
+  image71 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image71);
+  gtk_box_pack_start (GTK_BOX (hbox49), image71, FALSE, FALSE, 0);
+
+  label223 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label223);
+  gtk_box_pack_start (GTK_BOX (hbox49), label223, FALSE, FALSE, 0);
+
+  patch_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (patch_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox23), patch_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (patch_apply_button), 2);
+
+  patch_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (patch_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox23), patch_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (patch_ok_button), 2);
+
+  g_signal_connect ((gpointer) patch_editor, "destroy",
+                    G_CALLBACK (on_patch_editor_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) patch_arbitrary_radiobutton, "toggled",
+                    G_CALLBACK (on_patch_arbitrary_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) patch_rectangular_radiobutton, "toggled",
+                    G_CALLBACK (on_patch_rectangular_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) patch_triangular_radiobutton, "toggled",
+                    G_CALLBACK (on_patch_triangular_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) patch_quadrilateral_radiobutton, "toggled",
+                    G_CALLBACK (on_patch_quadrilateral_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) patch_surface_radiobutton, "toggled",
+                    G_CALLBACK (on_patch_surface_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) patch_nx_spinbutton, "value_changed",
+                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) patch_ny_spinbutton, "value_changed",
+                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) patch_x1_spinbutton, "value_changed",
+                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) patch_y1_spinbutton, "value_changed",
+                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) patch_z1_spinbutton, "value_changed",
+                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) patch_x2_spinbutton, "value_changed",
+                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) patch_y2_spinbutton, "value_changed",
+                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) patch_z2_spinbutton, "value_changed",
+                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) patch_x3_spinbutton, "value_changed",
+                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) patch_y3_spinbutton, "value_changed",
+                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) patch_z3_spinbutton, "value_changed",
+                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) patch_x4_spinbutton, "value_changed",
+                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) patch_y4_spinbutton, "value_changed",
+                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) patch_z4_spinbutton, "value_changed",
+                    G_CALLBACK (on_patch_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) patch_new_button, "clicked",
+                    G_CALLBACK (on_patch_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) patch_cancel_button, "clicked",
+                    G_CALLBACK (on_patch_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) patch_apply_button, "clicked",
+                    G_CALLBACK (on_patch_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) patch_ok_button, "clicked",
+                    G_CALLBACK (on_patch_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (patch_editor, patch_editor, "patch_editor");
+  GLADE_HOOKUP_OBJECT (patch_editor, vbox6, "vbox6");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_type_frame, "patch_type_frame");
+  GLADE_HOOKUP_OBJECT (patch_editor, alignment13, "alignment13");
+  GLADE_HOOKUP_OBJECT (patch_editor, hbox22, "hbox22");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_arbitrary_radiobutton, "patch_arbitrary_radiobutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_rectangular_radiobutton, "patch_rectangular_radiobutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_triangular_radiobutton, "patch_triangular_radiobutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_quadrilateral_radiobutton, "patch_quadrilateral_radiobutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_surface_radiobutton, "patch_surface_radiobutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, label45, "label45");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_sm_frame, "patch_sm_frame");
+  GLADE_HOOKUP_OBJECT (patch_editor, alignment18, "alignment18");
+  GLADE_HOOKUP_OBJECT (patch_editor, table10, "table10");
+  GLADE_HOOKUP_OBJECT (patch_editor, label87, "label87");
+  GLADE_HOOKUP_OBJECT (patch_editor, label88, "label88");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_nx_spinbutton, "patch_nx_spinbutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_ny_spinbutton, "patch_ny_spinbutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, label86, "label86");
+  GLADE_HOOKUP_OBJECT (patch_editor, frame13, "frame13");
+  GLADE_HOOKUP_OBJECT (patch_editor, alignment14, "alignment14");
+  GLADE_HOOKUP_OBJECT (patch_editor, table5, "table5");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_x1_label, "patch_x1_label");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_y1_label, "patch_y1_label");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_z1_label, "patch_z1_label");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_x1_spinbutton, "patch_x1_spinbutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_y1_spinbutton, "patch_y1_spinbutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_z1_spinbutton, "patch_z1_spinbutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_x2_spinbutton, "patch_x2_spinbutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_y2_spinbutton, "patch_y2_spinbutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_z2_spinbutton, "patch_z2_spinbutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_x2_label, "patch_x2_label");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_y2_label, "patch_y2_label");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_z2_label, "patch_z2_label");
+  GLADE_HOOKUP_OBJECT (patch_editor, label46, "label46");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_sc_frame, "patch_sc_frame");
+  GLADE_HOOKUP_OBJECT (patch_editor, alignment15, "alignment15");
+  GLADE_HOOKUP_OBJECT (patch_editor, vbox7, "vbox7");
+  GLADE_HOOKUP_OBJECT (patch_editor, table6, "table6");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_x3_spinbutton, "patch_x3_spinbutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_y3_spinbutton, "patch_y3_spinbutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_z3_spinbutton, "patch_z3_spinbutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, label54, "label54");
+  GLADE_HOOKUP_OBJECT (patch_editor, label57, "label57");
+  GLADE_HOOKUP_OBJECT (patch_editor, label58, "label58");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_sc_table, "patch_sc_table");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_x4_spinbutton, "patch_x4_spinbutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_y4_spinbutton, "patch_y4_spinbutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_z4_spinbutton, "patch_z4_spinbutton");
+  GLADE_HOOKUP_OBJECT (patch_editor, label55, "label55");
+  GLADE_HOOKUP_OBJECT (patch_editor, label56, "label56");
+  GLADE_HOOKUP_OBJECT (patch_editor, label59, "label59");
+  GLADE_HOOKUP_OBJECT (patch_editor, label47, "label47");
+  GLADE_HOOKUP_OBJECT (patch_editor, hbox23, "hbox23");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_new_button, "patch_new_button");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_cancel_button, "patch_cancel_button");
+  GLADE_HOOKUP_OBJECT (patch_editor, alignment51, "alignment51");
+  GLADE_HOOKUP_OBJECT (patch_editor, hbox49, "hbox49");
+  GLADE_HOOKUP_OBJECT (patch_editor, image71, "image71");
+  GLADE_HOOKUP_OBJECT (patch_editor, label223, "label223");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_apply_button, "patch_apply_button");
+  GLADE_HOOKUP_OBJECT (patch_editor, patch_ok_button, "patch_ok_button");
+
+  return patch_editor;
+}
+
+GtkWidget*
+create_arc_editor (void)
+{
+  GtkWidget *arc_editor;
+  GtkWidget *vbox8;
+  GtkWidget *frame14;
+  GtkWidget *alignment16;
+  GtkWidget *table7;
+  GtkWidget *label66;
+  GtkWidget *label67;
+  GtkObject *arc_end1_spinbutton_adj;
+  GtkWidget *arc_end1_spinbutton;
+  GtkObject *arc_end2_spinbutton_adj;
+  GtkWidget *arc_end2_spinbutton;
+  GtkObject *arc_tagnum_spinbutton_adj;
+  GtkWidget *arc_tagnum_spinbutton;
+  GtkObject *arc_numseg_spinbutton_adj;
+  GtkWidget *arc_numseg_spinbutton;
+  GtkWidget *label63;
+  GtkWidget *label64;
+  GtkWidget *label65;
+  GtkObject *arc_rad_spinbutton_adj;
+  GtkWidget *arc_rad_spinbutton;
+  GtkWidget *label69;
+  GtkObject *arc_pcl_spinbutton_adj;
+  GtkWidget *arc_pcl_spinbutton;
+  GtkObject *arc_res_spinbutton_adj;
+  GtkWidget *arc_res_spinbutton;
+  GtkWidget *label70;
+  GtkWidget *label68;
+  GtkObject *arc_dia_spinbutton_adj;
+  GtkWidget *arc_dia_spinbutton;
+  GtkWidget *label60;
+  GtkWidget *hbox24;
+  GtkWidget *arc_new_button;
+  GtkWidget *arc_cancel_button;
+  GtkWidget *alignment52;
+  GtkWidget *hbox50;
+  GtkWidget *image72;
+  GtkWidget *label224;
+  GtkWidget *arc_apply_button;
+  GtkWidget *arc_ok_buttonbutton;
+
+  arc_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (arc_editor), 4);
+  gtk_window_set_title (GTK_WINDOW (arc_editor), _("Arc Element (GA card)"));
+  gtk_window_set_destroy_with_parent (GTK_WINDOW (arc_editor), TRUE);
+
+  vbox8 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox8);
+  gtk_container_add (GTK_CONTAINER (arc_editor), vbox8);
+
+  frame14 = gtk_frame_new (NULL);
+  gtk_widget_show (frame14);
+  gtk_box_pack_start (GTK_BOX (vbox8), frame14, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame14), 4);
+
+  alignment16 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment16);
+  gtk_container_add (GTK_CONTAINER (frame14), alignment16);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment16), 0, 0, 12, 0);
+
+  table7 = gtk_table_new (4, 4, FALSE);
+  gtk_widget_show (table7);
+  gtk_container_add (GTK_CONTAINER (alignment16), table7);
+  gtk_table_set_row_spacings (GTK_TABLE (table7), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table7), 2);
+
+  label66 = gtk_label_new (_("End 1 Angle"));
+  gtk_widget_show (label66);
+  gtk_table_attach (GTK_TABLE (table7), label66, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label66), 0.1, 0.5);
+
+  label67 = gtk_label_new (_("End 2 Angle"));
+  gtk_widget_show (label67);
+  gtk_table_attach (GTK_TABLE (table7), label67, 2, 3, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label67), 0.1, 0.5);
+
+  arc_end1_spinbutton_adj = gtk_adjustment_new (45, -360, 360, 9.99999974738e-06, 10, 0);
+  arc_end1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_end1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (arc_end1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table7), arc_end1_spinbutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_end1_spinbutton), TRUE);
+
+  arc_end2_spinbutton_adj = gtk_adjustment_new (135, -360, 360, 9.99999974738e-06, 10, 0);
+  arc_end2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_end2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (arc_end2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table7), arc_end2_spinbutton, 2, 3, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_end2_spinbutton), TRUE);
+
+  arc_tagnum_spinbutton_adj = gtk_adjustment_new (1, 1, 100000, 1, 10, 0);
+  arc_tagnum_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_tagnum_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (arc_tagnum_spinbutton);
+  gtk_table_attach (GTK_TABLE (table7), arc_tagnum_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_tagnum_spinbutton), TRUE);
+
+  arc_numseg_spinbutton_adj = gtk_adjustment_new (15, 1, 100000, 1, 10, 0);
+  arc_numseg_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_numseg_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (arc_numseg_spinbutton);
+  gtk_table_attach (GTK_TABLE (table7), arc_numseg_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_numseg_spinbutton), TRUE);
+
+  label63 = gtk_label_new (_("Tag Number"));
+  gtk_widget_show (label63);
+  gtk_table_attach (GTK_TABLE (table7), label63, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label63), 0.1, 0.5);
+
+  label64 = gtk_label_new (_("No. Segments"));
+  gtk_widget_show (label64);
+  gtk_table_attach (GTK_TABLE (table7), label64, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label64), 0.1, 0.5);
+
+  label65 = gtk_label_new (_("Radius from Y"));
+  gtk_widget_show (label65);
+  gtk_table_attach (GTK_TABLE (table7), label65, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label65), 0.1, 0.5);
+
+  arc_rad_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
+  arc_rad_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_rad_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (arc_rad_spinbutton);
+  gtk_table_attach (GTK_TABLE (table7), arc_rad_spinbutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_rad_spinbutton), TRUE);
+
+  label69 = gtk_label_new (_("Segs % lambda"));
+  gtk_widget_show (label69);
+  gtk_table_attach (GTK_TABLE (table7), label69, 2, 3, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label69), 0.1, 0.5);
+
+  arc_pcl_spinbutton_adj = gtk_adjustment_new (5, 0.0010000000475, 30, 9.99999974738e-06, 10, 0);
+  arc_pcl_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_pcl_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (arc_pcl_spinbutton);
+  gtk_table_attach (GTK_TABLE (table7), arc_pcl_spinbutton, 2, 3, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_pcl_spinbutton), TRUE);
+
+  arc_res_spinbutton_adj = gtk_adjustment_new (0, 0, 1000000000, 9.99999974738e-06, 10, 0);
+  arc_res_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_res_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (arc_res_spinbutton);
+  gtk_table_attach (GTK_TABLE (table7), arc_res_spinbutton, 3, 4, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_res_spinbutton), TRUE);
+
+  label70 = gtk_label_new (_("Conductivity S/m"));
+  gtk_widget_show (label70);
+  gtk_table_attach (GTK_TABLE (table7), label70, 3, 4, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label70), 0.1, 0.5);
+
+  label68 = gtk_label_new (_("Wire Diameter"));
+  gtk_widget_show (label68);
+  gtk_table_attach (GTK_TABLE (table7), label68, 3, 4, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label68), 0.1, 0.5);
+
+  arc_dia_spinbutton_adj = gtk_adjustment_new (0.00300000002608, 9.99999974738e-06, 100, 9.99999974738e-06, 10, 0);
+  arc_dia_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (arc_dia_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (arc_dia_spinbutton);
+  gtk_table_attach (GTK_TABLE (table7), arc_dia_spinbutton, 3, 4, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (arc_dia_spinbutton), TRUE);
+
+  label60 = gtk_label_new (_("Wire Arc Data"));
+  gtk_widget_show (label60);
+  gtk_frame_set_label_widget (GTK_FRAME (frame14), label60);
+  gtk_misc_set_padding (GTK_MISC (label60), 4, 4);
+
+  hbox24 = gtk_hbox_new (TRUE, 2);
+  gtk_widget_show (hbox24);
+  gtk_box_pack_start (GTK_BOX (vbox8), hbox24, TRUE, TRUE, 0);
+
+  arc_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (arc_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox24), arc_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (arc_new_button), 2);
+
+  arc_cancel_button = gtk_button_new ();
+  gtk_widget_show (arc_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox24), arc_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (arc_cancel_button), 2);
+
+  alignment52 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment52);
+  gtk_container_add (GTK_CONTAINER (arc_cancel_button), alignment52);
+
+  hbox50 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox50);
+  gtk_container_add (GTK_CONTAINER (alignment52), hbox50);
+
+  image72 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image72);
+  gtk_box_pack_start (GTK_BOX (hbox50), image72, FALSE, FALSE, 0);
+
+  label224 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label224);
+  gtk_box_pack_start (GTK_BOX (hbox50), label224, FALSE, FALSE, 0);
+
+  arc_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (arc_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox24), arc_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (arc_apply_button), 2);
+
+  arc_ok_buttonbutton = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (arc_ok_buttonbutton);
+  gtk_box_pack_start (GTK_BOX (hbox24), arc_ok_buttonbutton, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (arc_ok_buttonbutton), 2);
+
+  g_signal_connect ((gpointer) arc_editor, "destroy",
+                    G_CALLBACK (on_arc_editor_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) arc_end1_spinbutton, "value_changed",
+                    G_CALLBACK (on_arc_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) arc_end2_spinbutton, "value_changed",
+                    G_CALLBACK (on_arc_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) arc_tagnum_spinbutton, "value_changed",
+                    G_CALLBACK (on_arc_tagnum_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) arc_numseg_spinbutton, "value_changed",
+                    G_CALLBACK (on_arc_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) arc_rad_spinbutton, "value_changed",
+                    G_CALLBACK (on_arc_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) arc_pcl_spinbutton, "value_changed",
+                    G_CALLBACK (on_arc_pcl_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) arc_res_spinbutton, "value_changed",
+                    G_CALLBACK (on_arc_res_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) arc_dia_spinbutton, "value_changed",
+                    G_CALLBACK (on_arc_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) arc_new_button, "clicked",
+                    G_CALLBACK (on_arc_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) arc_cancel_button, "clicked",
+                    G_CALLBACK (on_arc_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) arc_apply_button, "clicked",
+                    G_CALLBACK (on_arc_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) arc_ok_buttonbutton, "clicked",
+                    G_CALLBACK (on_arc_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (arc_editor, arc_editor, "arc_editor");
+  GLADE_HOOKUP_OBJECT (arc_editor, vbox8, "vbox8");
+  GLADE_HOOKUP_OBJECT (arc_editor, frame14, "frame14");
+  GLADE_HOOKUP_OBJECT (arc_editor, alignment16, "alignment16");
+  GLADE_HOOKUP_OBJECT (arc_editor, table7, "table7");
+  GLADE_HOOKUP_OBJECT (arc_editor, label66, "label66");
+  GLADE_HOOKUP_OBJECT (arc_editor, label67, "label67");
+  GLADE_HOOKUP_OBJECT (arc_editor, arc_end1_spinbutton, "arc_end1_spinbutton");
+  GLADE_HOOKUP_OBJECT (arc_editor, arc_end2_spinbutton, "arc_end2_spinbutton");
+  GLADE_HOOKUP_OBJECT (arc_editor, arc_tagnum_spinbutton, "arc_tagnum_spinbutton");
+  GLADE_HOOKUP_OBJECT (arc_editor, arc_numseg_spinbutton, "arc_numseg_spinbutton");
+  GLADE_HOOKUP_OBJECT (arc_editor, label63, "label63");
+  GLADE_HOOKUP_OBJECT (arc_editor, label64, "label64");
+  GLADE_HOOKUP_OBJECT (arc_editor, label65, "label65");
+  GLADE_HOOKUP_OBJECT (arc_editor, arc_rad_spinbutton, "arc_rad_spinbutton");
+  GLADE_HOOKUP_OBJECT (arc_editor, label69, "label69");
+  GLADE_HOOKUP_OBJECT (arc_editor, arc_pcl_spinbutton, "arc_pcl_spinbutton");
+  GLADE_HOOKUP_OBJECT (arc_editor, arc_res_spinbutton, "arc_res_spinbutton");
+  GLADE_HOOKUP_OBJECT (arc_editor, label70, "label70");
+  GLADE_HOOKUP_OBJECT (arc_editor, label68, "label68");
+  GLADE_HOOKUP_OBJECT (arc_editor, arc_dia_spinbutton, "arc_dia_spinbutton");
+  GLADE_HOOKUP_OBJECT (arc_editor, label60, "label60");
+  GLADE_HOOKUP_OBJECT (arc_editor, hbox24, "hbox24");
+  GLADE_HOOKUP_OBJECT (arc_editor, arc_new_button, "arc_new_button");
+  GLADE_HOOKUP_OBJECT (arc_editor, arc_cancel_button, "arc_cancel_button");
+  GLADE_HOOKUP_OBJECT (arc_editor, alignment52, "alignment52");
+  GLADE_HOOKUP_OBJECT (arc_editor, hbox50, "hbox50");
+  GLADE_HOOKUP_OBJECT (arc_editor, image72, "image72");
+  GLADE_HOOKUP_OBJECT (arc_editor, label224, "label224");
+  GLADE_HOOKUP_OBJECT (arc_editor, arc_apply_button, "arc_apply_button");
+  GLADE_HOOKUP_OBJECT (arc_editor, arc_ok_buttonbutton, "arc_ok_buttonbutton");
+
+  return arc_editor;
+}
+
+GtkWidget*
+create_transform_editor (void)
+{
+  GtkWidget *transform_editor;
+  GtkWidget *vbox9;
+  GtkWidget *frame15;
+  GtkWidget *alignment17;
+  GtkWidget *table8;
+  GtkWidget *label62;
+  GtkWidget *label98;
+  GtkWidget *label99;
+  GtkWidget *label100;
+  GtkWidget *label101;
+  GtkWidget *label102;
+  GtkWidget *label103;
+  GtkWidget *label104;
+  GtkWidget *label105;
+  GtkObject *transform_my_spinbutton_adj;
+  GtkWidget *transform_my_spinbutton;
+  GtkObject *transform_mx_spinbutton_adj;
+  GtkWidget *transform_mx_spinbutton;
+  GtkObject *transform_mz_spinbutton_adj;
+  GtkWidget *transform_mz_spinbutton;
+  GtkObject *transform_rx_spinbutton_adj;
+  GtkWidget *transform_rx_spinbutton;
+  GtkObject *transform_taginc_spinbutton_adj;
+  GtkWidget *transform_taginc_spinbutton;
+  GtkObject *transform_new_spinbutton_adj;
+  GtkWidget *transform_new_spinbutton;
+  GtkObject *transform_start_spinbutton_adj;
+  GtkWidget *transform_start_spinbutton;
+  GtkObject *transform_ry_spinbutton_adj;
+  GtkWidget *transform_ry_spinbutton;
+  GtkObject *transform_rz_spinbutton_adj;
+  GtkWidget *transform_rz_spinbutton;
+  GtkWidget *label61;
+  GtkWidget *hbox25;
+  GtkWidget *transform_new_button;
+  GtkWidget *transform_cancel_button;
+  GtkWidget *alignment53;
+  GtkWidget *hbox51;
+  GtkWidget *image73;
+  GtkWidget *label225;
+  GtkWidget *transform_apply_button;
+  GtkWidget *transform_ok_button;
+
+  transform_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (transform_editor), 4);
+  gtk_window_set_title (GTK_WINDOW (transform_editor), _("Co-ordinate Transformation (GM card)"));
+
+  vbox9 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox9);
+  gtk_container_add (GTK_CONTAINER (transform_editor), vbox9);
+
+  frame15 = gtk_frame_new (NULL);
+  gtk_widget_show (frame15);
+  gtk_box_pack_start (GTK_BOX (vbox9), frame15, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame15), 4);
+
+  alignment17 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment17);
+  gtk_container_add (GTK_CONTAINER (frame15), alignment17);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment17), 0, 0, 12, 0);
+
+  table8 = gtk_table_new (6, 3, FALSE);
+  gtk_widget_show (table8);
+  gtk_container_add (GTK_CONTAINER (alignment17), table8);
+  gtk_table_set_row_spacings (GTK_TABLE (table8), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table8), 2);
+
+  label62 = gtk_label_new (_("Tag Increment"));
+  gtk_widget_show (label62);
+  gtk_table_attach (GTK_TABLE (table8), label62, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label62), 0.1, 0.5);
+
+  label98 = gtk_label_new (_("New Structures"));
+  gtk_widget_show (label98);
+  gtk_table_attach (GTK_TABLE (table8), label98, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label98), 0.1, 0.5);
+
+  label99 = gtk_label_new (_("Start From Tag"));
+  gtk_widget_show (label99);
+  gtk_table_attach (GTK_TABLE (table8), label99, 2, 3, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label99), 0.1, 0.5);
+
+  label100 = gtk_label_new (_("Rotate about X"));
+  gtk_widget_show (label100);
+  gtk_table_attach (GTK_TABLE (table8), label100, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label100), 0.1, 0.5);
+
+  label101 = gtk_label_new (_("Rotate about Y"));
+  gtk_widget_show (label101);
+  gtk_table_attach (GTK_TABLE (table8), label101, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label101), 0.1, 0.5);
+
+  label102 = gtk_label_new (_("Rotate about Z"));
+  gtk_widget_show (label102);
+  gtk_table_attach (GTK_TABLE (table8), label102, 2, 3, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label102), 0.1, 0.5);
+
+  label103 = gtk_label_new (_("Move along X"));
+  gtk_widget_show (label103);
+  gtk_table_attach (GTK_TABLE (table8), label103, 0, 1, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label103), 0.1, 0.5);
+
+  label104 = gtk_label_new (_("Move along Y"));
+  gtk_widget_show (label104);
+  gtk_table_attach (GTK_TABLE (table8), label104, 1, 2, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label104), 0.1, 0.5);
+
+  label105 = gtk_label_new (_("Move along Z"));
+  gtk_widget_show (label105);
+  gtk_table_attach (GTK_TABLE (table8), label105, 2, 3, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label105), 0.1, 0.5);
+
+  transform_my_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  transform_my_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_my_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (transform_my_spinbutton);
+  gtk_table_attach (GTK_TABLE (table8), transform_my_spinbutton, 1, 2, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_my_spinbutton), TRUE);
+
+  transform_mx_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  transform_mx_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_mx_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (transform_mx_spinbutton);
+  gtk_table_attach (GTK_TABLE (table8), transform_mx_spinbutton, 0, 1, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_mx_spinbutton), TRUE);
+
+  transform_mz_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  transform_mz_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_mz_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (transform_mz_spinbutton);
+  gtk_table_attach (GTK_TABLE (table8), transform_mz_spinbutton, 2, 3, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_mz_spinbutton), TRUE);
+
+  transform_rx_spinbutton_adj = gtk_adjustment_new (0, -360, 360, 9.99999974738e-06, 10, 0);
+  transform_rx_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_rx_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (transform_rx_spinbutton);
+  gtk_table_attach (GTK_TABLE (table8), transform_rx_spinbutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_rx_spinbutton), TRUE);
+
+  transform_taginc_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
+  transform_taginc_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_taginc_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (transform_taginc_spinbutton);
+  gtk_table_attach (GTK_TABLE (table8), transform_taginc_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_taginc_spinbutton), TRUE);
+
+  transform_new_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
+  transform_new_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_new_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (transform_new_spinbutton);
+  gtk_table_attach (GTK_TABLE (table8), transform_new_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_new_spinbutton), TRUE);
+
+  transform_start_spinbutton_adj = gtk_adjustment_new (0, 0, 10000, 1, 10, 0);
+  transform_start_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_start_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (transform_start_spinbutton);
+  gtk_table_attach (GTK_TABLE (table8), transform_start_spinbutton, 2, 3, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_start_spinbutton), TRUE);
+
+  transform_ry_spinbutton_adj = gtk_adjustment_new (0, -360, 360, 9.99999974738e-06, 10, 0);
+  transform_ry_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_ry_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (transform_ry_spinbutton);
+  gtk_table_attach (GTK_TABLE (table8), transform_ry_spinbutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_ry_spinbutton), TRUE);
+
+  transform_rz_spinbutton_adj = gtk_adjustment_new (0, -360, 360, 9.99999974738e-06, 10, 0);
+  transform_rz_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (transform_rz_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (transform_rz_spinbutton);
+  gtk_table_attach (GTK_TABLE (table8), transform_rz_spinbutton, 2, 3, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (transform_rz_spinbutton), TRUE);
+
+  label61 = gtk_label_new (_("Co-ordinate Transformation Data"));
+  gtk_widget_show (label61);
+  gtk_frame_set_label_widget (GTK_FRAME (frame15), label61);
+  gtk_misc_set_padding (GTK_MISC (label61), 4, 4);
+
+  hbox25 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox25);
+  gtk_box_pack_start (GTK_BOX (vbox9), hbox25, TRUE, TRUE, 0);
+
+  transform_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (transform_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox25), transform_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (transform_new_button), 2);
+
+  transform_cancel_button = gtk_button_new ();
+  gtk_widget_show (transform_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox25), transform_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (transform_cancel_button), 2);
+
+  alignment53 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment53);
+  gtk_container_add (GTK_CONTAINER (transform_cancel_button), alignment53);
+
+  hbox51 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox51);
+  gtk_container_add (GTK_CONTAINER (alignment53), hbox51);
+
+  image73 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image73);
+  gtk_box_pack_start (GTK_BOX (hbox51), image73, FALSE, FALSE, 0);
+
+  label225 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label225);
+  gtk_box_pack_start (GTK_BOX (hbox51), label225, FALSE, FALSE, 0);
+
+  transform_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (transform_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox25), transform_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (transform_apply_button), 2);
+
+  transform_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (transform_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox25), transform_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (transform_ok_button), 2);
+
+  g_signal_connect ((gpointer) transform_editor, "destroy",
+                    G_CALLBACK (on_transform_editor_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) transform_my_spinbutton, "value_changed",
+                    G_CALLBACK (on_transform_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) transform_mx_spinbutton, "value_changed",
+                    G_CALLBACK (on_transform_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) transform_mz_spinbutton, "value_changed",
+                    G_CALLBACK (on_transform_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) transform_rx_spinbutton, "value_changed",
+                    G_CALLBACK (on_transform_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) transform_taginc_spinbutton, "value_changed",
+                    G_CALLBACK (on_transform_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) transform_new_spinbutton, "value_changed",
+                    G_CALLBACK (on_transform_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) transform_start_spinbutton, "value_changed",
+                    G_CALLBACK (on_transform_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) transform_ry_spinbutton, "value_changed",
+                    G_CALLBACK (on_transform_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) transform_rz_spinbutton, "value_changed",
+                    G_CALLBACK (on_transform_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) transform_new_button, "clicked",
+                    G_CALLBACK (on_transform_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) transform_cancel_button, "clicked",
+                    G_CALLBACK (on_transform_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) transform_apply_button, "clicked",
+                    G_CALLBACK (on_transform_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) transform_ok_button, "clicked",
+                    G_CALLBACK (on_transform_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (transform_editor, transform_editor, "transform_editor");
+  GLADE_HOOKUP_OBJECT (transform_editor, vbox9, "vbox9");
+  GLADE_HOOKUP_OBJECT (transform_editor, frame15, "frame15");
+  GLADE_HOOKUP_OBJECT (transform_editor, alignment17, "alignment17");
+  GLADE_HOOKUP_OBJECT (transform_editor, table8, "table8");
+  GLADE_HOOKUP_OBJECT (transform_editor, label62, "label62");
+  GLADE_HOOKUP_OBJECT (transform_editor, label98, "label98");
+  GLADE_HOOKUP_OBJECT (transform_editor, label99, "label99");
+  GLADE_HOOKUP_OBJECT (transform_editor, label100, "label100");
+  GLADE_HOOKUP_OBJECT (transform_editor, label101, "label101");
+  GLADE_HOOKUP_OBJECT (transform_editor, label102, "label102");
+  GLADE_HOOKUP_OBJECT (transform_editor, label103, "label103");
+  GLADE_HOOKUP_OBJECT (transform_editor, label104, "label104");
+  GLADE_HOOKUP_OBJECT (transform_editor, label105, "label105");
+  GLADE_HOOKUP_OBJECT (transform_editor, transform_my_spinbutton, "transform_my_spinbutton");
+  GLADE_HOOKUP_OBJECT (transform_editor, transform_mx_spinbutton, "transform_mx_spinbutton");
+  GLADE_HOOKUP_OBJECT (transform_editor, transform_mz_spinbutton, "transform_mz_spinbutton");
+  GLADE_HOOKUP_OBJECT (transform_editor, transform_rx_spinbutton, "transform_rx_spinbutton");
+  GLADE_HOOKUP_OBJECT (transform_editor, transform_taginc_spinbutton, "transform_taginc_spinbutton");
+  GLADE_HOOKUP_OBJECT (transform_editor, transform_new_spinbutton, "transform_new_spinbutton");
+  GLADE_HOOKUP_OBJECT (transform_editor, transform_start_spinbutton, "transform_start_spinbutton");
+  GLADE_HOOKUP_OBJECT (transform_editor, transform_ry_spinbutton, "transform_ry_spinbutton");
+  GLADE_HOOKUP_OBJECT (transform_editor, transform_rz_spinbutton, "transform_rz_spinbutton");
+  GLADE_HOOKUP_OBJECT (transform_editor, label61, "label61");
+  GLADE_HOOKUP_OBJECT (transform_editor, hbox25, "hbox25");
+  GLADE_HOOKUP_OBJECT (transform_editor, transform_new_button, "transform_new_button");
+  GLADE_HOOKUP_OBJECT (transform_editor, transform_cancel_button, "transform_cancel_button");
+  GLADE_HOOKUP_OBJECT (transform_editor, alignment53, "alignment53");
+  GLADE_HOOKUP_OBJECT (transform_editor, hbox51, "hbox51");
+  GLADE_HOOKUP_OBJECT (transform_editor, image73, "image73");
+  GLADE_HOOKUP_OBJECT (transform_editor, label225, "label225");
+  GLADE_HOOKUP_OBJECT (transform_editor, transform_apply_button, "transform_apply_button");
+  GLADE_HOOKUP_OBJECT (transform_editor, transform_ok_button, "transform_ok_button");
+
+  return transform_editor;
+}
+
+GtkWidget*
+create_helix_editor (void)
+{
+  GtkWidget *helix_editor;
+  GtkWidget *vbox10;
+  GtkWidget *frame16;
+  GtkWidget *table9;
+  GtkWidget *label72;
+  GtkWidget *label73;
+  GtkWidget *label75;
+  GtkWidget *label76;
+  GtkWidget *label77;
+  GtkWidget *label78;
+  GtkWidget *label79;
+  GtkWidget *label80;
+  GtkObject *helix_tagnum_spinbutton_adj;
+  GtkWidget *helix_tagnum_spinbutton;
+  GtkObject *helix_numseg_spinbutton_adj;
+  GtkWidget *helix_numseg_spinbutton;
+  GtkObject *helix_pcl_spinbutton_adj;
+  GtkWidget *helix_pcl_spinbutton;
+  GtkObject *helix_tspace_spinbutton_adj;
+  GtkWidget *helix_tspace_spinbutton;
+  GtkObject *helix_len_spinbutton_adj;
+  GtkWidget *helix_len_spinbutton;
+  GtkObject *helix_radxzo_spinbutton_adj;
+  GtkWidget *helix_radxzo_spinbutton;
+  GtkObject *helix_dia_spinbutton_adj;
+  GtkWidget *helix_dia_spinbutton;
+  GtkObject *helix_radyzhl_spinbutton_adj;
+  GtkWidget *helix_radyzhl_spinbutton;
+  GtkObject *helix_radxzhl_spinbutton_adj;
+  GtkWidget *helix_radxzhl_spinbutton;
+  GtkWidget *label81;
+  GtkObject *helix_nturns_spinbutton_adj;
+  GtkWidget *helix_nturns_spinbutton;
+  GtkWidget *label82;
+  GtkWidget *label83;
+  GtkObject *helix_radyzo_spinbutton_adj;
+  GtkWidget *helix_radyzo_spinbutton;
+  GtkWidget *label84;
+  GtkObject *helix_res_spinbutton_adj;
+  GtkWidget *helix_res_spinbutton;
+  GtkWidget *helix_linkzo_radiobutton;
+  GSList *helix_linkzo_radiobutton_group = NULL;
+  GtkWidget *helix_linkzhl_radiobutton;
+  GtkWidget *helix_linkall_radiobutton;
+  GtkWidget *helix_lh_checkbutton;
+  GtkWidget *label85;
+  GtkWidget *hbox26;
+  GtkWidget *helix_new_button;
+  GtkWidget *helix_cancel_button;
+  GtkWidget *alignment54;
+  GtkWidget *hbox52;
+  GtkWidget *image74;
+  GtkWidget *label226;
+  GtkWidget *helix_apply_button;
+  GtkWidget *helix_ok_button;
+
+  helix_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (helix_editor), 4);
+  gtk_window_set_title (GTK_WINDOW (helix_editor), _("Helical Element (GA card)"));
+
+  vbox10 = gtk_vbox_new (FALSE, 2);
+  gtk_widget_show (vbox10);
+  gtk_container_add (GTK_CONTAINER (helix_editor), vbox10);
+
+  frame16 = gtk_frame_new (NULL);
+  gtk_widget_show (frame16);
+  gtk_box_pack_start (GTK_BOX (vbox10), frame16, TRUE, TRUE, 2);
+  gtk_container_set_border_width (GTK_CONTAINER (frame16), 4);
+
+  table9 = gtk_table_new (7, 4, FALSE);
+  gtk_widget_show (table9);
+  gtk_container_add (GTK_CONTAINER (frame16), table9);
+  gtk_table_set_row_spacings (GTK_TABLE (table9), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table9), 2);
+
+  label72 = gtk_label_new (_("Segments/Turn"));
+  gtk_widget_show (label72);
+  gtk_table_attach (GTK_TABLE (table9), label72, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label72), 0.1, 0.5);
+
+  label73 = gtk_label_new (_("Segs % lambda"));
+  gtk_widget_show (label73);
+  gtk_table_attach (GTK_TABLE (table9), label73, 2, 3, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label73), 0.1, 0.5);
+
+  label75 = gtk_label_new (_("Turns Spacing"));
+  gtk_widget_show (label75);
+  gtk_table_attach (GTK_TABLE (table9), label75, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label75), 0.1, 0.5);
+
+  label76 = gtk_label_new (_("Helix Length"));
+  gtk_widget_show (label76);
+  gtk_table_attach (GTK_TABLE (table9), label76, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  GTK_WIDGET_SET_FLAGS (label76, GTK_CAN_FOCUS);
+  gtk_label_set_selectable (GTK_LABEL (label76), TRUE);
+  gtk_misc_set_alignment (GTK_MISC (label76), 0.1, 0.5);
+
+  label77 = gtk_label_new (_("Radius @ X,Z=0"));
+  gtk_widget_show (label77);
+  gtk_table_attach (GTK_TABLE (table9), label77, 2, 3, 3, 4,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label77), 0.1, 0.5);
+
+  label78 = gtk_label_new (_("Rad. @ X,Z=HL"));
+  gtk_widget_show (label78);
+  gtk_table_attach (GTK_TABLE (table9), label78, 0, 1, 5, 6,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label78), 0.1, 0.5);
+
+  label79 = gtk_label_new (_("Rad. @ Y,Z=HL"));
+  gtk_widget_show (label79);
+  gtk_table_attach (GTK_TABLE (table9), label79, 1, 2, 5, 6,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label79), 0.1, 0.5);
+
+  label80 = gtk_label_new (_("Wire Diameter"));
+  gtk_widget_show (label80);
+  gtk_table_attach (GTK_TABLE (table9), label80, 2, 3, 5, 6,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label80), 0.1, 0.5);
+
+  helix_tagnum_spinbutton_adj = gtk_adjustment_new (1, 1, 100000, 1, 10, 0);
+  helix_tagnum_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_tagnum_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (helix_tagnum_spinbutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_tagnum_spinbutton, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_tagnum_spinbutton), TRUE);
+
+  helix_numseg_spinbutton_adj = gtk_adjustment_new (8, 1, 100000, 1, 10, 0);
+  helix_numseg_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_numseg_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (helix_numseg_spinbutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_numseg_spinbutton, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_numseg_spinbutton), TRUE);
+
+  helix_pcl_spinbutton_adj = gtk_adjustment_new (5, 0.0010000000475, 30, 9.99999974738e-06, 10, 0);
+  helix_pcl_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_pcl_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (helix_pcl_spinbutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_pcl_spinbutton, 2, 3, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_pcl_spinbutton), TRUE);
+
+  helix_tspace_spinbutton_adj = gtk_adjustment_new (1, 0, 10000, 9.99999974738e-06, 10, 0);
+  helix_tspace_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_tspace_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (helix_tspace_spinbutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_tspace_spinbutton, 0, 1, 4, 5,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_tspace_spinbutton), TRUE);
+
+  helix_len_spinbutton_adj = gtk_adjustment_new (5, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
+  helix_len_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_len_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (helix_len_spinbutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_len_spinbutton, 1, 2, 4, 5,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_len_spinbutton), TRUE);
+
+  helix_radxzo_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
+  helix_radxzo_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_radxzo_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (helix_radxzo_spinbutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_radxzo_spinbutton, 2, 3, 4, 5,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_radxzo_spinbutton), TRUE);
+
+  helix_dia_spinbutton_adj = gtk_adjustment_new (0.00300000002608, 9.99999974738e-06, 100, 9.99999974738e-06, 10, 0);
+  helix_dia_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_dia_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (helix_dia_spinbutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_dia_spinbutton, 2, 3, 6, 7,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_dia_spinbutton), TRUE);
+
+  helix_radyzhl_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
+  helix_radyzhl_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_radyzhl_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (helix_radyzhl_spinbutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_radyzhl_spinbutton, 1, 2, 6, 7,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_radyzhl_spinbutton), TRUE);
+
+  helix_radxzhl_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
+  helix_radxzhl_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_radxzhl_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (helix_radxzhl_spinbutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_radxzhl_spinbutton, 0, 1, 6, 7,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_radxzhl_spinbutton), TRUE);
+
+  label81 = gtk_label_new (_("Tag Number"));
+  gtk_widget_show (label81);
+  gtk_table_attach (GTK_TABLE (table9), label81, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label81), 0.1, 0.5);
+
+  helix_nturns_spinbutton_adj = gtk_adjustment_new (8, 0.10000000149, 10000, 9.99999974738e-06, 10, 0);
+  helix_nturns_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_nturns_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (helix_nturns_spinbutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_nturns_spinbutton, 3, 4, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_nturns_spinbutton), TRUE);
+
+  label82 = gtk_label_new (_("Num. of Turns"));
+  gtk_widget_show (label82);
+  gtk_table_attach (GTK_TABLE (table9), label82, 3, 4, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label82), 0.1, 0.5);
+
+  label83 = gtk_label_new (_("Radius @ Y,Z=0"));
+  gtk_widget_show (label83);
+  gtk_table_attach (GTK_TABLE (table9), label83, 3, 4, 3, 4,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label83), 0.1, 0.5);
+
+  helix_radyzo_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
+  helix_radyzo_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_radyzo_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (helix_radyzo_spinbutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_radyzo_spinbutton, 3, 4, 4, 5,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_radyzo_spinbutton), TRUE);
+
+  label84 = gtk_label_new (_("Conductivity S/m"));
+  gtk_widget_show (label84);
+  gtk_table_attach (GTK_TABLE (table9), label84, 3, 4, 5, 6,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label84), 0.1, 0.5);
+
+  helix_res_spinbutton_adj = gtk_adjustment_new (0, 0, 1000000000, 9.99999974738e-06, 10, 0);
+  helix_res_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (helix_res_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (helix_res_spinbutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_res_spinbutton, 3, 4, 6, 7,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (helix_res_spinbutton), TRUE);
+
+  helix_linkzo_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Link @ Z=0"));
+  gtk_widget_show (helix_linkzo_radiobutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_linkzo_radiobutton, 2, 3, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (helix_linkzo_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (helix_linkzo_radiobutton), helix_linkzo_radiobutton_group);
+  helix_linkzo_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (helix_linkzo_radiobutton));
+
+  helix_linkzhl_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Link @ Z=HL"));
+  gtk_widget_show (helix_linkzhl_radiobutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_linkzhl_radiobutton, 3, 4, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (helix_linkzhl_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (helix_linkzhl_radiobutton), helix_linkzo_radiobutton_group);
+  helix_linkzo_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (helix_linkzhl_radiobutton));
+
+  helix_linkall_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Link all Radii"));
+  gtk_widget_show (helix_linkall_radiobutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_linkall_radiobutton, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (helix_linkall_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (helix_linkall_radiobutton), helix_linkzo_radiobutton_group);
+  helix_linkzo_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (helix_linkall_radiobutton));
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (helix_linkall_radiobutton), TRUE);
+
+  helix_lh_checkbutton = gtk_check_button_new_with_mnemonic (_("Left Hand"));
+  gtk_widget_show (helix_lh_checkbutton);
+  gtk_table_attach (GTK_TABLE (table9), helix_lh_checkbutton, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (helix_lh_checkbutton), 2);
+
+  label85 = gtk_label_new (_("GH Card"));
+  gtk_widget_show (label85);
+  gtk_frame_set_label_widget (GTK_FRAME (frame16), label85);
+  gtk_misc_set_padding (GTK_MISC (label85), 4, 4);
+
+  hbox26 = gtk_hbox_new (TRUE, 2);
+  gtk_widget_show (hbox26);
+  gtk_box_pack_start (GTK_BOX (vbox10), hbox26, TRUE, TRUE, 0);
+
+  helix_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (helix_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox26), helix_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (helix_new_button), 2);
+  GTK_WIDGET_SET_FLAGS (helix_new_button, GTK_CAN_DEFAULT);
+
+  helix_cancel_button = gtk_button_new ();
+  gtk_widget_show (helix_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox26), helix_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (helix_cancel_button), 2);
+  GTK_WIDGET_SET_FLAGS (helix_cancel_button, GTK_CAN_DEFAULT);
+
+  alignment54 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment54);
+  gtk_container_add (GTK_CONTAINER (helix_cancel_button), alignment54);
+
+  hbox52 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox52);
+  gtk_container_add (GTK_CONTAINER (alignment54), hbox52);
+
+  image74 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image74);
+  gtk_box_pack_start (GTK_BOX (hbox52), image74, FALSE, FALSE, 0);
+
+  label226 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label226);
+  gtk_box_pack_start (GTK_BOX (hbox52), label226, FALSE, FALSE, 0);
+
+  helix_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (helix_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox26), helix_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (helix_apply_button), 2);
+  GTK_WIDGET_SET_FLAGS (helix_apply_button, GTK_CAN_DEFAULT);
+
+  helix_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (helix_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox26), helix_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (helix_ok_button), 2);
+  GTK_WIDGET_SET_FLAGS (helix_ok_button, GTK_CAN_DEFAULT);
+
+  g_signal_connect ((gpointer) helix_editor, "destroy",
+                    G_CALLBACK (on_helix_editor_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) helix_tagnum_spinbutton, "value_changed",
+                    G_CALLBACK (on_helix_tagnum_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) helix_numseg_spinbutton, "value_changed",
+                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) helix_pcl_spinbutton, "value_changed",
+                    G_CALLBACK (on_helix_pcl_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) helix_tspace_spinbutton, "value_changed",
+                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) helix_len_spinbutton, "value_changed",
+                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) helix_radxzo_spinbutton, "value_changed",
+                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) helix_dia_spinbutton, "value_changed",
+                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) helix_radyzhl_spinbutton, "value_changed",
+                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) helix_radxzhl_spinbutton, "value_changed",
+                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) helix_nturns_spinbutton, "value_changed",
+                    G_CALLBACK (on_helix_nturns_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) helix_radyzo_spinbutton, "value_changed",
+                    G_CALLBACK (on_helix_data_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) helix_res_spinbutton, "value_changed",
+                    G_CALLBACK (on_helix_res_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) helix_linkzo_radiobutton, "toggled",
+                    G_CALLBACK (on_helix_linkzo_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) helix_linkzhl_radiobutton, "toggled",
+                    G_CALLBACK (on_helix_linkzhl_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) helix_linkall_radiobutton, "toggled",
+                    G_CALLBACK (on_helix_linkall_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) helix_lh_checkbutton, "toggled",
+                    G_CALLBACK (on_helix_lh_checkbutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) helix_new_button, "clicked",
+                    G_CALLBACK (on_helix_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) helix_cancel_button, "clicked",
+                    G_CALLBACK (on_helix_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) helix_apply_button, "clicked",
+                    G_CALLBACK (on_helix_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) helix_ok_button, "clicked",
+                    G_CALLBACK (on_helix_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (helix_editor, helix_editor, "helix_editor");
+  GLADE_HOOKUP_OBJECT (helix_editor, vbox10, "vbox10");
+  GLADE_HOOKUP_OBJECT (helix_editor, frame16, "frame16");
+  GLADE_HOOKUP_OBJECT (helix_editor, table9, "table9");
+  GLADE_HOOKUP_OBJECT (helix_editor, label72, "label72");
+  GLADE_HOOKUP_OBJECT (helix_editor, label73, "label73");
+  GLADE_HOOKUP_OBJECT (helix_editor, label75, "label75");
+  GLADE_HOOKUP_OBJECT (helix_editor, label76, "label76");
+  GLADE_HOOKUP_OBJECT (helix_editor, label77, "label77");
+  GLADE_HOOKUP_OBJECT (helix_editor, label78, "label78");
+  GLADE_HOOKUP_OBJECT (helix_editor, label79, "label79");
+  GLADE_HOOKUP_OBJECT (helix_editor, label80, "label80");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_tagnum_spinbutton, "helix_tagnum_spinbutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_numseg_spinbutton, "helix_numseg_spinbutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_pcl_spinbutton, "helix_pcl_spinbutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_tspace_spinbutton, "helix_tspace_spinbutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_len_spinbutton, "helix_len_spinbutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_radxzo_spinbutton, "helix_radxzo_spinbutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_dia_spinbutton, "helix_dia_spinbutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_radyzhl_spinbutton, "helix_radyzhl_spinbutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_radxzhl_spinbutton, "helix_radxzhl_spinbutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, label81, "label81");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_nturns_spinbutton, "helix_nturns_spinbutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, label82, "label82");
+  GLADE_HOOKUP_OBJECT (helix_editor, label83, "label83");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_radyzo_spinbutton, "helix_radyzo_spinbutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, label84, "label84");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_res_spinbutton, "helix_res_spinbutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_linkzo_radiobutton, "helix_linkzo_radiobutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_linkzhl_radiobutton, "helix_linkzhl_radiobutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_linkall_radiobutton, "helix_linkall_radiobutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_lh_checkbutton, "helix_lh_checkbutton");
+  GLADE_HOOKUP_OBJECT (helix_editor, label85, "label85");
+  GLADE_HOOKUP_OBJECT (helix_editor, hbox26, "hbox26");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_new_button, "helix_new_button");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_cancel_button, "helix_cancel_button");
+  GLADE_HOOKUP_OBJECT (helix_editor, alignment54, "alignment54");
+  GLADE_HOOKUP_OBJECT (helix_editor, hbox52, "hbox52");
+  GLADE_HOOKUP_OBJECT (helix_editor, image74, "image74");
+  GLADE_HOOKUP_OBJECT (helix_editor, label226, "label226");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_apply_button, "helix_apply_button");
+  GLADE_HOOKUP_OBJECT (helix_editor, helix_ok_button, "helix_ok_button");
+
+  return helix_editor;
+}
+
+GtkWidget*
+create_reflect_editor (void)
+{
+  GtkWidget *reflect_editor;
+  GtkWidget *vbox11;
+  GtkWidget *frame17;
+  GtkWidget *alignment19;
+  GtkWidget *table11;
+  GtkWidget *reflect_y_checkbutton;
+  GtkObject *reflect_taginc_spinbutton_adj;
+  GtkWidget *reflect_taginc_spinbutton;
+  GtkWidget *reflect_z_checkbutton;
+  GtkWidget *reflect_x_checkbutton;
+  GtkWidget *label91;
+  GtkWidget *label90;
+  GtkWidget *hbox27;
+  GtkWidget *reflect_new_button;
+  GtkWidget *reflect_cancel_button;
+  GtkWidget *alignment55;
+  GtkWidget *hbox53;
+  GtkWidget *image75;
+  GtkWidget *label227;
+  GtkWidget *reflect_apply_button;
+  GtkWidget *reflect_ok_button;
+
+  reflect_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (reflect_editor), 4);
+  gtk_window_set_title (GTK_WINDOW (reflect_editor), _("Reflect Structure (GX card)"));
+
+  vbox11 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox11);
+  gtk_container_add (GTK_CONTAINER (reflect_editor), vbox11);
+
+  frame17 = gtk_frame_new (NULL);
+  gtk_widget_show (frame17);
+  gtk_box_pack_start (GTK_BOX (vbox11), frame17, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame17), 4);
+
+  alignment19 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment19);
+  gtk_container_add (GTK_CONTAINER (frame17), alignment19);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment19), 0, 0, 12, 0);
+
+  table11 = gtk_table_new (3, 2, FALSE);
+  gtk_widget_show (table11);
+  gtk_container_add (GTK_CONTAINER (alignment19), table11);
+  gtk_table_set_row_spacings (GTK_TABLE (table11), 8);
+  gtk_table_set_col_spacings (GTK_TABLE (table11), 8);
+
+  reflect_y_checkbutton = gtk_check_button_new_with_mnemonic (_("Reflect in XZ plane"));
+  gtk_widget_show (reflect_y_checkbutton);
+  gtk_table_attach (GTK_TABLE (table11), reflect_y_checkbutton, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (reflect_y_checkbutton), 2);
+
+  reflect_taginc_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
+  reflect_taginc_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (reflect_taginc_spinbutton_adj), 1, 0);
+  gtk_widget_show (reflect_taginc_spinbutton);
+  gtk_table_attach (GTK_TABLE (table11), reflect_taginc_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (reflect_taginc_spinbutton), TRUE);
+
+  reflect_z_checkbutton = gtk_check_button_new_with_mnemonic (_("Reflect in XY plane"));
+  gtk_widget_show (reflect_z_checkbutton);
+  gtk_table_attach (GTK_TABLE (table11), reflect_z_checkbutton, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (reflect_z_checkbutton), 2);
+
+  reflect_x_checkbutton = gtk_check_button_new_with_mnemonic (_("Reflect in YZ plane"));
+  gtk_widget_show (reflect_x_checkbutton);
+  gtk_table_attach (GTK_TABLE (table11), reflect_x_checkbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (reflect_x_checkbutton), 2);
+
+  label91 = gtk_label_new (_("Tag Number Increment"));
+  gtk_widget_show (label91);
+  gtk_table_attach (GTK_TABLE (table11), label91, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label91), 0, 0.5);
+
+  label90 = gtk_label_new (_("Reflect Options"));
+  gtk_widget_show (label90);
+  gtk_frame_set_label_widget (GTK_FRAME (frame17), label90);
+  gtk_misc_set_padding (GTK_MISC (label90), 4, 4);
+
+  hbox27 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox27);
+  gtk_box_pack_start (GTK_BOX (vbox11), hbox27, TRUE, TRUE, 0);
+
+  reflect_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (reflect_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox27), reflect_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (reflect_new_button), 2);
+
+  reflect_cancel_button = gtk_button_new ();
+  gtk_widget_show (reflect_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox27), reflect_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (reflect_cancel_button), 2);
+
+  alignment55 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment55);
+  gtk_container_add (GTK_CONTAINER (reflect_cancel_button), alignment55);
+
+  hbox53 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox53);
+  gtk_container_add (GTK_CONTAINER (alignment55), hbox53);
+
+  image75 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image75);
+  gtk_box_pack_start (GTK_BOX (hbox53), image75, FALSE, FALSE, 0);
+
+  label227 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label227);
+  gtk_box_pack_start (GTK_BOX (hbox53), label227, FALSE, FALSE, 0);
+
+  reflect_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (reflect_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox27), reflect_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (reflect_apply_button), 2);
+
+  reflect_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (reflect_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox27), reflect_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (reflect_ok_button), 2);
+
+  g_signal_connect ((gpointer) reflect_editor, "destroy",
+                    G_CALLBACK (on_reflect_editor_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) reflect_y_checkbutton, "toggled",
+                    G_CALLBACK (on_reflect_checkbutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) reflect_taginc_spinbutton, "value_changed",
+                    G_CALLBACK (on_reflect_taginc_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) reflect_z_checkbutton, "toggled",
+                    G_CALLBACK (on_reflect_checkbutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) reflect_x_checkbutton, "toggled",
+                    G_CALLBACK (on_reflect_checkbutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) reflect_new_button, "clicked",
+                    G_CALLBACK (on_reflect_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) reflect_cancel_button, "clicked",
+                    G_CALLBACK (on_reflect_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) reflect_apply_button, "clicked",
+                    G_CALLBACK (on_reflect_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) reflect_ok_button, "clicked",
+                    G_CALLBACK (on_reflect_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (reflect_editor, reflect_editor, "reflect_editor");
+  GLADE_HOOKUP_OBJECT (reflect_editor, vbox11, "vbox11");
+  GLADE_HOOKUP_OBJECT (reflect_editor, frame17, "frame17");
+  GLADE_HOOKUP_OBJECT (reflect_editor, alignment19, "alignment19");
+  GLADE_HOOKUP_OBJECT (reflect_editor, table11, "table11");
+  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_y_checkbutton, "reflect_y_checkbutton");
+  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_taginc_spinbutton, "reflect_taginc_spinbutton");
+  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_z_checkbutton, "reflect_z_checkbutton");
+  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_x_checkbutton, "reflect_x_checkbutton");
+  GLADE_HOOKUP_OBJECT (reflect_editor, label91, "label91");
+  GLADE_HOOKUP_OBJECT (reflect_editor, label90, "label90");
+  GLADE_HOOKUP_OBJECT (reflect_editor, hbox27, "hbox27");
+  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_new_button, "reflect_new_button");
+  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_cancel_button, "reflect_cancel_button");
+  GLADE_HOOKUP_OBJECT (reflect_editor, alignment55, "alignment55");
+  GLADE_HOOKUP_OBJECT (reflect_editor, hbox53, "hbox53");
+  GLADE_HOOKUP_OBJECT (reflect_editor, image75, "image75");
+  GLADE_HOOKUP_OBJECT (reflect_editor, label227, "label227");
+  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_apply_button, "reflect_apply_button");
+  GLADE_HOOKUP_OBJECT (reflect_editor, reflect_ok_button, "reflect_ok_button");
+
+  return reflect_editor;
+}
+
+GtkWidget*
+create_scale_editor (void)
+{
+  GtkWidget *scale_editor;
+  GtkWidget *vbox12;
+  GtkWidget *frame18;
+  GtkWidget *alignment20;
+  GtkWidget *table35;
+  GtkWidget *label217;
+  GtkWidget *label220;
+  GtkWidget *label221;
+  GtkObject *scale_from_spinbutton_adj;
+  GtkWidget *scale_from_spinbutton;
+  GtkObject *scale_to_spinbutton_adj;
+  GtkWidget *scale_to_spinbutton;
+  GtkObject *scale_factor_spinbutton_adj;
+  GtkWidget *scale_factor_spinbutton;
+  GtkWidget *label93;
+  GtkWidget *hbox28;
+  GtkWidget *scale_new_button;
+  GtkWidget *scale_cancel_button;
+  GtkWidget *alignment56;
+  GtkWidget *hbox54;
+  GtkWidget *image76;
+  GtkWidget *label228;
+  GtkWidget *scale_apply_button;
+  GtkWidget *scale_ok_button;
+
+  scale_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (scale_editor), 4);
+  gtk_window_set_title (GTK_WINDOW (scale_editor), _("Scale Structure (GS card)"));
+
+  vbox12 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox12);
+  gtk_container_add (GTK_CONTAINER (scale_editor), vbox12);
+
+  frame18 = gtk_frame_new (NULL);
+  gtk_widget_show (frame18);
+  gtk_box_pack_start (GTK_BOX (vbox12), frame18, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame18), 4);
+
+  alignment20 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment20);
+  gtk_container_add (GTK_CONTAINER (frame18), alignment20);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment20), 0, 0, 12, 0);
+
+  table35 = gtk_table_new (3, 2, TRUE);
+  gtk_widget_show (table35);
+  gtk_container_add (GTK_CONTAINER (alignment20), table35);
+
+  label217 = gtk_label_new (_("Structure Scale Factor"));
+  gtk_widget_show (label217);
+  gtk_table_attach (GTK_TABLE (table35), label217, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+
+  label220 = gtk_label_new (_("From Tag No."));
+  gtk_widget_show (label220);
+  gtk_table_attach (GTK_TABLE (table35), label220, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label220), 0.1, 0.5);
+
+  label221 = gtk_label_new (_("To Tag No."));
+  gtk_widget_show (label221);
+  gtk_table_attach (GTK_TABLE (table35), label221, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label221), 0.1, 0.5);
+
+  scale_from_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
+  scale_from_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (scale_from_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (scale_from_spinbutton);
+  gtk_table_attach (GTK_TABLE (table35), scale_from_spinbutton, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (scale_from_spinbutton), TRUE);
+
+  scale_to_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
+  scale_to_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (scale_to_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (scale_to_spinbutton);
+  gtk_table_attach (GTK_TABLE (table35), scale_to_spinbutton, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (scale_to_spinbutton), TRUE);
+
+  scale_factor_spinbutton_adj = gtk_adjustment_new (1, 0, 100000, 9.99999974738e-06, 10, 0);
+  scale_factor_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (scale_factor_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (scale_factor_spinbutton);
+  gtk_table_attach (GTK_TABLE (table35), scale_factor_spinbutton, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (scale_factor_spinbutton), TRUE);
+
+  label93 = gtk_label_new (_("Scale Strucure"));
+  gtk_widget_show (label93);
+  gtk_frame_set_label_widget (GTK_FRAME (frame18), label93);
+  gtk_misc_set_padding (GTK_MISC (label93), 4, 4);
+
+  hbox28 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox28);
+  gtk_box_pack_start (GTK_BOX (vbox12), hbox28, TRUE, TRUE, 0);
+
+  scale_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (scale_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox28), scale_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (scale_new_button), 2);
+
+  scale_cancel_button = gtk_button_new ();
+  gtk_widget_show (scale_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox28), scale_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (scale_cancel_button), 2);
+
+  alignment56 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment56);
+  gtk_container_add (GTK_CONTAINER (scale_cancel_button), alignment56);
+
+  hbox54 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox54);
+  gtk_container_add (GTK_CONTAINER (alignment56), hbox54);
+
+  image76 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image76);
+  gtk_box_pack_start (GTK_BOX (hbox54), image76, FALSE, FALSE, 0);
+
+  label228 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label228);
+  gtk_box_pack_start (GTK_BOX (hbox54), label228, FALSE, FALSE, 0);
+
+  scale_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (scale_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox28), scale_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (scale_apply_button), 2);
+
+  scale_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (scale_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox28), scale_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (scale_ok_button), 2);
+
+  g_signal_connect ((gpointer) scale_editor, "destroy",
+                    G_CALLBACK (on_scale_editor_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) scale_from_spinbutton, "value_changed",
+                    G_CALLBACK (on_scale_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) scale_to_spinbutton, "value_changed",
+                    G_CALLBACK (on_scale_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) scale_factor_spinbutton, "value_changed",
+                    G_CALLBACK (on_scale_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) scale_new_button, "clicked",
+                    G_CALLBACK (on_scale_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) scale_cancel_button, "clicked",
+                    G_CALLBACK (on_scale_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) scale_apply_button, "clicked",
+                    G_CALLBACK (on_scale_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) scale_ok_button, "clicked",
+                    G_CALLBACK (on_scale_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (scale_editor, scale_editor, "scale_editor");
+  GLADE_HOOKUP_OBJECT (scale_editor, vbox12, "vbox12");
+  GLADE_HOOKUP_OBJECT (scale_editor, frame18, "frame18");
+  GLADE_HOOKUP_OBJECT (scale_editor, alignment20, "alignment20");
+  GLADE_HOOKUP_OBJECT (scale_editor, table35, "table35");
+  GLADE_HOOKUP_OBJECT (scale_editor, label217, "label217");
+  GLADE_HOOKUP_OBJECT (scale_editor, label220, "label220");
+  GLADE_HOOKUP_OBJECT (scale_editor, label221, "label221");
+  GLADE_HOOKUP_OBJECT (scale_editor, scale_from_spinbutton, "scale_from_spinbutton");
+  GLADE_HOOKUP_OBJECT (scale_editor, scale_to_spinbutton, "scale_to_spinbutton");
+  GLADE_HOOKUP_OBJECT (scale_editor, scale_factor_spinbutton, "scale_factor_spinbutton");
+  GLADE_HOOKUP_OBJECT (scale_editor, label93, "label93");
+  GLADE_HOOKUP_OBJECT (scale_editor, hbox28, "hbox28");
+  GLADE_HOOKUP_OBJECT (scale_editor, scale_new_button, "scale_new_button");
+  GLADE_HOOKUP_OBJECT (scale_editor, scale_cancel_button, "scale_cancel_button");
+  GLADE_HOOKUP_OBJECT (scale_editor, alignment56, "alignment56");
+  GLADE_HOOKUP_OBJECT (scale_editor, hbox54, "hbox54");
+  GLADE_HOOKUP_OBJECT (scale_editor, image76, "image76");
+  GLADE_HOOKUP_OBJECT (scale_editor, label228, "label228");
+  GLADE_HOOKUP_OBJECT (scale_editor, scale_apply_button, "scale_apply_button");
+  GLADE_HOOKUP_OBJECT (scale_editor, scale_ok_button, "scale_ok_button");
+
+  return scale_editor;
+}
+
+GtkWidget*
+create_cylinder_editor (void)
+{
+  GtkWidget *cylinder_editor;
+  GtkWidget *vbox13;
+  GtkWidget *frame19;
+  GtkWidget *alignment21;
+  GtkWidget *table12;
+  GtkWidget *label95;
+  GtkWidget *label97;
+  GtkObject *cylinder_taginc_spinbutton_adj;
+  GtkWidget *cylinder_taginc_spinbutton;
+  GtkObject *cylinder_total_spinbutton_adj;
+  GtkWidget *cylinder_total_spinbutton;
+  GtkWidget *label96;
+  GtkWidget *hbox30;
+  GtkWidget *cylinder_new_button;
+  GtkWidget *cylinder_cancel_button;
+  GtkWidget *alignment57;
+  GtkWidget *hbox55;
+  GtkWidget *image77;
+  GtkWidget *label229;
+  GtkWidget *cylinder_apply_button;
+  GtkWidget *cylinder_ok_button;
+
+  cylinder_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (cylinder_editor), 4);
+  gtk_window_set_title (GTK_WINDOW (cylinder_editor), _("Cylindrical Structure (GR card)"));
+
+  vbox13 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox13);
+  gtk_container_add (GTK_CONTAINER (cylinder_editor), vbox13);
+
+  frame19 = gtk_frame_new (NULL);
+  gtk_widget_show (frame19);
+  gtk_box_pack_start (GTK_BOX (vbox13), frame19, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame19), 4);
+
+  alignment21 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment21);
+  gtk_container_add (GTK_CONTAINER (frame19), alignment21);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment21), 0, 0, 12, 0);
+
+  table12 = gtk_table_new (2, 2, FALSE);
+  gtk_widget_show (table12);
+  gtk_container_add (GTK_CONTAINER (alignment21), table12);
+  gtk_table_set_row_spacings (GTK_TABLE (table12), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table12), 8);
+
+  label95 = gtk_label_new (_("Tag Number Increment"));
+  gtk_widget_show (label95);
+  gtk_table_attach (GTK_TABLE (table12), label95, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label95), 0.1, 0.5);
+
+  label97 = gtk_label_new (_("Number of Structures"));
+  gtk_widget_show (label97);
+  gtk_table_attach (GTK_TABLE (table12), label97, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label97), 0.1, 0.5);
+
+  cylinder_taginc_spinbutton_adj = gtk_adjustment_new (0, 0, 100000, 1, 10, 0);
+  cylinder_taginc_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (cylinder_taginc_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (cylinder_taginc_spinbutton);
+  gtk_table_attach (GTK_TABLE (table12), cylinder_taginc_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (cylinder_taginc_spinbutton), TRUE);
+
+  cylinder_total_spinbutton_adj = gtk_adjustment_new (4, 1, 100000, 1, 10, 0);
+  cylinder_total_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (cylinder_total_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (cylinder_total_spinbutton);
+  gtk_table_attach (GTK_TABLE (table12), cylinder_total_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (cylinder_total_spinbutton), TRUE);
+
+  label96 = gtk_label_new (_("Cylindrical Structure"));
+  gtk_widget_show (label96);
+  gtk_frame_set_label_widget (GTK_FRAME (frame19), label96);
+  gtk_misc_set_padding (GTK_MISC (label96), 4, 4);
+
+  hbox30 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox30);
+  gtk_box_pack_start (GTK_BOX (vbox13), hbox30, TRUE, TRUE, 0);
+
+  cylinder_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (cylinder_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox30), cylinder_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (cylinder_new_button), 2);
+
+  cylinder_cancel_button = gtk_button_new ();
+  gtk_widget_show (cylinder_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox30), cylinder_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (cylinder_cancel_button), 2);
+
+  alignment57 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment57);
+  gtk_container_add (GTK_CONTAINER (cylinder_cancel_button), alignment57);
+
+  hbox55 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox55);
+  gtk_container_add (GTK_CONTAINER (alignment57), hbox55);
+
+  image77 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image77);
+  gtk_box_pack_start (GTK_BOX (hbox55), image77, FALSE, FALSE, 0);
+
+  label229 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label229);
+  gtk_box_pack_start (GTK_BOX (hbox55), label229, FALSE, FALSE, 0);
+
+  cylinder_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (cylinder_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox30), cylinder_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (cylinder_apply_button), 2);
+
+  cylinder_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (cylinder_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox30), cylinder_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (cylinder_ok_button), 2);
+
+  g_signal_connect ((gpointer) cylinder_editor, "destroy",
+                    G_CALLBACK (on_cylinder_editor_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) cylinder_taginc_spinbutton, "value_changed",
+                    G_CALLBACK (on_cylinder_taginc_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) cylinder_total_spinbutton, "value_changed",
+                    G_CALLBACK (on_cylinder_total_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) cylinder_new_button, "clicked",
+                    G_CALLBACK (on_cylinder_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) cylinder_cancel_button, "clicked",
+                    G_CALLBACK (on_cylinder_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) cylinder_apply_button, "clicked",
+                    G_CALLBACK (on_cylinder_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) cylinder_ok_button, "clicked",
+                    G_CALLBACK (on_cylinder_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (cylinder_editor, cylinder_editor, "cylinder_editor");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, vbox13, "vbox13");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, frame19, "frame19");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, alignment21, "alignment21");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, table12, "table12");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, label95, "label95");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, label97, "label97");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_taginc_spinbutton, "cylinder_taginc_spinbutton");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_total_spinbutton, "cylinder_total_spinbutton");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, label96, "label96");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, hbox30, "hbox30");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_new_button, "cylinder_new_button");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_cancel_button, "cylinder_cancel_button");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, alignment57, "alignment57");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, hbox55, "hbox55");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, image77, "image77");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, label229, "label229");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_apply_button, "cylinder_apply_button");
+  GLADE_HOOKUP_OBJECT (cylinder_editor, cylinder_ok_button, "cylinder_ok_button");
+
+  return cylinder_editor;
+}
+
+GtkWidget*
+create_kernel_command (void)
+{
+  GtkWidget *kernel_command;
+  GtkWidget *vbox14;
+  GtkWidget *frame21;
+  GtkWidget *alignment23;
+  GtkWidget *kernel_checkbutton;
+  GtkWidget *label107;
+  GtkWidget *hbox31;
+  GtkWidget *kernel_new_button;
+  GtkWidget *kernel_cancel_button;
+  GtkWidget *alignment58;
+  GtkWidget *hbox56;
+  GtkWidget *image78;
+  GtkWidget *label230;
+  GtkWidget *kernel_apply_button;
+  GtkWidget *kernel_ok_button;
+
+  kernel_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (kernel_command), 4);
+  gtk_window_set_title (GTK_WINDOW (kernel_command), _("Thin Wire Kernel (EK Card)"));
+
+  vbox14 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox14);
+  gtk_container_add (GTK_CONTAINER (kernel_command), vbox14);
+
+  frame21 = gtk_frame_new (NULL);
+  gtk_widget_show (frame21);
+  gtk_box_pack_start (GTK_BOX (vbox14), frame21, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame21), 4);
+
+  alignment23 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment23);
+  gtk_container_add (GTK_CONTAINER (frame21), alignment23);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment23), 0, 0, 12, 0);
+
+  kernel_checkbutton = gtk_check_button_new_with_mnemonic (_("Extended Thin Wire Kernel"));
+  gtk_widget_show (kernel_checkbutton);
+  gtk_container_add (GTK_CONTAINER (alignment23), kernel_checkbutton);
+  gtk_container_set_border_width (GTK_CONTAINER (kernel_checkbutton), 8);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (kernel_checkbutton), TRUE);
+
+  label107 = gtk_label_new (_("Thin Wire Kernel"));
+  gtk_widget_show (label107);
+  gtk_frame_set_label_widget (GTK_FRAME (frame21), label107);
+  gtk_misc_set_padding (GTK_MISC (label107), 4, 4);
+
+  hbox31 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox31);
+  gtk_box_pack_start (GTK_BOX (vbox14), hbox31, TRUE, TRUE, 0);
+
+  kernel_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (kernel_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox31), kernel_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (kernel_new_button), 2);
+
+  kernel_cancel_button = gtk_button_new ();
+  gtk_widget_show (kernel_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox31), kernel_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (kernel_cancel_button), 2);
+
+  alignment58 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment58);
+  gtk_container_add (GTK_CONTAINER (kernel_cancel_button), alignment58);
+
+  hbox56 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox56);
+  gtk_container_add (GTK_CONTAINER (alignment58), hbox56);
+
+  image78 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image78);
+  gtk_box_pack_start (GTK_BOX (hbox56), image78, FALSE, FALSE, 0);
+
+  label230 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label230);
+  gtk_box_pack_start (GTK_BOX (hbox56), label230, FALSE, FALSE, 0);
+
+  kernel_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (kernel_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox31), kernel_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (kernel_apply_button), 2);
+
+  kernel_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (kernel_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox31), kernel_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (kernel_ok_button), 2);
+
+  g_signal_connect ((gpointer) kernel_command, "destroy",
+                    G_CALLBACK (on_kernel_command_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) kernel_checkbutton, "toggled",
+                    G_CALLBACK (on_kernel_checkbutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) kernel_new_button, "clicked",
+                    G_CALLBACK (on_kernel_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) kernel_cancel_button, "clicked",
+                    G_CALLBACK (on_kernel_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) kernel_apply_button, "clicked",
+                    G_CALLBACK (on_kernel_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) kernel_ok_button, "clicked",
+                    G_CALLBACK (on_kernel_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (kernel_command, kernel_command, "kernel_command");
+  GLADE_HOOKUP_OBJECT (kernel_command, vbox14, "vbox14");
+  GLADE_HOOKUP_OBJECT (kernel_command, frame21, "frame21");
+  GLADE_HOOKUP_OBJECT (kernel_command, alignment23, "alignment23");
+  GLADE_HOOKUP_OBJECT (kernel_command, kernel_checkbutton, "kernel_checkbutton");
+  GLADE_HOOKUP_OBJECT (kernel_command, label107, "label107");
+  GLADE_HOOKUP_OBJECT (kernel_command, hbox31, "hbox31");
+  GLADE_HOOKUP_OBJECT (kernel_command, kernel_new_button, "kernel_new_button");
+  GLADE_HOOKUP_OBJECT (kernel_command, kernel_cancel_button, "kernel_cancel_button");
+  GLADE_HOOKUP_OBJECT (kernel_command, alignment58, "alignment58");
+  GLADE_HOOKUP_OBJECT (kernel_command, hbox56, "hbox56");
+  GLADE_HOOKUP_OBJECT (kernel_command, image78, "image78");
+  GLADE_HOOKUP_OBJECT (kernel_command, label230, "label230");
+  GLADE_HOOKUP_OBJECT (kernel_command, kernel_apply_button, "kernel_apply_button");
+  GLADE_HOOKUP_OBJECT (kernel_command, kernel_ok_button, "kernel_ok_button");
+
+  return kernel_command;
+}
+
+GtkWidget*
+create_execute_command (void)
+{
+  GtkWidget *execute_command;
+  GtkWidget *vbox15;
+  GtkWidget *frame20;
+  GtkWidget *alignment22;
+  GtkWidget *table14;
+  GtkWidget *execute_none_radiobutton;
+  GSList *execute_none_radiobutton_group = NULL;
+  GtkWidget *execute_xz_radiobutton;
+  GtkWidget *execute_yz_radiobutton;
+  GtkWidget *execute_both_radiobutton;
+  GtkWidget *label106;
+  GtkWidget *hbox32;
+  GtkWidget *execute_new_button;
+  GtkWidget *execute_cancel_button;
+  GtkWidget *alignment59;
+  GtkWidget *hbox57;
+  GtkWidget *image79;
+  GtkWidget *label231;
+  GtkWidget *execute_apply_button;
+  GtkWidget *execute_ok_button;
+
+  execute_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (execute_command), 4);
+  gtk_window_set_title (GTK_WINDOW (execute_command), _("Execute Command (XQ Card)"));
+
+  vbox15 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox15);
+  gtk_container_add (GTK_CONTAINER (execute_command), vbox15);
+
+  frame20 = gtk_frame_new (NULL);
+  gtk_widget_show (frame20);
+  gtk_box_pack_start (GTK_BOX (vbox15), frame20, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame20), 4);
+
+  alignment22 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment22);
+  gtk_container_add (GTK_CONTAINER (frame20), alignment22);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment22), 0, 0, 12, 0);
+
+  table14 = gtk_table_new (2, 2, FALSE);
+  gtk_widget_show (table14);
+  gtk_container_add (GTK_CONTAINER (alignment22), table14);
+  gtk_table_set_row_spacings (GTK_TABLE (table14), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table14), 2);
+
+  execute_none_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("No Pattern Cuts"));
+  gtk_widget_show (execute_none_radiobutton);
+  gtk_table_attach (GTK_TABLE (table14), execute_none_radiobutton, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (execute_none_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (execute_none_radiobutton), execute_none_radiobutton_group);
+  execute_none_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (execute_none_radiobutton));
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (execute_none_radiobutton), TRUE);
+
+  execute_xz_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Pattern in XZ Plane"));
+  gtk_widget_show (execute_xz_radiobutton);
+  gtk_table_attach (GTK_TABLE (table14), execute_xz_radiobutton, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (execute_xz_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (execute_xz_radiobutton), execute_none_radiobutton_group);
+  execute_none_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (execute_xz_radiobutton));
+
+  execute_yz_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Pattern in YZ Plane"));
+  gtk_widget_show (execute_yz_radiobutton);
+  gtk_table_attach (GTK_TABLE (table14), execute_yz_radiobutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (execute_yz_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (execute_yz_radiobutton), execute_none_radiobutton_group);
+  execute_none_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (execute_yz_radiobutton));
+
+  execute_both_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Both XZ/YZ Patterns"));
+  gtk_widget_show (execute_both_radiobutton);
+  gtk_table_attach (GTK_TABLE (table14), execute_both_radiobutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (execute_both_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (execute_both_radiobutton), execute_none_radiobutton_group);
+  execute_none_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (execute_both_radiobutton));
+
+  label106 = gtk_label_new (_("Execute Command"));
+  gtk_widget_show (label106);
+  gtk_frame_set_label_widget (GTK_FRAME (frame20), label106);
+  gtk_misc_set_padding (GTK_MISC (label106), 4, 4);
+
+  hbox32 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox32);
+  gtk_box_pack_start (GTK_BOX (vbox15), hbox32, FALSE, FALSE, 0);
+
+  execute_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (execute_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox32), execute_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (execute_new_button), 2);
+
+  execute_cancel_button = gtk_button_new ();
+  gtk_widget_show (execute_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox32), execute_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (execute_cancel_button), 2);
+
+  alignment59 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment59);
+  gtk_container_add (GTK_CONTAINER (execute_cancel_button), alignment59);
+
+  hbox57 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox57);
+  gtk_container_add (GTK_CONTAINER (alignment59), hbox57);
+
+  image79 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image79);
+  gtk_box_pack_start (GTK_BOX (hbox57), image79, FALSE, FALSE, 0);
+
+  label231 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label231);
+  gtk_box_pack_start (GTK_BOX (hbox57), label231, FALSE, FALSE, 0);
+
+  execute_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (execute_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox32), execute_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (execute_apply_button), 2);
+
+  execute_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (execute_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox32), execute_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (execute_ok_button), 2);
+
+  g_signal_connect ((gpointer) execute_command, "destroy",
+                    G_CALLBACK (on_execute_command_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) execute_none_radiobutton, "toggled",
+                    G_CALLBACK (on_execute_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) execute_xz_radiobutton, "toggled",
+                    G_CALLBACK (on_execute_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) execute_yz_radiobutton, "toggled",
+                    G_CALLBACK (on_execute_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) execute_both_radiobutton, "toggled",
+                    G_CALLBACK (on_execute_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) execute_new_button, "clicked",
+                    G_CALLBACK (on_execute_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) execute_cancel_button, "clicked",
+                    G_CALLBACK (on_execute_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) execute_apply_button, "clicked",
+                    G_CALLBACK (on_execute_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) execute_ok_button, "clicked",
+                    G_CALLBACK (on_execute_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (execute_command, execute_command, "execute_command");
+  GLADE_HOOKUP_OBJECT (execute_command, vbox15, "vbox15");
+  GLADE_HOOKUP_OBJECT (execute_command, frame20, "frame20");
+  GLADE_HOOKUP_OBJECT (execute_command, alignment22, "alignment22");
+  GLADE_HOOKUP_OBJECT (execute_command, table14, "table14");
+  GLADE_HOOKUP_OBJECT (execute_command, execute_none_radiobutton, "execute_none_radiobutton");
+  GLADE_HOOKUP_OBJECT (execute_command, execute_xz_radiobutton, "execute_xz_radiobutton");
+  GLADE_HOOKUP_OBJECT (execute_command, execute_yz_radiobutton, "execute_yz_radiobutton");
+  GLADE_HOOKUP_OBJECT (execute_command, execute_both_radiobutton, "execute_both_radiobutton");
+  GLADE_HOOKUP_OBJECT (execute_command, label106, "label106");
+  GLADE_HOOKUP_OBJECT (execute_command, hbox32, "hbox32");
+  GLADE_HOOKUP_OBJECT (execute_command, execute_new_button, "execute_new_button");
+  GLADE_HOOKUP_OBJECT (execute_command, execute_cancel_button, "execute_cancel_button");
+  GLADE_HOOKUP_OBJECT (execute_command, alignment59, "alignment59");
+  GLADE_HOOKUP_OBJECT (execute_command, hbox57, "hbox57");
+  GLADE_HOOKUP_OBJECT (execute_command, image79, "image79");
+  GLADE_HOOKUP_OBJECT (execute_command, label231, "label231");
+  GLADE_HOOKUP_OBJECT (execute_command, execute_apply_button, "execute_apply_button");
+  GLADE_HOOKUP_OBJECT (execute_command, execute_ok_button, "execute_ok_button");
+
+  return execute_command;
+}
+
+GtkWidget*
+create_intrange_command (void)
+{
+  GtkWidget *intrange_command;
+  GtkWidget *vbox16;
+  GtkWidget *frame22;
+  GtkWidget *alignment24;
+  GtkWidget *hbox34;
+  GtkWidget *label109;
+  GtkObject *intrange_wlen_spinbutton_adj;
+  GtkWidget *intrange_wlen_spinbutton;
+  GtkWidget *label108;
+  GtkWidget *hbox33;
+  GtkWidget *intrange_new_button;
+  GtkWidget *intrange_cancel_button;
+  GtkWidget *alignment60;
+  GtkWidget *hbox58;
+  GtkWidget *image80;
+  GtkWidget *label232;
+  GtkWidget *intrange_apply_button;
+  GtkWidget *intrange_ok_button;
+
+  intrange_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_window_set_title (GTK_WINDOW (intrange_command), _("Interaction Approx Range (KH Card)"));
+
+  vbox16 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox16);
+  gtk_container_add (GTK_CONTAINER (intrange_command), vbox16);
+
+  frame22 = gtk_frame_new (NULL);
+  gtk_widget_show (frame22);
+  gtk_box_pack_start (GTK_BOX (vbox16), frame22, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame22), 4);
+
+  alignment24 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment24);
+  gtk_container_add (GTK_CONTAINER (frame22), alignment24);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment24), 0, 0, 12, 0);
+
+  hbox34 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox34);
+  gtk_container_add (GTK_CONTAINER (alignment24), hbox34);
+  gtk_container_set_border_width (GTK_CONTAINER (hbox34), 8);
+
+  label109 = gtk_label_new (_("Approximation Range (W/lengths)"));
+  gtk_widget_show (label109);
+  gtk_box_pack_start (GTK_BOX (hbox34), label109, FALSE, FALSE, 0);
+
+  intrange_wlen_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
+  intrange_wlen_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (intrange_wlen_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (intrange_wlen_spinbutton);
+  gtk_box_pack_start (GTK_BOX (hbox34), intrange_wlen_spinbutton, TRUE, TRUE, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (intrange_wlen_spinbutton), TRUE);
+
+  label108 = gtk_label_new (_("Interaction Approximation Range"));
+  gtk_widget_show (label108);
+  gtk_frame_set_label_widget (GTK_FRAME (frame22), label108);
+  gtk_misc_set_padding (GTK_MISC (label108), 4, 4);
+
+  hbox33 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox33);
+  gtk_box_pack_start (GTK_BOX (vbox16), hbox33, TRUE, TRUE, 0);
+
+  intrange_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (intrange_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox33), intrange_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (intrange_new_button), 2);
+
+  intrange_cancel_button = gtk_button_new ();
+  gtk_widget_show (intrange_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox33), intrange_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (intrange_cancel_button), 2);
+
+  alignment60 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment60);
+  gtk_container_add (GTK_CONTAINER (intrange_cancel_button), alignment60);
+
+  hbox58 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox58);
+  gtk_container_add (GTK_CONTAINER (alignment60), hbox58);
+
+  image80 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image80);
+  gtk_box_pack_start (GTK_BOX (hbox58), image80, FALSE, FALSE, 0);
+
+  label232 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label232);
+  gtk_box_pack_start (GTK_BOX (hbox58), label232, FALSE, FALSE, 0);
+
+  intrange_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (intrange_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox33), intrange_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (intrange_apply_button), 2);
+
+  intrange_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (intrange_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox33), intrange_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (intrange_ok_button), 2);
+
+  g_signal_connect ((gpointer) intrange_command, "destroy",
+                    G_CALLBACK (on_intrange_command_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) intrange_wlen_spinbutton, "value_changed",
+                    G_CALLBACK (on_intrange_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) intrange_new_button, "clicked",
+                    G_CALLBACK (on_intrange_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) intrange_cancel_button, "clicked",
+                    G_CALLBACK (on_intrange_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) intrange_apply_button, "clicked",
+                    G_CALLBACK (on_intrange_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) intrange_ok_button, "clicked",
+                    G_CALLBACK (on_intrange_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (intrange_command, intrange_command, "intrange_command");
+  GLADE_HOOKUP_OBJECT (intrange_command, vbox16, "vbox16");
+  GLADE_HOOKUP_OBJECT (intrange_command, frame22, "frame22");
+  GLADE_HOOKUP_OBJECT (intrange_command, alignment24, "alignment24");
+  GLADE_HOOKUP_OBJECT (intrange_command, hbox34, "hbox34");
+  GLADE_HOOKUP_OBJECT (intrange_command, label109, "label109");
+  GLADE_HOOKUP_OBJECT (intrange_command, intrange_wlen_spinbutton, "intrange_wlen_spinbutton");
+  GLADE_HOOKUP_OBJECT (intrange_command, label108, "label108");
+  GLADE_HOOKUP_OBJECT (intrange_command, hbox33, "hbox33");
+  GLADE_HOOKUP_OBJECT (intrange_command, intrange_new_button, "intrange_new_button");
+  GLADE_HOOKUP_OBJECT (intrange_command, intrange_cancel_button, "intrange_cancel_button");
+  GLADE_HOOKUP_OBJECT (intrange_command, alignment60, "alignment60");
+  GLADE_HOOKUP_OBJECT (intrange_command, hbox58, "hbox58");
+  GLADE_HOOKUP_OBJECT (intrange_command, image80, "image80");
+  GLADE_HOOKUP_OBJECT (intrange_command, label232, "label232");
+  GLADE_HOOKUP_OBJECT (intrange_command, intrange_apply_button, "intrange_apply_button");
+  GLADE_HOOKUP_OBJECT (intrange_command, intrange_ok_button, "intrange_ok_button");
+
+  return intrange_command;
+}
+
+GtkWidget*
+create_ground_command (void)
+{
+  GtkWidget *ground_command;
+  GtkWidget *vbox17;
+  GtkWidget *frame23;
+  GtkWidget *alignment25;
+  GtkWidget *table15;
+  GtkWidget *ground_perf_radiobutton;
+  GSList *ground_perf_radiobutton_group = NULL;
+  GtkWidget *ground_refl_radiobutton;
+  GtkWidget *ground_smfld_radiobutton;
+  GtkWidget *ground_null_radiobutton;
+  GtkWidget *ground_radl_checkbutton;
+  GtkWidget *ground_secmd_checkbutton;
+  GtkWidget *label110;
+  GtkWidget *ground_med1_frame;
+  GtkWidget *alignment26;
+  GtkWidget *table16;
+  GtkObject *ground_diel1_spinbutton_adj;
+  GtkWidget *ground_diel1_spinbutton;
+  GtkObject *ground_res1_spinbutton_adj;
+  GtkWidget *ground_res1_spinbutton;
+  GtkWidget *label116;
+  GtkWidget *label117;
+  GtkWidget *label111;
+  GtkWidget *ground_med2_frame;
+  GtkWidget *alignment27;
+  GtkWidget *table18;
+  GtkWidget *label118;
+  GtkWidget *label123;
+  GtkWidget *label124;
+  GtkWidget *label125;
+  GtkObject *ground_diel2_spinbutton_adj;
+  GtkWidget *ground_diel2_spinbutton;
+  GtkObject *ground_res2_spinbutton_adj;
+  GtkWidget *ground_res2_spinbutton;
+  GtkObject *ground_below_spinbutton_adj;
+  GtkWidget *ground_below_spinbutton;
+  GtkObject *ground_dist2_spinbutton_adj;
+  GtkWidget *ground_dist2_spinbutton;
+  GtkWidget *label114;
+  GtkWidget *ground_radial_frame;
+  GtkWidget *alignment28;
+  GtkWidget *table17;
+  GtkWidget *label126;
+  GtkWidget *label127;
+  GtkWidget *label128;
+  GtkObject *ground_nrad_spinbutton_adj;
+  GtkWidget *ground_nrad_spinbutton;
+  GtkObject *ground_diam_spinbutton_adj;
+  GtkWidget *ground_diam_spinbutton;
+  GtkObject *ground_scrnrd_spinbutton_adj;
+  GtkWidget *ground_scrnrd_spinbutton;
+  GtkWidget *label115;
+  GtkWidget *hbox35;
+  GtkWidget *ground_new_button;
+  GtkWidget *ground_cancel_button;
+  GtkWidget *alignment61;
+  GtkWidget *hbox59;
+  GtkWidget *image81;
+  GtkWidget *label233;
+  GtkWidget *ground_apply_button;
+  GtkWidget *ground_ok_button;
+
+  ground_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (ground_command), 4);
+  gtk_window_set_title (GTK_WINDOW (ground_command), _("Ground Parameters (GN & GD Cards)"));
+
+  vbox17 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox17);
+  gtk_container_add (GTK_CONTAINER (ground_command), vbox17);
+
+  frame23 = gtk_frame_new (NULL);
+  gtk_widget_show (frame23);
+  gtk_box_pack_start (GTK_BOX (vbox17), frame23, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame23), 4);
+
+  alignment25 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment25);
+  gtk_container_add (GTK_CONTAINER (frame23), alignment25);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment25), 0, 0, 12, 0);
+
+  table15 = gtk_table_new (3, 2, FALSE);
+  gtk_widget_show (table15);
+  gtk_container_add (GTK_CONTAINER (alignment25), table15);
+  gtk_table_set_row_spacings (GTK_TABLE (table15), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table15), 2);
+
+  ground_perf_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Perfect Ground"));
+  gtk_widget_show (ground_perf_radiobutton);
+  gtk_table_attach (GTK_TABLE (table15), ground_perf_radiobutton, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground_perf_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (ground_perf_radiobutton), ground_perf_radiobutton_group);
+  ground_perf_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (ground_perf_radiobutton));
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ground_perf_radiobutton), TRUE);
+
+  ground_refl_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Reflection Coeff. Approx"));
+  gtk_widget_show (ground_refl_radiobutton);
+  gtk_table_attach (GTK_TABLE (table15), ground_refl_radiobutton, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground_refl_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (ground_refl_radiobutton), ground_perf_radiobutton_group);
+  ground_perf_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (ground_refl_radiobutton));
+
+  ground_smfld_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Sommerfeld/Norton"));
+  gtk_widget_show (ground_smfld_radiobutton);
+  gtk_table_attach (GTK_TABLE (table15), ground_smfld_radiobutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground_smfld_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (ground_smfld_radiobutton), ground_perf_radiobutton_group);
+  ground_perf_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (ground_smfld_radiobutton));
+
+  ground_null_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Nullify Previous Params"));
+  gtk_widget_show (ground_null_radiobutton);
+  gtk_table_attach (GTK_TABLE (table15), ground_null_radiobutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground_null_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (ground_null_radiobutton), ground_perf_radiobutton_group);
+  ground_perf_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (ground_null_radiobutton));
+
+  ground_radl_checkbutton = gtk_check_button_new_with_mnemonic (_("Radial Ground Screen"));
+  gtk_widget_show (ground_radl_checkbutton);
+  gtk_table_attach (GTK_TABLE (table15), ground_radl_checkbutton, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground_radl_checkbutton), 2);
+
+  ground_secmd_checkbutton = gtk_check_button_new_with_mnemonic (_("Second Medium (Cliff)"));
+  gtk_widget_show (ground_secmd_checkbutton);
+  gtk_table_attach (GTK_TABLE (table15), ground_secmd_checkbutton, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground_secmd_checkbutton), 2);
+
+  label110 = gtk_label_new (_("Ground Type"));
+  gtk_widget_show (label110);
+  gtk_frame_set_label_widget (GTK_FRAME (frame23), label110);
+  gtk_misc_set_padding (GTK_MISC (label110), 4, 4);
+
+  ground_med1_frame = gtk_frame_new (NULL);
+  gtk_box_pack_start (GTK_BOX (vbox17), ground_med1_frame, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground_med1_frame), 4);
+
+  alignment26 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment26);
+  gtk_container_add (GTK_CONTAINER (ground_med1_frame), alignment26);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment26), 0, 0, 12, 0);
+
+  table16 = gtk_table_new (2, 2, FALSE);
+  gtk_widget_show (table16);
+  gtk_container_add (GTK_CONTAINER (alignment26), table16);
+  gtk_table_set_row_spacings (GTK_TABLE (table16), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table16), 2);
+
+  ground_diel1_spinbutton_adj = gtk_adjustment_new (12, 0, 10000, 9.99999974738e-06, 10, 0);
+  ground_diel1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_diel1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (ground_diel1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table16), ground_diel1_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_diel1_spinbutton), TRUE);
+
+  ground_res1_spinbutton_adj = gtk_adjustment_new (0.005, 0, 10000, 9.99999974738e-06, 10, 0);
+  ground_res1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_res1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (ground_res1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table16), ground_res1_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_res1_spinbutton), TRUE);
+
+  label116 = gtk_label_new (_("Relative Dielectric Const."));
+  gtk_widget_show (label116);
+  gtk_table_attach (GTK_TABLE (table16), label116, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label116), 0, 0.5);
+
+  label117 = gtk_label_new (_("Ground Conductivity S/m"));
+  gtk_widget_show (label117);
+  gtk_table_attach (GTK_TABLE (table16), label117, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label117), 0, 0.5);
+
+  label111 = gtk_label_new (_("1st Medium Parameters"));
+  gtk_widget_show (label111);
+  gtk_frame_set_label_widget (GTK_FRAME (ground_med1_frame), label111);
+  gtk_misc_set_padding (GTK_MISC (label111), 4, 4);
+
+  ground_med2_frame = gtk_frame_new (NULL);
+  gtk_box_pack_start (GTK_BOX (vbox17), ground_med2_frame, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground_med2_frame), 4);
+
+  alignment27 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment27);
+  gtk_container_add (GTK_CONTAINER (ground_med2_frame), alignment27);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment27), 0, 0, 12, 0);
+
+  table18 = gtk_table_new (4, 2, FALSE);
+  gtk_widget_show (table18);
+  gtk_container_add (GTK_CONTAINER (alignment27), table18);
+  gtk_table_set_row_spacings (GTK_TABLE (table18), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table18), 2);
+
+  label118 = gtk_label_new (_("Relative Dielectric Const."));
+  gtk_widget_show (label118);
+  gtk_table_attach (GTK_TABLE (table18), label118, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label118), 0, 0.5);
+
+  label123 = gtk_label_new (_("Ground Conductivity S/m"));
+  gtk_widget_show (label123);
+  gtk_table_attach (GTK_TABLE (table18), label123, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label123), 0, 0.5);
+
+  label124 = gtk_label_new (_("Distance to 2nd Medium"));
+  gtk_widget_show (label124);
+  gtk_table_attach (GTK_TABLE (table18), label124, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label124), 0, 0.5);
+
+  label125 = gtk_label_new (_("Dist. below 1st Medium"));
+  gtk_widget_show (label125);
+  gtk_table_attach (GTK_TABLE (table18), label125, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label125), 0, 0.5);
+
+  ground_diel2_spinbutton_adj = gtk_adjustment_new (12, 0, 10000, 9.99999974738e-06, 10, 0);
+  ground_diel2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_diel2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (ground_diel2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table18), ground_diel2_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_diel2_spinbutton), TRUE);
+
+  ground_res2_spinbutton_adj = gtk_adjustment_new (0.005, 0, 10000, 9.99999974738e-06, 10, 0);
+  ground_res2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_res2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (ground_res2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table18), ground_res2_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_res2_spinbutton), TRUE);
+
+  ground_below_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
+  ground_below_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_below_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (ground_below_spinbutton);
+  gtk_table_attach (GTK_TABLE (table18), ground_below_spinbutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_below_spinbutton), TRUE);
+
+  ground_dist2_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
+  ground_dist2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_dist2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (ground_dist2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table18), ground_dist2_spinbutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_dist2_spinbutton), TRUE);
+
+  label114 = gtk_label_new (_("2nd Medium Parameters"));
+  gtk_widget_show (label114);
+  gtk_frame_set_label_widget (GTK_FRAME (ground_med2_frame), label114);
+  gtk_misc_set_padding (GTK_MISC (label114), 4, 4);
+
+  ground_radial_frame = gtk_frame_new (NULL);
+  gtk_box_pack_start (GTK_BOX (vbox17), ground_radial_frame, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground_radial_frame), 4);
+
+  alignment28 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment28);
+  gtk_container_add (GTK_CONTAINER (ground_radial_frame), alignment28);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment28), 0, 0, 12, 0);
+
+  table17 = gtk_table_new (3, 2, FALSE);
+  gtk_widget_show (table17);
+  gtk_container_add (GTK_CONTAINER (alignment28), table17);
+  gtk_table_set_row_spacings (GTK_TABLE (table17), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table17), 2);
+
+  label126 = gtk_label_new (_("Number of Radials"));
+  gtk_widget_show (label126);
+  gtk_table_attach (GTK_TABLE (table17), label126, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label126), 0.9, 0.5);
+
+  label127 = gtk_label_new (_("Radial Screen Radius"));
+  gtk_widget_show (label127);
+  gtk_table_attach (GTK_TABLE (table17), label127, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label127), 0, 0.5);
+
+  label128 = gtk_label_new (_("Radial Wire Diameter"));
+  gtk_widget_show (label128);
+  gtk_table_attach (GTK_TABLE (table17), label128, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label128), 0, 0.5);
+
+  ground_nrad_spinbutton_adj = gtk_adjustment_new (4, 1, 1000, 1, 10, 0);
+  ground_nrad_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_nrad_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (ground_nrad_spinbutton);
+  gtk_table_attach (GTK_TABLE (table17), ground_nrad_spinbutton, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_nrad_spinbutton), TRUE);
+
+  ground_diam_spinbutton_adj = gtk_adjustment_new (0.00499999988824, 9.99999974738e-06, 10, 9.99999974738e-06, 10, 0);
+  ground_diam_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_diam_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (ground_diam_spinbutton);
+  gtk_table_attach (GTK_TABLE (table17), ground_diam_spinbutton, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_diam_spinbutton), TRUE);
+
+  ground_scrnrd_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
+  ground_scrnrd_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground_scrnrd_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (ground_scrnrd_spinbutton);
+  gtk_table_attach (GTK_TABLE (table17), ground_scrnrd_spinbutton, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground_scrnrd_spinbutton), TRUE);
+
+  label115 = gtk_label_new (_("Radial Screen Parameters"));
+  gtk_widget_show (label115);
+  gtk_frame_set_label_widget (GTK_FRAME (ground_radial_frame), label115);
+  gtk_misc_set_padding (GTK_MISC (label115), 4, 4);
+
+  hbox35 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox35);
+  gtk_box_pack_start (GTK_BOX (vbox17), hbox35, TRUE, TRUE, 0);
+
+  ground_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (ground_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox35), ground_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground_new_button), 2);
+
+  ground_cancel_button = gtk_button_new ();
+  gtk_widget_show (ground_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox35), ground_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground_cancel_button), 2);
+
+  alignment61 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment61);
+  gtk_container_add (GTK_CONTAINER (ground_cancel_button), alignment61);
+
+  hbox59 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox59);
+  gtk_container_add (GTK_CONTAINER (alignment61), hbox59);
+
+  image81 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image81);
+  gtk_box_pack_start (GTK_BOX (hbox59), image81, FALSE, FALSE, 0);
+
+  label233 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label233);
+  gtk_box_pack_start (GTK_BOX (hbox59), label233, FALSE, FALSE, 0);
+
+  ground_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (ground_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox35), ground_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground_apply_button), 2);
+
+  ground_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (ground_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox35), ground_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground_ok_button), 2);
+
+  g_signal_connect ((gpointer) ground_command, "destroy",
+                    G_CALLBACK (on_ground_command_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) ground_perf_radiobutton, "toggled",
+                    G_CALLBACK (on_ground_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) ground_refl_radiobutton, "toggled",
+                    G_CALLBACK (on_ground_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) ground_smfld_radiobutton, "toggled",
+                    G_CALLBACK (on_ground_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) ground_null_radiobutton, "toggled",
+                    G_CALLBACK (on_ground_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) ground_radl_checkbutton, "toggled",
+                    G_CALLBACK (on_ground_checkbutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) ground_secmd_checkbutton, "toggled",
+                    G_CALLBACK (on_ground_checkbutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) ground_diel1_spinbutton, "value_changed",
+                    G_CALLBACK (on_ground_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) ground_res1_spinbutton, "value_changed",
+                    G_CALLBACK (on_ground_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) ground_diel2_spinbutton, "value_changed",
+                    G_CALLBACK (on_ground_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) ground_res2_spinbutton, "value_changed",
+                    G_CALLBACK (on_ground_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) ground_below_spinbutton, "value_changed",
+                    G_CALLBACK (on_ground_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) ground_dist2_spinbutton, "value_changed",
+                    G_CALLBACK (on_ground_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) ground_nrad_spinbutton, "value_changed",
+                    G_CALLBACK (on_ground_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) ground_diam_spinbutton, "value_changed",
+                    G_CALLBACK (on_ground_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) ground_scrnrd_spinbutton, "value_changed",
+                    G_CALLBACK (on_ground_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) ground_new_button, "clicked",
+                    G_CALLBACK (on_ground_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) ground_cancel_button, "clicked",
+                    G_CALLBACK (on_ground_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) ground_apply_button, "clicked",
+                    G_CALLBACK (on_ground_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) ground_ok_button, "clicked",
+                    G_CALLBACK (on_ground_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (ground_command, ground_command, "ground_command");
+  GLADE_HOOKUP_OBJECT (ground_command, vbox17, "vbox17");
+  GLADE_HOOKUP_OBJECT (ground_command, frame23, "frame23");
+  GLADE_HOOKUP_OBJECT (ground_command, alignment25, "alignment25");
+  GLADE_HOOKUP_OBJECT (ground_command, table15, "table15");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_perf_radiobutton, "ground_perf_radiobutton");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_refl_radiobutton, "ground_refl_radiobutton");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_smfld_radiobutton, "ground_smfld_radiobutton");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_null_radiobutton, "ground_null_radiobutton");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_radl_checkbutton, "ground_radl_checkbutton");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_secmd_checkbutton, "ground_secmd_checkbutton");
+  GLADE_HOOKUP_OBJECT (ground_command, label110, "label110");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_med1_frame, "ground_med1_frame");
+  GLADE_HOOKUP_OBJECT (ground_command, alignment26, "alignment26");
+  GLADE_HOOKUP_OBJECT (ground_command, table16, "table16");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_diel1_spinbutton, "ground_diel1_spinbutton");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_res1_spinbutton, "ground_res1_spinbutton");
+  GLADE_HOOKUP_OBJECT (ground_command, label116, "label116");
+  GLADE_HOOKUP_OBJECT (ground_command, label117, "label117");
+  GLADE_HOOKUP_OBJECT (ground_command, label111, "label111");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_med2_frame, "ground_med2_frame");
+  GLADE_HOOKUP_OBJECT (ground_command, alignment27, "alignment27");
+  GLADE_HOOKUP_OBJECT (ground_command, table18, "table18");
+  GLADE_HOOKUP_OBJECT (ground_command, label118, "label118");
+  GLADE_HOOKUP_OBJECT (ground_command, label123, "label123");
+  GLADE_HOOKUP_OBJECT (ground_command, label124, "label124");
+  GLADE_HOOKUP_OBJECT (ground_command, label125, "label125");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_diel2_spinbutton, "ground_diel2_spinbutton");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_res2_spinbutton, "ground_res2_spinbutton");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_below_spinbutton, "ground_below_spinbutton");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_dist2_spinbutton, "ground_dist2_spinbutton");
+  GLADE_HOOKUP_OBJECT (ground_command, label114, "label114");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_radial_frame, "ground_radial_frame");
+  GLADE_HOOKUP_OBJECT (ground_command, alignment28, "alignment28");
+  GLADE_HOOKUP_OBJECT (ground_command, table17, "table17");
+  GLADE_HOOKUP_OBJECT (ground_command, label126, "label126");
+  GLADE_HOOKUP_OBJECT (ground_command, label127, "label127");
+  GLADE_HOOKUP_OBJECT (ground_command, label128, "label128");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_nrad_spinbutton, "ground_nrad_spinbutton");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_diam_spinbutton, "ground_diam_spinbutton");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_scrnrd_spinbutton, "ground_scrnrd_spinbutton");
+  GLADE_HOOKUP_OBJECT (ground_command, label115, "label115");
+  GLADE_HOOKUP_OBJECT (ground_command, hbox35, "hbox35");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_new_button, "ground_new_button");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_cancel_button, "ground_cancel_button");
+  GLADE_HOOKUP_OBJECT (ground_command, alignment61, "alignment61");
+  GLADE_HOOKUP_OBJECT (ground_command, hbox59, "hbox59");
+  GLADE_HOOKUP_OBJECT (ground_command, image81, "image81");
+  GLADE_HOOKUP_OBJECT (ground_command, label233, "label233");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_apply_button, "ground_apply_button");
+  GLADE_HOOKUP_OBJECT (ground_command, ground_ok_button, "ground_ok_button");
+
+  return ground_command;
+}
+
+GtkWidget*
+create_nearfield_command (void)
+{
+  GtkWidget *nearfield_command;
+  GtkWidget *vbox18;
+  GtkWidget *frame27;
+  GtkWidget *alignment29;
+  GtkWidget *table20;
+  GtkWidget *nearfield_nh_checkbutton;
+  GtkWidget *nearfield_ne_checkbutton;
+  GtkWidget *nearfield_rect_radiobutton;
+  GSList *nearfield_rect_radiobutton_group = NULL;
+  GtkWidget *nearfield_sph_radiobutton;
+  GtkWidget *label129;
+  GtkWidget *frame28;
+  GtkWidget *alignment30;
+  GtkWidget *table19;
+  GtkWidget *nearfield_i1_label;
+  GtkWidget *nearfield_i2_label;
+  GtkWidget *nearfield_i3_label;
+  GtkWidget *nearfield_f1_label;
+  GtkWidget *nearfield_f2_label;
+  GtkWidget *nearfield_f3_label;
+  GtkWidget *nearfield_f4_label;
+  GtkWidget *nearfield_f5_label;
+  GtkWidget *nearfield_f6_label;
+  GtkObject *nearfield_nx_spinbutton_adj;
+  GtkWidget *nearfield_nx_spinbutton;
+  GtkObject *nearfield_ny_spinbutton_adj;
+  GtkWidget *nearfield_ny_spinbutton;
+  GtkObject *nearfield_nz_spinbutton_adj;
+  GtkWidget *nearfield_nz_spinbutton;
+  GtkObject *nearfield_f1_spinbutton_adj;
+  GtkWidget *nearfield_f1_spinbutton;
+  GtkObject *nearfield_f2_spinbutton_adj;
+  GtkWidget *nearfield_f2_spinbutton;
+  GtkObject *nearfield_f3_spinbutton_adj;
+  GtkWidget *nearfield_f3_spinbutton;
+  GtkObject *nearfield_f4_spinbutton_adj;
+  GtkWidget *nearfield_f4_spinbutton;
+  GtkObject *nearfield_f5_spinbutton_adj;
+  GtkWidget *nearfield_f5_spinbutton;
+  GtkObject *nearfield_f6_spinbutton_adj;
+  GtkWidget *nearfield_f6_spinbutton;
+  GtkWidget *label130;
+  GtkWidget *hbox36;
+  GtkWidget *nearfield_new_button;
+  GtkWidget *nearfield_cancel_button;
+  GtkWidget *alignment62;
+  GtkWidget *hbox60;
+  GtkWidget *image82;
+  GtkWidget *label234;
+  GtkWidget *nearfield_apply_button;
+  GtkWidget *nearfield_ok_button;
+
+  nearfield_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (nearfield_command), 4);
+  gtk_window_set_title (GTK_WINDOW (nearfield_command), _("Near Fields Command (NE/NH Cards)"));
+
+  vbox18 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox18);
+  gtk_container_add (GTK_CONTAINER (nearfield_command), vbox18);
+
+  frame27 = gtk_frame_new (NULL);
+  gtk_widget_show (frame27);
+  gtk_box_pack_start (GTK_BOX (vbox18), frame27, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame27), 4);
+
+  alignment29 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment29);
+  gtk_container_add (GTK_CONTAINER (frame27), alignment29);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment29), 0, 0, 12, 0);
+
+  table20 = gtk_table_new (2, 2, TRUE);
+  gtk_widget_show (table20);
+  gtk_container_add (GTK_CONTAINER (alignment29), table20);
+
+  nearfield_nh_checkbutton = gtk_check_button_new_with_mnemonic (_("Near Magnetic Field"));
+  gtk_widget_show (nearfield_nh_checkbutton);
+  gtk_table_attach (GTK_TABLE (table20), nearfield_nh_checkbutton, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nearfield_nh_checkbutton), 2);
+
+  nearfield_ne_checkbutton = gtk_check_button_new_with_mnemonic (_("Near Electric Field"));
+  gtk_widget_show (nearfield_ne_checkbutton);
+  gtk_table_attach (GTK_TABLE (table20), nearfield_ne_checkbutton, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nearfield_ne_checkbutton), 2);
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (nearfield_ne_checkbutton), TRUE);
+
+  nearfield_rect_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Rectangular Co-ordinates"));
+  gtk_widget_show (nearfield_rect_radiobutton);
+  gtk_table_attach (GTK_TABLE (table20), nearfield_rect_radiobutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nearfield_rect_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (nearfield_rect_radiobutton), nearfield_rect_radiobutton_group);
+  nearfield_rect_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (nearfield_rect_radiobutton));
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (nearfield_rect_radiobutton), TRUE);
+
+  nearfield_sph_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Spherical Co-ordinates"));
+  gtk_widget_show (nearfield_sph_radiobutton);
+  gtk_table_attach (GTK_TABLE (table20), nearfield_sph_radiobutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nearfield_sph_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (nearfield_sph_radiobutton), nearfield_rect_radiobutton_group);
+  nearfield_rect_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (nearfield_sph_radiobutton));
+
+  label129 = gtk_label_new (_("Field Type & Co-ordinates"));
+  gtk_widget_show (label129);
+  gtk_frame_set_label_widget (GTK_FRAME (frame27), label129);
+  gtk_misc_set_padding (GTK_MISC (label129), 4, 4);
+
+  frame28 = gtk_frame_new (NULL);
+  gtk_widget_show (frame28);
+  gtk_box_pack_start (GTK_BOX (vbox18), frame28, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame28), 4);
+
+  alignment30 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment30);
+  gtk_container_add (GTK_CONTAINER (frame28), alignment30);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment30), 0, 0, 12, 0);
+
+  table19 = gtk_table_new (6, 3, FALSE);
+  gtk_widget_show (table19);
+  gtk_container_add (GTK_CONTAINER (alignment30), table19);
+
+  nearfield_i1_label = gtk_label_new (_("NX"));
+  gtk_widget_show (nearfield_i1_label);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_i1_label, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (nearfield_i1_label), 0.1, 0.5);
+
+  nearfield_i2_label = gtk_label_new (_("NY"));
+  gtk_widget_show (nearfield_i2_label);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_i2_label, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (nearfield_i2_label), 0.1, 0.5);
+
+  nearfield_i3_label = gtk_label_new (_("NZ"));
+  gtk_widget_show (nearfield_i3_label);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_i3_label, 2, 3, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (nearfield_i3_label), 0.1, 0.5);
+
+  nearfield_f1_label = gtk_label_new (_("X"));
+  gtk_widget_show (nearfield_f1_label);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_f1_label, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (nearfield_f1_label), 0.1, 0.5);
+
+  nearfield_f2_label = gtk_label_new (_("Y"));
+  gtk_widget_show (nearfield_f2_label);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_f2_label, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (nearfield_f2_label), 0.1, 0.5);
+
+  nearfield_f3_label = gtk_label_new (_("Z"));
+  gtk_widget_show (nearfield_f3_label);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_f3_label, 2, 3, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (nearfield_f3_label), 0.1, 0.5);
+
+  nearfield_f4_label = gtk_label_new (_("DX"));
+  gtk_widget_show (nearfield_f4_label);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_f4_label, 0, 1, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (nearfield_f4_label), 0.1, 0.5);
+
+  nearfield_f5_label = gtk_label_new (_("DY"));
+  gtk_widget_show (nearfield_f5_label);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_f5_label, 1, 2, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (nearfield_f5_label), 0.1, 0.5);
+
+  nearfield_f6_label = gtk_label_new (_("DZ"));
+  gtk_widget_show (nearfield_f6_label);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_f6_label, 2, 3, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (nearfield_f6_label), 0.1, 0.5);
+
+  nearfield_nx_spinbutton_adj = gtk_adjustment_new (4, 1, 10000, 1, 10, 0);
+  nearfield_nx_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_nx_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (nearfield_nx_spinbutton);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_nx_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_nx_spinbutton), TRUE);
+
+  nearfield_ny_spinbutton_adj = gtk_adjustment_new (4, 1, 10000, 1, 10, 0);
+  nearfield_ny_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_ny_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (nearfield_ny_spinbutton);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_ny_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_ny_spinbutton), TRUE);
+
+  nearfield_nz_spinbutton_adj = gtk_adjustment_new (4, 1, 10000, 1, 10, 0);
+  nearfield_nz_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_nz_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (nearfield_nz_spinbutton);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_nz_spinbutton, 2, 3, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_nz_spinbutton), TRUE);
+
+  nearfield_f1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  nearfield_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (nearfield_f1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_f1_spinbutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f1_spinbutton), TRUE);
+
+  nearfield_f2_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  nearfield_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (nearfield_f2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_f2_spinbutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f2_spinbutton), TRUE);
+
+  nearfield_f3_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  nearfield_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f3_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (nearfield_f3_spinbutton);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_f3_spinbutton, 2, 3, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f3_spinbutton), TRUE);
+
+  nearfield_f4_spinbutton_adj = gtk_adjustment_new (1, -1000, 1000, 9.99999974738e-06, 10, 0);
+  nearfield_f4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f4_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (nearfield_f4_spinbutton);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_f4_spinbutton, 0, 1, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f4_spinbutton), TRUE);
+
+  nearfield_f5_spinbutton_adj = gtk_adjustment_new (1, -1000, 1000, 9.99999974738e-06, 10, 0);
+  nearfield_f5_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f5_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (nearfield_f5_spinbutton);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_f5_spinbutton, 1, 2, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f5_spinbutton), TRUE);
+
+  nearfield_f6_spinbutton_adj = gtk_adjustment_new (1, -1000, 1000, 9.99999974738e-06, 10, 0);
+  nearfield_f6_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (nearfield_f6_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (nearfield_f6_spinbutton);
+  gtk_table_attach (GTK_TABLE (table19), nearfield_f6_spinbutton, 2, 3, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (nearfield_f6_spinbutton), TRUE);
+
+  label130 = gtk_label_new (_("Field Pattern Parameters"));
+  gtk_widget_show (label130);
+  gtk_frame_set_label_widget (GTK_FRAME (frame28), label130);
+  gtk_misc_set_padding (GTK_MISC (label130), 4, 4);
+
+  hbox36 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox36);
+  gtk_box_pack_start (GTK_BOX (vbox18), hbox36, TRUE, TRUE, 0);
+
+  nearfield_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (nearfield_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox36), nearfield_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nearfield_new_button), 2);
+
+  nearfield_cancel_button = gtk_button_new ();
+  gtk_widget_show (nearfield_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox36), nearfield_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nearfield_cancel_button), 2);
+
+  alignment62 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment62);
+  gtk_container_add (GTK_CONTAINER (nearfield_cancel_button), alignment62);
+
+  hbox60 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox60);
+  gtk_container_add (GTK_CONTAINER (alignment62), hbox60);
+
+  image82 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image82);
+  gtk_box_pack_start (GTK_BOX (hbox60), image82, FALSE, FALSE, 0);
+
+  label234 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label234);
+  gtk_box_pack_start (GTK_BOX (hbox60), label234, FALSE, FALSE, 0);
+
+  nearfield_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (nearfield_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox36), nearfield_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nearfield_apply_button), 2);
+
+  nearfield_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (nearfield_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox36), nearfield_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (nearfield_ok_button), 2);
+
+  g_signal_connect ((gpointer) nearfield_command, "destroy",
+                    G_CALLBACK (on_nearfield_command_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_nh_checkbutton, "toggled",
+                    G_CALLBACK (on_nearfield_nh_checkbutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_ne_checkbutton, "toggled",
+                    G_CALLBACK (on_nearfield_ne_checkbutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_rect_radiobutton, "toggled",
+                    G_CALLBACK (on_nearfield_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_sph_radiobutton, "toggled",
+                    G_CALLBACK (on_nearfield_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_nx_spinbutton, "value_changed",
+                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_ny_spinbutton, "value_changed",
+                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_nz_spinbutton, "value_changed",
+                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_f1_spinbutton, "value_changed",
+                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_f2_spinbutton, "value_changed",
+                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_f3_spinbutton, "value_changed",
+                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_f4_spinbutton, "value_changed",
+                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_f5_spinbutton, "value_changed",
+                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_f6_spinbutton, "value_changed",
+                    G_CALLBACK (on_nearfield_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_new_button, "clicked",
+                    G_CALLBACK (on_nearfield_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_cancel_button, "clicked",
+                    G_CALLBACK (on_nearfield_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_apply_button, "clicked",
+                    G_CALLBACK (on_nearfield_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) nearfield_ok_button, "clicked",
+                    G_CALLBACK (on_nearfield_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (nearfield_command, nearfield_command, "nearfield_command");
+  GLADE_HOOKUP_OBJECT (nearfield_command, vbox18, "vbox18");
+  GLADE_HOOKUP_OBJECT (nearfield_command, frame27, "frame27");
+  GLADE_HOOKUP_OBJECT (nearfield_command, alignment29, "alignment29");
+  GLADE_HOOKUP_OBJECT (nearfield_command, table20, "table20");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_nh_checkbutton, "nearfield_nh_checkbutton");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_ne_checkbutton, "nearfield_ne_checkbutton");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_rect_radiobutton, "nearfield_rect_radiobutton");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_sph_radiobutton, "nearfield_sph_radiobutton");
+  GLADE_HOOKUP_OBJECT (nearfield_command, label129, "label129");
+  GLADE_HOOKUP_OBJECT (nearfield_command, frame28, "frame28");
+  GLADE_HOOKUP_OBJECT (nearfield_command, alignment30, "alignment30");
+  GLADE_HOOKUP_OBJECT (nearfield_command, table19, "table19");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_i1_label, "nearfield_i1_label");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_i2_label, "nearfield_i2_label");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_i3_label, "nearfield_i3_label");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f1_label, "nearfield_f1_label");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f2_label, "nearfield_f2_label");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f3_label, "nearfield_f3_label");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f4_label, "nearfield_f4_label");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f5_label, "nearfield_f5_label");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f6_label, "nearfield_f6_label");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_nx_spinbutton, "nearfield_nx_spinbutton");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_ny_spinbutton, "nearfield_ny_spinbutton");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_nz_spinbutton, "nearfield_nz_spinbutton");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f1_spinbutton, "nearfield_f1_spinbutton");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f2_spinbutton, "nearfield_f2_spinbutton");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f3_spinbutton, "nearfield_f3_spinbutton");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f4_spinbutton, "nearfield_f4_spinbutton");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f5_spinbutton, "nearfield_f5_spinbutton");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_f6_spinbutton, "nearfield_f6_spinbutton");
+  GLADE_HOOKUP_OBJECT (nearfield_command, label130, "label130");
+  GLADE_HOOKUP_OBJECT (nearfield_command, hbox36, "hbox36");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_new_button, "nearfield_new_button");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_cancel_button, "nearfield_cancel_button");
+  GLADE_HOOKUP_OBJECT (nearfield_command, alignment62, "alignment62");
+  GLADE_HOOKUP_OBJECT (nearfield_command, hbox60, "hbox60");
+  GLADE_HOOKUP_OBJECT (nearfield_command, image82, "image82");
+  GLADE_HOOKUP_OBJECT (nearfield_command, label234, "label234");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_apply_button, "nearfield_apply_button");
+  GLADE_HOOKUP_OBJECT (nearfield_command, nearfield_ok_button, "nearfield_ok_button");
+
+  return nearfield_command;
+}
+
+GtkWidget*
+create_radiation_command (void)
+{
+  GtkWidget *radiation_command;
+  GtkWidget *vbox19;
+  GtkWidget *frame29;
+  GtkWidget *alignment31;
+  GtkWidget *table21;
+  GtkWidget *radiation_i10_radiobutton;
+  GSList *radiation_i10_radiobutton_group = NULL;
+  GtkWidget *radiation_i16_radiobutton;
+  GtkWidget *radiation_i14_radiobutton;
+  GtkWidget *radiation_i12_radiobutton;
+  GtkWidget *radiation_i11_radiobutton;
+  GtkWidget *radiation_i13_radiobutton;
+  GtkWidget *radiation_i15_radiobutton;
+  GtkWidget *label145;
+  GtkWidget *label140;
+  GtkWidget *frame33;
+  GtkWidget *alignment35;
+  GtkWidget *table22;
+  GtkWidget *radiation_x0_radiobutton;
+  GSList *radiation_x0_radiobutton_group = NULL;
+  GtkWidget *radiation_x1_radiobutton;
+  GtkWidget *radiation_n0_radiobutton;
+  GSList *radiation_n0_radiobutton_group = NULL;
+  GtkWidget *radiation_n2_radiobutton;
+  GtkWidget *radiation_n4_radiobutton;
+  GtkWidget *radiation_d0_radiobutton;
+  GSList *radiation_d0_radiobutton_group = NULL;
+  GtkWidget *radiation_a0_radiobutton;
+  GSList *radiation_a0_radiobutton_group = NULL;
+  GtkWidget *radiation_a2_radiobutton;
+  GtkWidget *radiation_a1_radiobutton;
+  GtkWidget *radiation_d1_radiobutton;
+  GtkWidget *radiation_n5_radiobutton;
+  GtkWidget *radiation_n3_radiobutton;
+  GtkWidget *radiation_n1_radiobutton;
+  GtkWidget *label146;
+  GtkWidget *hseparator5;
+  GtkWidget *hseparator6;
+  GtkWidget *hseparator7;
+  GtkWidget *hseparator8;
+  GtkWidget *hseparator9;
+  GtkWidget *hseparator10;
+  GtkWidget *label144;
+  GtkWidget *frame31;
+  GtkWidget *alignment33;
+  GtkWidget *table23;
+  GtkWidget *radiation_f6_label;
+  GtkObject *radiation_f1_spinbutton_adj;
+  GtkWidget *radiation_f1_spinbutton;
+  GtkObject *radiation_f2_spinbutton_adj;
+  GtkWidget *radiation_f2_spinbutton;
+  GtkObject *radiation_f6_spinbutton_adj;
+  GtkWidget *radiation_f6_spinbutton;
+  GtkWidget *radiation_f1_label;
+  GtkWidget *label148;
+  GtkObject *radiation_i3_spinbutton_adj;
+  GtkWidget *radiation_i3_spinbutton;
+  GtkObject *radiation_i2_spinbutton_adj;
+  GtkWidget *radiation_i2_spinbutton;
+  GtkWidget *radiation_i1_label;
+  GtkWidget *label210;
+  GtkWidget *radiation_f3_label;
+  GtkObject *radiation_f3_spinbutton_adj;
+  GtkWidget *radiation_f3_spinbutton;
+  GtkWidget *radiation_f5_label;
+  GtkObject *radiation_f5_spinbutton_adj;
+  GtkWidget *radiation_f5_spinbutton;
+  GtkWidget *label150;
+  GtkObject *radiation_f4_spinbutton_adj;
+  GtkWidget *radiation_f4_spinbutton;
+  GtkWidget *label142;
+  GtkWidget *hbox37;
+  GtkWidget *radiation_new_button;
+  GtkWidget *radiation_cancel_button;
+  GtkWidget *alignment63;
+  GtkWidget *hbox61;
+  GtkWidget *image83;
+  GtkWidget *label235;
+  GtkWidget *radiation_apply_button;
+  GtkWidget *radiation_ok_button;
+
+  radiation_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_command), 4);
+  gtk_window_set_title (GTK_WINDOW (radiation_command), _("Radiation Pattern (RP Card)"));
+  gtk_window_set_icon_name (GTK_WINDOW (radiation_command), "gtk-dialog-info");
+
+  vbox19 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox19);
+  gtk_container_add (GTK_CONTAINER (radiation_command), vbox19);
+
+  frame29 = gtk_frame_new (NULL);
+  gtk_widget_show (frame29);
+  gtk_box_pack_start (GTK_BOX (vbox19), frame29, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame29), 4);
+
+  alignment31 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment31);
+  gtk_container_add (GTK_CONTAINER (frame29), alignment31);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment31), 0, 0, 12, 0);
+
+  table21 = gtk_table_new (4, 2, FALSE);
+  gtk_widget_show (table21);
+  gtk_container_add (GTK_CONTAINER (alignment31), table21);
+
+  radiation_i10_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Normal (Space) Wave"));
+  gtk_widget_show (radiation_i10_radiobutton);
+  gtk_table_attach (GTK_TABLE (table21), radiation_i10_radiobutton, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_i10_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i10_radiobutton), radiation_i10_radiobutton_group);
+  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i10_radiobutton));
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiation_i10_radiobutton), TRUE);
+
+  radiation_i16_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Circular Cliff + Radials"));
+  gtk_widget_show (radiation_i16_radiobutton);
+  gtk_table_attach (GTK_TABLE (table21), radiation_i16_radiobutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_i16_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i16_radiobutton), radiation_i10_radiobutton_group);
+  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i16_radiobutton));
+
+  radiation_i14_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Radial wire screen"));
+  gtk_widget_show (radiation_i14_radiobutton);
+  gtk_table_attach (GTK_TABLE (table21), radiation_i14_radiobutton, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_i14_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i14_radiobutton), radiation_i10_radiobutton_group);
+  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i14_radiobutton));
+
+  radiation_i12_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Linear Cliff"));
+  gtk_widget_show (radiation_i12_radiobutton);
+  gtk_table_attach (GTK_TABLE (table21), radiation_i12_radiobutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i12_radiobutton), radiation_i10_radiobutton_group);
+  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i12_radiobutton));
+
+  radiation_i11_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Space + Ground Wave"));
+  gtk_widget_show (radiation_i11_radiobutton);
+  gtk_table_attach (GTK_TABLE (table21), radiation_i11_radiobutton, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_i11_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i11_radiobutton), radiation_i10_radiobutton_group);
+  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i11_radiobutton));
+
+  radiation_i13_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Circular Cliff"));
+  gtk_widget_show (radiation_i13_radiobutton);
+  gtk_table_attach (GTK_TABLE (table21), radiation_i13_radiobutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_i13_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i13_radiobutton), radiation_i10_radiobutton_group);
+  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i13_radiobutton));
+
+  radiation_i15_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Linear Cliff + Radials"));
+  gtk_widget_show (radiation_i15_radiobutton);
+  gtk_table_attach (GTK_TABLE (table21), radiation_i15_radiobutton, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_i15_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_i15_radiobutton), radiation_i10_radiobutton_group);
+  radiation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_i15_radiobutton));
+
+  label145 = gtk_label_new (_("<b>See GN/GD Card Documentation</b>"));
+  gtk_widget_show (label145);
+  gtk_table_attach (GTK_TABLE (table21), label145, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_use_markup (GTK_LABEL (label145), TRUE);
+  gtk_misc_set_alignment (GTK_MISC (label145), 0, 0.5);
+
+  label140 = gtk_label_new (_("Wave Type and Ground (I1)"));
+  gtk_widget_show (label140);
+  gtk_frame_set_label_widget (GTK_FRAME (frame29), label140);
+  gtk_misc_set_padding (GTK_MISC (label140), 4, 4);
+
+  frame33 = gtk_frame_new (NULL);
+  gtk_widget_show (frame33);
+  gtk_box_pack_start (GTK_BOX (vbox19), frame33, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame33), 4);
+
+  alignment35 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment35);
+  gtk_container_add (GTK_CONTAINER (frame33), alignment35);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment35), 0, 0, 12, 0);
+
+  table22 = gtk_table_new (10, 2, FALSE);
+  gtk_widget_show (table22);
+  gtk_container_add (GTK_CONTAINER (alignment35), table22);
+
+  radiation_x0_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Major & Minor Axis & Total Gain"));
+  gtk_widget_show (radiation_x0_radiobutton);
+  gtk_table_attach (GTK_TABLE (table22), radiation_x0_radiobutton, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_x0_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_x0_radiobutton), radiation_x0_radiobutton_group);
+  radiation_x0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_x0_radiobutton));
+
+  radiation_x1_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Vertical, Horizontal & Total Gain"));
+  gtk_widget_show (radiation_x1_radiobutton);
+  gtk_table_attach (GTK_TABLE (table22), radiation_x1_radiobutton, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_x1_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_x1_radiobutton), radiation_x0_radiobutton_group);
+  radiation_x0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_x1_radiobutton));
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiation_x1_radiobutton), TRUE);
+
+  radiation_n0_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("No Normalized Gain"));
+  gtk_widget_show (radiation_n0_radiobutton);
+  gtk_table_attach (GTK_TABLE (table22), radiation_n0_radiobutton, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_n0_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n0_radiobutton), radiation_n0_radiobutton_group);
+  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n0_radiobutton));
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiation_n0_radiobutton), TRUE);
+
+  radiation_n2_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Minor Axis Gain Normalized"));
+  gtk_widget_show (radiation_n2_radiobutton);
+  gtk_table_attach (GTK_TABLE (table22), radiation_n2_radiobutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_n2_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n2_radiobutton), radiation_n0_radiobutton_group);
+  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n2_radiobutton));
+
+  radiation_n4_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Horizontal Axis Gain Normalized"));
+  gtk_widget_show (radiation_n4_radiobutton);
+  gtk_table_attach (GTK_TABLE (table22), radiation_n4_radiobutton, 0, 1, 4, 5,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_n4_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n4_radiobutton), radiation_n0_radiobutton_group);
+  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n4_radiobutton));
+
+  radiation_d0_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Print/Normalize Power Gain"));
+  gtk_widget_show (radiation_d0_radiobutton);
+  gtk_table_attach (GTK_TABLE (table22), radiation_d0_radiobutton, 0, 1, 6, 7,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_d0_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_d0_radiobutton), radiation_d0_radiobutton_group);
+  radiation_d0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_d0_radiobutton));
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (radiation_d0_radiobutton), TRUE);
+
+  radiation_a0_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("No Gain Averaging"));
+  gtk_widget_show (radiation_a0_radiobutton);
+  gtk_table_attach (GTK_TABLE (table22), radiation_a0_radiobutton, 0, 1, 8, 9,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_a0_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_a0_radiobutton), radiation_a0_radiobutton_group);
+  radiation_a0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_a0_radiobutton));
+
+  radiation_a2_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Points in Average Not Printed"));
+  gtk_widget_show (radiation_a2_radiobutton);
+  gtk_table_attach (GTK_TABLE (table22), radiation_a2_radiobutton, 0, 1, 9, 10,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_a2_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_a2_radiobutton), radiation_a0_radiobutton_group);
+  radiation_a0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_a2_radiobutton));
+
+  radiation_a1_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Average Gain Computed"));
+  gtk_widget_show (radiation_a1_radiobutton);
+  gtk_table_attach (GTK_TABLE (table22), radiation_a1_radiobutton, 1, 2, 8, 9,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_a1_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_a1_radiobutton), radiation_a0_radiobutton_group);
+  radiation_a0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_a1_radiobutton));
+
+  radiation_d1_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Print/Normalize Directive Gain"));
+  gtk_widget_show (radiation_d1_radiobutton);
+  gtk_table_attach (GTK_TABLE (table22), radiation_d1_radiobutton, 1, 2, 6, 7,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_d1_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_d1_radiobutton), radiation_d0_radiobutton_group);
+  radiation_d0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_d1_radiobutton));
+
+  radiation_n5_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Total Gain Normalized"));
+  gtk_widget_show (radiation_n5_radiobutton);
+  gtk_table_attach (GTK_TABLE (table22), radiation_n5_radiobutton, 1, 2, 4, 5,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_n5_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n5_radiobutton), radiation_n0_radiobutton_group);
+  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n5_radiobutton));
+
+  radiation_n3_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Vertical Axis Gain Normalized"));
+  gtk_widget_show (radiation_n3_radiobutton);
+  gtk_table_attach (GTK_TABLE (table22), radiation_n3_radiobutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_n3_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n3_radiobutton), radiation_n0_radiobutton_group);
+  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n3_radiobutton));
+
+  radiation_n1_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Major Axis Gain Normalized"));
+  gtk_widget_show (radiation_n1_radiobutton);
+  gtk_table_attach (GTK_TABLE (table22), radiation_n1_radiobutton, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_n1_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (radiation_n1_radiobutton), radiation_n0_radiobutton_group);
+  radiation_n0_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (radiation_n1_radiobutton));
+
+  label146 = gtk_label_new (_("<b>See RP Card Documentation</b>"));
+  gtk_widget_show (label146);
+  gtk_table_attach (GTK_TABLE (table22), label146, 1, 2, 9, 10,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_label_set_use_markup (GTK_LABEL (label146), TRUE);
+  gtk_misc_set_alignment (GTK_MISC (label146), 0, 0.5);
+
+  hseparator5 = gtk_hseparator_new ();
+  gtk_widget_show (hseparator5);
+  gtk_table_attach (GTK_TABLE (table22), hseparator5, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+
+  hseparator6 = gtk_hseparator_new ();
+  gtk_widget_show (hseparator6);
+  gtk_table_attach (GTK_TABLE (table22), hseparator6, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+  hseparator7 = gtk_hseparator_new ();
+  gtk_widget_show (hseparator7);
+  gtk_table_attach (GTK_TABLE (table22), hseparator7, 0, 1, 5, 6,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+
+  hseparator8 = gtk_hseparator_new ();
+  gtk_widget_show (hseparator8);
+  gtk_table_attach (GTK_TABLE (table22), hseparator8, 1, 2, 5, 6,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+  hseparator9 = gtk_hseparator_new ();
+  gtk_widget_show (hseparator9);
+  gtk_table_attach (GTK_TABLE (table22), hseparator9, 0, 1, 7, 8,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0);
+
+  hseparator10 = gtk_hseparator_new ();
+  gtk_widget_show (hseparator10);
+  gtk_table_attach (GTK_TABLE (table22), hseparator10, 1, 2, 7, 8,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (GTK_FILL), 0, 0);
+
+  label144 = gtk_label_new (_("Data Output Control (XNDA)"));
+  gtk_widget_show (label144);
+  gtk_frame_set_label_widget (GTK_FRAME (frame33), label144);
+  gtk_misc_set_padding (GTK_MISC (label144), 4, 4);
+
+  frame31 = gtk_frame_new (NULL);
+  gtk_widget_show (frame31);
+  gtk_box_pack_start (GTK_BOX (vbox19), frame31, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame31), 5);
+
+  alignment33 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment33);
+  gtk_container_add (GTK_CONTAINER (frame31), alignment33);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment33), 0, 0, 12, 0);
+
+  table23 = gtk_table_new (6, 3, FALSE);
+  gtk_widget_show (table23);
+  gtk_container_add (GTK_CONTAINER (alignment33), table23);
+
+  radiation_f6_label = gtk_label_new (_("Gain Normalization"));
+  gtk_widget_show (radiation_f6_label);
+  gtk_table_attach (GTK_TABLE (table23), radiation_f6_label, 2, 3, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (radiation_f6_label), 0.1, 0.5);
+
+  radiation_f1_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  radiation_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (radiation_f1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table23), radiation_f1_spinbutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f1_spinbutton), TRUE);
+
+  radiation_f2_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  radiation_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (radiation_f2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table23), radiation_f2_spinbutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f2_spinbutton), TRUE);
+
+  radiation_f6_spinbutton_adj = gtk_adjustment_new (0, -1000, 1000, 9.99999974738e-06, 10, 0);
+  radiation_f6_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f6_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (radiation_f6_spinbutton);
+  gtk_table_attach (GTK_TABLE (table23), radiation_f6_spinbutton, 2, 3, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f6_spinbutton), TRUE);
+
+  radiation_f1_label = gtk_label_new (_("Initial Theta (deg)"));
+  gtk_widget_show (radiation_f1_label);
+  gtk_table_attach (GTK_TABLE (table23), radiation_f1_label, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (radiation_f1_label), 0.1, 0.5);
+
+  label148 = gtk_label_new (_("Initial Phi (deg)"));
+  gtk_widget_show (label148);
+  gtk_table_attach (GTK_TABLE (table23), label148, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label148), 0.1, 0.5);
+
+  radiation_i3_spinbutton_adj = gtk_adjustment_new (4, 1, 10000, 1, 10, 0);
+  radiation_i3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_i3_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (radiation_i3_spinbutton);
+  gtk_table_attach (GTK_TABLE (table23), radiation_i3_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_i3_spinbutton), TRUE);
+
+  radiation_i2_spinbutton_adj = gtk_adjustment_new (4, 1, 10000, 1, 10, 0);
+  radiation_i2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_i2_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (radiation_i2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table23), radiation_i2_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_i2_spinbutton), TRUE);
+
+  radiation_i1_label = gtk_label_new (_("Points in Phi"));
+  gtk_widget_show (radiation_i1_label);
+  gtk_table_attach (GTK_TABLE (table23), radiation_i1_label, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (radiation_i1_label), 0.1, 0.5);
+
+  label210 = gtk_label_new (_("Points in Theta"));
+  gtk_widget_show (label210);
+  gtk_table_attach (GTK_TABLE (table23), label210, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label210), 0.1, 0.5);
+
+  radiation_f3_label = gtk_label_new (_("Increment in Theta"));
+  gtk_widget_show (radiation_f3_label);
+  gtk_table_attach (GTK_TABLE (table23), radiation_f3_label, 0, 1, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (radiation_f3_label), 0.1, 0.5);
+
+  radiation_f3_spinbutton_adj = gtk_adjustment_new (5, -1000, 1000, 9.99999974738e-06, 10, 0);
+  radiation_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f3_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (radiation_f3_spinbutton);
+  gtk_table_attach (GTK_TABLE (table23), radiation_f3_spinbutton, 0, 1, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f3_spinbutton), TRUE);
+
+  radiation_f5_label = gtk_label_new (_("Field Point Distance"));
+  gtk_widget_show (radiation_f5_label);
+  gtk_table_attach (GTK_TABLE (table23), radiation_f5_label, 2, 3, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (radiation_f5_label), 0.1, 0.5);
+
+  radiation_f5_spinbutton_adj = gtk_adjustment_new (0, -1000, 1000, 9.99999974738e-06, 10, 0);
+  radiation_f5_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f5_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (radiation_f5_spinbutton);
+  gtk_table_attach (GTK_TABLE (table23), radiation_f5_spinbutton, 2, 3, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f5_spinbutton), TRUE);
+
+  label150 = gtk_label_new (_("Increment in Phi"));
+  gtk_widget_show (label150);
+  gtk_table_attach (GTK_TABLE (table23), label150, 1, 2, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label150), 0.1, 0.5);
+
+  radiation_f4_spinbutton_adj = gtk_adjustment_new (5, -1000, 1000, 9.99999974738e-06, 10, 0);
+  radiation_f4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (radiation_f4_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (radiation_f4_spinbutton);
+  gtk_table_attach (GTK_TABLE (table23), radiation_f4_spinbutton, 1, 2, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (radiation_f4_spinbutton), TRUE);
+
+  label142 = gtk_label_new (_("Radiation Pattern Parameters"));
+  gtk_widget_show (label142);
+  gtk_frame_set_label_widget (GTK_FRAME (frame31), label142);
+  gtk_misc_set_padding (GTK_MISC (label142), 4, 4);
+
+  hbox37 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox37);
+  gtk_box_pack_start (GTK_BOX (vbox19), hbox37, TRUE, TRUE, 0);
+
+  radiation_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (radiation_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox37), radiation_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_new_button), 2);
+
+  radiation_cancel_button = gtk_button_new ();
+  gtk_widget_show (radiation_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox37), radiation_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_cancel_button), 2);
+
+  alignment63 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment63);
+  gtk_container_add (GTK_CONTAINER (radiation_cancel_button), alignment63);
+
+  hbox61 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox61);
+  gtk_container_add (GTK_CONTAINER (alignment63), hbox61);
+
+  image83 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image83);
+  gtk_box_pack_start (GTK_BOX (hbox61), image83, FALSE, FALSE, 0);
+
+  label235 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label235);
+  gtk_box_pack_start (GTK_BOX (hbox61), label235, FALSE, FALSE, 0);
+
+  radiation_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (radiation_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox37), radiation_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_apply_button), 2);
+
+  radiation_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (radiation_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox37), radiation_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (radiation_ok_button), 2);
+
+  g_signal_connect ((gpointer) radiation_command, "destroy",
+                    G_CALLBACK (on_radiation_command_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_i10_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_i16_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_i14_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_i12_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_i11_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_i13_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_i15_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_x0_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_x1_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_n0_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_n2_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_n4_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_d0_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_a0_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_a2_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_a1_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_d1_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_n5_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_n3_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_n1_radiobutton, "toggled",
+                    G_CALLBACK (on_radiation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_f1_spinbutton, "value_changed",
+                    G_CALLBACK (on_radiation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_f2_spinbutton, "value_changed",
+                    G_CALLBACK (on_radiation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_f6_spinbutton, "value_changed",
+                    G_CALLBACK (on_radiation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_i3_spinbutton, "value_changed",
+                    G_CALLBACK (on_radiation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_i2_spinbutton, "value_changed",
+                    G_CALLBACK (on_radiation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_f3_spinbutton, "value_changed",
+                    G_CALLBACK (on_radiation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_f5_spinbutton, "value_changed",
+                    G_CALLBACK (on_radiation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_f4_spinbutton, "value_changed",
+                    G_CALLBACK (on_radiation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_new_button, "clicked",
+                    G_CALLBACK (on_radiation_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_cancel_button, "clicked",
+                    G_CALLBACK (on_radiation_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_apply_button, "clicked",
+                    G_CALLBACK (on_radiation_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) radiation_ok_button, "clicked",
+                    G_CALLBACK (on_radiation_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (radiation_command, radiation_command, "radiation_command");
+  GLADE_HOOKUP_OBJECT (radiation_command, vbox19, "vbox19");
+  GLADE_HOOKUP_OBJECT (radiation_command, frame29, "frame29");
+  GLADE_HOOKUP_OBJECT (radiation_command, alignment31, "alignment31");
+  GLADE_HOOKUP_OBJECT (radiation_command, table21, "table21");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i10_radiobutton, "radiation_i10_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i16_radiobutton, "radiation_i16_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i14_radiobutton, "radiation_i14_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i12_radiobutton, "radiation_i12_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i11_radiobutton, "radiation_i11_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i13_radiobutton, "radiation_i13_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i15_radiobutton, "radiation_i15_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, label145, "label145");
+  GLADE_HOOKUP_OBJECT (radiation_command, label140, "label140");
+  GLADE_HOOKUP_OBJECT (radiation_command, frame33, "frame33");
+  GLADE_HOOKUP_OBJECT (radiation_command, alignment35, "alignment35");
+  GLADE_HOOKUP_OBJECT (radiation_command, table22, "table22");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_x0_radiobutton, "radiation_x0_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_x1_radiobutton, "radiation_x1_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n0_radiobutton, "radiation_n0_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n2_radiobutton, "radiation_n2_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n4_radiobutton, "radiation_n4_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_d0_radiobutton, "radiation_d0_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_a0_radiobutton, "radiation_a0_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_a2_radiobutton, "radiation_a2_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_a1_radiobutton, "radiation_a1_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_d1_radiobutton, "radiation_d1_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n5_radiobutton, "radiation_n5_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n3_radiobutton, "radiation_n3_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_n1_radiobutton, "radiation_n1_radiobutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, label146, "label146");
+  GLADE_HOOKUP_OBJECT (radiation_command, hseparator5, "hseparator5");
+  GLADE_HOOKUP_OBJECT (radiation_command, hseparator6, "hseparator6");
+  GLADE_HOOKUP_OBJECT (radiation_command, hseparator7, "hseparator7");
+  GLADE_HOOKUP_OBJECT (radiation_command, hseparator8, "hseparator8");
+  GLADE_HOOKUP_OBJECT (radiation_command, hseparator9, "hseparator9");
+  GLADE_HOOKUP_OBJECT (radiation_command, hseparator10, "hseparator10");
+  GLADE_HOOKUP_OBJECT (radiation_command, label144, "label144");
+  GLADE_HOOKUP_OBJECT (radiation_command, frame31, "frame31");
+  GLADE_HOOKUP_OBJECT (radiation_command, alignment33, "alignment33");
+  GLADE_HOOKUP_OBJECT (radiation_command, table23, "table23");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f6_label, "radiation_f6_label");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f1_spinbutton, "radiation_f1_spinbutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f2_spinbutton, "radiation_f2_spinbutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f6_spinbutton, "radiation_f6_spinbutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f1_label, "radiation_f1_label");
+  GLADE_HOOKUP_OBJECT (radiation_command, label148, "label148");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i3_spinbutton, "radiation_i3_spinbutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i2_spinbutton, "radiation_i2_spinbutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_i1_label, "radiation_i1_label");
+  GLADE_HOOKUP_OBJECT (radiation_command, label210, "label210");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f3_label, "radiation_f3_label");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f3_spinbutton, "radiation_f3_spinbutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f5_label, "radiation_f5_label");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f5_spinbutton, "radiation_f5_spinbutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, label150, "label150");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_f4_spinbutton, "radiation_f4_spinbutton");
+  GLADE_HOOKUP_OBJECT (radiation_command, label142, "label142");
+  GLADE_HOOKUP_OBJECT (radiation_command, hbox37, "hbox37");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_new_button, "radiation_new_button");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_cancel_button, "radiation_cancel_button");
+  GLADE_HOOKUP_OBJECT (radiation_command, alignment63, "alignment63");
+  GLADE_HOOKUP_OBJECT (radiation_command, hbox61, "hbox61");
+  GLADE_HOOKUP_OBJECT (radiation_command, image83, "image83");
+  GLADE_HOOKUP_OBJECT (radiation_command, label235, "label235");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_apply_button, "radiation_apply_button");
+  GLADE_HOOKUP_OBJECT (radiation_command, radiation_ok_button, "radiation_ok_button");
+
+  return radiation_command;
+}
+
+GtkWidget*
+create_excitation_command (void)
+{
+  GtkWidget *excitation_command;
+  GtkWidget *vbox20;
+  GtkWidget *frame34;
+  GtkWidget *alignment36;
+  GtkWidget *table24;
+  GtkWidget *excitation_i10_radiobutton;
+  GSList *excitation_i10_radiobutton_group = NULL;
+  GtkWidget *excitation_i11_radiobutton;
+  GtkWidget *excitation_i12_radiobutton;
+  GtkWidget *excitation_i13_radiobutton;
+  GtkWidget *excitation_i15_radiobutton;
+  GtkWidget *excitation_i14_radiobutton;
+  GtkWidget *label153;
+  GtkWidget *frame35;
+  GtkWidget *alignment37;
+  GtkWidget *hbox39;
+  GtkWidget *excitation_i419_checkbutton;
+  GtkWidget *excitation_i420_checkbutton;
+  GtkWidget *label154;
+  GtkWidget *frame36;
+  GtkWidget *alignment38;
+  GtkWidget *table25;
+  GtkWidget *excitation_i2_label;
+  GtkWidget *excitation_i3_label;
+  GtkWidget *excitation_f1_label;
+  GtkWidget *excitation_f2_label;
+  GtkWidget *excitation_f3_label;
+  GtkWidget *excitation_f4_label;
+  GtkWidget *excitation_f5_label;
+  GtkWidget *excitation_f6_label;
+  GtkObject *excitation_i2_spinbutton_adj;
+  GtkWidget *excitation_i2_spinbutton;
+  GtkObject *excitation_i3_spinbutton_adj;
+  GtkWidget *excitation_i3_spinbutton;
+  GtkObject *excitation_f2_spinbutton_adj;
+  GtkWidget *excitation_f2_spinbutton;
+  GtkObject *excitation_f3_spinbutton_adj;
+  GtkWidget *excitation_f3_spinbutton;
+  GtkObject *excitation_f4_spinbutton_adj;
+  GtkWidget *excitation_f4_spinbutton;
+  GtkObject *excitation_f5_spinbutton_adj;
+  GtkWidget *excitation_f5_spinbutton;
+  GtkObject *excitation_f6_spinbutton_adj;
+  GtkWidget *excitation_f6_spinbutton;
+  GtkObject *excitation_f1_spinbutton_adj;
+  GtkWidget *excitation_f1_spinbutton;
+  GtkWidget *label155;
+  GtkWidget *hbox38;
+  GtkWidget *excitation_new_button;
+  GtkWidget *excitation_cancel_button;
+  GtkWidget *alignment64;
+  GtkWidget *hbox62;
+  GtkWidget *image84;
+  GtkWidget *label236;
+  GtkWidget *excitation_apply_button;
+  GtkWidget *excitation_ok_button;
+
+  excitation_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (excitation_command), 4);
+  gtk_window_set_title (GTK_WINDOW (excitation_command), _("Excitation Command (EX Card)"));
+
+  vbox20 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox20);
+  gtk_container_add (GTK_CONTAINER (excitation_command), vbox20);
+
+  frame34 = gtk_frame_new (NULL);
+  gtk_widget_show (frame34);
+  gtk_box_pack_start (GTK_BOX (vbox20), frame34, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame34), 4);
+
+  alignment36 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment36);
+  gtk_container_add (GTK_CONTAINER (frame34), alignment36);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment36), 0, 0, 12, 0);
+
+  table24 = gtk_table_new (2, 3, FALSE);
+  gtk_widget_show (table24);
+  gtk_container_add (GTK_CONTAINER (alignment36), table24);
+
+  excitation_i10_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Voltage Source"));
+  gtk_widget_show (excitation_i10_radiobutton);
+  gtk_table_attach (GTK_TABLE (table24), excitation_i10_radiobutton, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (excitation_i10_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i10_radiobutton), excitation_i10_radiobutton_group);
+  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i10_radiobutton));
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (excitation_i10_radiobutton), TRUE);
+
+  excitation_i11_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Incident Linear Wave "));
+  gtk_widget_show (excitation_i11_radiobutton);
+  gtk_table_attach (GTK_TABLE (table24), excitation_i11_radiobutton, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (excitation_i11_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i11_radiobutton), excitation_i10_radiobutton_group);
+  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i11_radiobutton));
+
+  excitation_i12_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Incident RH Wave"));
+  gtk_widget_show (excitation_i12_radiobutton);
+  gtk_table_attach (GTK_TABLE (table24), excitation_i12_radiobutton, 2, 3, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (excitation_i12_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i12_radiobutton), excitation_i10_radiobutton_group);
+  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i12_radiobutton));
+
+  excitation_i13_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Incident LH Wave"));
+  gtk_widget_show (excitation_i13_radiobutton);
+  gtk_table_attach (GTK_TABLE (table24), excitation_i13_radiobutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (excitation_i13_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i13_radiobutton), excitation_i10_radiobutton_group);
+  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i13_radiobutton));
+
+  excitation_i15_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Current Slope Discontinuity"));
+  gtk_widget_show (excitation_i15_radiobutton);
+  gtk_table_attach (GTK_TABLE (table24), excitation_i15_radiobutton, 2, 3, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (excitation_i15_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i15_radiobutton), excitation_i10_radiobutton_group);
+  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i15_radiobutton));
+
+  excitation_i14_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Current Source"));
+  gtk_widget_show (excitation_i14_radiobutton);
+  gtk_table_attach (GTK_TABLE (table24), excitation_i14_radiobutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (excitation_i14_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (excitation_i14_radiobutton), excitation_i10_radiobutton_group);
+  excitation_i10_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (excitation_i14_radiobutton));
+
+  label153 = gtk_label_new (_("Excitation Type"));
+  gtk_widget_show (label153);
+  gtk_frame_set_label_widget (GTK_FRAME (frame34), label153);
+  gtk_misc_set_padding (GTK_MISC (label153), 4, 4);
+
+  frame35 = gtk_frame_new (NULL);
+  gtk_widget_show (frame35);
+  gtk_box_pack_start (GTK_BOX (vbox20), frame35, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame35), 4);
+
+  alignment37 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment37);
+  gtk_container_add (GTK_CONTAINER (frame35), alignment37);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment37), 0, 0, 12, 0);
+
+  hbox39 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox39);
+  gtk_container_add (GTK_CONTAINER (alignment37), hbox39);
+
+  excitation_i419_checkbutton = gtk_check_button_new_with_mnemonic (_("Maximum Admittance Matrix Asymmetry"));
+  gtk_widget_show (excitation_i419_checkbutton);
+  gtk_box_pack_start (GTK_BOX (hbox39), excitation_i419_checkbutton, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (excitation_i419_checkbutton), 2);
+
+  excitation_i420_checkbutton = gtk_check_button_new_with_mnemonic (_("Impedance of Source Segment"));
+  gtk_widget_show (excitation_i420_checkbutton);
+  gtk_box_pack_start (GTK_BOX (hbox39), excitation_i420_checkbutton, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (excitation_i420_checkbutton), 2);
+
+  label154 = gtk_label_new (_("Print Control"));
+  gtk_widget_show (label154);
+  gtk_frame_set_label_widget (GTK_FRAME (frame35), label154);
+  gtk_misc_set_padding (GTK_MISC (label154), 4, 4);
+
+  frame36 = gtk_frame_new (NULL);
+  gtk_widget_show (frame36);
+  gtk_box_pack_start (GTK_BOX (vbox20), frame36, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame36), 4);
+
+  alignment38 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment38);
+  gtk_container_add (GTK_CONTAINER (frame36), alignment38);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment38), 0, 0, 12, 0);
+
+  table25 = gtk_table_new (6, 3, FALSE);
+  gtk_widget_show (table25);
+  gtk_container_add (GTK_CONTAINER (alignment38), table25);
+
+  excitation_i2_label = gtk_label_new (_("Tag Number"));
+  gtk_widget_show (excitation_i2_label);
+  gtk_table_attach (GTK_TABLE (table25), excitation_i2_label, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (excitation_i2_label), 0.1, 0.5);
+
+  excitation_i3_label = gtk_label_new (_("Segment Number"));
+  gtk_widget_show (excitation_i3_label);
+  gtk_table_attach (GTK_TABLE (table25), excitation_i3_label, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (excitation_i3_label), 0.1, 0.5);
+
+  excitation_f1_label = gtk_label_new (_("Voltage - Real Part"));
+  gtk_widget_show (excitation_f1_label);
+  gtk_table_attach (GTK_TABLE (table25), excitation_f1_label, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (excitation_f1_label), 0.1, 0.5);
+
+  excitation_f2_label = gtk_label_new (_("Voltage - Imaginary Part"));
+  gtk_widget_show (excitation_f2_label);
+  gtk_table_attach (GTK_TABLE (table25), excitation_f2_label, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (excitation_f2_label), 0.1, 0.5);
+
+  excitation_f3_label = gtk_label_new (_("Eta"));
+  gtk_widget_show (excitation_f3_label);
+  gtk_table_attach (GTK_TABLE (table25), excitation_f3_label, 2, 3, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (excitation_f3_label), 0.1, 0.5);
+
+  excitation_f4_label = gtk_label_new (_("Theta"));
+  gtk_widget_show (excitation_f4_label);
+  gtk_table_attach (GTK_TABLE (table25), excitation_f4_label, 0, 1, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (excitation_f4_label), 0.1, 0.5);
+
+  excitation_f5_label = gtk_label_new (_("Phi"));
+  gtk_widget_show (excitation_f5_label);
+  gtk_table_attach (GTK_TABLE (table25), excitation_f5_label, 1, 2, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (excitation_f5_label), 0.1, 0.5);
+
+  excitation_f6_label = gtk_label_new (_("Ratio"));
+  gtk_widget_show (excitation_f6_label);
+  gtk_table_attach (GTK_TABLE (table25), excitation_f6_label, 2, 3, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (excitation_f6_label), 0.1, 0.5);
+
+  excitation_i2_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
+  excitation_i2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_i2_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (excitation_i2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table25), excitation_i2_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_i2_spinbutton), TRUE);
+
+  excitation_i3_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
+  excitation_i3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_i3_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (excitation_i3_spinbutton);
+  gtk_table_attach (GTK_TABLE (table25), excitation_i3_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_i3_spinbutton), TRUE);
+
+  excitation_f2_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  excitation_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (excitation_f2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table25), excitation_f2_spinbutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f2_spinbutton), TRUE);
+
+  excitation_f3_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  excitation_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f3_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (excitation_f3_spinbutton);
+  gtk_table_attach (GTK_TABLE (table25), excitation_f3_spinbutton, 2, 3, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f3_spinbutton), TRUE);
+
+  excitation_f4_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  excitation_f4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f4_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (excitation_f4_spinbutton);
+  gtk_table_attach (GTK_TABLE (table25), excitation_f4_spinbutton, 0, 1, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f4_spinbutton), TRUE);
+
+  excitation_f5_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  excitation_f5_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f5_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (excitation_f5_spinbutton);
+  gtk_table_attach (GTK_TABLE (table25), excitation_f5_spinbutton, 1, 2, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f5_spinbutton), TRUE);
+
+  excitation_f6_spinbutton_adj = gtk_adjustment_new (0, -10000, 10000, 9.99999974738e-06, 10, 0);
+  excitation_f6_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f6_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (excitation_f6_spinbutton);
+  gtk_table_attach (GTK_TABLE (table25), excitation_f6_spinbutton, 2, 3, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f6_spinbutton), TRUE);
+
+  excitation_f1_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
+  excitation_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (excitation_f1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (excitation_f1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table25), excitation_f1_spinbutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (excitation_f1_spinbutton), TRUE);
+
+  label155 = gtk_label_new (_("Excitation Parameters"));
+  gtk_widget_show (label155);
+  gtk_frame_set_label_widget (GTK_FRAME (frame36), label155);
+  gtk_misc_set_padding (GTK_MISC (label155), 4, 4);
+
+  hbox38 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox38);
+  gtk_box_pack_start (GTK_BOX (vbox20), hbox38, TRUE, TRUE, 0);
+
+  excitation_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (excitation_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox38), excitation_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (excitation_new_button), 2);
+
+  excitation_cancel_button = gtk_button_new ();
+  gtk_widget_show (excitation_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox38), excitation_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (excitation_cancel_button), 2);
+
+  alignment64 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment64);
+  gtk_container_add (GTK_CONTAINER (excitation_cancel_button), alignment64);
+
+  hbox62 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox62);
+  gtk_container_add (GTK_CONTAINER (alignment64), hbox62);
+
+  image84 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image84);
+  gtk_box_pack_start (GTK_BOX (hbox62), image84, FALSE, FALSE, 0);
+
+  label236 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label236);
+  gtk_box_pack_start (GTK_BOX (hbox62), label236, FALSE, FALSE, 0);
+
+  excitation_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (excitation_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox38), excitation_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (excitation_apply_button), 2);
+
+  excitation_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (excitation_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox38), excitation_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (excitation_ok_button), 2);
+
+  g_signal_connect ((gpointer) excitation_command, "destroy",
+                    G_CALLBACK (on_excitation_command_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_i10_radiobutton, "toggled",
+                    G_CALLBACK (on_excitation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_i11_radiobutton, "toggled",
+                    G_CALLBACK (on_excitation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_i12_radiobutton, "toggled",
+                    G_CALLBACK (on_excitation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_i13_radiobutton, "toggled",
+                    G_CALLBACK (on_excitation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_i15_radiobutton, "toggled",
+                    G_CALLBACK (on_excitation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_i14_radiobutton, "toggled",
+                    G_CALLBACK (on_excitation_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_i419_checkbutton, "toggled",
+                    G_CALLBACK (on_excitation_checkbutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_i420_checkbutton, "toggled",
+                    G_CALLBACK (on_excitation_checkbutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_i2_spinbutton, "value_changed",
+                    G_CALLBACK (on_excitation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_i3_spinbutton, "value_changed",
+                    G_CALLBACK (on_excitation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_f2_spinbutton, "value_changed",
+                    G_CALLBACK (on_excitation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_f3_spinbutton, "value_changed",
+                    G_CALLBACK (on_excitation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_f4_spinbutton, "value_changed",
+                    G_CALLBACK (on_excitation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_f5_spinbutton, "value_changed",
+                    G_CALLBACK (on_excitation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_f6_spinbutton, "value_changed",
+                    G_CALLBACK (on_excitation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_f1_spinbutton, "value_changed",
+                    G_CALLBACK (on_excitation_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_new_button, "clicked",
+                    G_CALLBACK (on_excitation_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_cancel_button, "clicked",
+                    G_CALLBACK (on_excitation_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_apply_button, "clicked",
+                    G_CALLBACK (on_excitation_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) excitation_ok_button, "clicked",
+                    G_CALLBACK (on_excitation_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (excitation_command, excitation_command, "excitation_command");
+  GLADE_HOOKUP_OBJECT (excitation_command, vbox20, "vbox20");
+  GLADE_HOOKUP_OBJECT (excitation_command, frame34, "frame34");
+  GLADE_HOOKUP_OBJECT (excitation_command, alignment36, "alignment36");
+  GLADE_HOOKUP_OBJECT (excitation_command, table24, "table24");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i10_radiobutton, "excitation_i10_radiobutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i11_radiobutton, "excitation_i11_radiobutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i12_radiobutton, "excitation_i12_radiobutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i13_radiobutton, "excitation_i13_radiobutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i15_radiobutton, "excitation_i15_radiobutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i14_radiobutton, "excitation_i14_radiobutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, label153, "label153");
+  GLADE_HOOKUP_OBJECT (excitation_command, frame35, "frame35");
+  GLADE_HOOKUP_OBJECT (excitation_command, alignment37, "alignment37");
+  GLADE_HOOKUP_OBJECT (excitation_command, hbox39, "hbox39");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i419_checkbutton, "excitation_i419_checkbutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i420_checkbutton, "excitation_i420_checkbutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, label154, "label154");
+  GLADE_HOOKUP_OBJECT (excitation_command, frame36, "frame36");
+  GLADE_HOOKUP_OBJECT (excitation_command, alignment38, "alignment38");
+  GLADE_HOOKUP_OBJECT (excitation_command, table25, "table25");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i2_label, "excitation_i2_label");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i3_label, "excitation_i3_label");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f1_label, "excitation_f1_label");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f2_label, "excitation_f2_label");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f3_label, "excitation_f3_label");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f4_label, "excitation_f4_label");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f5_label, "excitation_f5_label");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f6_label, "excitation_f6_label");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i2_spinbutton, "excitation_i2_spinbutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_i3_spinbutton, "excitation_i3_spinbutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f2_spinbutton, "excitation_f2_spinbutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f3_spinbutton, "excitation_f3_spinbutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f4_spinbutton, "excitation_f4_spinbutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f5_spinbutton, "excitation_f5_spinbutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f6_spinbutton, "excitation_f6_spinbutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_f1_spinbutton, "excitation_f1_spinbutton");
+  GLADE_HOOKUP_OBJECT (excitation_command, label155, "label155");
+  GLADE_HOOKUP_OBJECT (excitation_command, hbox38, "hbox38");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_new_button, "excitation_new_button");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_cancel_button, "excitation_cancel_button");
+  GLADE_HOOKUP_OBJECT (excitation_command, alignment64, "alignment64");
+  GLADE_HOOKUP_OBJECT (excitation_command, hbox62, "hbox62");
+  GLADE_HOOKUP_OBJECT (excitation_command, image84, "image84");
+  GLADE_HOOKUP_OBJECT (excitation_command, label236, "label236");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_apply_button, "excitation_apply_button");
+  GLADE_HOOKUP_OBJECT (excitation_command, excitation_ok_button, "excitation_ok_button");
+
+  return excitation_command;
+}
+
+GtkWidget*
+create_frequency_command (void)
+{
+  GtkWidget *frequency_command;
+  GtkWidget *vbox21;
+  GtkWidget *frame37;
+  GtkWidget *alignment39;
+  GtkWidget *hbox41;
+  GtkWidget *frequency_add_radiobutton;
+  GSList *frequency_add_radiobutton_group = NULL;
+  GtkWidget *frequency_mul_radiobutton;
+  GtkWidget *label165;
+  GtkWidget *frame38;
+  GtkWidget *alignment40;
+  GtkWidget *table26;
+  GtkWidget *label167;
+  GtkWidget *label168;
+  GtkObject *frequency_num_spinbutton_adj;
+  GtkWidget *frequency_num_spinbutton;
+  GtkObject *frequency_step_spinbutton_adj;
+  GtkWidget *frequency_step_spinbutton;
+  GtkWidget *label170;
+  GtkWidget *label171;
+  GtkObject *frequency_start_spinbutton_adj;
+  GtkWidget *frequency_start_spinbutton;
+  GtkObject *frequency_end_spinbutton_adj;
+  GtkWidget *frequency_end_spinbutton;
+  GtkWidget *label166;
+  GtkWidget *hbox40;
+  GtkWidget *frequency_new_button;
+  GtkWidget *frequency_cancel_button;
+  GtkWidget *alignment65;
+  GtkWidget *hbox63;
+  GtkWidget *image85;
+  GtkWidget *label237;
+  GtkWidget *frequency_apply_button;
+  GtkWidget *frequency_ok_button;
+
+  frequency_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (frequency_command), 4);
+  gtk_window_set_title (GTK_WINDOW (frequency_command), _("Frequecy Command (FR Card)"));
+
+  vbox21 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox21);
+  gtk_container_add (GTK_CONTAINER (frequency_command), vbox21);
+
+  frame37 = gtk_frame_new (NULL);
+  gtk_widget_show (frame37);
+  gtk_box_pack_start (GTK_BOX (vbox21), frame37, TRUE, TRUE, 0);
+
+  alignment39 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment39);
+  gtk_container_add (GTK_CONTAINER (frame37), alignment39);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment39), 0, 0, 12, 0);
+
+  hbox41 = gtk_hbox_new (FALSE, 0);
+  gtk_widget_show (hbox41);
+  gtk_container_add (GTK_CONTAINER (alignment39), hbox41);
+
+  frequency_add_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Additive Stepping"));
+  gtk_widget_show (frequency_add_radiobutton);
+  gtk_box_pack_start (GTK_BOX (hbox41), frequency_add_radiobutton, TRUE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frequency_add_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (frequency_add_radiobutton), frequency_add_radiobutton_group);
+  frequency_add_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (frequency_add_radiobutton));
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (frequency_add_radiobutton), TRUE);
+
+  frequency_mul_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Multiplicative Stepping"));
+  gtk_widget_show (frequency_mul_radiobutton);
+  gtk_box_pack_start (GTK_BOX (hbox41), frequency_mul_radiobutton, TRUE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frequency_mul_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (frequency_mul_radiobutton), frequency_add_radiobutton_group);
+  frequency_add_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (frequency_mul_radiobutton));
+
+  label165 = gtk_label_new (_("Frequency Stepping"));
+  gtk_widget_show (label165);
+  gtk_frame_set_label_widget (GTK_FRAME (frame37), label165);
+  gtk_misc_set_padding (GTK_MISC (label165), 4, 4);
+
+  frame38 = gtk_frame_new (NULL);
+  gtk_widget_show (frame38);
+  gtk_box_pack_start (GTK_BOX (vbox21), frame38, TRUE, TRUE, 0);
+
+  alignment40 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment40);
+  gtk_container_add (GTK_CONTAINER (frame38), alignment40);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment40), 0, 0, 12, 0);
+
+  table26 = gtk_table_new (4, 2, FALSE);
+  gtk_widget_show (table26);
+  gtk_container_add (GTK_CONTAINER (alignment40), table26);
+
+  label167 = gtk_label_new (_("No. Frequency Points"));
+  gtk_widget_show (label167);
+  gtk_table_attach (GTK_TABLE (table26), label167, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label167), 0.1, 0.5);
+
+  label168 = gtk_label_new (_("Frequency Step (MHz)"));
+  gtk_widget_show (label168);
+  gtk_table_attach (GTK_TABLE (table26), label168, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label168), 0.1, 0.5);
+
+  frequency_num_spinbutton_adj = gtk_adjustment_new (11, 1, 10000, 1, 10, 0);
+  frequency_num_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (frequency_num_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (frequency_num_spinbutton);
+  gtk_table_attach (GTK_TABLE (table26), frequency_num_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (frequency_num_spinbutton), TRUE);
+
+  frequency_step_spinbutton_adj = gtk_adjustment_new (0.10000000149, -1000, 1000, 9.99999974738e-06, 10, 0);
+  frequency_step_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (frequency_step_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (frequency_step_spinbutton);
+  gtk_table_attach (GTK_TABLE (table26), frequency_step_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (frequency_step_spinbutton), TRUE);
+
+  label170 = gtk_label_new (_("Start Frequency (MHz)"));
+  gtk_widget_show (label170);
+  gtk_table_attach (GTK_TABLE (table26), label170, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label170), 0.1, 0.5);
+
+  label171 = gtk_label_new (_("End Frequency (MHz)"));
+  gtk_widget_show (label171);
+  gtk_table_attach (GTK_TABLE (table26), label171, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label171), 0.1, 0.5);
+
+  frequency_start_spinbutton_adj = gtk_adjustment_new (50, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
+  frequency_start_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (frequency_start_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (frequency_start_spinbutton);
+  gtk_table_attach (GTK_TABLE (table26), frequency_start_spinbutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (frequency_start_spinbutton), TRUE);
+
+  frequency_end_spinbutton_adj = gtk_adjustment_new (100, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
+  frequency_end_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (frequency_end_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (frequency_end_spinbutton);
+  gtk_table_attach (GTK_TABLE (table26), frequency_end_spinbutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (frequency_end_spinbutton), TRUE);
+
+  label166 = gtk_label_new (_("Frequency Stepping Parameters"));
+  gtk_widget_show (label166);
+  gtk_frame_set_label_widget (GTK_FRAME (frame38), label166);
+  gtk_misc_set_padding (GTK_MISC (label166), 4, 4);
+
+  hbox40 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox40);
+  gtk_box_pack_start (GTK_BOX (vbox21), hbox40, FALSE, FALSE, 0);
+
+  frequency_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (frequency_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox40), frequency_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frequency_new_button), 2);
+
+  frequency_cancel_button = gtk_button_new ();
+  gtk_widget_show (frequency_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox40), frequency_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frequency_cancel_button), 2);
+
+  alignment65 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment65);
+  gtk_container_add (GTK_CONTAINER (frequency_cancel_button), alignment65);
+
+  hbox63 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox63);
+  gtk_container_add (GTK_CONTAINER (alignment65), hbox63);
+
+  image85 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image85);
+  gtk_box_pack_start (GTK_BOX (hbox63), image85, FALSE, FALSE, 0);
+
+  label237 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label237);
+  gtk_box_pack_start (GTK_BOX (hbox63), label237, FALSE, FALSE, 0);
+
+  frequency_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (frequency_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox40), frequency_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frequency_apply_button), 2);
+
+  frequency_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (frequency_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox40), frequency_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frequency_ok_button), 2);
+
+  g_signal_connect ((gpointer) frequency_command, "destroy",
+                    G_CALLBACK (on_frequency_command_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) frequency_add_radiobutton, "toggled",
+                    G_CALLBACK (on_frequency_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) frequency_mul_radiobutton, "toggled",
+                    G_CALLBACK (on_frequency_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) frequency_num_spinbutton, "value_changed",
+                    G_CALLBACK (on_frequency_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) frequency_step_spinbutton, "value_changed",
+                    G_CALLBACK (on_frequency_step_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) frequency_start_spinbutton, "value_changed",
+                    G_CALLBACK (on_frequency_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) frequency_end_spinbutton, "value_changed",
+                    G_CALLBACK (on_frequency_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) frequency_new_button, "clicked",
+                    G_CALLBACK (on_frequency_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) frequency_cancel_button, "clicked",
+                    G_CALLBACK (on_frequency_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) frequency_apply_button, "clicked",
+                    G_CALLBACK (on_frequency_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) frequency_ok_button, "clicked",
+                    G_CALLBACK (on_frequency_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (frequency_command, frequency_command, "frequency_command");
+  GLADE_HOOKUP_OBJECT (frequency_command, vbox21, "vbox21");
+  GLADE_HOOKUP_OBJECT (frequency_command, frame37, "frame37");
+  GLADE_HOOKUP_OBJECT (frequency_command, alignment39, "alignment39");
+  GLADE_HOOKUP_OBJECT (frequency_command, hbox41, "hbox41");
+  GLADE_HOOKUP_OBJECT (frequency_command, frequency_add_radiobutton, "frequency_add_radiobutton");
+  GLADE_HOOKUP_OBJECT (frequency_command, frequency_mul_radiobutton, "frequency_mul_radiobutton");
+  GLADE_HOOKUP_OBJECT (frequency_command, label165, "label165");
+  GLADE_HOOKUP_OBJECT (frequency_command, frame38, "frame38");
+  GLADE_HOOKUP_OBJECT (frequency_command, alignment40, "alignment40");
+  GLADE_HOOKUP_OBJECT (frequency_command, table26, "table26");
+  GLADE_HOOKUP_OBJECT (frequency_command, label167, "label167");
+  GLADE_HOOKUP_OBJECT (frequency_command, label168, "label168");
+  GLADE_HOOKUP_OBJECT (frequency_command, frequency_num_spinbutton, "frequency_num_spinbutton");
+  GLADE_HOOKUP_OBJECT (frequency_command, frequency_step_spinbutton, "frequency_step_spinbutton");
+  GLADE_HOOKUP_OBJECT (frequency_command, label170, "label170");
+  GLADE_HOOKUP_OBJECT (frequency_command, label171, "label171");
+  GLADE_HOOKUP_OBJECT (frequency_command, frequency_start_spinbutton, "frequency_start_spinbutton");
+  GLADE_HOOKUP_OBJECT (frequency_command, frequency_end_spinbutton, "frequency_end_spinbutton");
+  GLADE_HOOKUP_OBJECT (frequency_command, label166, "label166");
+  GLADE_HOOKUP_OBJECT (frequency_command, hbox40, "hbox40");
+  GLADE_HOOKUP_OBJECT (frequency_command, frequency_new_button, "frequency_new_button");
+  GLADE_HOOKUP_OBJECT (frequency_command, frequency_cancel_button, "frequency_cancel_button");
+  GLADE_HOOKUP_OBJECT (frequency_command, alignment65, "alignment65");
+  GLADE_HOOKUP_OBJECT (frequency_command, hbox63, "hbox63");
+  GLADE_HOOKUP_OBJECT (frequency_command, image85, "image85");
+  GLADE_HOOKUP_OBJECT (frequency_command, label237, "label237");
+  GLADE_HOOKUP_OBJECT (frequency_command, frequency_apply_button, "frequency_apply_button");
+  GLADE_HOOKUP_OBJECT (frequency_command, frequency_ok_button, "frequency_ok_button");
+
+  return frequency_command;
+}
+
+GtkWidget*
+create_loading_command (void)
+{
+  GtkWidget *loading_command;
+  GtkWidget *vbox22;
+  GtkWidget *frame39;
+  GtkWidget *alignment41;
+  GtkWidget *table27;
+  GtkWidget *loading_slrlc_radiobutton;
+  GSList *loading_slrlc_radiobutton_group = NULL;
+  GtkWidget *loading_pdrlc_radiobutton;
+  GtkWidget *loading_rr_radiobutton;
+  GtkWidget *loading_plrlc_radiobutton;
+  GtkWidget *loading_sdrlc_radiobutton;
+  GtkWidget *loading_wcon_radiobutton;
+  GtkWidget *loading_null_radiobutton;
+  GtkWidget *label172;
+  GtkWidget *loading_frame;
+  GtkWidget *alignment42;
+  GtkWidget *table28;
+  GtkWidget *loading_i2_label;
+  GtkWidget *loading_i3_label;
+  GtkWidget *loading_i4_label;
+  GtkWidget *loading_f1_label;
+  GtkWidget *loading_f2_label;
+  GtkWidget *loading_f3_label;
+  GtkObject *loading_f1_spinbutton_adj;
+  GtkWidget *loading_f1_spinbutton;
+  GtkObject *loading_i2_spinbutton_adj;
+  GtkWidget *loading_i2_spinbutton;
+  GtkObject *loading_i3_spinbutton_adj;
+  GtkWidget *loading_i3_spinbutton;
+  GtkObject *loading_i4_spinbutton_adj;
+  GtkWidget *loading_i4_spinbutton;
+  GtkObject *loading_f2_spinbutton_adj;
+  GtkWidget *loading_f2_spinbutton;
+  GtkObject *loading_f3_spinbutton_adj;
+  GtkWidget *loading_f3_spinbutton;
+  GtkWidget *label173;
+  GtkWidget *hbox42;
+  GtkWidget *loading_new_button;
+  GtkWidget *loading_cancel_button;
+  GtkWidget *alignment66;
+  GtkWidget *hbox64;
+  GtkWidget *image86;
+  GtkWidget *label238;
+  GtkWidget *loading_apply_button;
+  GtkWidget *loading_ok_button;
+
+  loading_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (loading_command), 4);
+  gtk_window_set_title (GTK_WINDOW (loading_command), _("Loading Command (LD Card)"));
+
+  vbox22 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox22);
+  gtk_container_add (GTK_CONTAINER (loading_command), vbox22);
+
+  frame39 = gtk_frame_new (NULL);
+  gtk_widget_show (frame39);
+  gtk_box_pack_start (GTK_BOX (vbox22), frame39, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame39), 4);
+
+  alignment41 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment41);
+  gtk_container_add (GTK_CONTAINER (frame39), alignment41);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment41), 0, 0, 12, 0);
+
+  table27 = gtk_table_new (3, 3, FALSE);
+  gtk_widget_show (table27);
+  gtk_container_add (GTK_CONTAINER (alignment41), table27);
+
+  loading_slrlc_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Series, Lumped"));
+  gtk_widget_show (loading_slrlc_radiobutton);
+  gtk_table_attach (GTK_TABLE (table27), loading_slrlc_radiobutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (loading_slrlc_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_slrlc_radiobutton), loading_slrlc_radiobutton_group);
+  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_slrlc_radiobutton));
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (loading_slrlc_radiobutton), TRUE);
+
+  loading_pdrlc_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Parallel, Distributed"));
+  gtk_widget_show (loading_pdrlc_radiobutton);
+  gtk_table_attach (GTK_TABLE (table27), loading_pdrlc_radiobutton, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (loading_pdrlc_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_pdrlc_radiobutton), loading_slrlc_radiobutton_group);
+  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_pdrlc_radiobutton));
+
+  loading_rr_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Resistance & Reactance"));
+  gtk_widget_show (loading_rr_radiobutton);
+  gtk_table_attach (GTK_TABLE (table27), loading_rr_radiobutton, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (loading_rr_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_rr_radiobutton), loading_slrlc_radiobutton_group);
+  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_rr_radiobutton));
+
+  loading_plrlc_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Parallel, Lumped"));
+  gtk_widget_show (loading_plrlc_radiobutton);
+  gtk_table_attach (GTK_TABLE (table27), loading_plrlc_radiobutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (loading_plrlc_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_plrlc_radiobutton), loading_slrlc_radiobutton_group);
+  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_plrlc_radiobutton));
+
+  loading_sdrlc_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Series, Distributed"));
+  gtk_widget_show (loading_sdrlc_radiobutton);
+  gtk_table_attach (GTK_TABLE (table27), loading_sdrlc_radiobutton, 2, 3, 1, 2,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (loading_sdrlc_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_sdrlc_radiobutton), loading_slrlc_radiobutton_group);
+  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_sdrlc_radiobutton));
+
+  loading_wcon_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Wire Conductivity"));
+  gtk_widget_show (loading_wcon_radiobutton);
+  gtk_table_attach (GTK_TABLE (table27), loading_wcon_radiobutton, 2, 3, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (loading_wcon_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_wcon_radiobutton), loading_slrlc_radiobutton_group);
+  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_wcon_radiobutton));
+
+  loading_null_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Short all Loads (Nulls previous Loading Cards)"));
+  gtk_widget_show (loading_null_radiobutton);
+  gtk_table_attach (GTK_TABLE (table27), loading_null_radiobutton, 0, 3, 0, 1,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (loading_null_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (loading_null_radiobutton), loading_slrlc_radiobutton_group);
+  loading_slrlc_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (loading_null_radiobutton));
+
+  label172 = gtk_label_new (_("Loading Type"));
+  gtk_widget_show (label172);
+  gtk_frame_set_label_widget (GTK_FRAME (frame39), label172);
+  gtk_misc_set_padding (GTK_MISC (label172), 4, 4);
+
+  loading_frame = gtk_frame_new (NULL);
+  gtk_widget_show (loading_frame);
+  gtk_box_pack_start (GTK_BOX (vbox22), loading_frame, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (loading_frame), 4);
+
+  alignment42 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment42);
+  gtk_container_add (GTK_CONTAINER (loading_frame), alignment42);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment42), 0, 0, 12, 0);
+
+  table28 = gtk_table_new (4, 3, FALSE);
+  gtk_widget_show (table28);
+  gtk_container_add (GTK_CONTAINER (alignment42), table28);
+
+  loading_i2_label = gtk_label_new (_("Load Tag Number"));
+  gtk_widget_show (loading_i2_label);
+  gtk_table_attach (GTK_TABLE (table28), loading_i2_label, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (loading_i2_label), 0.1, 0.5);
+
+  loading_i3_label = gtk_label_new (_("From Segment #"));
+  gtk_widget_show (loading_i3_label);
+  gtk_table_attach (GTK_TABLE (table28), loading_i3_label, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (loading_i3_label), 0.1, 0.5);
+
+  loading_i4_label = gtk_label_new (_("To Segment #"));
+  gtk_widget_show (loading_i4_label);
+  gtk_table_attach (GTK_TABLE (table28), loading_i4_label, 2, 3, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (loading_i4_label), 0.1, 0.5);
+
+  loading_f1_label = gtk_label_new (_("Resistance"));
+  gtk_widget_show (loading_f1_label);
+  gtk_table_attach (GTK_TABLE (table28), loading_f1_label, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (loading_f1_label), 0.1, 0.5);
+
+  loading_f2_label = gtk_label_new (_("Inductance"));
+  gtk_widget_show (loading_f2_label);
+  gtk_table_attach (GTK_TABLE (table28), loading_f2_label, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (loading_f2_label), 0.1, 0.5);
+
+  loading_f3_label = gtk_label_new (_("Capacitance"));
+  gtk_widget_show (loading_f3_label);
+  gtk_table_attach (GTK_TABLE (table28), loading_f3_label, 2, 3, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (loading_f3_label), 0.1, 0.5);
+
+  loading_f1_spinbutton_adj = gtk_adjustment_new (1, 0, 1000000000, 9.99999974738e-06, 10, 0);
+  loading_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_f1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (loading_f1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table28), loading_f1_spinbutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_f1_spinbutton), TRUE);
+
+  loading_i2_spinbutton_adj = gtk_adjustment_new (1, 0, 10000, 1, 10, 0);
+  loading_i2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_i2_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (loading_i2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table28), loading_i2_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_i2_spinbutton), TRUE);
+
+  loading_i3_spinbutton_adj = gtk_adjustment_new (2, 0, 10000, 1, 10, 0);
+  loading_i3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_i3_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (loading_i3_spinbutton);
+  gtk_table_attach (GTK_TABLE (table28), loading_i3_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_i3_spinbutton), TRUE);
+
+  loading_i4_spinbutton_adj = gtk_adjustment_new (3, 0, 10000, 1, 10, 0);
+  loading_i4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_i4_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (loading_i4_spinbutton);
+  gtk_table_attach (GTK_TABLE (table28), loading_i4_spinbutton, 2, 3, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_i4_spinbutton), TRUE);
+
+  loading_f2_spinbutton_adj = gtk_adjustment_new (1, -1000000, 1000000, 9.99999974738e-06, 10, 0);
+  loading_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_f2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (loading_f2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table28), loading_f2_spinbutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_f2_spinbutton), TRUE);
+
+  loading_f3_spinbutton_adj = gtk_adjustment_new (1, 0, 1000000000, 9.99999974738e-06, 10, 0);
+  loading_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (loading_f3_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (loading_f3_spinbutton);
+  gtk_table_attach (GTK_TABLE (table28), loading_f3_spinbutton, 2, 3, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (loading_f3_spinbutton), TRUE);
+
+  label173 = gtk_label_new (_("Loading Parameters"));
+  gtk_widget_show (label173);
+  gtk_frame_set_label_widget (GTK_FRAME (loading_frame), label173);
+  gtk_misc_set_padding (GTK_MISC (label173), 4, 4);
+
+  hbox42 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox42);
+  gtk_box_pack_start (GTK_BOX (vbox22), hbox42, TRUE, TRUE, 0);
+
+  loading_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (loading_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox42), loading_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (loading_new_button), 2);
+
+  loading_cancel_button = gtk_button_new ();
+  gtk_widget_show (loading_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox42), loading_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (loading_cancel_button), 2);
+
+  alignment66 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment66);
+  gtk_container_add (GTK_CONTAINER (loading_cancel_button), alignment66);
+
+  hbox64 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox64);
+  gtk_container_add (GTK_CONTAINER (alignment66), hbox64);
+
+  image86 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image86);
+  gtk_box_pack_start (GTK_BOX (hbox64), image86, FALSE, FALSE, 0);
+
+  label238 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label238);
+  gtk_box_pack_start (GTK_BOX (hbox64), label238, FALSE, FALSE, 0);
+
+  loading_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (loading_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox42), loading_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (loading_apply_button), 2);
+
+  loading_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (loading_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox42), loading_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (loading_ok_button), 2);
+
+  g_signal_connect ((gpointer) loading_command, "destroy",
+                    G_CALLBACK (on_loading_command_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) loading_slrlc_radiobutton, "toggled",
+                    G_CALLBACK (on_loading_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) loading_pdrlc_radiobutton, "toggled",
+                    G_CALLBACK (on_loading_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) loading_rr_radiobutton, "toggled",
+                    G_CALLBACK (on_loading_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) loading_plrlc_radiobutton, "toggled",
+                    G_CALLBACK (on_loading_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) loading_sdrlc_radiobutton, "toggled",
+                    G_CALLBACK (on_loading_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) loading_wcon_radiobutton, "toggled",
+                    G_CALLBACK (on_loading_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) loading_null_radiobutton, "toggled",
+                    G_CALLBACK (on_loading_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) loading_f1_spinbutton, "value_changed",
+                    G_CALLBACK (on_loading_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) loading_i2_spinbutton, "value_changed",
+                    G_CALLBACK (on_loading_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) loading_i3_spinbutton, "value_changed",
+                    G_CALLBACK (on_loading_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) loading_i4_spinbutton, "value_changed",
+                    G_CALLBACK (on_loading_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) loading_f2_spinbutton, "value_changed",
+                    G_CALLBACK (on_loading_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) loading_f3_spinbutton, "value_changed",
+                    G_CALLBACK (on_loading_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) loading_new_button, "clicked",
+                    G_CALLBACK (on_loading_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) loading_cancel_button, "clicked",
+                    G_CALLBACK (on_loading_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) loading_apply_button, "clicked",
+                    G_CALLBACK (on_loading_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) loading_ok_button, "clicked",
+                    G_CALLBACK (on_loading_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (loading_command, loading_command, "loading_command");
+  GLADE_HOOKUP_OBJECT (loading_command, vbox22, "vbox22");
+  GLADE_HOOKUP_OBJECT (loading_command, frame39, "frame39");
+  GLADE_HOOKUP_OBJECT (loading_command, alignment41, "alignment41");
+  GLADE_HOOKUP_OBJECT (loading_command, table27, "table27");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_slrlc_radiobutton, "loading_slrlc_radiobutton");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_pdrlc_radiobutton, "loading_pdrlc_radiobutton");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_rr_radiobutton, "loading_rr_radiobutton");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_plrlc_radiobutton, "loading_plrlc_radiobutton");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_sdrlc_radiobutton, "loading_sdrlc_radiobutton");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_wcon_radiobutton, "loading_wcon_radiobutton");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_null_radiobutton, "loading_null_radiobutton");
+  GLADE_HOOKUP_OBJECT (loading_command, label172, "label172");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_frame, "loading_frame");
+  GLADE_HOOKUP_OBJECT (loading_command, alignment42, "alignment42");
+  GLADE_HOOKUP_OBJECT (loading_command, table28, "table28");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_i2_label, "loading_i2_label");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_i3_label, "loading_i3_label");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_i4_label, "loading_i4_label");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_f1_label, "loading_f1_label");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_f2_label, "loading_f2_label");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_f3_label, "loading_f3_label");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_f1_spinbutton, "loading_f1_spinbutton");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_i2_spinbutton, "loading_i2_spinbutton");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_i3_spinbutton, "loading_i3_spinbutton");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_i4_spinbutton, "loading_i4_spinbutton");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_f2_spinbutton, "loading_f2_spinbutton");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_f3_spinbutton, "loading_f3_spinbutton");
+  GLADE_HOOKUP_OBJECT (loading_command, label173, "label173");
+  GLADE_HOOKUP_OBJECT (loading_command, hbox42, "hbox42");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_new_button, "loading_new_button");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_cancel_button, "loading_cancel_button");
+  GLADE_HOOKUP_OBJECT (loading_command, alignment66, "alignment66");
+  GLADE_HOOKUP_OBJECT (loading_command, hbox64, "hbox64");
+  GLADE_HOOKUP_OBJECT (loading_command, image86, "image86");
+  GLADE_HOOKUP_OBJECT (loading_command, label238, "label238");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_apply_button, "loading_apply_button");
+  GLADE_HOOKUP_OBJECT (loading_command, loading_ok_button, "loading_ok_button");
+
+  return loading_command;
+}
+
+GtkWidget*
+create_network_command (void)
+{
+  GtkWidget *network_command;
+  GtkWidget *vbox23;
+  GtkWidget *frame41;
+  GtkWidget *alignment43;
+  GtkWidget *table29;
+  GtkWidget *label184;
+  GtkObject *network_i4_spinbutton_adj;
+  GtkWidget *network_i4_spinbutton;
+  GtkObject *network_i1_spinbutton_adj;
+  GtkWidget *network_i1_spinbutton;
+  GtkObject *network_i2_spinbutton_adj;
+  GtkWidget *network_i2_spinbutton;
+  GtkWidget *label183;
+  GtkWidget *label182;
+  GtkWidget *label185;
+  GtkObject *network_i3_spinbutton_adj;
+  GtkWidget *network_i3_spinbutton;
+  GtkWidget *label180;
+  GtkWidget *frame42;
+  GtkWidget *alignment44;
+  GtkWidget *table30;
+  GtkWidget *label186;
+  GtkWidget *label187;
+  GtkWidget *label189;
+  GtkWidget *label190;
+  GtkObject *network_f3_spinbutton_adj;
+  GtkWidget *network_f3_spinbutton;
+  GtkObject *network_f4_spinbutton_adj;
+  GtkWidget *network_f4_spinbutton;
+  GtkWidget *label191;
+  GtkWidget *label192;
+  GtkObject *network_f1_spinbutton_adj;
+  GtkWidget *network_f1_spinbutton;
+  GtkObject *network_f2_spinbutton_adj;
+  GtkWidget *network_f2_spinbutton;
+  GtkObject *network_f6_spinbutton_adj;
+  GtkWidget *network_f6_spinbutton;
+  GtkObject *network_f5_spinbutton_adj;
+  GtkWidget *network_f5_spinbutton;
+  GtkWidget *label181;
+  GtkWidget *hbox43;
+  GtkWidget *network_new_button;
+  GtkWidget *network_cancel_button;
+  GtkWidget *alignment67;
+  GtkWidget *hbox65;
+  GtkWidget *image87;
+  GtkWidget *label239;
+  GtkWidget *network_apply_button;
+  GtkWidget *network_ok_button;
+
+  network_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (network_command), 4);
+  gtk_window_set_title (GTK_WINDOW (network_command), _("Network Command (NT Card)"));
+
+  vbox23 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox23);
+  gtk_container_add (GTK_CONTAINER (network_command), vbox23);
+
+  frame41 = gtk_frame_new (NULL);
+  gtk_widget_show (frame41);
+  gtk_box_pack_start (GTK_BOX (vbox23), frame41, TRUE, TRUE, 0);
+
+  alignment43 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment43);
+  gtk_container_add (GTK_CONTAINER (frame41), alignment43);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment43), 0, 0, 12, 0);
+
+  table29 = gtk_table_new (4, 2, FALSE);
+  gtk_widget_show (table29);
+  gtk_container_add (GTK_CONTAINER (alignment43), table29);
+
+  label184 = gtk_label_new (_("Tag Number, Port 2  "));
+  gtk_widget_show (label184);
+  gtk_table_attach (GTK_TABLE (table29), label184, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label184), 0.1, 0.5);
+
+  network_i4_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
+  network_i4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_i4_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (network_i4_spinbutton);
+  gtk_table_attach (GTK_TABLE (table29), network_i4_spinbutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_i4_spinbutton), TRUE);
+
+  network_i1_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
+  network_i1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_i1_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (network_i1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table29), network_i1_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_i1_spinbutton), TRUE);
+
+  network_i2_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
+  network_i2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_i2_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (network_i2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table29), network_i2_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_i2_spinbutton), TRUE);
+
+  label183 = gtk_label_new (_("Segment Num, Port 1"));
+  gtk_widget_show (label183);
+  gtk_table_attach (GTK_TABLE (table29), label183, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label183), 0.1, 0.5);
+
+  label182 = gtk_label_new (_("Tag Number, Port 1  "));
+  gtk_widget_show (label182);
+  gtk_table_attach (GTK_TABLE (table29), label182, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label182), 0.1, 0.5);
+
+  label185 = gtk_label_new (_("Segment Num, Port 2"));
+  gtk_widget_show (label185);
+  gtk_table_attach (GTK_TABLE (table29), label185, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label185), 0.1, 0.5);
+
+  network_i3_spinbutton_adj = gtk_adjustment_new (2, 1, 10000, 1, 10, 0);
+  network_i3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_i3_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (network_i3_spinbutton);
+  gtk_table_attach (GTK_TABLE (table29), network_i3_spinbutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_i3_spinbutton), TRUE);
+
+  label180 = gtk_label_new (_("Segment Identity"));
+  gtk_widget_show (label180);
+  gtk_frame_set_label_widget (GTK_FRAME (frame41), label180);
+  gtk_misc_set_padding (GTK_MISC (label180), 4, 4);
+
+  frame42 = gtk_frame_new (NULL);
+  gtk_widget_show (frame42);
+  gtk_box_pack_start (GTK_BOX (vbox23), frame42, TRUE, TRUE, 0);
+
+  alignment44 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment44);
+  gtk_container_add (GTK_CONTAINER (frame42), alignment44);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment44), 0, 0, 12, 0);
+
+  table30 = gtk_table_new (6, 2, FALSE);
+  gtk_widget_show (table30);
+  gtk_container_add (GTK_CONTAINER (alignment44), table30);
+
+  label186 = gtk_label_new (_("Element 1,1 Real Part"));
+  gtk_widget_show (label186);
+  gtk_table_attach (GTK_TABLE (table30), label186, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label186), 0.1, 0.5);
+
+  label187 = gtk_label_new (_("Element 1,1 Imag Part"));
+  gtk_widget_show (label187);
+  gtk_table_attach (GTK_TABLE (table30), label187, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label187), 0.1, 0.5);
+
+  label189 = gtk_label_new (_("Element 1,2 Real Part"));
+  gtk_widget_show (label189);
+  gtk_table_attach (GTK_TABLE (table30), label189, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label189), 0.1, 0.5);
+
+  label190 = gtk_label_new (_("Element 1,2 Imag Part"));
+  gtk_widget_show (label190);
+  gtk_table_attach (GTK_TABLE (table30), label190, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label190), 0.1, 0.5);
+
+  network_f3_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
+  network_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f3_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (network_f3_spinbutton);
+  gtk_table_attach (GTK_TABLE (table30), network_f3_spinbutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f3_spinbutton), TRUE);
+
+  network_f4_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
+  network_f4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f4_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (network_f4_spinbutton);
+  gtk_table_attach (GTK_TABLE (table30), network_f4_spinbutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f4_spinbutton), TRUE);
+
+  label191 = gtk_label_new (_("Element 2,2 Real Part"));
+  gtk_widget_show (label191);
+  gtk_table_attach (GTK_TABLE (table30), label191, 0, 1, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label191), 0.1, 0.5);
+
+  label192 = gtk_label_new (_("Element 2,2 Imag Part"));
+  gtk_widget_show (label192);
+  gtk_table_attach (GTK_TABLE (table30), label192, 1, 2, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label192), 0.1, 0.5);
+
+  network_f1_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
+  network_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (network_f1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table30), network_f1_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f1_spinbutton), TRUE);
+
+  network_f2_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
+  network_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (network_f2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table30), network_f2_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f2_spinbutton), TRUE);
+
+  network_f6_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
+  network_f6_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f6_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (network_f6_spinbutton);
+  gtk_table_attach (GTK_TABLE (table30), network_f6_spinbutton, 1, 2, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f6_spinbutton), TRUE);
+
+  network_f5_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
+  network_f5_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (network_f5_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (network_f5_spinbutton);
+  gtk_table_attach (GTK_TABLE (table30), network_f5_spinbutton, 0, 1, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (network_f5_spinbutton), TRUE);
+
+  label181 = gtk_label_new (_("Admittance Matrix Elements"));
+  gtk_widget_show (label181);
+  gtk_frame_set_label_widget (GTK_FRAME (frame42), label181);
+  gtk_misc_set_padding (GTK_MISC (label181), 4, 4);
+
+  hbox43 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox43);
+  gtk_box_pack_start (GTK_BOX (vbox23), hbox43, TRUE, TRUE, 0);
+
+  network_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (network_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox43), network_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (network_new_button), 2);
+
+  network_cancel_button = gtk_button_new ();
+  gtk_widget_show (network_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox43), network_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (network_cancel_button), 2);
+
+  alignment67 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment67);
+  gtk_container_add (GTK_CONTAINER (network_cancel_button), alignment67);
+
+  hbox65 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox65);
+  gtk_container_add (GTK_CONTAINER (alignment67), hbox65);
+
+  image87 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image87);
+  gtk_box_pack_start (GTK_BOX (hbox65), image87, FALSE, FALSE, 0);
+
+  label239 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label239);
+  gtk_box_pack_start (GTK_BOX (hbox65), label239, FALSE, FALSE, 0);
+
+  network_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (network_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox43), network_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (network_apply_button), 2);
+
+  network_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (network_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox43), network_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (network_ok_button), 2);
+
+  g_signal_connect ((gpointer) network_command, "destroy",
+                    G_CALLBACK (on_network_command_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) network_i4_spinbutton, "value_changed",
+                    G_CALLBACK (on_network_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) network_i1_spinbutton, "value_changed",
+                    G_CALLBACK (on_network_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) network_i2_spinbutton, "value_changed",
+                    G_CALLBACK (on_network_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) network_i3_spinbutton, "value_changed",
+                    G_CALLBACK (on_network_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) network_f3_spinbutton, "value_changed",
+                    G_CALLBACK (on_network_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) network_f4_spinbutton, "value_changed",
+                    G_CALLBACK (on_network_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) network_f1_spinbutton, "value_changed",
+                    G_CALLBACK (on_network_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) network_f2_spinbutton, "value_changed",
+                    G_CALLBACK (on_network_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) network_f6_spinbutton, "value_changed",
+                    G_CALLBACK (on_network_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) network_f5_spinbutton, "value_changed",
+                    G_CALLBACK (on_network_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) network_new_button, "clicked",
+                    G_CALLBACK (on_network_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) network_cancel_button, "clicked",
+                    G_CALLBACK (on_network_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) network_apply_button, "clicked",
+                    G_CALLBACK (on_network_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) network_ok_button, "clicked",
+                    G_CALLBACK (on_network_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (network_command, network_command, "network_command");
+  GLADE_HOOKUP_OBJECT (network_command, vbox23, "vbox23");
+  GLADE_HOOKUP_OBJECT (network_command, frame41, "frame41");
+  GLADE_HOOKUP_OBJECT (network_command, alignment43, "alignment43");
+  GLADE_HOOKUP_OBJECT (network_command, table29, "table29");
+  GLADE_HOOKUP_OBJECT (network_command, label184, "label184");
+  GLADE_HOOKUP_OBJECT (network_command, network_i4_spinbutton, "network_i4_spinbutton");
+  GLADE_HOOKUP_OBJECT (network_command, network_i1_spinbutton, "network_i1_spinbutton");
+  GLADE_HOOKUP_OBJECT (network_command, network_i2_spinbutton, "network_i2_spinbutton");
+  GLADE_HOOKUP_OBJECT (network_command, label183, "label183");
+  GLADE_HOOKUP_OBJECT (network_command, label182, "label182");
+  GLADE_HOOKUP_OBJECT (network_command, label185, "label185");
+  GLADE_HOOKUP_OBJECT (network_command, network_i3_spinbutton, "network_i3_spinbutton");
+  GLADE_HOOKUP_OBJECT (network_command, label180, "label180");
+  GLADE_HOOKUP_OBJECT (network_command, frame42, "frame42");
+  GLADE_HOOKUP_OBJECT (network_command, alignment44, "alignment44");
+  GLADE_HOOKUP_OBJECT (network_command, table30, "table30");
+  GLADE_HOOKUP_OBJECT (network_command, label186, "label186");
+  GLADE_HOOKUP_OBJECT (network_command, label187, "label187");
+  GLADE_HOOKUP_OBJECT (network_command, label189, "label189");
+  GLADE_HOOKUP_OBJECT (network_command, label190, "label190");
+  GLADE_HOOKUP_OBJECT (network_command, network_f3_spinbutton, "network_f3_spinbutton");
+  GLADE_HOOKUP_OBJECT (network_command, network_f4_spinbutton, "network_f4_spinbutton");
+  GLADE_HOOKUP_OBJECT (network_command, label191, "label191");
+  GLADE_HOOKUP_OBJECT (network_command, label192, "label192");
+  GLADE_HOOKUP_OBJECT (network_command, network_f1_spinbutton, "network_f1_spinbutton");
+  GLADE_HOOKUP_OBJECT (network_command, network_f2_spinbutton, "network_f2_spinbutton");
+  GLADE_HOOKUP_OBJECT (network_command, network_f6_spinbutton, "network_f6_spinbutton");
+  GLADE_HOOKUP_OBJECT (network_command, network_f5_spinbutton, "network_f5_spinbutton");
+  GLADE_HOOKUP_OBJECT (network_command, label181, "label181");
+  GLADE_HOOKUP_OBJECT (network_command, hbox43, "hbox43");
+  GLADE_HOOKUP_OBJECT (network_command, network_new_button, "network_new_button");
+  GLADE_HOOKUP_OBJECT (network_command, network_cancel_button, "network_cancel_button");
+  GLADE_HOOKUP_OBJECT (network_command, alignment67, "alignment67");
+  GLADE_HOOKUP_OBJECT (network_command, hbox65, "hbox65");
+  GLADE_HOOKUP_OBJECT (network_command, image87, "image87");
+  GLADE_HOOKUP_OBJECT (network_command, label239, "label239");
+  GLADE_HOOKUP_OBJECT (network_command, network_apply_button, "network_apply_button");
+  GLADE_HOOKUP_OBJECT (network_command, network_ok_button, "network_ok_button");
+
+  return network_command;
+}
+
+GtkWidget*
+create_txline_command (void)
+{
+  GtkWidget *txline_command;
+  GtkWidget *vbox24;
+  GtkWidget *frame43;
+  GtkWidget *alignment45;
+  GtkWidget *table31;
+  GtkObject *txline_i4_spinbutton_adj;
+  GtkWidget *txline_i4_spinbutton;
+  GtkObject *txline_i1_spinbutton_adj;
+  GtkWidget *txline_i1_spinbutton;
+  GtkObject *txline_i2_spinbutton_adj;
+  GtkWidget *txline_i2_spinbutton;
+  GtkWidget *label194;
+  GtkWidget *label195;
+  GtkWidget *label196;
+  GtkObject *txline_i3_spinbutton_adj;
+  GtkWidget *txline_i3_spinbutton;
+  GtkWidget *label193;
+  GtkWidget *label197;
+  GtkWidget *frame44;
+  GtkWidget *alignment46;
+  GtkWidget *table32;
+  GtkWidget *label198;
+  GtkWidget *label199;
+  GtkWidget *label200;
+  GtkWidget *label201;
+  GtkObject *txline_f3_spinbutton_adj;
+  GtkWidget *txline_f3_spinbutton;
+  GtkObject *txline_f4_spinbutton_adj;
+  GtkWidget *txline_f4_spinbutton;
+  GtkWidget *label202;
+  GtkWidget *label203;
+  GtkObject *txline_f1_spinbutton_adj;
+  GtkWidget *txline_f1_spinbutton;
+  GtkObject *txline_f2_spinbutton_adj;
+  GtkWidget *txline_f2_spinbutton;
+  GtkObject *txline_f6_spinbutton_adj;
+  GtkWidget *txline_f6_spinbutton;
+  GtkObject *txline_f5_spinbutton_adj;
+  GtkWidget *txline_f5_spinbutton;
+  GtkWidget *txline_crossed_checkbutton;
+  GtkWidget *hbox44;
+  GtkWidget *txline_new_button;
+  GtkWidget *txline_cancel_button;
+  GtkWidget *alignment68;
+  GtkWidget *hbox66;
+  GtkWidget *image88;
+  GtkWidget *label240;
+  GtkWidget *txline_apply_button;
+  GtkWidget *txline_ok_button;
+
+  txline_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (txline_command), 4);
+  gtk_window_set_title (GTK_WINDOW (txline_command), _("Trans. Line Command (TL Card)"));
+
+  vbox24 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox24);
+  gtk_container_add (GTK_CONTAINER (txline_command), vbox24);
+
+  frame43 = gtk_frame_new (NULL);
+  gtk_widget_show (frame43);
+  gtk_box_pack_start (GTK_BOX (vbox24), frame43, TRUE, TRUE, 0);
+
+  alignment45 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment45);
+  gtk_container_add (GTK_CONTAINER (frame43), alignment45);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment45), 0, 0, 12, 0);
+
+  table31 = gtk_table_new (4, 2, FALSE);
+  gtk_widget_show (table31);
+  gtk_container_add (GTK_CONTAINER (alignment45), table31);
+
+  txline_i4_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
+  txline_i4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_i4_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (txline_i4_spinbutton);
+  gtk_table_attach (GTK_TABLE (table31), txline_i4_spinbutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_i4_spinbutton), TRUE);
+
+  txline_i1_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
+  txline_i1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_i1_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (txline_i1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table31), txline_i1_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_i1_spinbutton), TRUE);
+
+  txline_i2_spinbutton_adj = gtk_adjustment_new (1, 1, 10000, 1, 10, 0);
+  txline_i2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_i2_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (txline_i2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table31), txline_i2_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_i2_spinbutton), TRUE);
+
+  label194 = gtk_label_new (_("Segment Num, End 1"));
+  gtk_widget_show (label194);
+  gtk_table_attach (GTK_TABLE (table31), label194, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label194), 0.1, 0.5);
+
+  label195 = gtk_label_new (_("Tag Number, End 1  "));
+  gtk_widget_show (label195);
+  gtk_table_attach (GTK_TABLE (table31), label195, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label195), 0.1, 0.5);
+
+  label196 = gtk_label_new (_("Segment Num, End 2"));
+  gtk_widget_show (label196);
+  gtk_table_attach (GTK_TABLE (table31), label196, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label196), 0.1, 0.5);
+
+  txline_i3_spinbutton_adj = gtk_adjustment_new (2, 1, 10000, 1, 10, 0);
+  txline_i3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_i3_spinbutton_adj), 0.00999999977648, 0);
+  gtk_widget_show (txline_i3_spinbutton);
+  gtk_table_attach (GTK_TABLE (table31), txline_i3_spinbutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_i3_spinbutton), TRUE);
+
+  label193 = gtk_label_new (_("Tag Number, End 2  "));
+  gtk_widget_show (label193);
+  gtk_table_attach (GTK_TABLE (table31), label193, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label193), 0.1, 0.5);
+
+  label197 = gtk_label_new (_("Segment Identity"));
+  gtk_widget_show (label197);
+  gtk_frame_set_label_widget (GTK_FRAME (frame43), label197);
+  gtk_misc_set_padding (GTK_MISC (label197), 4, 4);
+
+  frame44 = gtk_frame_new (NULL);
+  gtk_widget_show (frame44);
+  gtk_box_pack_start (GTK_BOX (vbox24), frame44, TRUE, TRUE, 0);
+
+  alignment46 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment46);
+  gtk_container_add (GTK_CONTAINER (frame44), alignment46);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment46), 0, 0, 12, 0);
+
+  table32 = gtk_table_new (6, 2, FALSE);
+  gtk_widget_show (table32);
+  gtk_container_add (GTK_CONTAINER (alignment46), table32);
+
+  label198 = gtk_label_new (_("Characteristic Impedance"));
+  gtk_widget_show (label198);
+  gtk_table_attach (GTK_TABLE (table32), label198, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label198), 0.1, 0.5);
+  gtk_misc_set_padding (GTK_MISC (label198), 4, 0);
+
+  label199 = gtk_label_new (_("Length of Tx Line (m)"));
+  gtk_widget_show (label199);
+  gtk_table_attach (GTK_TABLE (table32), label199, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label199), 0.1, 0.5);
+  gtk_misc_set_padding (GTK_MISC (label199), 4, 0);
+
+  label200 = gtk_label_new (_("End 1 Y Real Part (S)"));
+  gtk_widget_show (label200);
+  gtk_table_attach (GTK_TABLE (table32), label200, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label200), 0.1, 0.5);
+
+  label201 = gtk_label_new (_("End 1 Y Imag Part (S)"));
+  gtk_widget_show (label201);
+  gtk_table_attach (GTK_TABLE (table32), label201, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label201), 0.1, 0.5);
+
+  txline_f3_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
+  txline_f3_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f3_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (txline_f3_spinbutton);
+  gtk_table_attach (GTK_TABLE (table32), txline_f3_spinbutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f3_spinbutton), TRUE);
+
+  txline_f4_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
+  txline_f4_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f4_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (txline_f4_spinbutton);
+  gtk_table_attach (GTK_TABLE (table32), txline_f4_spinbutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f4_spinbutton), TRUE);
+
+  label202 = gtk_label_new (_("End 2 Y Real Part (S)"));
+  gtk_widget_show (label202);
+  gtk_table_attach (GTK_TABLE (table32), label202, 0, 1, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label202), 0.1, 0.5);
+
+  label203 = gtk_label_new (_("End 2 Y Imag Part (S)"));
+  gtk_widget_show (label203);
+  gtk_table_attach (GTK_TABLE (table32), label203, 1, 2, 4, 5,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label203), 0.1, 0.5);
+
+  txline_f1_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
+  txline_f1_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f1_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (txline_f1_spinbutton);
+  gtk_table_attach (GTK_TABLE (table32), txline_f1_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f1_spinbutton), TRUE);
+
+  txline_f2_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
+  txline_f2_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f2_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (txline_f2_spinbutton);
+  gtk_table_attach (GTK_TABLE (table32), txline_f2_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f2_spinbutton), TRUE);
+
+  txline_f6_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
+  txline_f6_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f6_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (txline_f6_spinbutton);
+  gtk_table_attach (GTK_TABLE (table32), txline_f6_spinbutton, 1, 2, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f6_spinbutton), TRUE);
+
+  txline_f5_spinbutton_adj = gtk_adjustment_new (1, -10000, 10000, 9.99999974738e-06, 10, 0);
+  txline_f5_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (txline_f5_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (txline_f5_spinbutton);
+  gtk_table_attach (GTK_TABLE (table32), txline_f5_spinbutton, 0, 1, 5, 6,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (txline_f5_spinbutton), TRUE);
+
+  txline_crossed_checkbutton = gtk_check_button_new_with_mnemonic (_("Crossed Transmission Line"));
+  gtk_widget_show (txline_crossed_checkbutton);
+  gtk_frame_set_label_widget (GTK_FRAME (frame44), txline_crossed_checkbutton);
+  gtk_container_set_border_width (GTK_CONTAINER (txline_crossed_checkbutton), 4);
+
+  hbox44 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox44);
+  gtk_box_pack_start (GTK_BOX (vbox24), hbox44, TRUE, TRUE, 0);
+
+  txline_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (txline_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox44), txline_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (txline_new_button), 2);
+
+  txline_cancel_button = gtk_button_new ();
+  gtk_widget_show (txline_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox44), txline_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (txline_cancel_button), 2);
+
+  alignment68 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment68);
+  gtk_container_add (GTK_CONTAINER (txline_cancel_button), alignment68);
+
+  hbox66 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox66);
+  gtk_container_add (GTK_CONTAINER (alignment68), hbox66);
+
+  image88 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image88);
+  gtk_box_pack_start (GTK_BOX (hbox66), image88, FALSE, FALSE, 0);
+
+  label240 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label240);
+  gtk_box_pack_start (GTK_BOX (hbox66), label240, FALSE, FALSE, 0);
+
+  txline_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (txline_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox44), txline_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (txline_apply_button), 2);
+
+  txline_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (txline_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox44), txline_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (txline_ok_button), 2);
+
+  g_signal_connect ((gpointer) txline_command, "destroy",
+                    G_CALLBACK (on_txline_command_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) txline_i4_spinbutton, "value_changed",
+                    G_CALLBACK (on_txline_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) txline_i1_spinbutton, "value_changed",
+                    G_CALLBACK (on_txline_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) txline_i2_spinbutton, "value_changed",
+                    G_CALLBACK (on_txline_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) txline_i3_spinbutton, "value_changed",
+                    G_CALLBACK (on_txline_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) txline_f3_spinbutton, "value_changed",
+                    G_CALLBACK (on_txline_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) txline_f4_spinbutton, "value_changed",
+                    G_CALLBACK (on_txline_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) txline_f1_spinbutton, "value_changed",
+                    G_CALLBACK (on_txline_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) txline_f2_spinbutton, "value_changed",
+                    G_CALLBACK (on_txline_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) txline_f6_spinbutton, "value_changed",
+                    G_CALLBACK (on_txline_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) txline_f5_spinbutton, "value_changed",
+                    G_CALLBACK (on_txline_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) txline_crossed_checkbutton, "toggled",
+                    G_CALLBACK (on_txline_checkbutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) txline_new_button, "clicked",
+                    G_CALLBACK (on_txline_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) txline_cancel_button, "clicked",
+                    G_CALLBACK (on_txline_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) txline_apply_button, "clicked",
+                    G_CALLBACK (on_txline_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) txline_ok_button, "clicked",
+                    G_CALLBACK (on_txline_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (txline_command, txline_command, "txline_command");
+  GLADE_HOOKUP_OBJECT (txline_command, vbox24, "vbox24");
+  GLADE_HOOKUP_OBJECT (txline_command, frame43, "frame43");
+  GLADE_HOOKUP_OBJECT (txline_command, alignment45, "alignment45");
+  GLADE_HOOKUP_OBJECT (txline_command, table31, "table31");
+  GLADE_HOOKUP_OBJECT (txline_command, txline_i4_spinbutton, "txline_i4_spinbutton");
+  GLADE_HOOKUP_OBJECT (txline_command, txline_i1_spinbutton, "txline_i1_spinbutton");
+  GLADE_HOOKUP_OBJECT (txline_command, txline_i2_spinbutton, "txline_i2_spinbutton");
+  GLADE_HOOKUP_OBJECT (txline_command, label194, "label194");
+  GLADE_HOOKUP_OBJECT (txline_command, label195, "label195");
+  GLADE_HOOKUP_OBJECT (txline_command, label196, "label196");
+  GLADE_HOOKUP_OBJECT (txline_command, txline_i3_spinbutton, "txline_i3_spinbutton");
+  GLADE_HOOKUP_OBJECT (txline_command, label193, "label193");
+  GLADE_HOOKUP_OBJECT (txline_command, label197, "label197");
+  GLADE_HOOKUP_OBJECT (txline_command, frame44, "frame44");
+  GLADE_HOOKUP_OBJECT (txline_command, alignment46, "alignment46");
+  GLADE_HOOKUP_OBJECT (txline_command, table32, "table32");
+  GLADE_HOOKUP_OBJECT (txline_command, label198, "label198");
+  GLADE_HOOKUP_OBJECT (txline_command, label199, "label199");
+  GLADE_HOOKUP_OBJECT (txline_command, label200, "label200");
+  GLADE_HOOKUP_OBJECT (txline_command, label201, "label201");
+  GLADE_HOOKUP_OBJECT (txline_command, txline_f3_spinbutton, "txline_f3_spinbutton");
+  GLADE_HOOKUP_OBJECT (txline_command, txline_f4_spinbutton, "txline_f4_spinbutton");
+  GLADE_HOOKUP_OBJECT (txline_command, label202, "label202");
+  GLADE_HOOKUP_OBJECT (txline_command, label203, "label203");
+  GLADE_HOOKUP_OBJECT (txline_command, txline_f1_spinbutton, "txline_f1_spinbutton");
+  GLADE_HOOKUP_OBJECT (txline_command, txline_f2_spinbutton, "txline_f2_spinbutton");
+  GLADE_HOOKUP_OBJECT (txline_command, txline_f6_spinbutton, "txline_f6_spinbutton");
+  GLADE_HOOKUP_OBJECT (txline_command, txline_f5_spinbutton, "txline_f5_spinbutton");
+  GLADE_HOOKUP_OBJECT (txline_command, txline_crossed_checkbutton, "txline_crossed_checkbutton");
+  GLADE_HOOKUP_OBJECT (txline_command, hbox44, "hbox44");
+  GLADE_HOOKUP_OBJECT (txline_command, txline_new_button, "txline_new_button");
+  GLADE_HOOKUP_OBJECT (txline_command, txline_cancel_button, "txline_cancel_button");
+  GLADE_HOOKUP_OBJECT (txline_command, alignment68, "alignment68");
+  GLADE_HOOKUP_OBJECT (txline_command, hbox66, "hbox66");
+  GLADE_HOOKUP_OBJECT (txline_command, image88, "image88");
+  GLADE_HOOKUP_OBJECT (txline_command, label240, "label240");
+  GLADE_HOOKUP_OBJECT (txline_command, txline_apply_button, "txline_apply_button");
+  GLADE_HOOKUP_OBJECT (txline_command, txline_ok_button, "txline_ok_button");
+
+  return txline_command;
+}
+
+GtkWidget*
+create_ground2_command (void)
+{
+  GtkWidget *ground2_command;
+  GtkWidget *vbox25;
+  GtkWidget *frame45;
+  GtkWidget *alignment47;
+  GtkWidget *table33;
+  GtkWidget *label204;
+  GtkWidget *label205;
+  GtkWidget *label206;
+  GtkWidget *label207;
+  GtkObject *ground2_diel_spinbutton_adj;
+  GtkWidget *ground2_diel_spinbutton;
+  GtkObject *ground2_res_spinbutton_adj;
+  GtkWidget *ground2_res_spinbutton;
+  GtkObject *ground2_below_spinbutton_adj;
+  GtkWidget *ground2_below_spinbutton;
+  GtkObject *ground2_dist_spinbutton_adj;
+  GtkWidget *ground2_dist_spinbutton;
+  GtkWidget *label208;
+  GtkWidget *hbox45;
+  GtkWidget *ground2_new_button;
+  GtkWidget *ground2_cancel_button;
+  GtkWidget *alignment69;
+  GtkWidget *hbox67;
+  GtkWidget *image89;
+  GtkWidget *label241;
+  GtkWidget *ground2_apply_button;
+  GtkWidget *ground2_ok_button;
+
+  ground2_command = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (ground2_command), 4);
+  gtk_window_set_title (GTK_WINDOW (ground2_command), _("Ground Parameters (GD Card)"));
+
+  vbox25 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox25);
+  gtk_container_add (GTK_CONTAINER (ground2_command), vbox25);
+
+  frame45 = gtk_frame_new (NULL);
+  gtk_widget_show (frame45);
+  gtk_box_pack_start (GTK_BOX (vbox25), frame45, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame45), 4);
+
+  alignment47 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment47);
+  gtk_container_add (GTK_CONTAINER (frame45), alignment47);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment47), 0, 0, 12, 0);
+
+  table33 = gtk_table_new (4, 2, FALSE);
+  gtk_widget_show (table33);
+  gtk_container_add (GTK_CONTAINER (alignment47), table33);
+  gtk_table_set_row_spacings (GTK_TABLE (table33), 2);
+  gtk_table_set_col_spacings (GTK_TABLE (table33), 2);
+
+  label204 = gtk_label_new (_("Relative Dielectric Const."));
+  gtk_widget_show (label204);
+  gtk_table_attach (GTK_TABLE (table33), label204, 0, 1, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label204), 0, 0.5);
+
+  label205 = gtk_label_new (_("Ground Conductivity S/m"));
+  gtk_widget_show (label205);
+  gtk_table_attach (GTK_TABLE (table33), label205, 1, 2, 0, 1,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label205), 0, 0.5);
+
+  label206 = gtk_label_new (_("Distance to 2nd Medium"));
+  gtk_widget_show (label206);
+  gtk_table_attach (GTK_TABLE (table33), label206, 0, 1, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label206), 0, 0.5);
+
+  label207 = gtk_label_new (_("Dist. below 1st Medium"));
+  gtk_widget_show (label207);
+  gtk_table_attach (GTK_TABLE (table33), label207, 1, 2, 2, 3,
+                    (GtkAttachOptions) (GTK_FILL),
+                    (GtkAttachOptions) (0), 0, 0);
+  gtk_misc_set_alignment (GTK_MISC (label207), 0, 0.5);
+
+  ground2_diel_spinbutton_adj = gtk_adjustment_new (12, 0, 10000, 9.99999974738e-06, 10, 0);
+  ground2_diel_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground2_diel_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (ground2_diel_spinbutton);
+  gtk_table_attach (GTK_TABLE (table33), ground2_diel_spinbutton, 0, 1, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground2_diel_spinbutton), TRUE);
+
+  ground2_res_spinbutton_adj = gtk_adjustment_new (0.005, 0, 10000, 9.99999974738e-06, 10, 0);
+  ground2_res_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground2_res_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (ground2_res_spinbutton);
+  gtk_table_attach (GTK_TABLE (table33), ground2_res_spinbutton, 1, 2, 1, 2,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground2_res_spinbutton), TRUE);
+
+  ground2_below_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
+  ground2_below_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground2_below_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (ground2_below_spinbutton);
+  gtk_table_attach (GTK_TABLE (table33), ground2_below_spinbutton, 1, 2, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground2_below_spinbutton), TRUE);
+
+  ground2_dist_spinbutton_adj = gtk_adjustment_new (1, 9.99999974738e-06, 10000, 9.99999974738e-06, 10, 0);
+  ground2_dist_spinbutton = gtk_spin_button_new (GTK_ADJUSTMENT (ground2_dist_spinbutton_adj), 0.00999999977648, 5);
+  gtk_widget_show (ground2_dist_spinbutton);
+  gtk_table_attach (GTK_TABLE (table33), ground2_dist_spinbutton, 0, 1, 3, 4,
+                    (GtkAttachOptions) (GTK_EXPAND | GTK_FILL),
+                    (GtkAttachOptions) (0), 2, 4);
+  gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (ground2_dist_spinbutton), TRUE);
+
+  label208 = gtk_label_new (_("2nd Medium Parameters"));
+  gtk_widget_show (label208);
+  gtk_frame_set_label_widget (GTK_FRAME (frame45), label208);
+  gtk_misc_set_padding (GTK_MISC (label208), 4, 4);
+
+  hbox45 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox45);
+  gtk_box_pack_start (GTK_BOX (vbox25), hbox45, TRUE, TRUE, 0);
+
+  ground2_new_button = gtk_button_new_from_stock ("gtk-new");
+  gtk_widget_show (ground2_new_button);
+  gtk_box_pack_start (GTK_BOX (hbox45), ground2_new_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground2_new_button), 2);
+
+  ground2_cancel_button = gtk_button_new ();
+  gtk_widget_show (ground2_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox45), ground2_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground2_cancel_button), 2);
+
+  alignment69 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment69);
+  gtk_container_add (GTK_CONTAINER (ground2_cancel_button), alignment69);
+
+  hbox67 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox67);
+  gtk_container_add (GTK_CONTAINER (alignment69), hbox67);
+
+  image89 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image89);
+  gtk_box_pack_start (GTK_BOX (hbox67), image89, FALSE, FALSE, 0);
+
+  label241 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label241);
+  gtk_box_pack_start (GTK_BOX (hbox67), label241, FALSE, FALSE, 0);
+
+  ground2_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (ground2_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox45), ground2_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground2_apply_button), 2);
+
+  ground2_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (ground2_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox45), ground2_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (ground2_ok_button), 2);
+
+  g_signal_connect ((gpointer) ground2_command, "destroy",
+                    G_CALLBACK (on_ground2_command_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) ground2_diel_spinbutton, "value_changed",
+                    G_CALLBACK (on_ground2_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) ground2_res_spinbutton, "value_changed",
+                    G_CALLBACK (on_ground2_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) ground2_below_spinbutton, "value_changed",
+                    G_CALLBACK (on_ground2_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) ground2_dist_spinbutton, "value_changed",
+                    G_CALLBACK (on_ground2_spinbutton_value_changed),
+                    NULL);
+  g_signal_connect ((gpointer) ground2_new_button, "clicked",
+                    G_CALLBACK (on_ground2_new_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) ground2_cancel_button, "clicked",
+                    G_CALLBACK (on_ground2_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) ground2_apply_button, "clicked",
+                    G_CALLBACK (on_ground2_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) ground2_ok_button, "clicked",
+                    G_CALLBACK (on_ground2_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (ground2_command, ground2_command, "ground2_command");
+  GLADE_HOOKUP_OBJECT (ground2_command, vbox25, "vbox25");
+  GLADE_HOOKUP_OBJECT (ground2_command, frame45, "frame45");
+  GLADE_HOOKUP_OBJECT (ground2_command, alignment47, "alignment47");
+  GLADE_HOOKUP_OBJECT (ground2_command, table33, "table33");
+  GLADE_HOOKUP_OBJECT (ground2_command, label204, "label204");
+  GLADE_HOOKUP_OBJECT (ground2_command, label205, "label205");
+  GLADE_HOOKUP_OBJECT (ground2_command, label206, "label206");
+  GLADE_HOOKUP_OBJECT (ground2_command, label207, "label207");
+  GLADE_HOOKUP_OBJECT (ground2_command, ground2_diel_spinbutton, "ground2_diel_spinbutton");
+  GLADE_HOOKUP_OBJECT (ground2_command, ground2_res_spinbutton, "ground2_res_spinbutton");
+  GLADE_HOOKUP_OBJECT (ground2_command, ground2_below_spinbutton, "ground2_below_spinbutton");
+  GLADE_HOOKUP_OBJECT (ground2_command, ground2_dist_spinbutton, "ground2_dist_spinbutton");
+  GLADE_HOOKUP_OBJECT (ground2_command, label208, "label208");
+  GLADE_HOOKUP_OBJECT (ground2_command, hbox45, "hbox45");
+  GLADE_HOOKUP_OBJECT (ground2_command, ground2_new_button, "ground2_new_button");
+  GLADE_HOOKUP_OBJECT (ground2_command, ground2_cancel_button, "ground2_cancel_button");
+  GLADE_HOOKUP_OBJECT (ground2_command, alignment69, "alignment69");
+  GLADE_HOOKUP_OBJECT (ground2_command, hbox67, "hbox67");
+  GLADE_HOOKUP_OBJECT (ground2_command, image89, "image89");
+  GLADE_HOOKUP_OBJECT (ground2_command, label241, "label241");
+  GLADE_HOOKUP_OBJECT (ground2_command, ground2_apply_button, "ground2_apply_button");
+  GLADE_HOOKUP_OBJECT (ground2_command, ground2_ok_button, "ground2_ok_button");
+
+  return ground2_command;
+}
+
+GtkWidget*
+create_gend_editor (void)
+{
+  GtkWidget *gend_editor;
+  GtkWidget *vbox26;
+  GtkWidget *frame46;
+  GtkWidget *alignment48;
+  GtkWidget *vbox27;
+  GtkWidget *gend_nognd_radiobutton;
+  GSList *gend_nognd_radiobutton_group = NULL;
+  GtkWidget *gend_img_radiobutton;
+  GtkWidget *gend_noimg_radiobutton;
+  GtkWidget *label211;
+  GtkWidget *hbox46;
+  GtkWidget *gend_cancel_button;
+  GtkWidget *alignment70;
+  GtkWidget *hbox68;
+  GtkWidget *image90;
+  GtkWidget *label242;
+  GtkWidget *gend_apply_button;
+  GtkWidget *gend_ok_button;
+
+  gend_editor = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+  gtk_container_set_border_width (GTK_CONTAINER (gend_editor), 4);
+  gtk_window_set_title (GTK_WINDOW (gend_editor), _("Geometry End (GE Card)"));
+
+  vbox26 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox26);
+  gtk_container_add (GTK_CONTAINER (gend_editor), vbox26);
+
+  frame46 = gtk_frame_new (NULL);
+  gtk_widget_show (frame46);
+  gtk_box_pack_start (GTK_BOX (vbox26), frame46, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (frame46), 4);
+
+  alignment48 = gtk_alignment_new (0.5, 0.5, 1, 1);
+  gtk_widget_show (alignment48);
+  gtk_container_add (GTK_CONTAINER (frame46), alignment48);
+  gtk_alignment_set_padding (GTK_ALIGNMENT (alignment48), 0, 0, 12, 0);
+
+  vbox27 = gtk_vbox_new (FALSE, 0);
+  gtk_widget_show (vbox27);
+  gtk_container_add (GTK_CONTAINER (alignment48), vbox27);
+
+  gend_nognd_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("No Ground, Free Space condition"));
+  gtk_widget_show (gend_nognd_radiobutton);
+  gtk_box_pack_start (GTK_BOX (vbox27), gend_nognd_radiobutton, TRUE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (gend_nognd_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (gend_nognd_radiobutton), gend_nognd_radiobutton_group);
+  gend_nognd_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (gend_nognd_radiobutton));
+  gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gend_nognd_radiobutton), TRUE);
+
+  gend_img_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Ground present, Strucure reflection"));
+  gtk_widget_show (gend_img_radiobutton);
+  gtk_box_pack_start (GTK_BOX (vbox27), gend_img_radiobutton, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (gend_img_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (gend_img_radiobutton), gend_nognd_radiobutton_group);
+  gend_nognd_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (gend_img_radiobutton));
+
+  gend_noimg_radiobutton = gtk_radio_button_new_with_mnemonic (NULL, _("Ground present, no Structure reflection"));
+  gtk_widget_show (gend_noimg_radiobutton);
+  gtk_box_pack_start (GTK_BOX (vbox27), gend_noimg_radiobutton, FALSE, FALSE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (gend_noimg_radiobutton), 2);
+  gtk_radio_button_set_group (GTK_RADIO_BUTTON (gend_noimg_radiobutton), gend_nognd_radiobutton_group);
+  gend_nognd_radiobutton_group = gtk_radio_button_get_group (GTK_RADIO_BUTTON (gend_noimg_radiobutton));
+
+  label211 = gtk_label_new (_("Ground Plane type"));
+  gtk_widget_show (label211);
+  gtk_frame_set_label_widget (GTK_FRAME (frame46), label211);
+  gtk_misc_set_padding (GTK_MISC (label211), 4, 4);
+
+  hbox46 = gtk_hbox_new (TRUE, 0);
+  gtk_widget_show (hbox46);
+  gtk_box_pack_start (GTK_BOX (vbox26), hbox46, FALSE, FALSE, 0);
+
+  gend_cancel_button = gtk_button_new ();
+  gtk_widget_show (gend_cancel_button);
+  gtk_box_pack_start (GTK_BOX (hbox46), gend_cancel_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (gend_cancel_button), 2);
+
+  alignment70 = gtk_alignment_new (0.5, 0.5, 0, 0);
+  gtk_widget_show (alignment70);
+  gtk_container_add (GTK_CONTAINER (gend_cancel_button), alignment70);
+
+  hbox68 = gtk_hbox_new (FALSE, 2);
+  gtk_widget_show (hbox68);
+  gtk_container_add (GTK_CONTAINER (alignment70), hbox68);
+
+  image90 = gtk_image_new_from_stock ("gtk-delete", GTK_ICON_SIZE_BUTTON);
+  gtk_widget_show (image90);
+  gtk_box_pack_start (GTK_BOX (hbox68), image90, FALSE, FALSE, 0);
+
+  label242 = gtk_label_new_with_mnemonic ("Delete Card");
+  gtk_widget_show (label242);
+  gtk_box_pack_start (GTK_BOX (hbox68), label242, FALSE, FALSE, 0);
+
+  gend_apply_button = gtk_button_new_from_stock ("gtk-apply");
+  gtk_widget_show (gend_apply_button);
+  gtk_box_pack_start (GTK_BOX (hbox46), gend_apply_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (gend_apply_button), 2);
+
+  gend_ok_button = gtk_button_new_from_stock ("gtk-ok");
+  gtk_widget_show (gend_ok_button);
+  gtk_box_pack_start (GTK_BOX (hbox46), gend_ok_button, TRUE, TRUE, 0);
+  gtk_container_set_border_width (GTK_CONTAINER (gend_ok_button), 2);
+
+  g_signal_connect ((gpointer) gend_editor, "destroy",
+                    G_CALLBACK (on_gend_editor_destroy),
+                    NULL);
+  g_signal_connect ((gpointer) gend_nognd_radiobutton, "toggled",
+                    G_CALLBACK (on_gend_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) gend_img_radiobutton, "toggled",
+                    G_CALLBACK (on_gend_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) gend_noimg_radiobutton, "toggled",
+                    G_CALLBACK (on_gend_radiobutton_toggled),
+                    NULL);
+  g_signal_connect ((gpointer) gend_cancel_button, "clicked",
+                    G_CALLBACK (on_gend_cancel_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) gend_apply_button, "clicked",
+                    G_CALLBACK (on_gend_apply_button_clicked),
+                    NULL);
+  g_signal_connect ((gpointer) gend_ok_button, "clicked",
+                    G_CALLBACK (on_gend_ok_button_clicked),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (gend_editor, gend_editor, "gend_editor");
+  GLADE_HOOKUP_OBJECT (gend_editor, vbox26, "vbox26");
+  GLADE_HOOKUP_OBJECT (gend_editor, frame46, "frame46");
+  GLADE_HOOKUP_OBJECT (gend_editor, alignment48, "alignment48");
+  GLADE_HOOKUP_OBJECT (gend_editor, vbox27, "vbox27");
+  GLADE_HOOKUP_OBJECT (gend_editor, gend_nognd_radiobutton, "gend_nognd_radiobutton");
+  GLADE_HOOKUP_OBJECT (gend_editor, gend_img_radiobutton, "gend_img_radiobutton");
+  GLADE_HOOKUP_OBJECT (gend_editor, gend_noimg_radiobutton, "gend_noimg_radiobutton");
+  GLADE_HOOKUP_OBJECT (gend_editor, label211, "label211");
+  GLADE_HOOKUP_OBJECT (gend_editor, hbox46, "hbox46");
+  GLADE_HOOKUP_OBJECT (gend_editor, gend_cancel_button, "gend_cancel_button");
+  GLADE_HOOKUP_OBJECT (gend_editor, alignment70, "alignment70");
+  GLADE_HOOKUP_OBJECT (gend_editor, hbox68, "hbox68");
+  GLADE_HOOKUP_OBJECT (gend_editor, image90, "image90");
+  GLADE_HOOKUP_OBJECT (gend_editor, label242, "label242");
+  GLADE_HOOKUP_OBJECT (gend_editor, gend_apply_button, "gend_apply_button");
+  GLADE_HOOKUP_OBJECT (gend_editor, gend_ok_button, "gend_ok_button");
+
+  return gend_editor;
+}
+
+GtkWidget*
+create_aboutdialog (void)
+{
+  GtkWidget *aboutdialog;
+  const gchar *authors[] = {
+    "Neoklis Kyriazis",
+    "Ham Radio Call: 5B4AZ",
+    "http://www.qsl.net/5b4az",
+    NULL
+  };
+  const gchar *documenters[] = {
+    "Neoklis Kyriazis",
+    NULL
+  };
+  /* TRANSLATORS: Replace this string with your names, one name per line. */
+  gchar *translators = _("translator-credits");
+
+  aboutdialog = gtk_about_dialog_new ();
+  gtk_container_set_border_width (GTK_CONTAINER (aboutdialog), 5);
+  gtk_about_dialog_set_version (GTK_ABOUT_DIALOG (aboutdialog), VERSION);
+  gtk_about_dialog_set_name (GTK_ABOUT_DIALOG (aboutdialog), _("Xnec2c"));
+  gtk_about_dialog_set_copyright (GTK_ABOUT_DIALOG (aboutdialog), _("(C) 2007-2010 Neoklis Kyriazis"));
+  gtk_about_dialog_set_comments (GTK_ABOUT_DIALOG (aboutdialog), _("xnec2c is an interactive graphical wrapper around a modified version of nec2c, which is itself a translation to C of the original FORTRAN NEC2 Numerical Electromagnetics Code.\n\nxnec2c can display frequency-dependent data (gain, input impedance, vswr etc) in a graphical format. It can also display radiation pattern data in a rotatable wire frame format and near-field (E, H, S vectors) in a grid format.\n\nxnec2c has a b [...]
+  gtk_about_dialog_set_license (GTK_ABOUT_DIALOG (aboutdialog), _("GPL v2 or higher"));
+  gtk_about_dialog_set_website (GTK_ABOUT_DIALOG (aboutdialog), "http://www.qsl.net/5b4az");
+  gtk_about_dialog_set_authors (GTK_ABOUT_DIALOG (aboutdialog), authors);
+  gtk_about_dialog_set_documenters (GTK_ABOUT_DIALOG (aboutdialog), documenters);
+  gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (aboutdialog), translators);
+
+  g_signal_connect ((gpointer) aboutdialog, "close",
+                    G_CALLBACK (on_aboutdialog_close),
+                    NULL);
+  g_signal_connect ((gpointer) aboutdialog, "response",
+                    G_CALLBACK (on_aboutdialog_response),
+                    NULL);
+
+  /* Store pointers to all widgets, for use by lookup_widget(). */
+  GLADE_HOOKUP_OBJECT_NO_REF (aboutdialog, aboutdialog, "aboutdialog");
+
+  return aboutdialog;
+}
+
diff --git a/src/interface.h b/src/interface.h
new file mode 100644
index 0000000..5af60f9
--- /dev/null
+++ b/src/interface.h
@@ -0,0 +1,35 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+GtkWidget* create_main_window (void);
+GtkWidget* create_filechooserdialog (void);
+GtkWidget* create_fileselection (void);
+GtkWidget* create_freqplots_window (void);
+GtkWidget* create_rdpattern_window (void);
+GtkWidget* create_quit_dialog (void);
+GtkWidget* create_error_dialog (void);
+GtkWidget* create_animate_dialog (void);
+GtkWidget* create_nec2_editor (void);
+GtkWidget* create_wire_editor (void);
+GtkWidget* create_patch_editor (void);
+GtkWidget* create_arc_editor (void);
+GtkWidget* create_transform_editor (void);
+GtkWidget* create_helix_editor (void);
+GtkWidget* create_reflect_editor (void);
+GtkWidget* create_scale_editor (void);
+GtkWidget* create_cylinder_editor (void);
+GtkWidget* create_kernel_command (void);
+GtkWidget* create_execute_command (void);
+GtkWidget* create_intrange_command (void);
+GtkWidget* create_ground_command (void);
+GtkWidget* create_nearfield_command (void);
+GtkWidget* create_radiation_command (void);
+GtkWidget* create_excitation_command (void);
+GtkWidget* create_frequency_command (void);
+GtkWidget* create_loading_command (void);
+GtkWidget* create_network_command (void);
+GtkWidget* create_txline_command (void);
+GtkWidget* create_ground2_command (void);
+GtkWidget* create_gend_editor (void);
+GtkWidget* create_aboutdialog (void);
diff --git a/src/main.c b/src/main.c
new file mode 100644
index 0000000..28a0bf8
--- /dev/null
+++ b/src/main.c
@@ -0,0 +1,492 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * Initial main.c file generated by Glade. Edit as required.
+ * Glade will not overwrite this file.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+#include <sys/wait.h>
+#include <locale.h>
+
+#include "main.h"
+#include "shared.h"
+
+static void sig_handler(int signal);
+
+/* Child process pid returned by fork() */
+static pid_t child_pid = (pid_t)(-1);
+
+/*------------------------------------------------------------------------*/
+
+  int
+main (int argc, char *argv[])
+{
+  /* getopt() variables */
+  int option, idx, err;
+  gboolean new = TRUE;
+
+  /*** Signal handler related code ***/
+  /* new and old actions for sigaction() */
+  struct sigaction sa_new, sa_old;
+
+  /* initialize new actions */
+  sa_new.sa_handler = sig_handler;
+  sigemptyset( &sa_new.sa_mask );
+  sa_new.sa_flags = 0;
+
+  /* register function to handle signals */
+  sigaction( SIGINT,  &sa_new, &sa_old );
+  sigaction( SIGSEGV, &sa_new, NULL );
+  sigaction( SIGFPE,  &sa_new, NULL );
+  sigaction( SIGTERM, &sa_new, NULL );
+  sigaction( SIGABRT, &sa_new, NULL );
+  sigaction( SIGCHLD, &sa_new, NULL );
+
+  /* Process command line options */
+  calc_data.num_jobs = 1;
+  while( (option = getopt(argc, argv, "i:j:hv") ) != -1 )
+  {
+	switch( option )
+	{
+	  case 'i': /* specify input file name */
+		if( strlen(optarg) > 80 )
+		{
+		  fprintf ( stderr,
+			  _("xnec2c: input file name too long (>80 char)\n") );
+		  exit(-1);
+		}
+		Strlcpy( infile, optarg, strlen(optarg)+1 ); /* For null term. */
+		break;
+
+	  case 'j': /* number of child processes = num of processors */
+		calc_data.num_jobs = atoi( optarg );
+		break;
+
+	  case 'h': /* print usage and exit */
+		usage();
+		exit(0);
+
+	  case 'v': /* print xnec2c version */
+		puts( PACKAGE_STRING );
+		exit(0);
+
+	  default:
+		usage();
+		exit(0);
+
+	} /* end of switch( option ) */
+
+  } /* while( (option = getopt(argc, argv, "i:o:hv") ) != -1 ) */
+
+  /* Read input file path name if not supplied by -i option */
+  if( (strlen(infile) == 0) &&
+	  (strstr(argv[argc - 1], ".nec") || strstr(argv[argc - 1], ".NEC")) )
+  {
+	if( strlen(argv[argc - 1]) > 80 )
+	{
+	  fprintf ( stderr,
+		  _("xnec2c: input file path name too long (>80 char)\n") );
+	  exit(-1);
+	}
+	Strlcpy( infile, argv[argc-1], strlen(argv[argc-1])+1 ); /* For null term. */
+  }
+
+  /* When forking is useful, e.g. if more than 1 processor is
+   * available, the parent process handles the GUI and delegates
+   * calculations to the child processes, one per processor. The
+   * requested number of child processes = number of processors */
+
+  /* Allocate buffers for fork data */
+  if( calc_data.num_jobs > 1 )
+  {
+	size_t mreq = (size_t)calc_data.num_jobs * sizeof(forked_proc_data_t *);
+	mem_alloc( (void *)&forked_proc_data, mreq, "in main.c" );
+	for( idx = 0; idx < calc_data.num_jobs; idx++ )
+	{
+	  forked_proc_data[idx] = NULL;
+	  mreq = sizeof(forked_proc_data_t);
+	  mem_alloc( (void *)&forked_proc_data[idx], mreq, "in main.c" );
+	}
+
+	/* Fork child processes */
+	for( idx = 0; idx < calc_data.num_jobs; idx++ )
+	{
+	  /* Make pipes to transfer data */
+	  err = pipe( forked_proc_data[idx]->pnt2child_pipe );
+	  if( err )
+	  {
+		perror( "xnec2c: pipe()" );
+		puts( _("xnec2c: exiting after fatal error (pipe() failed)") );
+		exit(-1);
+	  }
+
+	  err = pipe( forked_proc_data[idx]->child2pnt_pipe );
+	  if( err )
+	  {
+		perror( "xnec2c: pipe()" );
+		puts( _("xnec2c: exiting after fatal error (pipe() failed)") );
+		exit(-1);
+	  }
+
+	  /* Fork child process */
+	  forked_proc_data[idx]->child_pid = fork();
+	  if( forked_proc_data[idx]->child_pid == -1 )
+	  {
+		perror( "xnec2c: fork()" );
+		puts( _("xnec2c: exiting after fatal error (fork() failed)") );
+		exit(-1);
+	  }
+	  else child_pid = forked_proc_data[idx]->child_pid;
+
+	  /* Child get out of forking loop! */
+	  if( CHILD ) Child_Process( idx );
+
+	  /* Ready to accept a job */
+	  forked_proc_data[idx]->busy = FALSE;
+
+	  /* Close unwanted pipe ends */
+	  close( forked_proc_data[idx]->pnt2child_pipe[READ] );
+	  close( forked_proc_data[idx]->child2pnt_pipe[WRITE] );
+
+	  /* Set file descriptors for select() */
+	  FD_ZERO( &forked_proc_data[idx]->read_fds );
+	  FD_SET( forked_proc_data[idx]->child2pnt_pipe[READ],
+		  &forked_proc_data[idx]->read_fds );
+	  FD_ZERO( &forked_proc_data[idx]->write_fds );
+	  FD_SET( forked_proc_data[idx]->pnt2child_pipe[WRITE],
+		  &forked_proc_data[idx]->write_fds );
+
+	  /* Count child processes */
+	  num_child_procs++;
+	} /* for( idx = 0; idx < calc_data.num_jobs; idx++ ) */
+
+	FORKED = TRUE;
+  } /* if( calc_data.num_jobs > 1 ) */
+
+  gtk_set_locale ();
+  gtk_init (&argc, &argv);
+  setlocale(LC_NUMERIC, "C");
+  add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
+
+  /*
+   * The following code was added by Glade to create one of each component
+   * (except popup menus), just so that you see something after building
+   * the project. Delete any components that you don't want shown initially.
+   */
+  main_window = create_main_window ();
+  gtk_window_set_title( GTK_WINDOW(main_window), PACKAGE_STRING );
+  gtk_widget_show (main_window);
+  mainwin_frequency = GTK_SPIN_BUTTON(lookup_widget(
+		main_window, "main_freq_spinbutton") );
+
+  gtk_widget_hide_all( lookup_widget(
+		main_window, "main_hbox1") );
+  gtk_widget_hide_all( lookup_widget(
+		main_window, "main_hbox2") );
+  gtk_widget_hide_all( lookup_widget(
+		main_window, "main_hbox3") );
+  gtk_widget_hide_all( lookup_widget(
+		main_window, "main_view_menuitem") );
+  gtk_widget_hide( lookup_widget(
+		main_window, "structure_drawingarea") );
+
+  structure_drawingarea = lookup_widget(
+	  main_window, "structure_drawingarea");
+  gtk_widget_add_events(
+	  GTK_WIDGET(structure_drawingarea),
+	  GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK );
+  structure_motion_handler = g_signal_connect (
+	  (gpointer) structure_drawingarea,
+	  "motion_notify_event",
+	  G_CALLBACK (on_structure_drawingarea_motion_notify_event),
+	  NULL);
+
+  /* Initialize structure projection angles */
+  rotate_structure  = GTK_SPIN_BUTTON(lookup_widget(
+		main_window, "main_rotate_spinbutton"));
+  incline_structure = GTK_SPIN_BUTTON(lookup_widget(
+		main_window, "main_incline_spinbutton"));
+  structure_zoom_spinbutton = GTK_SPIN_BUTTON(lookup_widget(
+		main_window, "structure_zoom_spinbutton"));
+  structure_fstep_entry = GTK_ENTRY(lookup_widget(
+		main_window, "structure_fstep_entry")) ;
+
+  structure_proj_params.Wr =
+	gtk_spin_button_get_value(rotate_structure);
+  structure_proj_params.Wi =
+	gtk_spin_button_get_value(incline_structure);
+
+  structure_proj_params.xy_zoom = 1.0;
+  structure_proj_params.reset = TRUE;
+  structure_proj_params.type = STRUCTURE_DRAWINGAREA;
+
+  rdpattern_proj_params.xy_zoom = 1.0;
+  rdpattern_proj_params.reset = TRUE;
+  rdpattern_proj_params.type = RDPATTERN_DRAWINGAREA;
+
+  New_Structure_Projection_Angle();
+
+  /* Open input file if specified */
+  if( strlen(infile) > 0 )
+	g_idle_add( Open_Input_File, (gpointer)&new );
+  else
+	SetFlag( INPUT_PENDING );
+
+  gtk_main ();
+
+  return 0;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* Open_Input_File()
+ *
+ * Opens NEC2 input file
+ */
+
+  gboolean
+Open_Input_File( gpointer udata )
+{
+  gboolean ok, new;
+
+  /* Stop freq loop */
+  if( isFlagSet(FREQ_LOOP_RUNNING) )
+	Stop_Frequency_Loop();
+
+  /* Close open files if any */
+  Close_File( &input_fp );
+
+  /* Suppress activity while input file opened */
+  ClearFlag( OPEN_INPUT_FLAGS );
+  SetFlag( INPUT_PENDING );
+
+  /* Open NEC2 input file */
+  Open_File( &input_fp, infile, "r");
+
+  /* Read input file, record failures */
+  ok = Read_Comments() && Read_Geometry() && Read_Commands();
+  if( !ok )
+  {
+	/* Hide main control buttons etc */
+	gtk_widget_hide_all( lookup_widget(
+		  main_window, "main_hbox1") );
+	gtk_widget_hide_all( lookup_widget(
+		  main_window, "main_hbox2") );
+	gtk_widget_hide_all( lookup_widget(
+		  main_window, "main_view_menuitem") );
+	gtk_widget_hide( lookup_widget(
+		  main_window, "structure_drawingarea") );
+
+	/* Close plot/rdpat windows */
+	if( rdpattern_window != NULL )
+	  gtk_widget_destroy( rdpattern_window );
+	if( freqplots_window != NULL )
+	  gtk_widget_destroy( freqplots_window );
+
+	if( nec2_edit_window == NULL )
+	  Open_Nec2_Editor( NEC2_EDITOR_RELOAD );
+	else
+	  Nec2_Input_File_Treeview( NEC2_EDITOR_REVERT );
+
+	return( FALSE );
+  }
+
+  /* Ask child processes to read input file */
+  if( FORKED )
+  {
+	int idx;
+	size_t lenc, leni;
+
+	lenc = strlen( fork_commands[INFILE] );
+	leni = strlen( infile );
+	for( idx = 0; idx < num_child_procs; idx++ )
+	{
+	  Write_Pipe( idx, fork_commands[INFILE], (ssize_t)lenc, TRUE );
+	  Write_Pipe( idx, infile, (ssize_t)leni, TRUE );
+	}
+  } /* if( FORKED ) */
+
+  /* Allow redraws on expose events etc */
+  ClearFlag( INPUT_PENDING );
+
+  /* Initialize xnec2c */
+  SetFlag( COMMON_PROJECTION );
+  SetFlag( COMMON_FREQUENCY );
+  SetFlag( MAIN_NEW_FREQ );
+  SetFlag( FREQ_LOOP_INIT );
+  floop_tag = 0;
+  save.last_freq = 0.0;
+  crnt.newer = 0;
+  crnt.valid = 0;
+  near_field.newer = 0;
+  near_field.valid = 0;
+
+  /* Set projection at 45 deg rotation and
+   * inclination if NEC2 editor window is not open */
+  if( nec2_edit_window == NULL )
+	New_Viewer_Angle( 45.0, 45.0, rotate_structure,
+		incline_structure, &structure_proj_params );
+
+  /* Show current frequency */
+  gtk_spin_button_set_value(
+	  mainwin_frequency, (gdouble)calc_data.fmhz );
+
+  /* Show main control buttons etc */
+  gtk_widget_show_all( lookup_widget(
+		main_window, "main_hbox1") );
+  gtk_widget_show_all( lookup_widget(
+		main_window, "main_hbox2") );
+  gtk_widget_show_all( lookup_widget(
+		main_window, "main_hbox3") );
+  gtk_widget_show_all( lookup_widget(
+		main_window, "main_view_menuitem") );
+  gtk_widget_show( lookup_widget(
+		main_window, "structure_drawingarea") );
+
+  /* If currents or charges draw button is active
+   * re-initialize structure currents/charges drawing */
+  if( isFlagSet(DRAW_CURRENTS) )
+	Main_Currents_Togglebutton_Toggled( TRUE );
+  if( isFlagSet(DRAW_CHARGES) )
+	Main_Charges_Togglebutton_Toggled( TRUE );
+
+  /* Set input file to NEC2 editor. It will only
+   * happen if the NEC2 editor window is open */
+  new = *(gboolean *)udata;
+  if( new )
+	Nec2_Input_File_Treeview( NEC2_EDITOR_REVERT );
+  else
+	Nec2_Input_File_Treeview( NEC2_EDITOR_RELOAD );
+
+  /* Disable freq step and display sructure */
+  calc_data.fstep = -1;
+  Draw_Structure( structure_drawingarea );
+
+  /* Re-initialize Rad Pattern drawing if window open */
+  if( rdpattern_window != NULL )
+  {
+	Main_Rdpattern_Activate( FALSE );
+	crnt.valid = FALSE;
+
+	if( isFlagSet(DRAW_GAIN) )
+	  Rdpattern_Gain_Togglebutton_Toggled( TRUE );
+	else
+	  Rdpattern_Gain_Togglebutton_Toggled( FALSE );
+
+	if( isFlagSet(DRAW_EHFIELD) )
+	  Rdpattern_EH_Togglebutton_Toggled( TRUE );
+	else
+	  Rdpattern_EH_Togglebutton_Toggled( FALSE );
+  }
+
+  /* Re-initiate plots if window open */
+  if( freqplots_window != NULL )
+  {
+	Main_Freqplots_Activate();
+	Start_Frequency_Loop();
+  }
+
+  return( FALSE );
+} /* Open_Input_File() */
+
+/*------------------------------------------------------------------------*/
+
+static void sig_handler( int signal )
+{
+  switch( signal )
+  {
+	case SIGINT:
+	  fprintf( stderr, _("xnec2c: exiting via user interrupt\n") );
+	  break;
+
+	case SIGSEGV:
+	  fprintf( stderr, _("xnec2c: segmentation fault, exiting\n") );
+	  break;
+
+	case SIGFPE:
+	  fprintf( stderr, _("xnec2c: floating point exception, exiting\n") );
+	  break;
+
+	case SIGABRT:
+	  fprintf( stderr, _("xnec2c: abort signal received, exiting\n") );
+	  break;
+
+	case SIGTERM:
+	  fprintf( stderr, _("xnec2c: termination request received, exiting\n") );
+	  break;
+
+	case SIGCHLD:
+	  {
+		int idx;
+		pid_t pid = getpid();
+
+		if( !FORKED )
+		{
+		  fprintf( stderr,
+			  _("xnec2c: not forked, ignoring SIGCHLD from pid %d\n"), pid );
+		  return;
+		}
+		else
+		{
+		  for( idx = 0; idx < calc_data.num_jobs; idx++ )
+			if( forked_proc_data[idx]->child_pid == pid )
+			{
+			  fprintf( stderr, _("xnec2c: child process pid %d exited\n"), pid );
+			  if( isFlagSet(MAIN_QUIT) ) return;
+			  else break;
+			}
+		  return;
+		}
+	  }
+
+	default:
+	  fprintf( stderr, _("xnec2c: default exit with signal: %d\n"), signal );
+  } /* switch( signal ) */
+
+  /* Kill child processes */
+  if( FORKED && !CHILD )
+	while( num_child_procs )
+	{
+	  num_child_procs--;
+	  kill( forked_proc_data[num_child_procs]->child_pid, SIGKILL );
+	}
+
+  Close_File( &input_fp );
+
+  if( CHILD ) _exit( 0 );
+  else exit( signal );
+
+} /* End of sig_handler() */
+
+/*------------------------------------------------------------------------*/
+
+/* Tests for child process */
+  gboolean
+isChild(void)
+{
+  return( child_pid == (pid_t)(0) );
+}
+
+/*------------------------------------------------------------------------*/
+
diff --git a/src/main.h b/src/main.h
new file mode 100644
index 0000000..37853db
--- /dev/null
+++ b/src/main.h
@@ -0,0 +1,36 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	MAIN_H
+#define	MAIN_H		1
+
+#include "common.h"
+#include "callbacks.h"
+#include "interface.h"
+#include "support.h"
+#include "fork.h"
+#include "nec2_model.h"
+
+#define OPEN_INPUT_FLAGS \
+  RDPAT_FLAGS		| \
+  FREQ_LOOP_FLAGS	| \
+  PLOT_FREQ_LINE	| \
+  ENABLE_EXCITN
+
+#endif
+
diff --git a/src/matrix.c b/src/matrix.c
new file mode 100644
index 0000000..e4c8396
--- /dev/null
+++ b/src/matrix.c
@@ -0,0 +1,1549 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/******* Translated to the C language by N. Kyriazis  20 Aug 2003 ******
+
+  Program NEC(input,tape5=input,output,tape11,tape12,tape13,tape14,
+  tape15,tape16,tape20,tape21)
+
+  Numerical Electromagnetics Code (NEC2)  developed at Lawrence
+  Livermore lab., Livermore, CA.  (contact G. Burke at 415-422-8414
+  for problems with the NEC code. For problems with the vax implem-
+  entation, contact J. Breakall at 415-422-8196 or E. Domning at 415
+  422-5936)
+  file created 4/11/80.
+
+ ***********Notice**********
+ This computer code material was prepared as an account of work
+ sponsored by the United States government.  Neither the United
+ States nor the United States Department Of Energy, nor any of
+ their employees, nor any of their contractors, subcontractors,
+ or their employees, makes any warranty, express or implied, or
+ assumes any legal liability or responsibility for the accuracy,
+ completeness or usefulness of any information, apparatus, product
+ or process disclosed, or represents that its use would not infringe
+ privately-owned rights.
+
+ ***********************************************************************/
+
+#include "matrix.h"
+#include "shared.h"
+
+/*-------------------------------------------------------------------*/
+
+/* cmset sets up the complex structure matrix in the array cm */
+void cmset( int nrow, complex double *cmx, double rkhx, int iexkx )
+{
+  int mp2, neq, npeq, it, i, j, i1, i2, in2, im1;
+  int im2, ist, ij, ipr, jss, jm1, jm2, jst, k, ka, kk;
+  complex double zaj, deter, *scm = NULL;
+
+  mp2=2* data.mp;
+  npeq= data.np+ mp2;
+  neq= data.n+2* data.m;
+  smat.nop = neq/npeq;
+
+  dataj.rkh= rkhx;
+  dataj.iexk= iexkx;
+  it= matpar.nlast;
+
+  for( i = 0; i < nrow; i++ )
+	for( j = 0; j < it; j++ )
+	  cmx[i+j*nrow]= CPLX_00;
+
+  i1= 1;
+  i2= it;
+  in2= i2;
+
+  if( in2 > data.np)
+	in2= data.np;
+
+  im1= i1- data.np;
+  im2= i2- data.np;
+
+  if( im1 < 1)
+	im1=1;
+
+  ist=1;
+  if( i1 <= data.np)
+	ist= data.np- i1+2;
+
+  /* wire source loop */
+  if( data.n != 0)
+  {
+	for( j = 1; j <= data.n; j++ )
+	{
+	  trio(j);
+	  for( i = 0; i < segj.jsno; i++ )
+	  {
+		ij= segj.jco[i];
+		segj.jco[i]=(( ij-1)/ data.np)* mp2+ ij;
+	  }
+
+	  if( i1 <= in2)
+		cmww( j, i1, in2, cmx, nrow, cmx, nrow,1);
+
+	  if( im1 <= im2)
+		cmws( j, im1, im2, &cmx[(ist-1)*nrow], nrow, cmx, 1);
+
+	  /* matrix elements modified by loading */
+	  if( zload.nload == 0)
+		continue;
+
+	  if( j > data.np)
+		continue;
+
+	  ipr= j;
+	  if( (ipr < 1) || (ipr > it) )
+		continue;
+
+	  zaj= zload.zarray[j-1];
+
+	  for( i = 0; i < segj.jsno; i++ )
+	  {
+		jss= segj.jco[i];
+		cmx[(jss-1)+(ipr-1)*nrow] -=
+		  ( segj.ax[i]+ segj.cx[i])* zaj;
+	  }
+
+	} /* for( j = 1; j <= n; j++ ) */
+
+  } /* if( n != 0) */
+
+  if( data.m != 0)
+  {
+	/* matrix elements for patch current sources */
+	jm1=1- data.mp;
+	jm2=0;
+	jst=1- mp2;
+
+	for( i = 0; i < smat.nop; i++ )
+	{
+	  jm1 += data.mp;
+	  jm2 += data.mp;
+	  jst += npeq;
+
+	  if( i1 <= in2)
+		cmsw( jm1, jm2, i1, in2,
+			&cmx[(jst-1)], cmx, 0, nrow, 1);
+
+	  if( im1 <= im2)
+		cmss( jm1, jm2, im1, im2,
+			&cmx[(jst-1)+(ist-1)*nrow], nrow, 1);
+	}
+
+  } /* if( m != 0) */
+
+  if( matpar.icase == 1)
+	return;
+
+  /* Allocate to scratch memory */
+  size_t mreq = (size_t)data.np2m * sizeof(complex double);
+  mem_alloc( (void *)&scm, mreq, "in matrix.c");
+
+  /* combine elements for symmetry modes */
+  for( i = 0; i < it; i++ )
+  {
+	for( j = 0; j < npeq; j++ )
+	{
+	  for( k = 0; k < smat.nop; k++ )
+	  {
+		ka= j+ k*npeq;
+		scm[k]= cmx[ka+i*nrow];
+	  }
+
+	  deter= scm[0];
+
+	  for( kk = 1; kk < smat.nop; kk++ )
+		deter += scm[kk];
+
+	  cmx[j+i*nrow]= deter;
+
+	  for( k = 1; k < smat.nop; k++ )
+	  {
+		ka= j+ k*npeq;
+		deter= scm[0];
+
+		for( kk = 1; kk < smat.nop; kk++ )
+		{
+		  deter += scm[kk]* smat.ssx[k+kk*smat.nop];
+		  cmx[ka+i*nrow]= deter;
+		}
+
+	  } /* for( k = 1; k < smat.nop; k++ ) */
+
+	} /* for( j = 0; j < npeq; j++ ) */
+
+  } /* for( i = 0; i < it; i++ ) */
+
+  free_ptr( (void *)&scm );
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* cmss computes matrix elements for surface-surface interactions. */
+void cmss( int j1, int j2, int im1, int im2,
+	complex double *cmx, int nrow, int itrp )
+{
+  int i1, i2, icomp, ii1, i, il, ii2, jj1, j, jl, jj2;
+  double t1xi, t1yi, t1zi, t2xi, t2yi, t2zi, xi, yi, zi;
+  complex double g11, g12, g21, g22;
+
+  i1=( im1+1)/2;
+  i2=( im2+1)/2;
+  icomp= i1*2-3;
+  ii1=-2;
+  if( icomp+2 < im1)
+	ii1=-3;
+
+  /* loop over observation patches */
+  il = -1;
+  for( i = i1; i <= i2; i++ )
+  {
+	il++;
+	icomp += 2;
+	ii1 += 2;
+	ii2 = ii1+1;
+
+	t1xi= data.t1x[il]* data.psalp[il];
+	t1yi= data.t1y[il]* data.psalp[il];
+	t1zi= data.t1z[il]* data.psalp[il];
+	t2xi= data.t2x[il]* data.psalp[il];
+	t2yi= data.t2y[il]* data.psalp[il];
+	t2zi= data.t2z[il]* data.psalp[il];
+	xi= data.px[il];
+	yi= data.py[il];
+	zi= data.pz[il];
+
+	/* loop over source patches */
+	jj1=-2;
+	for( j = j1; j <= j2; j++ )
+	{
+	  jl=j-1;
+	  jj1 += 2;
+	  jj2 = jj1+1;
+
+	  dataj.s= data.pbi[jl];
+	  dataj.xj= data.px[jl];
+	  dataj.yj= data.py[jl];
+	  dataj.zj= data.pz[jl];
+	  dataj.t1xj= data.t1x[jl];
+	  dataj.t1yj= data.t1y[jl];
+	  dataj.t1zj= data.t1z[jl];
+	  dataj.t2xj= data.t2x[jl];
+	  dataj.t2yj= data.t2y[jl];
+	  dataj.t2zj= data.t2z[jl];
+
+	  hintg( xi, yi, zi);
+
+	  g11=-( t2xi* dataj.exk+ t2yi* dataj.eyk+ t2zi* dataj.ezk);
+	  g12=-( t2xi* dataj.exs+ t2yi* dataj.eys+ t2zi* dataj.ezs);
+	  g21=-( t1xi* dataj.exk+ t1yi* dataj.eyk+ t1zi* dataj.ezk);
+	  g22=-( t1xi* dataj.exs+ t1yi* dataj.eys+ t1zi* dataj.ezs);
+
+	  if( i == j )
+	  {
+		g11 -= .5;
+		g22 += .5;
+	  }
+
+	  /* normal fill */
+	  if( itrp == 0)
+	  {
+		if( icomp >= im1 )
+		{
+		  cmx[ii1+jj1*nrow]= g11;
+		  cmx[ii1+jj2*nrow]= g12;
+		}
+
+		if( icomp >= im2 )
+		  continue;
+
+		cmx[ii2+jj1*nrow]= g21;
+		cmx[ii2+jj2*nrow]= g22;
+		continue;
+
+	  } /* if( itrp == 0) */
+
+	  /* transposed fill */
+	  if( icomp >= im1 )
+	  {
+		cmx[jj1+ii1*nrow]= g11;
+		cmx[jj2+ii1*nrow]= g12;
+	  }
+
+	  if( icomp >= im2 )
+		continue;
+
+	  cmx[jj1+ii2*nrow]= g21;
+	  cmx[jj2+ii2*nrow]= g22;
+
+	} /* for( j = j1; j <= j2; j++ ) */
+
+  } /* for( i = i1; i <= i2; i++ ) */
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* computes matrix elements for e along wires due to patch current */
+void cmsw( int j1, int j2, int i1, int i2, complex double *cmx,
+	complex double *cw, int ncw, int nrow, int itrp )
+{
+  int jsnox; /* -1 offset to "jsno" for array indexing */
+  static complex double *emel = NULL;
+
+  size_t mreq = 9 * sizeof(complex double);
+  mem_alloc( (void *)&emel, mreq, "in matrix.c");
+
+  jsnox = segj.jsno-1;
+
+  if( itrp >= 0)
+  {
+	int k, icgo, i, ipch, jl, j, js, il, ip;
+	double xi, yi, zi, cabi, sabi, salpi, fsign=1.0, pyl, pxl;
+
+	k=-1;
+	icgo=0;
+
+	/* observation loop */
+	for( i = i1-1; i < i2; i++ )
+	{
+	  k++;
+	  xi= data.x[i];
+	  yi= data.y[i];
+	  zi= data.z[i];
+	  cabi= data.cab[i];
+	  sabi= data.sab[i];
+	  salpi= data.salp[i];
+	  ipch=0;
+
+	  if( data.icon1[i] >= PCHCON)
+	  {
+		ipch= data.icon1[i]-PCHCON;
+		fsign=-1.0;
+	  }
+
+	  if( data.icon2[i] >= PCHCON)
+	  {
+		ipch= data.icon2[i]-PCHCON;
+		fsign=1.0;
+	  }
+
+	  /* source loop */
+	  jl = -1;
+	  for( j = j1; j <= j2; j++ )
+	  {
+		jl += 2;
+		js = j-1;
+		dataj.t1xj= data.t1x[js];
+		dataj.t1yj= data.t1y[js];
+		dataj.t1zj= data.t1z[js];
+		dataj.t2xj= data.t2x[js];
+		dataj.t2yj= data.t2y[js];
+		dataj.t2zj= data.t2z[js];
+		dataj.xj= data.px[js];
+		dataj.yj= data.py[js];
+		dataj.zj= data.pz[js];
+		dataj.s= data.pbi[js];
+
+		/* ground loop */
+		for( ip = 1; ip <= gnd.ksymp; ip++ )
+		{
+		  dataj.ipgnd= ip;
+
+		  if( ((ipch == j) || (icgo != 0)) && (ip != 2) )
+		  {
+			if( icgo <= 0 )
+			{
+			  pcint( xi, yi, zi, cabi, sabi, salpi, emel);
+
+			  pyl= PI* data.si[i]* fsign;
+			  pxl= sin( pyl);
+			  pyl= cos( pyl);
+			  dataj.exc= emel[8]* fsign;
+
+			  trio(i+1);
+
+			  il= i-ncw;
+			  if( i < data.np)
+				il += (il/data.np)*2*data.mp;
+
+			  if( itrp == 0 )
+				cw[k+il*nrow] +=
+				  dataj.exc*( segj.ax[jsnox] +
+					  segj.bx[jsnox]* pxl+ segj.cx[jsnox]* pyl);
+			  else
+				cw[il+k*nrow] +=
+				  dataj.exc*( segj.ax[jsnox] +
+					  segj.bx[jsnox]* pxl+ segj.cx[jsnox]* pyl);
+
+			} /* if( icgo <= 0 ) */
+
+			if( itrp == 0)
+			{
+			  cmx[k+(jl-1)*nrow]= emel[icgo];
+			  cmx[k+jl*nrow]    = emel[icgo+4];
+			}
+			else
+			{
+			  cmx[(jl-1)+k*nrow]= emel[icgo];
+			  cmx[jl+k*nrow]    = emel[icgo+4];
+			}
+
+			icgo++;
+			if( icgo == 4)
+			  icgo=0;
+
+			continue;
+
+		  } /* if( ((ipch == (j+1)) || (icgo != 0)) && (ip != 2) ) */
+
+		  unere( xi, yi, zi);
+
+		  /* normal fill */
+		  if( itrp == 0)
+		  {
+			cmx[k+(jl-1)*nrow] +=
+			  dataj.exk* cabi+ dataj.eyk* sabi+ dataj.ezk* salpi;
+			cmx[k+jl*nrow]     +=
+			  dataj.exs* cabi+ dataj.eys* sabi+ dataj.ezs* salpi;
+			continue;
+		  }
+
+		  /* transposed fill */
+		  cmx[(jl-1)+k*nrow] +=
+			dataj.exk* cabi+ dataj.eyk* sabi+ dataj.ezk* salpi;
+		  cmx[jl+k*nrow]     +=
+			dataj.exs* cabi+ dataj.eys* sabi+ dataj.ezs* salpi;
+
+		} /* for( ip = 1; ip <= gnd.ksymp; ip++ ) */
+
+	  } /* for( j = j1; j <= j2; j++ ) */
+
+	} /* for( i = i1-1; i < i2; i++ ) */
+
+  } /* if( itrp >= 0) */
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* cmws computes matrix elements for wire-surface interactions */
+void cmws( int j, int i1, int i2, complex double *cmx,
+	int nr, complex double *cw, int itrp )
+{
+  int ipr, i, ipatch, ik, js=0, ij, jx;
+  double xi, yi, zi, tx, ty, tz;
+  complex double etk, ets, etc;
+
+  j--;
+  dataj.s= data.si[j];
+  dataj.b= data.bi[j];
+  dataj.xj= data.x[j];
+  dataj.yj= data.y[j];
+  dataj.zj= data.z[j];
+  dataj.cabj= data.cab[j];
+  dataj.sabj= data.sab[j];
+  dataj.salpj= data.salp[j];
+
+  /* observation loop */
+  ipr= -1;
+  for( i = i1; i <= i2; i++ )
+  {
+	ipr++;
+	ipatch=(i+1)/2;
+	ik= i-( i/2)*2;
+
+	if( (ik != 0) || (ipr == 0) )
+	{
+	  js= ipatch-1;
+	  xi= data.px[js];
+	  yi= data.py[js];
+	  zi= data.pz[js];
+	  hsfld( xi, yi, zi, 0.0);
+
+	  if( ik != 0 )
+	  {
+		tx= data.t2x[js];
+		ty= data.t2y[js];
+		tz= data.t2z[js];
+	  }
+	  else
+	  {
+		tx= data.t1x[js];
+		ty= data.t1y[js];
+		tz= data.t1z[js];
+	  }
+
+	} /* if( (ik != 0) || (ipr == 0) ) */
+	else
+	{
+	  tx= data.t1x[js];
+	  ty= data.t1y[js];
+	  tz= data.t1z[js];
+
+	} /* if( (ik != 0) || (ipr == 0) ) */
+
+	etk=-( dataj.exk* tx+ dataj.eyk* ty +
+		dataj.ezk* tz)* data.psalp[js];
+	ets=-( dataj.exs* tx+ dataj.eys* ty +
+		dataj.ezs* tz)* data.psalp[js];
+	etc=-( dataj.exc* tx+ dataj.eyc* ty +
+		dataj.ezc* tz)* data.psalp[js];
+
+	/* fill matrix elements.  element locations */
+	/* determined by connection data. */
+
+	/* normal fill */
+	if( itrp == 0)
+	{
+	  for( ij = 0; ij < segj.jsno; ij++ )
+	  {
+		jx= segj.jco[ij]-1;
+		cmx[ipr+jx*nr] += etk* segj.ax[ij] +
+		  ets* segj.bx[ij]+ etc* segj.cx[ij];
+	  }
+
+	  continue;
+	} /* if( itrp == 0) */
+
+	/* transposed fill */
+	if( itrp != 2)
+	{
+	  for( ij = 0; ij < segj.jsno; ij++ )
+	  {
+		jx= segj.jco[ij]-1;
+		cmx[jx+ipr*nr] += etk* segj.ax[ij] +
+		  ets* segj.bx[ij]+ etc* segj.cx[ij];
+	  }
+
+	  continue;
+	} /* if( itrp != 2) */
+
+	/* transposed fill - c(ws) and d(ws)prime (=cw) */
+	for( ij = 0; ij < segj.jsno; ij++ )
+	{
+	  jx= segj.jco[ij]-1;
+	  if( jx < nr)
+		cmx[jx+ipr*nr] += etk* segj.ax[ij] +
+		  ets* segj.bx[ij]+ etc* segj.cx[ij];
+	  else
+	  {
+		jx -= nr;
+		cw[jx+ipr*nr] += etk* segj.ax[ij] +
+		  ets* segj.bx[ij]+ etc* segj.cx[ij];
+	  }
+	} /* for( ij = 0; ij < segj.jsno; ij++ ) */
+
+  } /* for( i = i1; i <= i2; i++ ) */
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* cmww computes matrix elements for wire-wire interactions */
+void cmww( int j, int i1, int i2, complex double *cmx,
+	int nr, complex double *cw, int nw, int itrp)
+{
+  int ipr, iprx, i, ij, jx;
+  double xi, yi, zi, ai, cabi, sabi, salpi;
+  complex double etk, ets, etc;
+
+  /* set source segment parameters */
+  jx = j;
+  j--;
+  dataj.s= data.si[j];
+  dataj.b= data.bi[j];
+  dataj.xj= data.x[j];
+  dataj.yj= data.y[j];
+  dataj.zj= data.z[j];
+  dataj.cabj= data.cab[j];
+  dataj.sabj= data.sab[j];
+  dataj.salpj= data.salp[j];
+
+  /* decide whether ext. t.w. approx. can be used */
+  if( dataj.iexk != 0)
+  {
+	ipr = data.icon1[j];
+	if (ipr > PCHCON) dataj.ind1 = 0;
+	else if( ipr < 0 )
+	{
+	  ipr= -ipr;
+	  iprx= ipr-1;
+
+	  if( -data.icon1[iprx] != jx )
+		dataj.ind1=2;
+	  else
+	  {
+		xi= fabs( dataj.cabj* data.cab[iprx]+ dataj.sabj*
+			data.sab[iprx]+ dataj.salpj* data.salp[iprx]);
+		if( (xi < 0.999999) ||
+			(fabs(data.bi[iprx]/dataj.b-1.0) > 1.0e-6) )
+		  dataj.ind1=2;
+		else
+		  dataj.ind1=0;
+
+	  } /* if( -data.icon1[iprx] != jx ) */
+
+	} /* if( ipr < 0 ) */
+	else
+	{
+	  iprx = ipr-1;
+	  if( ipr == 0 )
+		dataj.ind1=1;
+	  else
+	  {
+		if( ipr != jx )
+		{
+		  if( data.icon2[iprx] != jx )
+			dataj.ind1=2;
+		  else
+		  {
+			xi= fabs( dataj.cabj* data.cab[iprx]+ dataj.sabj*
+				data.sab[iprx]+ dataj.salpj* data.salp[iprx]);
+			if( (xi < 0.999999) ||
+				(fabs(data.bi[iprx]/dataj.b-1.0) > 1.0e-6) )
+			  dataj.ind1=2;
+			else
+			  dataj.ind1=0;
+
+		  } /* if( data.icon2[iprx] != jx ) */
+
+		} /* if( ipr != jx ) */
+		else if( (dataj.cabj* dataj.cabj +
+			  dataj.sabj* dataj.sabj) > 1.0e-8)
+		  dataj.ind1=2;
+		else
+		  dataj.ind1=0;
+
+	  } /* if( ipr == 0 ) */
+
+	} /* if( ipr < 0 ) */
+
+	ipr = data.icon2[j];
+	if (ipr > PCHCON) dataj.ind2 = 2;
+	else if( ipr < 0 )
+	{
+	  ipr= -ipr;
+	  iprx = ipr-1;
+	  if( -data.icon2[iprx] != jx )
+		dataj.ind2=2;
+	  else
+	  {
+		xi= fabs( dataj.cabj* data.cab[iprx]+ dataj.sabj*
+			data.sab[iprx]+ dataj.salpj* data.salp[iprx]);
+		if( (xi < 0.99999) ||
+			(fabs(data.bi[iprx]/dataj.b-1.0) > 1.0e-6) )
+		  dataj.ind2=2;
+		else
+		  dataj.ind2=0;
+
+	  } /* if( -data.icon1[iprx] != jx ) */
+
+	} /* if( ipr < 0 ) */
+	else
+	{
+	  iprx = ipr-1;
+	  if( ipr == 0 )
+		dataj.ind2=1;
+	  else
+	  {
+		if( ipr != jx )
+		{
+		  if( data.icon1[iprx] != jx )
+			dataj.ind2=2;
+		  else
+		  {
+			xi= fabs( dataj.cabj* data.cab[iprx]+ dataj.sabj*
+				data.sab[iprx]+ dataj.salpj* data.salp[iprx]);
+			if( (xi < 0.999999) ||
+				(fabs(data.bi[iprx]/dataj.b-1.0) > 1.0e-6) )
+			  dataj.ind2=2;
+			else
+			  dataj.ind2=0;
+
+		  } /* if( data.icon2[iprx] != jx ) */
+
+		} /* if( ipr != jx ) */
+		else if( (dataj.cabj* dataj.cabj +
+			  dataj.sabj* dataj.sabj) > 1.0e-8)
+		  dataj.ind2=2;
+		else
+		  dataj.ind2=0;
+
+	  } /* if( ipr == 0 ) */
+
+	} /* if( ipr < 0 ) */
+
+  } /* if( dataj.iexk != 0) */
+
+  /* observation loop */
+  ipr=-1;
+  for( i = i1-1; i < i2; i++ )
+  {
+	ipr++;
+	ij= i-j;
+	xi= data.x[i];
+	yi= data.y[i];
+	zi= data.z[i];
+	ai= data.bi[i];
+	cabi= data.cab[i];
+	sabi= data.sab[i];
+	salpi= data.salp[i];
+
+	efld( xi, yi, zi, ai, ij);
+
+	etk= dataj.exk* cabi+ dataj.eyk *
+	  sabi+ dataj.ezk* salpi;
+	ets= dataj.exs* cabi+ dataj.eys *
+	  sabi+ dataj.ezs* salpi;
+	etc= dataj.exc* cabi+ dataj.eyc *
+	  sabi+ dataj.ezc* salpi;
+
+	/* fill matrix elements. element locations */
+	/* determined by connection data. */
+
+	/* normal fill */
+	if( itrp == 0)
+	{
+	  for( ij = 0; ij < segj.jsno; ij++ )
+	  {
+		jx = segj.jco[ij]-1;
+		cmx[ipr+jx*nr] += etk* segj.ax[ij] +
+		  ets* segj.bx[ij]+ etc* segj.cx[ij];
+	  }
+	  continue;
+	}
+
+	/* transposed fill */
+	if( itrp != 2)
+	{
+	  for( ij = 0; ij < segj.jsno; ij++ )
+	  {
+		jx= segj.jco[ij]-1;
+		cmx[jx+ipr*nr] += etk* segj.ax[ij] +
+		  ets* segj.bx[ij]+ etc* segj.cx[ij];
+	  }
+	  continue;
+	}
+
+	/* trans. fill for c(ww) - test for elements for d(ww)prime */
+	for( ij = 0; ij < segj.jsno; ij++ )
+	{
+	  jx= segj.jco[ij]-1;
+	  if( jx < nr)
+		cmx[jx+ipr*nr] += etk* segj.ax[ij] +
+		  ets* segj.bx[ij]+ etc* segj.cx[ij];
+	  else
+	  {
+		jx -= nr;
+		cw[jx*ipr*nw] += etk* segj.ax[ij] +
+		  ets* segj.bx[ij]+ etc* segj.cx[ij];
+	  }
+
+	} /* for( ij = 0; ij < segj.jsno; ij++ ) */
+
+  } /* for( i = i1-1; i < i2; i++ ) */
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* etmns fills the array e with the negative of the */
+/* electric field incident on the structure. e is the */
+/* right hand side of the matrix equation. */
+void etmns( double p1, double p2, double p3, double p4,
+	double p5, double p6, int ipr, complex double *e )
+{
+  int i, is, i1, i2=0, neq;
+  double cth, sth, cph, sph, cet, set, pxl, pyl, pzl, wx;
+  double wy, wz, qx, qy, qz, arg, ds, dsh, rs, r;
+  complex double cx, cy, cz, er, et, ezh;
+  complex double erh, rrv=CPLX_00, rrh=CPLX_00, tt1, tt2;
+
+  neq= data.n+2*data.m;
+  vsorc.nqds=0;
+
+  /* applied field of voltage sources for transmitting case */
+  if( (ipr == 0) || (ipr == 5) )
+  {
+	for( i = 0; i < neq; i++ )
+	  e[i]=CPLX_00;
+
+	if( vsorc.nsant != 0)
+	{
+	  for( i = 0; i < vsorc.nsant; i++ )
+	  {
+		is= vsorc.isant[i]-1;
+		e[is]= -vsorc.vsant[i]/( data.si[is]* data.wlam);
+	  }
+	}
+
+	if( vsorc.nvqd == 0)
+	  return;
+
+	for( i = 0; i < vsorc.nvqd; i++ )
+	{
+	  is= vsorc.ivqd[i];
+	  qdsrc( is, vsorc.vqd[i], e);
+	}
+	return;
+
+  } /* if( (ipr <= 0) || (ipr == 5) ) */
+
+  /* incident plane wave, linearly polarized. */
+  if( ipr <= 3)
+  {
+	cth= cos( p1);
+	sth= sin( p1);
+	cph= cos( p2);
+	sph= sin( p2);
+	cet= cos( p3);
+	set= sin( p3);
+	pxl= cth* cph* cet- sph* set;
+	pyl= cth* sph* cet+ cph* set;
+	pzl= -sth* cet;
+	wx= -sth* cph;
+	wy= -sth* sph;
+	wz= -cth;
+	qx= wy* pzl- wz* pyl;
+	qy= wz* pxl- wx* pzl;
+	qz= wx* pyl- wy* pxl;
+
+	if( gnd.ksymp != 1)
+	{
+	  if( gnd.iperf != 1)
+	  {
+		rrv= csqrt(1.0- gnd.zrati* gnd.zrati* sth* sth);
+		rrh= gnd.zrati* cth;
+		rrh=( rrh- rrv)/( rrh+ rrv);
+		rrv= gnd.zrati* rrv;
+		rrv=-( cth- rrv)/( cth+ rrv);
+	  }
+	  else
+	  {
+		rrv=-CPLX_10;
+		rrh=-CPLX_10;
+	  } /* if( gnd.iperf != 1) */
+
+	} /* if( gnd.ksymp != 1) */
+
+	if( ipr <= 1)
+	{
+	  if( data.n != 0)
+	  {
+		for( i = 0; i < data.n; i++ )
+		{
+		  arg= -TP*( wx* data.x[i]+ wy* data.y[i]+ wz* data.z[i]);
+		  e[i]=-( pxl* data.cab[i]+ pyl* data.sab[i]+ pzl*
+			  data.salp[i])* cmplx( cos( arg), sin( arg));
+		}
+
+		if( gnd.ksymp != 1)
+		{
+		  tt1=( pyl* cph- pxl* sph)*( rrh- rrv);
+		  cx= rrv* pxl- tt1* sph;
+		  cy= rrv* pyl+ tt1* cph;
+		  cz= -rrv* pzl;
+
+		  for( i = 0; i < data.n; i++ )
+		  {
+			arg= -TP*( wx* data.x[i]+ wy* data.y[i]- wz* data.z[i]);
+			e[i]= e[i]-( cx* data.cab[i]+ cy* data.sab[i]+
+				cz* data.salp[i])* cmplx(cos( arg), sin( arg));
+		  }
+
+		} /* if( gnd.ksymp != 1) */
+
+	  } /* if( data.n != 0) */
+
+	  if( data.m == 0)
+		return;
+
+	  i= -1;
+	  i1= data.n-2;
+	  for( is = 0; is < data.m; is++ )
+	  {
+		i++;
+		i1 += 2;
+		i2 = i1+1;
+		arg= -TP*( wx* data.px[i] +
+			wy* data.py[i]+ wz* data.pz[i]);
+		tt1= cmplx( cos( arg), sin( arg)) *
+		  data.psalp[i]* RETA;
+		e[i2]=( qx* data.t1x[i]+ qy* data.t1y[i] +
+			qz* data.t1z[i])* tt1;
+		e[i1]=( qx* data.t2x[i]+ qy* data.t2y[i] +
+			qz* data.t2z[i])* tt1;
+	  }
+
+	  if( gnd.ksymp == 1)
+		return;
+
+	  tt1=( qy* cph- qx* sph)*( rrv- rrh);
+	  cx=-( rrh* qx- tt1* sph);
+	  cy=-( rrh* qy+ tt1* cph);
+	  cz= rrh* qz;
+
+	  i= -1;
+	  i1= data.n-2;
+	  for( is = 0; is < data.m; is++ )
+	  {
+		i++;
+		i1 += 2;
+		i2 = i1+1;
+		arg= -TP*( wx* data.px[i] +
+			wy* data.py[i]- wz* data.pz[i]);
+		tt1= cmplx( cos( arg), sin( arg)) *
+		  data.psalp[i]* RETA;
+		e[i2]= e[i2]+( cx* data.t1x[i]+ cy *
+			data.t1y[i]+ cz* data.t1z[i])* tt1;
+		e[i1]= e[i1]+( cx* data.t2x[i]+ cy *
+			data.t2y[i]+ cz* data.t2z[i])* tt1;
+	  }
+	  return;
+
+	} /* if( ipr <= 1) */
+
+	/* incident plane wave, elliptic polarization. */
+	tt1=-(CPLX_01)* p6;
+	if( ipr == 3)
+	  tt1= -tt1;
+
+	if( data.n != 0)
+	{
+	  cx= pxl+ tt1* qx;
+	  cy= pyl+ tt1* qy;
+	  cz= pzl+ tt1* qz;
+
+	  for( i = 0; i < data.n; i++ )
+	  {
+		arg= -TP*( wx* data.x[i]+ wy* data.y[i] + wz* data.z[i]);
+		e[i]=-( cx* data.cab[i]+ cy* data.sab[i] +
+			cz * data.salp[i])* cmplx( cos( arg), sin( arg));
+	  }
+
+	  if( gnd.ksymp != 1)
+	  {
+		tt2=( cy* cph- cx* sph)*( rrh- rrv);
+		cx= rrv* cx- tt2* sph;
+		cy= rrv* cy+ tt2* cph;
+		cz= -rrv* cz;
+
+		for( i = 0; i < data.n; i++ )
+		{
+		  arg= -TP*( wx* data.x[i]+ wy* data.y[i]- wz* data.z[i]);
+		  e[i]= e[i]-( cx* data.cab[i]+ cy* data.sab[i]+
+			  cz* data.salp[i])* cmplx(cos( arg), sin( arg));
+		}
+
+	  } /* if( gnd.ksymp != 1) */
+
+	} /* if( n != 0) */
+
+	if( data.m == 0)
+	  return;
+
+	cx= qx- tt1* pxl;
+	cy= qy- tt1* pyl;
+	cz= qz- tt1* pzl;
+
+	i= -1;
+	i1= data.n-2;
+	for( is = 0; is < data.m; is++ )
+	{
+	  i++;
+	  i1 += 2;
+	  i2 = i1+1;
+	  arg= -TP*( wx* data.px[i] +
+		  wy* data.py[i]+ wz* data.pz[i]);
+	  tt2= cmplx( cos( arg),
+		  sin( arg)) * data.psalp[i] * RETA;
+	  e[i2]=( cx* data.t1x[i] +
+		  cy* data.t1y[i]+ cz* data.t1z[i])* tt2;
+	  e[i1]=( cx* data.t2x[i] +
+		  cy* data.t2y[i]+ cz* data.t2z[i])* tt2;
+	}
+
+	if( gnd.ksymp == 1)
+	  return;
+
+	tt1=( cy* cph- cx* sph)*( rrv- rrh);
+	cx=-( rrh* cx- tt1* sph);
+	cy=-( rrh* cy+ tt1* cph);
+	cz= rrh* cz;
+
+	i= -1;
+	i1= data.n-2;
+	for( is=0; is < data.m; is++ )
+	{
+	  i++;
+	  i1 += 2;
+	  i2 = i1+1;
+	  arg= -TP*( wx* data.px[i] +
+		  wy* data.py[i]- wz* data.pz[i]);
+	  tt1= cmplx( cos( arg), sin( arg)) *
+		data.psalp[i]* RETA;
+	  e[i2]= e[i2]+( cx* data.t1x[i]+ cy *
+		  data.t1y[i]+ cz* data.t1z[i])* tt1;
+	  e[i1]= e[i1]+( cx* data.t2x[i]+ cy *
+		  data.t2y[i]+ cz* data.t2z[i])* tt1;
+	}
+
+	return;
+
+  } /* if( ipr <= 3) */
+
+  /* incident field of an elementary current source. */
+  wz= cos( p4);
+  wx= wz* cos( p5);
+  wy= wz* sin( p5);
+  wz= sin( p4);
+  ds= p6*59.9580;
+  dsh= p6/(2.0* TP);
+
+  is= 0;
+  i1= data.n-2;
+  for( i = 0; i < data.npm; i++ )
+  {
+	if( i >= data.n )
+	{
+	  i1 += 2;
+	  i2 = i1+1;
+	  pxl= data.px[is]- p1;
+	  pyl= data.py[is]- p2;
+	  pzl= data.pz[is]- p3;
+	}
+	else
+	{
+	  pxl= data.x[i]- p1;
+	  pyl= data.y[i]- p2;
+	  pzl= data.z[i]- p3;
+	}
+
+	rs= pxl* pxl+ pyl* pyl+ pzl* pzl;
+	if( rs < 1.0e-30)
+	  continue;
+
+	r= sqrt( rs);
+	pxl= pxl/ r;
+	pyl= pyl/ r;
+	pzl= pzl/ r;
+	cth= pxl* wx+ pyl* wy+ pzl* wz;
+	sth= sqrt(1.0- cth* cth);
+	qx= pxl- wx* cth;
+	qy= pyl- wy* cth;
+	qz= pzl- wz* cth;
+
+	arg= sqrt( qx* qx+ qy* qy+ qz* qz);
+	if( arg >= 1.0e-30)
+	{
+	  qx= qx/ arg;
+	  qy= qy/ arg;
+	  qz= qz/ arg;
+	}
+	else
+	{
+	  qx=1.0;
+	  qy=0.0;
+	  qz=0.0;
+
+	} /* if( arg >= 1.0e-30) */
+
+	arg= -TP* r;
+	tt1= cmplx( cos( arg), sin( arg));
+
+	if( i < data.n )
+	{
+	  tt2= cmplx(1.0,-1.0/( r* TP))/ rs;
+	  er= ds* tt1* tt2* cth;
+	  et=.5* ds* tt1*((CPLX_01)* TP/ r+ tt2)* sth;
+	  ezh= er* cth- et* sth;
+	  erh= er* sth+ et* cth;
+	  cx= ezh* wx+ erh* qx;
+	  cy= ezh* wy+ erh* qy;
+	  cz= ezh* wz+ erh* qz;
+	  e[i]=-( cx* data.cab[i] +
+		  cy* data.sab[i]+ cz* data.salp[i]);
+	}
+	else
+	{
+	  pxl= wy* qz- wz* qy;
+	  pyl= wz* qx- wx* qz;
+	  pzl= wx* qy- wy* qx;
+	  tt2= dsh* tt1* cmplx(1.0/ r, TP) /
+		r* sth* data.psalp[is];
+	  cx= tt2* pxl;
+	  cy= tt2* pyl;
+	  cz= tt2* pzl;
+	  e[i2]= cx* data.t1x[is] +
+		cy* data.t1y[is]+ cz* data.t1z[is];
+	  e[i1]= cx* data.t2x[is] +
+		cy* data.t2y[is]+ cz* data.t2z[is];
+	  is++;
+	} /* if( i < data.n) */
+
+  } /* for( i = 0; i < npm; i++ ) */
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* subroutine to factor a matrix into a unit lower triangular matrix */
+/* and an upper triangular matrix using the gauss-doolittle algorithm */
+/* presented on pages 411-416 of a. ralston--a first course in */
+/* numerical analysis.  comments below refer to comments in ralstons */
+/* text.    (matrix transposed.) */
+
+void factr( int n, complex double *a, int *ip, int ndim)
+{
+  int r, rm1, rp1, pj, pr, iflg, k, j, jp1, i;
+  double dmax, elmag;
+  complex double arj, *scm = NULL;
+
+  /* Allocate to scratch memory */
+  size_t mreq = (size_t)data.np2m * sizeof(complex double);
+  mem_alloc( (void *)&scm, mreq, "in matrix.c");
+
+  /* Un-transpose the matrix for Gauss elimination */
+  for( i = 1; i < n; i++ )
+	for( j = 0; j < i; j++ )
+	{
+	  arj = a[i+j*ndim];
+	  a[i+j*ndim] = a[j+i*ndim];
+	  a[j+i*ndim] = arj;
+	}
+
+  iflg=FALSE;
+  /* step 1 */
+  for( r = 0; r < n; r++ )
+  {
+	for( k = 0; k < n; k++ )
+	  scm[k]= a[k+r*ndim];
+
+	/* steps 2 and 3 */
+	rm1= r;
+	if( rm1 > 0)
+	{
+	  for( j = 0; j < rm1; j++ )
+	  {
+		pj= ip[j]-1;
+		arj= scm[pj];
+		a[j+r*ndim]= arj;
+		scm[pj]= scm[j];
+		jp1= j+1;
+
+		for( i = jp1; i < n; i++ )
+		  scm[i] -= a[i+j*ndim]* arj;
+
+	  } /* for( j = 0; j < rm1; j++ ) */
+
+	} /* if( rm1 >= 0.0) */
+
+	/* step 4 */
+	dmax= creal( scm[r]*conj(scm[r]) );
+
+	rp1= r+1;
+	ip[r]= rp1;
+	if( rp1 < n)
+	{
+	  for( i = rp1; i < n; i++ )
+	  {
+		elmag= creal( scm[i]* conj(scm[i]) );
+		if( elmag >= dmax)
+		{
+		  dmax= elmag;
+		  ip[r]= i+1;
+		}
+	  }
+	} /* if( rp1 < n) */
+
+	if( dmax < 1.0e-10)
+	  iflg=TRUE;
+
+	pr= ip[r]-1;
+	a[r+r*ndim]= scm[pr];
+	scm[pr]= scm[r];
+
+	/* step 5 */
+	if( rp1 < n)
+	{
+	  arj=1.0/ a[r+r*ndim];
+
+	  for( i = rp1; i < n; i++ )
+		a[i+r*ndim]= scm[i]* arj;
+	}
+
+	if( iflg == TRUE )
+	{
+	  fprintf( stderr,
+		  "xnec2c: pivot(%d)= %16.8E\n", r, dmax );
+	  iflg=FALSE;
+	}
+
+  } /* for( r=0; r < n; r++ ) */
+
+  free_ptr( (void *)&scm );
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* factrs, for symmetric structure, transforms submatricies to form */
+/* matricies of the symmetric modes and calls routine to factor */
+/* matricies.  if no symmetry, the routine is called to factor the */
+/* complete matrix. */
+void factrs( int np, int nrow, complex double *a, int *ip )
+{
+  int kk, ka;
+
+  smat.nop = nrow/np;
+  for( kk = 0; kk < smat.nop; kk++ )
+  {
+	ka= kk* np;
+	factr( np, &a[ka], &ip[ka], nrow );
+  }
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* fblock sets parameters for out-of-core */
+/* solution for the primary matrix (a) */
+  void
+fblock( int nrow, int ncol, int imax, int ipsym )
+{
+  int i, j, k, ka, kk;
+  double phaz, arg;
+  complex double deter;
+
+  if( nrow*ncol <= imax)
+  {
+	matpar.npblk= nrow;
+	matpar.nlast= nrow;
+	matpar.imat= nrow* ncol;
+
+	if( nrow == ncol)
+	{
+	  matpar.icase=1;
+	  return;
+	}
+	else matpar.icase=2;
+
+  } /* if( nrow*ncol <= imax) */
+
+  smat.nop = ncol/nrow;
+  if( smat.nop*nrow != ncol)
+  {
+	fprintf( stderr,
+		"xnec2c: fblock(): symmetry error - nrow:%d ncol:%d\n",nrow, ncol );
+	stop( _("fblock(): Symmetry error"), ERR_STOP );
+  }
+
+  /* set up smat.ssx matrix for rotational symmetry. */
+  if( ipsym <= 0)
+  {
+	phaz = TP/smat.nop;
+
+	for( i = 1; i < smat.nop; i++ )
+	{
+	  for( j= i; j < smat.nop; j++ )
+	  {
+		arg= phaz* (double)i * (double)j;
+		smat.ssx[i+j*smat.nop]= cmplx( cos( arg), sin( arg));
+		smat.ssx[j+i*smat.nop]= smat.ssx[i+j*smat.nop];
+	  }
+	}
+	return;
+
+  } /* if( ipsym <= 0) */
+
+  /* set up smat.ssx matrix for plane symmetry */
+  kk=1;
+  smat.ssx[0]=CPLX_10;
+
+  k = 2;
+  for( ka = 1; k != smat.nop; ka++ )
+	k *= 2;
+
+  for( k = 0; k < ka; k++ )
+  {
+	for( i = 0; i < kk; i++ )
+	{
+	  for( j = 0; j < kk; j++ )
+	  {
+		deter= smat.ssx[i+j*smat.nop];
+		smat.ssx[i+(j+kk)*smat.nop]= deter;
+		smat.ssx[i+kk+(j+kk)*smat.nop]= -deter;
+		smat.ssx[i+kk+j*smat.nop]= deter;
+	  }
+	}
+	kk *= 2;
+
+  } /* for( k = 0; k < ka; k++ ) */
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+
+/* subroutine to solve the matrix equation lu*x=b where l is a unit */
+/* lower triangular matrix and u is an upper triangular matrix both */
+/* of which are stored in a.  the rhs vector b is input and the */
+/* solution is returned through vector b.   (matrix transposed) */
+  void
+solve( int n, complex double *a, int *ip,
+	complex double *b, int ndim )
+{
+  int i, ip1, j, k, pia;
+  complex double sum, *scm = NULL;
+
+  /* Allocate to scratch memory */
+  size_t mreq = (size_t)data.np2m * sizeof(complex double);
+  mem_alloc( (void *)&scm, mreq, "in matrix.c");
+
+  /* forward substitution */
+  for( i = 0; i < n; i++ )
+  {
+	pia= ip[i]-1;
+	scm[i]= b[pia];
+	b[pia]= b[i];
+	ip1= i+1;
+
+	if( ip1 < n)
+	  for( j = ip1; j < n; j++ )
+		b[j] -= a[j+i*ndim]* scm[i];
+  }
+
+  /* backward substitution */
+  for( k = 0; k < n; k++ )
+  {
+	i= n-k-1;
+	sum=CPLX_00;
+	ip1= i+1;
+
+	if( ip1 < n)
+	  for( j = ip1; j < n; j++ )
+		sum += a[i+j*ndim]* b[j];
+
+	b[i]=( scm[i]- sum)/ a[i+i*ndim];
+  }
+
+  free_ptr( (void *)&scm );
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* subroutine solves, for symmetric structures, handles the */
+/* transformation of the right hand side vector and solution */
+/* of the matrix eq. */
+  void
+solves( complex double *a, int *ip,
+	complex double *b,	int neq, int nrh,
+	int np, int n, int mp, int m)
+{
+  int npeq, nrow, ic, i, kk, ia, ib, j, k;
+  double fnop, fnorm;
+  complex double  sum, *scm = NULL;
+
+  npeq= np+ 2*mp;
+  smat.nop = neq/npeq;
+  fnop= smat.nop;
+  fnorm=1.0/ fnop;
+  nrow= neq;
+
+  /* Allocate to scratch memory */
+  size_t mreq = (size_t)data.np2m * sizeof(complex double);
+  mem_alloc( (void *)&scm, mreq, "in matrix.c");
+
+  if( smat.nop != 1)
+  {
+	for( ic = 0; ic < nrh; ic++ )
+	{
+	  if( (n != 0) && (m != 0) )
+	  {
+		for( i = 0; i < neq; i++ )
+		  scm[i]= b[i+ic*neq];
+
+		kk=2* mp;
+		ia= np-1;
+		ib= n-1;
+		j= np-1;
+
+		for( k = 0; k < smat.nop; k++ )
+		{
+		  if( k != 0 )
+		  {
+			for( i = 0; i < np; i++ )
+			{
+			  ia++;
+			  j++;
+			  b[j+ic*neq]= scm[ia];
+			}
+
+			if( k == (smat.nop-1) )
+			  continue;
+
+		  } /* if( k != 0 ) */
+
+		  for( i = 0; i < kk; i++ )
+		  {
+			ib++;
+			j++;
+			b[j+ic*neq]= scm[ib];
+		  }
+
+		} /* for( k = 0; k < smat.nop; k++ ) */
+
+	  } /* if( (n != 0) && (m != 0) ) */
+
+	  /* transform matrix eq. rhs vector according to symmetry modes */
+	  for( i = 0; i < npeq; i++ )
+	  {
+		for( k = 0; k < smat.nop; k++ )
+		{
+		  ia= i+ k* npeq;
+		  scm[k]= b[ia+ic*neq];
+		}
+
+		sum= scm[0];
+		for( k = 1; k < smat.nop; k++ )
+		  sum += scm[k];
+
+		b[i+ic*neq]= sum* fnorm;
+
+		for( k = 1; k < smat.nop; k++ )
+		{
+		  ia= i+ k* npeq;
+		  sum= scm[0];
+
+		  for( j = 1; j < smat.nop; j++ )
+			sum += scm[j]* conj( smat.ssx[k+j*smat.nop]);
+
+		  b[ia+ic*neq]= sum* fnorm;
+		}
+
+	  } /* for( i = 0; i < npeq; i++ ) */
+
+	} /* for( ic = 0; ic < nrh; ic++ ) */
+
+  } /* if( smat.nop != 1) */
+
+  /* solve each mode equation */
+  for( kk = 0; kk < smat.nop; kk++ )
+  {
+	ia= kk* npeq;
+	ib= ia;
+
+	for( ic = 0; ic < nrh; ic++ )
+	  solve( npeq, &a[ib], &ip[ia], &b[ia+ic*neq], nrow );
+
+  } /* for( kk = 0; kk < smat.nop; kk++ ) */
+
+  if( smat.nop == 1)
+  {
+	free_ptr( (void *)&scm );
+	return;
+  }
+
+  /* inverse transform the mode solutions */
+  for( ic = 0; ic < nrh; ic++ )
+  {
+	for( i = 0; i < npeq; i++ )
+	{
+	  for( k = 0; k < smat.nop; k++ )
+	  {
+		ia= i+ k* npeq;
+		scm[k]= b[ia+ic*neq];
+	  }
+
+	  sum= scm[0];
+	  for( k = 1; k < smat.nop; k++ )
+		sum += scm[k];
+
+	  b[i+ic*neq]= sum;
+	  for( k = 1; k < smat.nop; k++ )
+	  {
+		ia= i+ k* npeq;
+		sum= scm[0];
+
+		for( j = 1; j < smat.nop; j++ )
+		  sum += scm[j]* smat.ssx[k+j*smat.nop];
+
+		b[ia+ic*neq]= sum;
+	  }
+
+	} /* for( i = 0; i < npeq; i++ ) */
+
+	if( (n == 0) || (m == 0) )
+	  continue;
+
+	for( i = 0; i < neq; i++ )
+	  scm[i]= b[i+ic*neq];
+
+	kk=2* mp;
+	ia= np-1;
+	ib= n-1;
+	j= np-1;
+
+	for( k = 0; k < smat.nop; k++ )
+	{
+	  if( k != 0 )
+	  {
+		for( i = 0; i < np; i++ )
+		{
+		  ia++;
+		  j++;
+		  b[ia+ic*neq]= scm[j];
+		}
+
+		if( k == smat.nop)
+		  continue;
+
+	  } /* if( k != 0 ) */
+
+	  for( i = 0; i < kk; i++ )
+	  {
+		ib++;
+		j++;
+		b[ib+ic*neq]= scm[j];
+	  }
+
+	} /* for( k = 0; k < smat.nop; k++ ) */
+
+  } /* for( ic = 0; ic < nrh; ic++ ) */
+
+  free_ptr( (void *)&scm );
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
diff --git a/src/matrix.h b/src/matrix.h
new file mode 100644
index 0000000..7c59ea7
--- /dev/null
+++ b/src/matrix.h
@@ -0,0 +1,28 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	MATRIX_H
+#define	MATRIX_H	1
+
+#include "common.h"
+#include "support.h"
+
+#define	RETA	2.654420938E-3
+
+#endif
+
diff --git a/src/nec2_model.c b/src/nec2_model.c
new file mode 100644
index 0000000..966320d
--- /dev/null
+++ b/src/nec2_model.c
@@ -0,0 +1,692 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* nec2_model.c
+ *
+ * Structure modelling functions for xnec2c
+ */
+
+#include "nec2_model.h"
+#include "shared.h"
+
+/*------------------------------------------------------------------------*/
+
+/* Nec2_Input_File_Treeview()
+ *
+ * Reads a NEC2 input file and renders it in a tree view
+ */
+  void
+Nec2_Input_File_Treeview( int action )
+{
+  /* Abort if editor window is not opened */
+  if( nec2_edit_window == NULL ) return;
+
+  /* Signal save of edited file */
+  SetFlag( NEC2_EDIT_SAVE );
+
+  /* Implement user action */
+  switch( action )
+  {
+	case NEC2_EDITOR_REVERT: /* Revert editor to file contents */
+	  /* Clear all tree view list stores */
+	  gtk_list_store_clear( cmnt_store );
+	  gtk_list_store_clear( geom_store );
+	  gtk_list_store_clear( cmnd_store );
+	  break;
+
+	case NEC2_EDITOR_NEW: /* Create new default input file */
+	  /* If tree view stores are already
+	   * created, just make the new file */
+	  Create_List_Stores(); /* Only done if needed */
+	  Create_Default_File();
+	  return;
+
+	case NEC2_EDITOR_RELOAD: /* Just reload input file */
+	  Create_List_Stores();  /* Only done if needed */
+	  break;
+
+  } /* switch( action ) */
+
+  /* Rewind NEC2 input file */
+  rewind( input_fp );
+
+  /*** List Comment cards ***/
+  List_Comments();
+
+  /*** List Geometry cards ***/
+  List_Geometry();
+
+  /*** Read Command cards ***/
+  List_Commands();
+
+  return;
+} /* Nec2_Input_File_Treeview() */
+
+/*------------------------------------------------------------------------*/
+
+/* Create_List_Stores()
+ *
+ * Create stores needed for the treeview
+ */
+  void
+Create_List_Stores( void )
+{
+  /* Comments column names */
+  char *cmnt_col_name[CMNT_NUM_COLS] =
+  { _("Card"), _("Comments") };
+
+  /* Geometry column names */
+  char *geom_col_name[GEOM_NUM_COLS] =
+  { _("Card"), "I1", "I2", "F1", "F2", "F3", "F4", "F5", "F6", "F7" };
+
+  /* Command column names */
+  char *cmnd_col_name[CMND_NUM_COLS] =
+  { _("Card"), "I1", "I2", "I3", "I4", "F1", "F2", "F3", "F4", "F5", "F6" };
+
+
+  /* Create list stores only if needed */
+  if( cmnt_store != NULL ) return;
+
+  /* Create comments list store */
+  cmnt_store = gtk_list_store_new(
+	  CMNT_NUM_COLS, G_TYPE_STRING, G_TYPE_STRING );
+
+  /* Create geometry data list store */
+  geom_store = gtk_list_store_new(
+	  GEOM_NUM_COLS, G_TYPE_STRING,
+	  G_TYPE_STRING, G_TYPE_STRING,
+	  G_TYPE_STRING, G_TYPE_STRING,
+	  G_TYPE_STRING, G_TYPE_STRING,
+	  G_TYPE_STRING, G_TYPE_STRING,
+	  G_TYPE_STRING );
+
+  /* Create control commands data list store */
+  cmnd_store = gtk_list_store_new(
+	  CMND_NUM_COLS, G_TYPE_STRING,
+	  G_TYPE_STRING, G_TYPE_STRING,
+	  G_TYPE_STRING, G_TYPE_STRING,
+	  G_TYPE_STRING, G_TYPE_STRING,
+	  G_TYPE_STRING, G_TYPE_STRING,
+	  G_TYPE_STRING, G_TYPE_STRING );
+
+  /* Insert comment columns */
+  Insert_Columns(
+	  nec2_edit_window, "nec2_cmnt_treeview",
+	  cmnt_store, CMNT_NUM_COLS, cmnt_col_name );
+
+  /* Insert geometry columns */
+  Insert_Columns(
+	  nec2_edit_window, "nec2_geom_treeview",
+	  geom_store, GEOM_NUM_COLS, geom_col_name );
+
+  /* Insert command columns */
+  Insert_Columns(
+	  nec2_edit_window, "nec2_cmnd_treeview",
+	  cmnd_store, CMND_NUM_COLS, cmnd_col_name );
+
+  /* Set models to treviews */
+  gtk_tree_view_set_model(
+	  GTK_TREE_VIEW(lookup_widget(
+		  nec2_edit_window, "nec2_cmnt_treeview")),
+	  GTK_TREE_MODEL(cmnt_store) );
+  gtk_tree_view_set_model(
+	  GTK_TREE_VIEW(lookup_widget(
+		  nec2_edit_window, "nec2_geom_treeview")),
+	  GTK_TREE_MODEL(geom_store) );
+  gtk_tree_view_set_model(
+	  GTK_TREE_VIEW(lookup_widget(
+		  nec2_edit_window, "nec2_cmnd_treeview")),
+	  GTK_TREE_MODEL(cmnd_store) );
+
+} /* Create_List_Stores() */
+
+/*------------------------------------------------------------------------*/
+
+/* Create_Default_File()
+ *
+ * Creates a default NEC2 file if needed
+ */
+  void
+Create_Default_File( void )
+{
+  GtkTreeIter iter;
+  int idx, idi;
+  char str[64];
+  size_t s = sizeof( str );
+
+
+  /* Clear all tree views */
+  gtk_list_store_clear( cmnt_store );
+  gtk_list_store_clear( geom_store );
+  gtk_list_store_clear( cmnd_store );
+
+  /* Append a default comment row */
+  Strlcpy( str, _("--- NEC2 Input File created by "), s );
+  Strlcat( str, PACKAGE_STRING, s );
+  Strlcat( str, " ---", s );
+  gtk_list_store_append( cmnt_store, &iter );
+  gtk_list_store_set(
+	  cmnt_store, &iter,
+	  CMNT_COL_NAME, "CM",
+	  CMNT_COL_COMMENT, str, -1 );
+
+  /* Append a default CE card */
+  gtk_list_store_append( cmnt_store, &iter );
+  gtk_list_store_set(
+	  cmnt_store, &iter,
+	  CMNT_COL_NAME, "CE",
+	  CMNT_COL_COMMENT,
+	  _("--- End Comments ---"),
+	  -1 );
+
+  /* Append a dipole wire (GW) card */
+  gtk_list_store_append( geom_store, &iter );
+  gtk_list_store_set( geom_store, &iter,
+	  GEOM_COL_NAME, "GW",
+	  GEOM_COL_I1, "1",
+	  GEOM_COL_I2, "15",
+	  GEOM_COL_F1, "0.0",
+	  GEOM_COL_F2, "0.0",
+	  GEOM_COL_F3, "-1.0",
+	  GEOM_COL_F4, "0.0",
+	  GEOM_COL_F5, "0.0",
+	  GEOM_COL_F6, "1.0",
+	  GEOM_COL_F7, "0.015",
+	  -1 );
+
+  /* Append a geometry end (GE) card */
+  gtk_list_store_append( geom_store, &iter );
+  gtk_list_store_set( geom_store,
+	  &iter, GEOM_COL_NAME, "GE", -1 );
+  for( idx = GEOM_COL_I1; idx < GEOM_NUM_COLS; idx++ )
+	gtk_list_store_set( geom_store, &iter, idx, "0", -1 );
+
+  /* Append an excitation (EX) card */
+  gtk_list_store_append( cmnd_store, &iter );
+  gtk_list_store_set( cmnd_store, &iter,
+	  CMND_COL_NAME, "EX",
+	  CMND_COL_I1, "0",
+	  CMND_COL_I2, "1",
+	  CMND_COL_I3, "8",
+	  CMND_COL_I4, "0",
+	  CMND_COL_F1, "1.0",
+	  CMND_COL_F2, "0.0",
+	  CMND_COL_F3, "0.0",
+	  CMND_COL_F4, "0.0",
+	  CMND_COL_F5, "0.0",
+	  CMND_COL_F6, "0.0",
+	  -1 );
+
+  /* Append a frequency (FR) card */
+  gtk_list_store_append( cmnd_store, &iter );
+  gtk_list_store_set( cmnd_store, &iter,
+	  CMND_COL_NAME, "FR",
+	  CMND_COL_I1, "0",
+	  CMND_COL_I2, "11",
+	  CMND_COL_I3, "0",
+	  CMND_COL_I4, "0",
+	  CMND_COL_F1, "50.0",
+	  CMND_COL_F2, "5.0",
+	  CMND_COL_F3, "0.0",
+	  CMND_COL_F4, "0.0",
+	  CMND_COL_F5, "0.0",
+	  CMND_COL_F6, "0.0",
+	  -1 );
+
+  /* Append a near H field (NH) card */
+  gtk_list_store_append( cmnd_store, &iter );
+  gtk_list_store_set( cmnd_store, &iter,
+	  CMND_COL_NAME, "NH",
+	  CMND_COL_I1, "0",
+	  CMND_COL_I2, "0",
+	  CMND_COL_I3, "0",
+	  CMND_COL_I4, "0",
+	  CMND_COL_F1, "0.0",
+	  CMND_COL_F2, "0.0",
+	  CMND_COL_F3, "0.0",
+	  CMND_COL_F4, "0.0",
+	  CMND_COL_F5, "0.0",
+	  CMND_COL_F6, "0.0",
+	  -1 );
+
+  /* Append a near E field (NE) card */
+  gtk_list_store_append( cmnd_store, &iter );
+  gtk_list_store_set( cmnd_store, &iter,
+	  CMND_COL_NAME, "NE",
+	  CMND_COL_I1, "0",
+	  CMND_COL_I2, "10",
+	  CMND_COL_I3, "1",
+	  CMND_COL_I4, "10",
+	  CMND_COL_F1, "-1.35",
+	  CMND_COL_F2, "0.0",
+	  CMND_COL_F3, "-1.35",
+	  CMND_COL_F4, "0.3",
+	  CMND_COL_F5, "0.0",
+	  CMND_COL_F6, "0.3",
+	  -1 );
+
+  /* Append a radiation pattern (RP) card */
+  gtk_list_store_append( cmnd_store, &iter );
+  gtk_list_store_set( cmnd_store, &iter,
+	  CMND_COL_NAME, "RP",
+	  CMND_COL_I1, "0",
+	  CMND_COL_I2, "19",
+	  CMND_COL_I3, "37",
+	  CMND_COL_I4, "1000",
+	  CMND_COL_F1, "0.0",
+	  CMND_COL_F2, "0.0",
+	  CMND_COL_F3, "10.0",
+	  CMND_COL_F4, "10.0",
+	  CMND_COL_F5, "0.0",
+	  CMND_COL_F6, "0.0",
+	  -1 );
+
+  /* Append a file end (EN) card */
+  gtk_list_store_append( cmnd_store, &iter );
+  gtk_list_store_set( cmnd_store,
+	  &iter, CMND_COL_NAME, "EN", -1 );
+  for( idi = CMND_COL_I1; idi < CMND_NUM_COLS; idi++ )
+	gtk_list_store_set( cmnd_store, &iter, idi, "0", -1 );
+
+} /* Create_Default_File() */
+
+/*------------------------------------------------------------------------*/
+
+/* List_Comments()
+ *
+ * Reads comments from file and lists in tree view
+ */
+  void
+List_Comments( void )
+{
+  GtkTreeIter iter;
+  gboolean ret;
+
+  /* "Card" mnemonic and line buffer */
+  char ain[3], line_buf[LINE_LEN];
+
+  /* Check that store is empty */
+  ret = gtk_tree_model_get_iter_first(
+	  GTK_TREE_MODEL(cmnt_store), &iter );
+
+  /* Keep reading till the CE card */
+  do
+  {
+	/* Read a line from input file */
+	if( Load_Line(line_buf, input_fp) == EOF )
+	  stop( _("List_Comments():\n"\
+			"Error reading input file\n"\
+			"Unexpected EOF (End of File)"), ERR_OK );
+
+	/* Check for short or missing CM or CE and fix */
+	if( strlen(line_buf) < 2 )
+	{
+	  stop( _("List_Comments():\n"\
+			"Error reading input file\n"\
+			"Comment mnemonic short or missing"), ERR_OK );
+	  Strlcpy( line_buf, "XX ", sizeof(line_buf) );
+	}
+
+	/* If only mnemonic in card,
+	 * "cut" the rest of line buffer */
+	if( strlen(line_buf) == 2 ) line_buf[3] = '\0';
+
+	/* Separate card's id mnemonic */
+	Strlcpy( ain, line_buf, 3 );
+
+	/* Append a comment row and fill in text if opening call */
+	if( !ret )
+	  gtk_list_store_append( cmnt_store, &iter );
+	gtk_list_store_set(
+		cmnt_store, &iter,
+		CMNT_COL_NAME, ain,
+		CMNT_COL_COMMENT,
+		&line_buf[3], -1 );
+
+	/* Get new row if available */
+	ret = gtk_tree_model_iter_next(
+		GTK_TREE_MODEL(cmnt_store), &iter);
+
+  } /* do */
+  while( strcmp(ain, "CE") != 0 );
+
+} /* List_Comments() */
+
+/*------------------------------------------------------------------------*/
+
+/* List_Geometry()
+ *
+ * Reads geometry cards from file and lists in tree view
+ */
+  void
+List_Geometry( void )
+{
+  GtkTreeIter iter;
+
+  /* "Card" mnemonic */
+  char ain[3];
+
+  /* int data from cards */
+  int iv[4];
+
+  /* float data from cards */
+  double fv[7];
+
+  /* For snprintf */
+  char si[4][7], sf[7][13];
+
+  int idx;
+  gboolean ret;
+
+  /* Check that store is empty */
+  ret = gtk_tree_model_get_iter_first(
+	  GTK_TREE_MODEL(geom_store), &iter );
+  do
+  {
+	/* Read a geometry card. Errors are handled in readgm() */
+	if( !readgm( ain, &iv[0], &iv[1],
+		&fv[0], &fv[1], &fv[2], &fv[3],
+		&fv[4], &fv[5], &fv[6]) )
+	  break;
+
+	/* Ignore in-data (NEC4 style) comments */
+	if( strcmp(ain, "CM") == 0 ) continue;
+
+	/* Format card data and print to string */
+	snprintf( si[0], 6, "%5d",  iv[0] );
+	snprintf( si[1], 6, "%5d ", iv[1] );
+	for( idx = GEOM_COL_F1; idx <= GEOM_COL_F7; idx++ )
+	  snprintf( sf[idx-GEOM_COL_F1], 13,
+		  "%12.5E", (double)fv[idx-GEOM_COL_F1] );
+
+	/* Append a comment row and fill in text if opening call */
+	if( !ret )
+	  gtk_list_store_append( geom_store, &iter );
+
+	/* Set data to list store */
+	gtk_list_store_set(
+		geom_store, &iter, GEOM_COL_NAME, ain, -1 );
+	for( idx = GEOM_COL_I1; idx <= GEOM_COL_I2; idx++ )
+	  gtk_list_store_set(
+		  geom_store, &iter, idx, si[idx-GEOM_COL_I1], -1 );
+	for( idx = GEOM_COL_F1; idx <= GEOM_COL_F7; idx++ )
+	  gtk_list_store_set(
+		  geom_store, &iter, idx, sf[idx-GEOM_COL_F1], -1 );
+
+	/* Get new row if available */
+	ret = gtk_tree_model_iter_next(
+		GTK_TREE_MODEL(geom_store), &iter);
+  }
+  while( strcmp(ain, "GE") != 0 );
+
+} /* List_Geometry() */
+
+/*------------------------------------------------------------------------*/
+
+/* List_Commands()
+ *
+ * Reads command cards from file and lists in tree view
+ */
+  void
+List_Commands( void )
+{
+  GtkTreeIter iter;
+
+  /* "Card" mnemonic and line buffer */
+  char ain[3];
+
+  /* int data from cards */
+  int iv[4];
+
+  /* float data from cards */
+  double fv[7];
+
+  /* For snprintf */
+  char si[4][7], sf[7][13];
+
+  int idx;
+  gboolean ret;
+
+  /* Check that store is empty */
+  ret = gtk_tree_model_get_iter_first(
+	  GTK_TREE_MODEL(cmnd_store), &iter );
+  do
+  {
+	/* Read a command card. Errors are handled in readmn() */
+	readmn(
+		ain, &iv[0], &iv[1], &iv[2], &iv[3], &fv[0],
+		&fv[1], &fv[2], &fv[3], &fv[4], &fv[5] );
+
+	/* Ignore in-data (NEC4 style) comments */
+	if( strcmp(ain, "CM") == 0 ) continue;
+
+	/* Format card data and print to string */
+	for( idx = CMND_COL_I1; idx < CMND_COL_I4; idx++ )
+	  snprintf( si[idx-CMND_COL_I1], 6, "%5d", iv[idx-CMND_COL_I1] );
+
+	/* For alignment of data printed to NEC2 file */
+	snprintf( si[idx-CMND_COL_I1], 7, " %5d", iv[idx-CMND_COL_I1] );
+	for( idx = CMND_COL_F1; idx <= CMND_COL_F6; idx++ )
+	  snprintf( sf[idx-CMND_COL_F1], 13,
+		  "%12.5E", (double)fv[idx-CMND_COL_F1] );
+
+	/* Append a command row and fill in text if opening call */
+	if( !ret )
+	  gtk_list_store_append( cmnd_store, &iter );
+
+	/* Set data to list store */
+	gtk_list_store_set(
+		cmnd_store, &iter, CMND_COL_NAME, ain, -1 );
+	for( idx = CMND_COL_I1; idx <= CMND_COL_I4; idx++ )
+	  gtk_list_store_set(
+		  cmnd_store, &iter, idx, si[idx-CMND_COL_I1], -1 );
+	for( idx = CMND_COL_F1; idx <= CMND_COL_F6; idx++ )
+	  gtk_list_store_set(
+		  cmnd_store, &iter, idx, sf[idx-CMND_COL_F1], -1 );
+
+	/* Get new row if available */
+	ret = gtk_tree_model_iter_next(
+		GTK_TREE_MODEL(cmnd_store), &iter);
+  }
+  while( strcmp(ain, "EN") != 0 );
+
+} /* List_Commands() */
+
+/*------------------------------------------------------------------------*/
+
+/* Inserts columns in a list store */
+  void
+Insert_Columns(	GtkWidget *window, gchar *treeview,
+	GtkListStore* store, int ncols, char *colname[] )
+{
+  int idx;
+  GtkTreeModel *model;
+  GtkCellRenderer *renderer;
+
+  static GtkWidget *view;
+  view = lookup_widget( window, treeview );
+  for( idx = 0; idx < ncols; idx++ )
+  {
+	renderer = gtk_cell_renderer_text_new();
+	g_object_set(renderer, "editable", TRUE, NULL);
+	g_signal_connect( renderer, "edited",
+		(GCallback)cell_edited_callback, view );
+	g_object_set_data( G_OBJECT(renderer),
+		"column", GUINT_TO_POINTER(idx) );
+	gtk_tree_view_insert_column_with_attributes(
+		GTK_TREE_VIEW(view), -1, colname[idx],
+		renderer, "text", idx, NULL );
+  }
+  model = GTK_TREE_MODEL(store);
+  gtk_tree_view_set_model( GTK_TREE_VIEW (view), model );
+
+  /* Destroy model automatically with view */
+  g_object_unref( model );
+
+} /* Insert_Columns() */
+
+/*------------------------------------------------------------------------*/
+
+/* cell_edited_callback()
+ *
+ * Text cell edited callback
+ */
+  void
+cell_edited_callback(
+	GtkCellRendererText *cell,
+	gchar				*path,
+	gchar               *new_text,
+	gpointer             user_data )
+{
+  GtkTreeSelection *selection;
+  GtkTreeModel     *model;
+  GtkTreeIter       iter;
+  guint column;
+
+  column = GPOINTER_TO_UINT(
+	  g_object_get_data(G_OBJECT(cell), "column") );
+  selection = gtk_tree_view_get_selection(
+	  GTK_TREE_VIEW(user_data) );
+  gtk_tree_selection_get_selected(
+	  selection, &model, &iter );
+
+  /* Blank cells cause problems */
+  if( strcmp(new_text, "") == 0 )
+  {
+	gchar *name;
+
+	gtk_tree_model_get( model, &iter, 0, &name, -1 );
+	if( strcmp(name, "CE") == 0 )
+	  gtk_list_store_set( GTK_LIST_STORE(model),
+		  &iter, column, _("End Comments"), -1 );
+	else
+	  gtk_list_store_set( GTK_LIST_STORE(model),
+		  &iter, column, "0", -1 );
+	g_free(name);
+  }
+  else
+	gtk_list_store_set( GTK_LIST_STORE(model),
+	  &iter, column, new_text, -1 );
+
+} /* cell_edited_callback() */
+
+/*------------------------------------------------------------------------*/
+
+/* Save_Nec2_Input_File()
+ *
+ * Saves the data in a NEC2 input treeview to a given filename
+ */
+  void
+Save_Nec2_Input_File( GtkWidget *treeview_window, char *nec2_file )
+{
+  FILE *nec2_fp = NULL;
+  GtkTreeView *tree_view;
+
+
+  /* Abort if editor window is not opened */
+  if( nec2_edit_window == NULL ) return;
+
+  /* Open NEC2 input file for writing */
+  if( !Open_File(&nec2_fp, nec2_file, "w") ) return;
+
+  /* Save comments to file */
+  tree_view = GTK_TREE_VIEW( lookup_widget(
+		treeview_window, "nec2_cmnt_treeview") );
+  Save_Treeview_Data( tree_view, CMNT_NUM_COLS, nec2_fp );
+
+  /* Save geometry to file */
+  tree_view = GTK_TREE_VIEW( lookup_widget(
+		treeview_window, "nec2_geom_treeview") );
+  Save_Treeview_Data( tree_view, GEOM_NUM_COLS, nec2_fp );
+
+  /* Save commands to file */
+  tree_view = GTK_TREE_VIEW( lookup_widget(
+		treeview_window, "nec2_cmnd_treeview") );
+  Save_Treeview_Data( tree_view, CMND_NUM_COLS, nec2_fp );
+
+  /* Re-open file in read mode */
+  Close_File( &nec2_fp );
+
+} /* Save_Nec2_Input_File() */
+
+/*------------------------------------------------------------------------*/
+
+/* Save_Treeview_Data()
+ *
+ * Saves tree view data to an open NEC2 input file
+ */
+  void
+Save_Treeview_Data( GtkTreeView *tree_view, int ncols, FILE *nec2_fp )
+{
+  GtkTreeModel *list_store;
+  GtkTreeIter iter;
+  gboolean valid;
+  int idx;
+
+  /* Abort if no open file to sane to */
+  if( nec2_fp == NULL )
+  {
+	stop( _("Cannot save treeview data\n"\
+		  "Please use the Save button\n"\
+		  "to specify a file path"), ERR_STOP );
+  }
+
+  /* Get the first iter in the list */
+  list_store = GTK_TREE_MODEL( gtk_tree_view_get_model(tree_view) );
+  valid = gtk_tree_model_get_iter_first( list_store, &iter );
+
+  /* Walk through all rows and print data to file */
+  while( valid )
+  {
+	gchar *str_data;
+
+	for( idx = 0; idx < ncols; idx++ )
+	{
+	  gtk_tree_model_get( list_store, &iter, idx, &str_data, -1 );
+	  fprintf( nec2_fp, "%s ", str_data );
+	  g_free( str_data );
+	}
+
+	/* Overwrite last space with newline */
+	if( fseek(nec2_fp, -1, SEEK_CUR) == 0 )
+	  fprintf( nec2_fp, "\n" );
+
+	valid = gtk_tree_model_iter_next( list_store, &iter );
+  } /* while( valid ) */
+
+} /* Save_Treeview_Data() */
+
+/*------------------------------------------------------------------------*/
+
+/* Helper function */
+  gboolean
+gtk_tree_model_iter_previous(GtkTreeModel *tree_model, GtkTreeIter *iter)
+{
+  GtkTreePath *path;
+  gboolean ret;
+
+  path = gtk_tree_model_get_path (tree_model, iter);
+  ret = gtk_tree_path_prev (path);
+  if (ret == TRUE)
+	gtk_tree_model_get_iter (tree_model, iter, path);
+  gtk_tree_path_free (path);
+  return ret;
+}
+
+/*------------------------------------------------------------------------*/
+
diff --git a/src/nec2_model.h b/src/nec2_model.h
new file mode 100644
index 0000000..3dbe3f5
--- /dev/null
+++ b/src/nec2_model.h
@@ -0,0 +1,36 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	NEC2_MODEL_H
+#define	NEC2_MODEL_H	1
+
+#include "common.h"
+#include "interface.h"
+#include "support.h"
+#include "editors.h"
+
+/* Commands for the NEC2 file editor */
+enum NEC2_CMND
+{
+  NEC2_EDITOR_NEW = 0,
+  NEC2_EDITOR_REVERT,
+  NEC2_EDITOR_RELOAD
+};
+
+#endif
+
diff --git a/src/network.c b/src/network.c
new file mode 100644
index 0000000..875ae56
--- /dev/null
+++ b/src/network.c
@@ -0,0 +1,749 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/******* Translated to the C language by N. Kyriazis  20 Aug 2003 ******
+
+  Program NEC(input,tape5=input,output,tape11,tape12,tape13,tape14,
+  tape15,tape16,tape20,tape21)
+
+  Numerical Electromagnetics Code (NEC2)  developed at Lawrence
+  Livermore lab., Livermore, CA.  (contact G. Burke at 415-422-8414
+  for problems with the NEC code. For problems with the vax implem-
+  entation, contact J. Breakall at 415-422-8196 or E. Domning at 415
+  422-5936)
+  file created 4/11/80.
+
+ ***********Notice**********
+ This computer code material was prepared as an account of work
+ sponsored by the United States government.  Neither the United
+ States nor the United States Department Of Energy, nor any of
+ their employees, nor any of their contractors, subcontractors,
+ or their employees, makes any warranty, express or implied, or
+ assumes any legal liability or responsibility for the accuracy,
+ completeness or usefulness of any information, apparatus, product
+ or process disclosed, or represents that its use would not infringe
+ privately-owned rights.
+
+ ***********************************************************************/
+
+#include "network.h"
+#include "shared.h"
+
+/*-------------------------------------------------------------------*/
+
+/* subroutine netwk solves for structure currents for a given */
+/* excitation including the effect of non-radiating networks if */
+/* present. */
+void netwk( complex double *cmx, int *ip, complex double *einc )
+{
+  int *ipnt = NULL, *nteqa = NULL, *ntsca = NULL;
+  int nteq=0, ntsc=0, j, ndimn;
+  int neqt, irow1=0, i, isc1=0;
+  double pwr;
+  complex double *vsrc = NULL, *rhs = NULL, *cmn = NULL;
+  complex double *rhnt = NULL, *rhnx = NULL, ymit, vlt, cux;
+  size_t mreq;
+
+  netcx.pin=0.0;
+  netcx.pnls=0.0;
+  neqt= netcx.neq+ netcx.neq2;
+  ndimn = j = (2*netcx.nonet + vsorc.nsant);
+
+  /* Allocate network buffers */
+  if( netcx.nonet > 0 )
+  {
+	mreq = (size_t)data.np3m * sizeof(complex double);
+	mem_alloc( (void *)&rhs, mreq, "in network.c");
+
+	mreq = (size_t)j * sizeof(complex double);
+	mem_alloc( (void *)&rhnt, mreq, "in network.c");
+	mem_alloc( (void *)&rhnx, mreq, "in network.c");
+	mem_alloc( (void *)&cmn,  mreq * (size_t)j, "in network.c");
+
+	mreq = (size_t)j * sizeof(int);
+	mem_alloc( (void *)&ntsca, mreq, "in network.c");
+	mem_alloc( (void *)&nteqa, mreq, "in network.c");
+	mem_alloc( (void *)&ipnt,  mreq, "in network.c");
+
+	mreq = (size_t)vsorc.nsant * sizeof(complex double);
+	mem_alloc( (void *)&vsrc, mreq, "in network.c");
+  }
+  else if( netcx.masym != 0)
+  {
+	mreq = (size_t)j * sizeof(int);
+	mem_alloc( (void *)&ipnt,  mreq, "in network.c");
+  }
+
+  /* Signal new and valid current data */
+  crnt.newer = crnt.valid = 1;
+
+  if( netcx.ntsol == 0)
+  {
+	int nseg1;
+
+	/* compute relative matrix asymmetry */
+	if( netcx.masym != 0)
+	{
+	  irow1=0;
+	  if( netcx.nonet != 0)
+	  {
+		for( i = 0; i < netcx.nonet; i++ )
+		{
+		  nseg1= netcx.iseg1[i];
+		  for( isc1 = 0; isc1 < 2; isc1++ )
+		  {
+			if( irow1 == 0)
+			{
+			  ipnt[irow1]= nseg1;
+			  nseg1= netcx.iseg2[i];
+			  irow1++;
+			  continue;
+			}
+
+			for( j = 0; j < irow1; j++ )
+			  if( nseg1 == ipnt[j])
+				break;
+
+			if( j == irow1 )
+			{
+			  ipnt[irow1]= nseg1;
+			  irow1++;
+			}
+
+			nseg1= netcx.iseg2[i];
+
+		  } /* for( isc1 = 0; isc1 < 2; isc1++ ) */
+
+		} /* for( i = 0; i < netcx.nonet; i++ ) */
+
+	  } /* if( netcx.nonet != 0) */
+
+	  if( vsorc.nsant != 0)
+	  {
+		for( i = 0; i < vsorc.nsant; i++ )
+		{
+		  nseg1= vsorc.isant[i];
+		  if( irow1 == 0)
+		  {
+			ipnt[irow1]= nseg1;
+			irow1++;
+			continue;
+		  }
+
+		  for( j = 0; j < irow1; j++ )
+			if( nseg1 == ipnt[j])
+			  break;
+
+		  if( j == irow1 )
+		  {
+			ipnt[irow1]= nseg1;
+			irow1++;
+		  }
+
+		} /* for( i = 0; i < vsorc.nsant; i++ ) */
+
+	  } /* if( vsorc.nsant != 0) */
+
+	  if( irow1 >= 2)
+	  {
+		double asmx;
+
+		for( i = 0; i < irow1; i++ )
+		{
+		  isc1= ipnt[i]-1;
+		  asmx= data.si[isc1];
+
+		  for( j = 0; j < neqt; j++ )
+			rhs[j] = CPLX_00;
+
+		  rhs[isc1] = CPLX_10;
+		  solves( cmx, ip, rhs, netcx.neq, 1,
+			  data.np, data.n, data.mp, data.m);
+		  cabc( rhs);
+
+		  for( j = 0; j < irow1; j++ )
+		  {
+			isc1= ipnt[j]-1;
+			cmn[j+i*ndimn]= rhs[isc1]/ asmx;
+		  }
+
+		} /* for( i = 0; i < irow1; i++ ) */
+
+		asmx=0.0;
+
+		for( i = 1; i < irow1; i++ )
+		{
+		  isc1= i;
+		  for( j = 0; j < isc1; j++ )
+		  {
+			cux= cmn[i+j*ndimn];
+			pwr= cabs(( cux- cmn[j+i*ndimn])/ cux);
+
+			if( pwr < asmx)
+			  continue;
+
+			asmx= pwr;
+			nteq= ipnt[i];
+			ntsc= ipnt[j];
+
+		  } /* for( j = 0; j < isc1; j++ ) */
+
+		} /* for( i = 1; i < irow1; i++ ) */
+
+	  } /* if( irow1 >= 2) */
+
+	} /* if( netcx.masym != 0) */
+
+	/* solution of network equations */
+	if( netcx.nonet > 0)
+	{
+	  for( i = 0; i < ndimn; i++ )
+	  {
+		rhnx[i]=CPLX_00;
+		for( j = 0; j < ndimn; j++ )
+		  cmn[j+i*ndimn]=CPLX_00;
+	  }
+
+	  /* sort network and source data and */
+	  /* assign equation numbers to segments */
+	  nteq=0;
+	  ntsc=0;
+
+	  for( j = 0; j < netcx.nonet; j++ )
+	  {
+		int  jump1, jump2, nseg2, isc2=0, irow2=0;
+		double y11r, y11i, y12r, y12i, y22r, y22i;
+
+		nseg1= netcx.iseg1[j];
+		nseg2= netcx.iseg2[j];
+
+		if( netcx.ntyp[j] <= 1)
+		{
+		  y11r= netcx.x11r[j];
+		  y11i= netcx.x11i[j];
+		  y12r= netcx.x12r[j];
+		  y12i= netcx.x12i[j];
+		  y22r= netcx.x22r[j];
+		  y22i= netcx.x22i[j];
+		}
+		else
+		{
+		  y22r= TP* netcx.x11i[j]/ data.wlam;
+		  y12r=0.0;
+		  y12i=1.0/( netcx.x11r[j]* sin( y22r));
+		  y11r= netcx.x12r[j];
+		  y11i= -y12i* cos( y22r);
+		  y22r= netcx.x22r[j];
+		  y22i= y11i+ netcx.x22i[j];
+		  y11i= y11i+ netcx.x12i[j];
+
+		  if( netcx.ntyp[j] != 2)
+		  {
+			y12r= -y12r;
+			y12i= -y12i;
+		  }
+
+		} /* if( netcx.ntyp[j] <= 1) */
+
+		jump1 = FALSE;
+		if( vsorc.nsant != 0)
+		{
+		  for( i = 0; i < vsorc.nsant; i++ )
+			if( nseg1 == vsorc.isant[i])
+			{
+			  isc1 = i;
+			  jump1 = TRUE;
+			  break;
+			}
+		} /* if( vsorc.nsant != 0) */
+
+		jump2 = FALSE;
+		if( ! jump1 )
+		{
+		  isc1=-1;
+
+		  if( nteq != 0)
+		  {
+			for( i = 0; i < nteq; i++ )
+			  if( nseg1 == nteqa[i])
+			  {
+				irow1 = i;
+				jump2 = TRUE;
+				break;
+			  }
+
+		  } /* if( nteq != 0) */
+
+		  if( ! jump2 )
+		  {
+			irow1= nteq;
+			nteqa[nteq]= nseg1;
+			nteq++;
+		  }
+
+		} /* if( ! jump1 ) */
+		else
+		{
+		  if( ntsc != 0)
+		  {
+			for( i = 0; i < ntsc; i++ )
+			{
+			  if( nseg1 == ntsca[i])
+			  {
+				irow1 = ndimn- (i+1);
+				jump2 = TRUE;
+				break;
+			  }
+			}
+
+		  } /* if( ntsc != 0) */
+
+		  if( ! jump2 )
+		  {
+			irow1= ndimn- (ntsc+1);
+			ntsca[ntsc]= nseg1;
+			vsrc[ntsc]= vsorc.vsant[isc1];
+			ntsc++;
+		  }
+
+		} /* if( ! jump1 ) */
+
+		jump1 = FALSE;
+		if( vsorc.nsant != 0)
+		{
+		  for( i = 0; i < vsorc.nsant; i++ )
+		  {
+			if( nseg2 == vsorc.isant[i])
+			{
+			  isc2= i;
+			  jump1 = TRUE;
+			  break;
+			}
+		  }
+
+		} /* if( vsorc.nsant != 0) */
+
+		jump2 = FALSE;
+		if( ! jump1 )
+		{
+		  isc2=-1;
+
+		  if( nteq != 0)
+		  {
+			for( i = 0; i < nteq; i++ )
+			  if( nseg2 == nteqa[i])
+			  {
+				irow2= i;
+				jump2 = TRUE;
+				break;
+			  }
+
+		  } /* if( nteq != 0) */
+
+		  if( ! jump2 )
+		  {
+			irow2= nteq;
+			nteqa[nteq]= nseg2;
+			nteq++;
+		  }
+
+		}  /* if( ! jump1 ) */
+		else
+		{
+		  if( ntsc != 0)
+		  {
+			for( i = 0; i < ntsc; i++ )
+			  if( nseg2 == ntsca[i])
+			  {
+				irow2 = ndimn- (i+1);
+				jump2 = TRUE;
+				break;
+			  }
+
+		  } /* if( ntsc != 0) */
+
+		  if( ! jump2 )
+		  {
+			irow2= ndimn- (ntsc+1);
+			ntsca[ntsc]= nseg2;
+			vsrc[ntsc]= vsorc.vsant[isc2];
+			ntsc++;
+		  }
+
+		} /* if( ! jump1 ) */
+
+		/* fill network equation matrix and right hand side vector with */
+		/* network short-circuit admittance matrix coefficients. */
+		if( isc1 == -1)
+		{
+		  cmn[irow1+irow1*ndimn] -=
+			cmplx( y11r, y11i)* data.si[nseg1-1];
+		  cmn[irow1+irow2*ndimn] -=
+			cmplx( y12r, y12i)* data.si[nseg1-1];
+		}
+		else
+		{
+		  rhnx[irow1] += cmplx( y11r, y11i) *
+			vsorc.vsant[isc1]/data.wlam;
+		  rhnx[irow2] += cmplx( y12r, y12i) *
+			vsorc.vsant[isc1]/data.wlam;
+		}
+
+		if( isc2 == -1)
+		{
+		  cmn[irow2+irow2*ndimn] -=
+			cmplx( y22r, y22i)* data.si[nseg2-1];
+		  cmn[irow2+irow1*ndimn] -=
+			cmplx( y12r, y12i)* data.si[nseg2-1];
+		}
+		else
+		{
+		  rhnx[irow1] += cmplx( y12r, y12i) *
+			vsorc.vsant[isc2]/data.wlam;
+		  rhnx[irow2] += cmplx( y22r, y22i) *
+			vsorc.vsant[isc2]/data.wlam;
+		}
+
+	  } /* for( j = 0; j < netcx.nonet; j++ ) */
+
+	  /* add interaction matrix admittance */
+	  /* elements to network equation matrix */
+	  for( i = 0; i < nteq; i++ )
+	  {
+		for( j = 0; j < neqt; j++ )
+		  rhs[j] = CPLX_00;
+
+		irow1= nteqa[i]-1;
+		rhs[irow1]=CPLX_10;
+		solves( cmx, ip, rhs, netcx.neq, 1,
+			data.np, data.n, data.mp, data.m);
+		cabc( rhs);
+
+		for( j = 0; j < nteq; j++ )
+		{
+		  irow1= nteqa[j]-1;
+		  cmn[i+j*ndimn] += rhs[irow1];
+		}
+
+	  } /* for( i = 0; i < nteq; i++ ) */
+
+	  /* factor network equation matrix */
+	  factr( nteq, cmn, ipnt, ndimn);
+
+	} /* if( netcx.nonet != 0) */
+
+  } /* if( netcx.ntsol != 0) */
+
+  if( netcx.nonet > 0)
+  {
+	/* add to network equation right hand side */
+	/* the terms due to element interactions */
+	for( i = 0; i < neqt; i++ )
+	  rhs[i]= einc[i];
+
+	solves( cmx, ip, rhs, netcx.neq, 1,
+		data.np, data.n, data.mp, data.m);
+	cabc( rhs);
+
+	for( i = 0; i < nteq; i++ )
+	{
+	  irow1= nteqa[i]-1;
+	  rhnt[i]= rhnx[i]+ rhs[irow1];
+	}
+
+	/* solve network equations */
+	solve( nteq, cmn, ipnt, rhnt, ndimn);
+
+	/* add fields due to network voltages to electric fields */
+	/* applied to structure and solve for induced current */
+	for( i = 0; i < nteq; i++ )
+	{
+	  irow1= nteqa[i]-1;
+	  einc[irow1] -= rhnt[i];
+	}
+
+	solves( cmx, ip, einc, netcx.neq, 1,
+		data.np, data.n, data.mp, data.m);
+	cabc( einc);
+
+	for( i = 0; i < nteq; i++ )
+	{
+	  irow1= nteqa[i]-1;
+	  vlt= rhnt[i]* data.si[irow1]* data.wlam;
+	  cux= einc[irow1]* data.wlam;
+	  netcx.zped= vlt/ cux;
+	  pwr=.5* creal( vlt* conj( cux));
+	  netcx.pnls= netcx.pnls- pwr;
+	}
+
+	if( ntsc != 0)
+	{
+	  for( i = 0; i < ntsc; i++ )
+	  {
+		irow1= ntsca[i]-1;
+		vlt= vsrc[i];
+		cux= einc[irow1]* data.wlam;
+		netcx.zped= vlt/ cux;
+		pwr=.5* creal( vlt* conj( cux));
+		netcx.pnls= netcx.pnls- pwr;
+	  } /* for( i = 0; i < ntsc; i++ ) */
+
+	} /* if( ntsc != 0) */
+
+  } /* if( netcx.nonet != 0) */
+  else
+  {
+	/* solve for currents when no networks are present */
+	solves( cmx, ip, einc, netcx.neq, 1,
+		data.np, data.n, data.mp, data.m);
+	cabc( einc);
+	ntsc=0;
+  }
+
+  if( (vsorc.nsant+vsorc.nvqd) == 0)
+  {
+	/* Free network buffers */
+	free_ptr( (void *)&ipnt );
+	free_ptr( (void *)&nteqa );
+	free_ptr( (void *)&ntsca );
+	free_ptr( (void *)&vsrc );
+	free_ptr( (void *)&rhs );
+	free_ptr( (void *)&cmn );
+	free_ptr( (void *)&rhnt );
+	free_ptr( (void *)&rhnx );
+	return;
+  }
+
+  if( vsorc.nsant != 0)
+  {
+	for( i = 0; i < vsorc.nsant; i++ )
+	{
+	  isc1= vsorc.isant[i]-1;
+	  vlt= vsorc.vsant[i];
+
+	  if( ntsc == 0)
+	  {
+		cux= einc[isc1]* data.wlam;
+		irow1=0;
+	  }
+	  else
+	  {
+		for( j = 0; j < ntsc; j++ )
+		  if( ntsca[j] == isc1+1)
+			break;
+
+		irow1= ndimn- (j+1);
+		cux= rhnx[irow1];
+		for( j = 0; j < nteq; j++ )
+		  cux -= cmn[j+irow1*ndimn]*rhnt[j];
+		cux=(einc[isc1]+ cux)* data.wlam;
+		irow1++;
+
+	  } /* if( ntsc == 0) */
+
+	  netcx.zped= vlt/ cux;
+	  pwr=.5* creal( vlt* conj( cux));
+	  netcx.pin= netcx.pin+ pwr;
+
+	  if( irow1 != 0)
+		netcx.pnls= netcx.pnls+ pwr;
+	} /* for( i = 0; i < vsorc.nsant; i++ ) */
+
+  } /* if( vsorc.nsant != 0) */
+
+  if( vsorc.nvqd != 0)
+	for( i = 0; i < vsorc.nvqd; i++ )
+	{
+	  isc1= vsorc.ivqd[i]-1;
+	  vlt= vsorc.vqd[i];
+	  cux= cmplx( crnt.air[isc1], crnt.aii[isc1]);
+	  ymit= cmplx( crnt.bir[isc1], crnt.bii[isc1]);
+	  netcx.zped= cmplx( crnt.cir[isc1], crnt.cii[isc1]);
+	  pwr= data.si[isc1]* TP*.5;
+	  cux=( cux- ymit* sin( pwr) +
+		  netcx.zped* cos( pwr))* data.wlam;
+	  netcx.zped= vlt/ cux;
+	  pwr=.5* creal( vlt* conj( cux));
+	  netcx.pin= netcx.pin+ pwr;
+	} /* for( i = 0; i < vsorc.nvqd; i++ ) */
+
+  /* Free network buffers */
+  free_ptr( (void *)&ipnt );
+  free_ptr( (void *)&nteqa );
+  free_ptr( (void *)&ntsca );
+  free_ptr( (void *)&vsrc );
+  free_ptr( (void *)&rhs );
+  free_ptr( (void *)&cmn );
+  free_ptr( (void *)&rhnt );
+  free_ptr( (void *)&rhnx );
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* load calculates the impedance of specified */
+/* segments for various types of loading */
+  void
+load( int *ldtyp, int *ldtag, int *ldtagf, int *ldtagt,
+	double *zlr, double *zli, double *zlc )
+{
+  int i, istep, istepx, l1, l2, ldtags, jump, ichk;
+  complex double zt=CPLX_00, tpcj;
+
+  tpcj = (0.0+I*1.883698955e+9);
+
+  /* initialize d array, used for temporary */
+  /* storage of loading information. */
+  for( i = 0; i < data.n; i++ )
+	zload.zarray[i]=CPLX_00;
+
+  istep=0;
+
+  /* cycle over loading cards */
+  while( TRUE )
+  {
+	istepx = istep;
+	istep++;
+
+	if( istep > zload.nload)
+	{
+	  smat.nop = data.n/data.np;
+	  if( smat.nop == 1) return;
+
+	  for( i = 0; i < data.np; i++ )
+	  {
+		zt = zload.zarray[i];
+		l1 = i;
+
+		for( l2 = 1; l2 < smat.nop; l2++ )
+		{
+		  l1 += data.np;
+		  zload.zarray[l1]= zt;
+		}
+	  }
+
+	  return;
+	} /* if( istep > zload.nload) */
+
+	if( ldtyp[istepx] > 5 )
+	{
+	  fprintf( stderr,
+		  "xnec2c: load(): improper load type chosen,"
+		  " requested type is %d\n", ldtyp[istepx] );
+	  stop( _("load(): Improper load type chose"), ERR_STOP );
+	}
+
+	/* search segments for proper itags */
+	ldtags= ldtag[istepx];
+	jump= ldtyp[istepx]+1;
+	ichk=0;
+	l1= 1;
+	l2= data.n;
+
+	if( ldtags == 0)
+	{
+	  if( (ldtagf[istepx] != 0) || (ldtagt[istepx] != 0) )
+	  {
+		l1= ldtagf[istepx];
+		l2= ldtagt[istepx];
+
+	  } /* if( (ldtagf[istepx] != 0) || (ldtagt[istepx] != 0) ) */
+
+	} /* if( ldtags == 0) */
+
+	for( i = l1-1; i < l2; i++ )
+	{
+	  if( ldtags != 0)
+	  {
+		if( ldtags != data.itag[i])
+		  continue;
+
+		if( ldtagf[istepx] != 0)
+		{
+		  ichk++;
+		  if( (ichk < ldtagf[istepx]) || (ichk > ldtagt[istepx]) )
+			continue;
+		}
+		else ichk=1;
+
+	  } /* if( ldtags != 0) */
+	  else ichk=1;
+
+	  /* calculation of lamda*imped. per unit length, */
+	  /* jump to appropriate section for loading type */
+	  switch( jump )
+	  {
+		case 1:
+		  zt= zlr[istepx]/ data.si[i] +
+			tpcj* zli[istepx]/( data.si[i]* data.wlam);
+		  if( fabs( zlc[istepx]) > 1.0e-20)
+			zt += data.wlam/( tpcj* data.si[i]* zlc[istepx]);
+		  break;
+
+		case 2:
+		  zt= tpcj* data.si[i]* zlc[istepx]/ data.wlam;
+		  if( fabs( zli[istepx]) > 1.0e-20)
+			zt += data.si[i]* data.wlam/( tpcj* zli[istepx]);
+		  if( fabs( zlr[istepx]) > 1.0e-20)
+			zt += data.si[i]/ zlr[istepx];
+		  zt=1.0/ zt;
+		  break;
+
+		case 3:
+		  zt= zlr[istepx]* data.wlam+ tpcj* zli[istepx];
+		  if( fabs( zlc[istepx]) > 1.0e-20)
+			zt += 1.0/( tpcj* data.si[i]* data.si[i]* zlc[istepx]);
+		  break;
+
+		case 4:
+		  zt= tpcj* data.si[i]* data.si[i]* zlc[istepx];
+		  if( fabs( zli[istepx]) > 1.0e-20)
+			zt += 1.0/( tpcj* zli[istepx]);
+		  if( fabs( zlr[istepx]) > 1.0e-20)
+			zt += 1.0/( zlr[istepx]* data.wlam);
+		  zt=1.0/ zt;
+		  break;
+
+		case 5:
+		  zt= cmplx( zlr[istepx], zli[istepx])/ data.si[i];
+		  break;
+
+		case 6:
+		  zint( zlr[istepx]* data.wlam, data.bi[i], &zt );
+
+	  } /* switch( jump ) */
+
+	  zload.zarray[i] += zt;
+	} /* for( i = l1-1; i < l2; i++ ) */
+
+	if( ichk == 0 )
+	{
+	  fprintf( stderr,
+		  "xnec2c: load(): loading data card error,"
+		  " no segment has an itag = %d\n", ldtags );
+	  stop( _("load(): Loading data card\n"\
+			"Tag number mismatch error"), ERR_STOP );
+	}
+
+  } /* while( TRUE ) */
+
+}
+
+/*-----------------------------------------------------------------------*/
+
diff --git a/src/network.h b/src/network.h
new file mode 100644
index 0000000..3d455d7
--- /dev/null
+++ b/src/network.h
@@ -0,0 +1,26 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	NETWORK_H
+#define	NETWORK_H		1
+
+#include "common.h"
+#include "support.h"
+
+#endif
+
diff --git a/src/plot_freqdata.c b/src/plot_freqdata.c
new file mode 100644
index 0000000..a7d50de
--- /dev/null
+++ b/src/plot_freqdata.c
@@ -0,0 +1,1353 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* plot_freqdata.c
+ *
+ * Code for plotting graphs of structure
+ * data (VSWR, impedance, gain etc)
+ */
+
+/*
+ * Net gain added by Mark Whitis http://www.freelabs.com/~whitis/
+ * References:
+ *   http://www.digitalhome.ca/forum/showpost.php?p=744018&postcount=47
+ *      NetGain = RawGain+10*log(Feed-pointGain)
+ *      where Feed-point Gain = 4*Zr*Zo/((Zr+Zo)^2+Zi^2)
+ *   http://www.avsforum.com/avs-vb/showthread.php?p=14086104#post14086104
+ *      NetGain = RawGain+10*log(4*Zr*Zo/((Zr+Zo)^2+Zi^2)
+ *   Where log is log10.
+ */
+
+#include "plot_freqdata.h"
+#include "shared.h"
+
+/* Graph plot bounding rectangle */
+static GdkRectangle plot_rect;
+
+/* Frequency scale max, min, num of values */
+static double max_fscale, min_fscale;
+static int nval_fscale;
+
+/*-----------------------------------------------------------------------*/
+
+/* Plot_Frequency_Data()
+ *
+ */
+  void
+Plot_Frequency_Data( void )
+{
+  /* Abort plotting if main window is to be closed
+   * or when plots drawing area not available */
+  if(
+	  isFlagSet(MAIN_QUIT) ||
+	  isFlagClear(PLOT_ENABLED) ||
+	  isFlagClear(ENABLE_EXCITN) )
+	return;
+
+  /* Titles for plots */
+  char *titles[3];
+
+  int
+	idx,
+	posn,  /* Position num of plot in drawingarea */
+	fstep; /* Freq step number */
+
+  static double
+	*gmax     = NULL, /* Max gain buffer */
+	*vgain    = NULL, /* Viewer direction gain buffer */
+	*netgain  = NULL, /* Viewer direction net gain buffer */
+	*gdir_tht = NULL, /* Direction in theta of gain */
+	*gdir_phi = NULL, /* Direction in phi of gain */
+	*fbratio  = NULL; /* Front to back ratio */
+
+  /* Used to calculate net gain */
+  double Zr, Zo, Zi;
+
+  /* Cairo context */
+  cairo_t *cr = gdk_cairo_create( freqplots_pixmap );
+
+  /* Clear pixmap */
+  cairo_set_source_rgb( cr, BLACK );
+  cairo_rectangle(
+	  cr, 0.0, 0.0,
+	  (double)freqplots_pixmap_width,
+	  (double)freqplots_pixmap_height );
+  cairo_fill( cr );
+
+  /* Abort if plotting is not possible */
+  if( (calc_data.fstep < 1)				||
+	  (isFlagClear(FREQ_LOOP_RUNNING)	&&
+	   isFlagClear(FREQ_LOOP_DONE))		||
+	  (isFlagClear(PLOT_GMAX)			&&
+	   isFlagClear(PLOT_GVIEWER)		&&
+	   isFlagClear(PLOT_VSWR)			&&
+	   isFlagClear(PLOT_ZREAL_ZIMAG)	&&
+	   isFlagClear(PLOT_ZMAG_ZPHASE)) )
+  {
+	/* Render pixmap to screen */
+	gdk_window_set_back_pixmap(
+		freqplots_drawingarea->window, freqplots_pixmap, FALSE );
+	gdk_window_clear( freqplots_drawingarea->window );
+	cairo_destroy( cr );
+	return;
+  }
+
+  /* Fit frequency range to scale */
+  min_fscale  = (double)save.freq[0];
+  if( isFlagSet(FREQ_LOOP_RUNNING) )
+	max_fscale = (double)save.freq[calc_data.fstep];
+  else
+	max_fscale = (double)save.freq[calc_data.lastf];
+  nval_fscale = freqplots_pixmap_width / 75;
+  Fit_to_Scale( &max_fscale, &min_fscale, &nval_fscale );
+
+  /* Graph position */
+  posn = 0;
+
+  /* Limit freq stepping to last freq step */
+  fstep = calc_data.lastf + 1;
+
+  /* Plot max gain vs frequency, if possible */
+  if( isFlagSet(PLOT_GMAX) && isFlagSet(ENABLE_RDPAT) )
+  {
+	int nth, nph, pol;
+	gboolean no_fbr;
+
+	/* Allocate max gmax and directions */
+	size_t mreq = (size_t)fstep * sizeof(double);
+	mem_realloc( (void *)&gmax,     mreq, "in plot_freqdata.c" );
+	mem_realloc( (void *)&gdir_tht, mreq, "in plot_freqdata.c" );
+	mem_realloc( (void *)&gdir_phi, mreq, "in plot_freqdata.c" );
+	mem_realloc( (void *)&fbratio,  mreq, "in plot_freqdata.c" );
+
+	if( isFlagSet(PLOT_NETGAIN) )
+	  mem_realloc( (void *)&netgain, mreq, "in plot_freqdata.c" );
+
+	/* Find max gain and direction, F/B ratio */
+	no_fbr = FALSE;
+
+	/* Polarization type and impedance */
+	pol = calc_data.pol_type;
+	Zo = calc_data.zo;
+
+	/* When freq loop is done, calcs are done for all freq steps */
+	for( idx = 0; idx < fstep; idx++ )
+	{
+	  double fbdir;
+	  int fbidx, mgidx;
+
+	  /* Index to gtot buffer where max gain
+	   * occurs for given polarization type */
+	  mgidx = rad_pattern[idx].max_gain_idx[pol];
+
+	  /* Max gain for given polarization type */
+	  gmax[idx] = rad_pattern[idx].gtot[mgidx] +
+		10.0 * log10( Polarization_Factor(pol, idx, mgidx) );
+
+	  /* Net gain if selected */
+	  if( isFlagSet(PLOT_NETGAIN) )
+	  {
+		Zr = impedance_data.zreal[idx];
+		Zi = impedance_data.zimag[idx];
+		netgain[idx] = gmax[idx] +
+		  10*log10(4*Zr*Zo/(pow(Zr+Zo,2)+pow(Zi,2)));
+	  }
+
+	  /* Radiation angle/phi where max gain occurs */
+	  gdir_tht[idx] = 90.0 - rad_pattern[idx].max_gain_tht[pol];
+	  gdir_phi[idx] = rad_pattern[idx].max_gain_phi[pol];
+
+	  /* Find F/B ratio if possible or net gain not required */
+	  if( no_fbr || isFlagSet(PLOT_NETGAIN) )
+		continue;
+
+	  /* Find F/B direction in theta */
+	  fbdir = 180.0 - rad_pattern[idx].max_gain_tht[pol];
+	  if( fpat.dth == 0.0 )
+		nth = 0;
+	  else
+		nth = (int)( fbdir/fpat.dth + 0.5 );
+
+	  /* If the antenna is modelled over ground, then use the same
+	   * theta as the max gain direction, relying on phi alone to
+	   * take us to the back. Patch supplied by Rik van Riel AB1KW
+	   */
+	  if( (nth >= fpat.nth) || (nth < 0) )
+	  {
+		fbdir = rad_pattern[idx].max_gain_tht[pol];
+		if( fpat.dth == 0.0 )
+		  nth = 0;
+		else
+		  nth = (int)( fbdir/fpat.dth + 0.5 );
+	  }
+
+	  /* Find F/B direction in phi */
+	  fbdir = gdir_phi[idx] + 180.0;
+	  if( fbdir >= 360.0 ) fbdir -= 360.0;
+	  nph = (int)( fbdir/fpat.dph + 0.5 );
+
+	  /* No F/B calc. possible if no phi step at +180 from max gain */
+	  if( (nph >= fpat.nph) || (nph < 0) )
+	  {
+		no_fbr = TRUE;
+		continue;
+	  }
+
+	  /* Index to gtot buffer for gain in back direction */
+	  fbidx = nth + nph*fpat.nth;
+
+	  /* Front to back ratio */
+	  fbratio[idx]  = pow( 10.0, gmax[idx] / 10.0 );
+	  fbratio[idx] /= pow( 10.0,
+		  rad_pattern[idx].gtot[fbidx] / 10.0 +
+		  log10(Polarization_Factor(pol, idx, fbidx)) );
+	  fbratio[idx] = 10.0 * log10( fbratio[idx] );
+
+	} /* for( idx = 0; idx < fstep; idx++ ) */
+
+	/*** Plot gain and f/b ratio (if possible) graph(s) */
+	if( no_fbr || isFlagSet(PLOT_NETGAIN) )
+	{
+	  /* Plotting frame titles */
+	  titles[0] = _("Raw Gain dbi");
+	  if( isFlagSet(PLOT_NETGAIN) )
+	  {
+		titles[1] = _("Max Gain & Net Gain vs Frequency");
+		titles[2] = _("Net Gain dbi");
+		if( fstep > 1 )
+		  Plot_Graph2( gmax, netgain, save.freq, fstep,
+			  titles, calc_data.ngraph, ++posn );
+	  }
+	  else
+	  {
+		titles[1] = _("Max Gain & F/B Ratio vs Frequency");
+		titles[2] = "        ";
+		if( fstep > 1 )
+		  Plot_Graph( gmax, save.freq, fstep,
+			  titles, calc_data.ngraph, ++posn );
+	  }
+	}
+	else
+	{
+	  /* Plotting frame titles */
+	  titles[0] = _("Raw Gain dbi");
+	  titles[1] = _("Max Gain & F/B Ratio vs Frequency");
+	  titles[2] = _("F/B Ratio db");
+	  if( fstep > 1 )
+		Plot_Graph2( gmax, fbratio, save.freq, fstep,
+			titles, calc_data.ngraph, ++posn );
+	}
+
+	/* Plot max gain direction if enabled */
+	if( isFlagSet(PLOT_GAIN_DIR) )
+	{
+	  /* Plotting frame titles */
+	  titles[0] = _("Rad Angle - deg");
+	  titles[1] = _("Max Gain Direction vs Frequency");
+	  titles[2] = _("Phi - deg");
+	  if( fstep > 1 )
+		Plot_Graph2( gdir_tht, gdir_phi, save.freq, fstep,
+			titles, calc_data.ngraph, ++posn );
+	}
+
+  } /* if( isFlagSet(PLOT_GMAX) && isFlagSet(ENABLE_RDPAT) ) */
+
+  /* Plot gain in direction of viewer vs freq, if possible */
+  if( isFlagSet(PLOT_GVIEWER) && isFlagSet(ENABLE_RDPAT) )
+  {
+	/* Plotting frame titles */
+	titles[0] = _("Raw Gain dbi");
+	titles[1] = _("Gain in Viewer Direction vs Frequency");
+
+	/* Allocate viewer gain buffer */
+	size_t mreq = (size_t)fstep * sizeof(double);
+	mem_realloc( (void *)&vgain, mreq, "in plot_freqdata.c" );
+
+	/* Calcs are done for all freq steps */
+	for( idx = 0; idx < fstep; idx++ )
+	  vgain[idx] = Viewer_Gain( structure_proj_params, idx );
+
+	/* Plot net gain if selected */
+	if( isFlagSet(PLOT_NETGAIN) )
+	{
+	  mreq = (size_t)fstep * sizeof(double);
+	  mem_realloc( (void *)&netgain, mreq, "in plot_freqdata.c" );
+
+	  Zo = calc_data.zo;
+	  for( idx = 0; idx < fstep; idx++ )
+	  {
+		Zr = impedance_data.zreal[idx];
+		Zi = impedance_data.zimag[idx];
+		netgain[idx] = vgain[idx] +
+		  10*log10(4*Zr*Zo/(pow(Zr+Zo,2)+pow(Zi,2)));
+	  }
+
+	  /* Plot net gain if selected */
+	  titles[2] = _("Net gain dbi");
+	  if( fstep > 1 )
+		Plot_Graph2( vgain, netgain, save.freq, fstep,
+			titles, calc_data.ngraph, ++posn );
+	} /* if( isFlagSet(PLOT_NETGAIN) ) */
+	else
+	{
+	  titles[2] = "        ";
+	  if( fstep > 1 )
+		Plot_Graph( vgain, save.freq, fstep,
+			titles, calc_data.ngraph, ++posn );
+	}
+  } /* isFlagSet(PLOT_GVIEWER) && isFlagSet(ENABLE_RDPAT) */
+
+  /* Plot VSWR vs freq */
+  if( isFlagSet(PLOT_VSWR) )
+  {
+	double *vswr = NULL, gamma;
+	double zrpro2, zrmro2, zimag2;
+
+	/* Plotting frame titles */
+	titles[0] = _("VSWR");
+	titles[1] = _("VSWR vs Frequency");
+
+	/* Calculate VSWR */
+	mem_alloc( (void *)&vswr,
+		(size_t)calc_data.nfrq * sizeof(double),
+		"in Plot_Frequency_Data()" );
+	if( vswr == NULL )
+	{
+	  fprintf( stderr, "xnec2c: Plot_Frequency_Data():"
+		  "memory allocation for vswr failed\n" );
+	  stop( _("Plot_Frequency_Data():"
+			"Memory allocation for vswr failed"), ERR_OK );
+	  return;
+	}
+	for(idx = 0; idx < fstep; idx++ )
+	{
+	  zrpro2 = impedance_data.zreal[idx] + calc_data.zo;
+	  zrpro2 *= zrpro2;
+	  zrmro2 = impedance_data.zreal[idx] - calc_data.zo;
+	  zrmro2 *= zrmro2;
+	  zimag2 = impedance_data.zimag[idx] * impedance_data.zimag[idx];
+	  gamma = sqrt( (zrmro2 + zimag2)/(zrpro2 + zimag2) );
+	  vswr[idx] = (1+gamma)/(1-gamma);
+	  if( vswr[idx] > 10.0 ) vswr[idx] = 10.0;
+	}
+
+	titles[2] = "        ";
+	if( fstep > 1 )
+	  Plot_Graph( vswr, save.freq, fstep,
+		  titles, calc_data.ngraph, ++posn );
+
+	free_ptr( (void *)&vswr );
+  } /* if( isFlagSet(PLOT_VSWR) ) */
+
+  /* Plot z-real and z-imag */
+  if( isFlagSet(PLOT_ZREAL_ZIMAG) )
+  {
+	/* Plotting frame titles */
+	titles[0] = _("Z-real");
+	titles[1] = _("Impedance vs Frequency");
+	titles[2] = _("Z-imag");
+	if( fstep > 1 )
+	  Plot_Graph2(
+		  impedance_data.zreal, impedance_data.zimag, save.freq,
+		  fstep, titles, calc_data.ngraph, ++posn );
+
+  } /* if( isFlagSet(PLOT_ZREAL_ZIMAG) ) */
+
+  /* Plot z-magn and z-phase */
+  if( isFlagSet(PLOT_ZMAG_ZPHASE) )
+  {
+	/* Plotting frame titles */
+	titles[0] = _("Z-magn");
+	titles[1] = _("Impedance vs Frequency");
+	titles[2] = _("Z-phase");
+	if( fstep > 1 )
+	  Plot_Graph2( impedance_data.zmagn, impedance_data.zphase,
+		  save.freq, fstep, titles, calc_data.ngraph, ++posn );
+
+  } /* if( isFlagSet(PLOT_ZREAL_ZIMAG) ) */
+
+  /* Render pixmap to screen */
+  gdk_window_set_back_pixmap(
+	  freqplots_drawingarea->window, freqplots_pixmap, FALSE );
+  gdk_window_clear( freqplots_drawingarea->window );
+
+  /* Display freq data in entry widgets */
+  Display_Frequency_Data();
+
+  /* Wait for GTK to complete its tasks */
+  while( g_main_context_iteration(NULL, FALSE) );
+
+  cairo_destroy( cr );
+} /* Plot_Frequency_Data() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Display_Frequency_Data()
+ *
+ * Displays freq dependent data (gain, impedance etc)
+ * in the entry widgets in the freq plots window
+ */
+  void
+Display_Frequency_Data( void )
+{
+  int pol, fstep;
+  double vswr, gamma;
+  double zrpro2, zrmro2, zimag2;
+  char txt[11];
+
+  if( isFlagClear(PLOT_ENABLED) ) return;
+
+  /* Limit freq stepping to nfrq */
+  fstep = calc_data.fstep;
+  if( fstep >= calc_data.nfrq )
+	fstep = calc_data.nfrq;
+
+  /* Polarization type */
+  pol = calc_data.pol_type;
+
+  /* Index to gtot buffer where max gain
+   * occurs for given polarization type */
+  if( isFlagSet(ENABLE_RDPAT) )
+  {
+	/* Max gain for given polarization type */
+	int mgidx = rad_pattern[fstep].max_gain_idx[pol];
+	double gmax = rad_pattern[fstep].gtot[mgidx] +
+	  10.0 * log10( Polarization_Factor(pol, fstep, mgidx) );
+
+	/* Display max gain */
+	snprintf( txt, 6, "%5f", gmax );
+	txt[5] = '\0';
+	gtk_entry_set_text( GTK_ENTRY(lookup_widget(
+			freqplots_window, "freqplots_maxgain_entry")), txt );
+
+  } /* isFlagSet(ENABLE_RDPAT) */
+
+  /* Display frequency */
+  snprintf( txt, 11, "%10.3f", (double)calc_data.fmhz );
+  txt[10] = '\0';
+  gtk_entry_set_text( GTK_ENTRY(lookup_widget(
+		  freqplots_window, "freqplots_fmhz_entry")), txt );
+
+  /* Calculate VSWR */
+  zrpro2 = (double)creal( netcx.zped ) + calc_data.zo;
+  zrpro2 *= zrpro2;
+  zrmro2 = (double)creal( netcx.zped ) - calc_data.zo;
+  zrmro2 *= zrmro2;
+  zimag2 = (double)cimag( netcx.zped );
+  zimag2 *= zimag2;
+  gamma = sqrt( (zrmro2 + zimag2)/(zrpro2 + zimag2) );
+  vswr = (1+gamma)/(1-gamma);
+  if( vswr > 999.0 )
+	vswr = 999.0;
+
+  /* Display VSWR */
+  snprintf( txt, 6, "%5f", vswr );
+  txt[5] = '\0';
+  gtk_entry_set_text( GTK_ENTRY(lookup_widget(
+		  freqplots_window, "freqplots_vswr_entry")), txt );
+
+  /* Display Z real */
+  snprintf( txt, 6, "%5f", (double)creal( netcx.zped ) );
+  txt[5] = '\0';
+  gtk_entry_set_text( GTK_ENTRY(lookup_widget(
+		  freqplots_window, "freqplots_zreal_entry")), txt );
+
+  /* Display Z imaginary */
+  snprintf( txt, 6, "%5f", (double)cimag( netcx.zped ) );
+  txt[5] = '\0';
+  gtk_entry_set_text( GTK_ENTRY(lookup_widget(
+		  freqplots_window, "freqplots_zimag_entry")), txt );
+
+} /* Display_Frequency_Data() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Draw_Plotting_Frame()
+ *
+ * Draws a graph plotting frame, including
+ * horizontal and vertical divisions
+ */
+void
+Draw_Plotting_Frame(
+	gchar **title,
+	GdkRectangle *rect,
+	int nhor, int nvert )
+{
+  int idx, xpw, xps, yph, yps;
+  PangoLayout *layout;
+  int width0, width1, width2, height; /* Layout size */
+
+  /* Cairo context */
+  cairo_t *cr = gdk_cairo_create( freqplots_pixmap );
+
+  /* Draw titles (left scale, center and right scale) */
+  cairo_set_source_rgb( cr, MAGENTA );
+  layout = gtk_widget_create_pango_layout(
+	  freqplots_drawingarea, title[0] );
+  pango_layout_get_pixel_size( layout, &width0, &height);
+  cairo_move_to( cr, rect->x, rect->y );
+  pango_cairo_show_layout( cr, layout );
+
+  cairo_set_source_rgb( cr, CYAN );
+  pango_layout_set_text( layout, title[2], -1 );
+  pango_layout_get_pixel_size( layout, &width2, &height);
+  xpw = rect->x + rect->width - width2;
+  cairo_move_to( cr, xpw, rect->y );
+  pango_cairo_show_layout( cr, layout );
+
+  cairo_set_source_rgb( cr, YELLOW );
+  pango_layout_set_text( layout, title[1], -1 );
+  pango_layout_get_pixel_size( layout, &width1, &height);
+  xpw = rect->x + width0/2 + (rect->width-width1-width2)/2;
+  cairo_move_to( cr, xpw, rect->y );
+  pango_cairo_show_layout( cr, layout );
+
+  /* Move to plot box and divisions */
+  rect->y += height;
+  xpw = rect->x + rect->width;
+  yph = rect->y + rect->height;
+
+  /* Draw vertical divisions */
+  cairo_set_source_rgb( cr, GREY );
+  nvert--;
+  for( idx = 1; idx <= nvert; idx++ )
+  {
+	xps = rect->x + (idx * rect->width) / nvert;
+	Cairo_Draw_Line( cr, xps, rect->y, xps, yph );
+  }
+
+  /* Draw horizontal divisions */
+  nhor--;
+  for( idx = 1; idx <= nhor; idx++ )
+  {
+	yps = rect->y + (idx * rect->height) / nhor;
+	Cairo_Draw_Line( cr, rect->x, yps, xpw, yps );
+  }
+
+  /* Draw outer box */
+  cairo_rectangle(
+	  cr, rect->x, rect->y, rect->width, rect->height );
+  cairo_stroke( cr );
+
+  /* Draw a vertical line to show current freq if it was
+   * changed by a user click on the plots drawingarea */
+  if( isFlagSet(FREQ_LOOP_DONE) && isFlagSet(PLOT_FREQ_LINE) )
+  {
+	double fr;
+
+	fr = ((double)calc_data.fmhz - min_fscale) /
+	  (max_fscale - min_fscale);
+	fr = fr * (double)rect->width + 0.5;
+
+	cairo_set_source_rgb( cr, GREEN );
+	Cairo_Draw_Line( cr, rect->x+(int)fr, rect->y, rect->x+(int)fr, yph );
+  }
+
+  g_object_unref( layout );
+  cairo_destroy( cr );
+} /* Draw_Plotting_Frame() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Plot_Vertical_Scale()
+ *
+ * Draws out a vertical scale, between the min
+ * and max value of the variable to be plotted
+ */
+void
+Plot_Vertical_Scale(
+	double red, double grn, double blu,
+	int x, int y, int height,
+	double max, double min,
+	int nval )
+{
+  int idx, yps;
+  int min_order, max_order, order;
+  double vstep = 1.0;
+  char value[16], format[6];
+  PangoLayout *layout;
+  int pl_width, pl_height; /* Layout size */
+
+  /* Abort if not enough values to plot */
+  if( nval <= 1 ) return;
+
+  /* Cairo context */
+  cairo_t *cr = gdk_cairo_create( freqplots_pixmap );
+  cairo_set_source_rgb( cr, red, grn, blu );
+
+  /* Calculate step between scale values */
+  vstep = (max-min) / (double)(nval-1);
+
+  /* Determine format for scale values */
+  /* Find order of magnitude of min and max values */
+  if( min != 0.0 )
+  {
+	double mo = log10( fabs(min) );
+	min_order = (int)mo;
+  }
+  else
+	min_order = 0;
+  if( max != 0.0 )
+  {
+	double mo = log10( fabs(max) );
+	max_order = (int)mo;
+  }
+  else max_order = 0;
+
+  /* Use highest order for format */
+  order = ( max_order > min_order ? max_order : min_order );
+  if( order > 3 ) order = 3;
+  if( order < 0 ) order = 0;
+  snprintf( format, 6, "%%6.%df", (3-order) );
+  format[5] = '\0';
+
+  /* Create a pango layout */
+  layout = gtk_widget_create_pango_layout(
+	  freqplots_drawingarea, "X" );
+  pango_layout_get_pixel_size( layout, &pl_width, &pl_height);
+
+  /* Draw vertical scale values */
+  /* Align with plot box */
+  y += pl_height/4;
+  for( idx = 0; idx < nval; idx++ )
+  {
+	yps = y + (idx * height) / (nval-1);
+	snprintf( value, 16, (const char *)format, max );
+	value[15] = '\0';
+	pango_layout_set_text( layout, value, -1 );
+	cairo_move_to( cr, x, yps );
+	pango_cairo_show_layout( cr, layout );
+	max -= vstep;
+  }
+
+  g_object_unref( layout );
+  cairo_destroy( cr );
+} /* Plot_Vertical_Scale() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Plot_Horizontal_Scale()
+ *
+ * Draws out a horizontal scale, between the min
+ * and max value of the variable to be plotted
+ */
+void
+Plot_Horizontal_Scale(
+	double red, double grn, double blu,
+	int x, int y, int width,
+	double max, double min,
+	int nval )
+{
+  int idx, xps, order;
+  double hstep = 1.0;
+  char value[16], format[6];
+  PangoLayout *layout;
+  int pl_width, pl_height; /* Layout size */
+
+  /* Abort if not enough values to plot */
+  if( nval <= 1 ) return;
+
+  /* Cairo context */
+  cairo_t *cr = gdk_cairo_create( freqplots_pixmap );
+  cairo_set_source_rgb( cr, red, grn, blu );
+
+  /* Calculate step between scale values */
+  hstep = (max-min) / (nval-1);
+
+  /* Determine format for scale values */
+  /* Use order of horizontal step to determine format of print */
+  double ord = log10( fabs(hstep + 0.0000001) );
+  order = (int)ord;
+  if( order > 0 )  order = 0;
+  if( order < -9 ) order = -9;
+  snprintf( format, 6, "%%6.%df", 1-order );
+  format[5] = '\0';
+
+  /* Create a pango layout */
+  layout = gtk_widget_create_pango_layout(
+	  freqplots_drawingarea, "1234.5" );
+  pango_layout_get_pixel_size( layout, &pl_width, &pl_height);
+
+  /* Draw horizontal scale values */
+  /* Align with plot box */
+  x -= pl_width/2;
+  for( idx = 0; idx < nval; idx++ )
+  {
+	xps = x + (idx * width) / (nval-1);
+	snprintf( value, 16, (const char *)format, min );
+	value[15] = '\0';
+	pango_layout_set_text( layout, value, -1 );
+	cairo_move_to( cr, xps, y );
+	pango_cairo_show_layout( cr, layout );
+	min += hstep;
+  }
+
+  g_object_unref( layout );
+  cairo_destroy( cr );
+} /* Plot_Horizontal_Scale() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Draw_Graph()
+ *
+ * Plots a graph of a vs b
+ */
+void
+Draw_Graph(
+	double red, double grn, double blu,
+	GdkRectangle *rect,
+	double *a, double *b,
+	double amax, double amin,
+	double bmax, double bmin,
+	int nval, int side )
+{
+  double ra, rb;
+  int idx;
+  GdkPoint *points = NULL, polygn[4];
+
+  /* Cairo context */
+  cairo_t *cr = gdk_cairo_create( freqplots_pixmap );
+  cairo_set_source_rgb( cr, red, grn, blu );
+
+  /* Range of values to plot */
+  ra = amax - amin;
+  rb = bmax - bmin;
+
+  /* Calculate points to plot */
+  mem_alloc( (void *)&points,
+	  (size_t)calc_data.nfrq * sizeof(GdkPoint),
+	  "in Plot_Frequency_Data()" );
+  if( points == NULL )
+  {
+	fprintf( stderr, "xnec2c: Draw_Graph():"
+		"memory allocation for points failed\n" );
+	stop( _("Draw_Graph():"
+		  "Memory allocation for points failed"), ERR_OK );
+	return;
+  }
+  for( idx = 0; idx < nval; idx++ )
+  {
+	points[idx].x = rect->x + (int)( (double)rect->width  *
+		(b[idx]-bmin) / rb + 0.5 );
+	points[idx].y = rect->y + (int)( (double)rect->height *
+		(amax-a[idx]) / ra + 0.5 );
+
+	/* Plot a small rectangle (left scale) or polygon (right scale) at point */
+	if( side == LEFT )
+	{
+	  cairo_rectangle( cr,
+		  (double)(points[idx].x-3), (double)(points[idx].y-3),
+		  6.0, 6.0 );
+	  cairo_fill( cr );
+	}
+	else
+	{
+	  polygn[0].x = points[idx].x-4; polygn[0].y = points[idx].y;
+	  polygn[1].x = points[idx].x;   polygn[1].y = points[idx].y+4;
+	  polygn[2].x = points[idx].x+4; polygn[2].y = points[idx].y;
+	  polygn[3].x = points[idx].x;   polygn[3].y = points[idx].y-4;
+	  Cairo_Draw_Polygon( cr, polygn, 4 );
+	  cairo_fill( cr );
+	}
+  }
+
+  /* Draw the graph */
+  Cairo_Draw_Lines( cr, points, nval );
+
+  free_ptr( (void *)&points );
+  cairo_destroy( cr );
+} /* Draw_Graph() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Set_Rectangle()
+ *
+ * Sets the parameters of a GdkRectangle
+ */
+  void
+Set_Rectangle( GdkRectangle *rect, int x, int y, int w, int h )
+{
+  rect->x = x;
+  rect->y = y;
+  rect->width  = w;
+  rect->height = h;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* Fit_to_Scale()
+ *
+ * Adjust the max and min value of data to be plotted,
+ * as well as the number of scale sub-divisions, so that
+ * sub-division values are easier to interpolate between.
+ * The chosen scale values are 10, 10/2, 10/4, 10/5 and 1.
+ */
+  void
+Fit_to_Scale( double *max, double *min, int *nval )
+{
+  /* Acceptable scale values (10/10, 10/5, 10/4, 10/2) */
+  /* Intermediate values are geometric mean of pairs */
+  double scale_val[] =
+  { 1.0, 1.4142, 2.0, 2.2360, 2.5, 3.5355, 5.0, 7.0710, 10.0, 14.142 };
+  double subdiv_val, subdiv_order;
+  int idx;
+
+  /* Fix input */
+  if( *max == *min )
+  {
+	if( *max == 0.0 )
+	{
+	  *max =  1.0;
+	  *min = -1.0;
+	}
+	else if( *max > 0.0 )
+	{
+	  *max *= 1.5;
+	  *min /= 2.0;
+	}
+	else
+	{
+	  *max /= 2.0;
+	  *min *= 1.5;
+	}
+  }
+
+  /* Find subdivision's lower order of magnitude */
+  subdiv_val = (*max - *min) / (double)(*nval-1);
+  subdiv_order = 1.0;
+  while( subdiv_order < subdiv_val )
+	subdiv_order *= 10.0;
+  while( subdiv_order > subdiv_val )
+	subdiv_order /= 10.0;
+
+  /* Scale subdivision 1 < subd < 10 */
+  subdiv_val /= subdiv_order;
+
+  /* Find nearest prefered subdiv value */
+  for( idx = 1; idx <= 9; idx += 2 )
+	if( scale_val[idx] >= subdiv_val )
+	  break;
+
+  /* Scale prefered subdiv value */
+  if( idx > 9 ) idx = 9;
+  subdiv_val = scale_val[idx-1] * subdiv_order;
+
+  /* Recalculate new max and min value */
+  New_Max_Min( max, min, subdiv_val, nval );
+
+} /* Fit_to_Scale() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Fit_to_Scale2()
+ *
+ * Adjust the max and min value of data to be plotted,
+ * as well as the number of scale sub-divisions, so that
+ * sub-division values are easier to interpolate between.
+ * This is done for two scales (left & right) simultaneously.
+ * The chosen scale values are 10, 10/2, 10/4, 10/5 and 1.
+ */
+  void
+Fit_to_Scale2( double *max1, double *min1,
+	double *max2, double *min2, int *nval )
+{
+  /* Acceptable scale values (10/10, 10/5, 10/4, 10/2) */
+  /* Intermediate values are geometric mean of pairs */
+  double scale_val[] = { 10.0, 5.0, 2.5, 2.0, 1.0, 0.5 };
+
+  double subdiv_val1, subdiv_order1, subdiv_val2, subdiv_order2;
+  double max_1, min_1, max_2, min_2, range1, range2, min_stretch;
+  double max1sv=0.0, min1sv=0.0, max2sv=0.0, min2sv=0.0;
+  int idx1, idx2, nval1, nval2, nvalsv=0, mx, i1, i2;
+
+  /* Fix input for both scales */
+  if( *max1 == *min1 )
+  {
+	if( *max1 == 0.0 )
+	{
+	  *max1 =  1.0;
+	  *min1 = -1.0;
+	}
+	else if( *max1 > 0.0 )
+	{
+	  *max1 *= 1.5;
+	  *min1 /= 2.0;
+	}
+	else
+	{
+	  *max1 /= 2.0;
+	  *min1 *= 1.5;
+	}
+  }
+
+  if( *max2 == *min2 )
+  {
+	if( *max2 == 0.0 )
+	{
+	  *max2 =  1.0;
+	  *min2 = -1.0;
+	}
+	else if( *max2 > 0.0 )
+	{
+	  *max2 *= 1.5;
+	  *min2 /= 2.0;
+	}
+	else
+	{
+	  *max2 /= 2.0;
+	  *min2 *= 1.5;
+	}
+  }
+
+  /* For each scale */
+  /* Find subdivision's lower order of magnitude */
+  subdiv_val1 = (*max1 - *min1) / (double)(*nval-1);
+  subdiv_order1 = 1.0;
+  while( subdiv_order1 < subdiv_val1 )
+	subdiv_order1 *= 10.0;
+  while( subdiv_order1 > subdiv_val1 )
+	subdiv_order1 /= 10.0;
+
+  /* Scale subdivision 1 < subd < 10 */
+  subdiv_val1 /= subdiv_order1;
+
+  /* Find nearest prefered subdiv value */
+  idx1 = 1;
+  while( (scale_val[idx1] > subdiv_val1) && (idx1 <= 4) )
+	idx1++;
+
+  /* Find subdivision's lower order of magnitude */
+  subdiv_val2 = (*max2 - *min2) / (double)(*nval-1);
+  subdiv_order2 = 1.0;
+  while( subdiv_order2 < subdiv_val2 )
+	subdiv_order2 *= 10.0;
+  while( subdiv_order2 > subdiv_val2 )
+	subdiv_order2 /= 10.0;
+
+  /* Scale subdivision 1 < subd < 10 */
+  subdiv_val2 /= subdiv_order2;
+
+  /* Find nearest prefered subdiv value */
+  idx2 = 1;
+  while( (scale_val[idx2] > subdiv_val2) && (idx2 <= 4) )
+	idx2++;
+
+  /* Search for a compromize in scale stretching */
+  range1 = *max1 - *min1;
+  range2 = *max2 - *min2;
+  min_stretch = 10.0;
+
+  /* Scale prefered subdiv values */
+  subdiv_val1 = scale_val[idx1] * subdiv_order1;
+  subdiv_val2 = scale_val[idx2] * subdiv_order2;
+
+  /* Recalculate new max and min values */
+  max_1 = *max1; min_1 = *min1; nval1 = *nval;
+  max_2 = *max2; min_2 = *min2; nval2 = *nval;
+  New_Max_Min( &max_1, &min_1, subdiv_val1, &nval1 );
+  New_Max_Min( &max_2, &min_2, subdiv_val2, &nval2 );
+
+  /* This is a lucky case */
+  if( (nval1 == nval2) && (nval1 >= *nval) )
+  {
+	*max1 = max_1; *min1 = min_1;
+	*max2 = max_2; *min2 = min_2;
+	*nval = nval1;
+	return;
+  }
+
+  /* More likely look for a compromise */
+  for( i1 = 0; i1 < 2; i1++ )
+	for( i2 = 0; i2 < 2; i2++ )
+	{
+	  double stretch;
+
+	  /* Scale prefered subdiv values */
+	  subdiv_val1 = scale_val[idx1-i1] * subdiv_order1;
+	  subdiv_val2 = scale_val[idx2-i2] * subdiv_order2;
+
+	  /* Recalculate new max and min values */
+	  max_1 = *max1; min_1 = *min1; nval1 = *nval;
+	  max_2 = *max2; min_2 = *min2; nval2 = *nval;
+	  New_Max_Min( &max_1, &min_1, subdiv_val1, &nval1 );
+	  New_Max_Min( &max_2, &min_2, subdiv_val2, &nval2 );
+
+	  /* This is a lucky case */
+	  if( nval1 == nval2 )
+	  {
+		*max1 = max_1; *min1 = min_1;
+		*max2 = max_2; *min2 = min_2;
+		*nval = nval1;
+		return;
+	  }
+
+	  /* Stretch scale with the fewer steps */
+	  if( nval1 > nval2 )
+	  {
+		mx = nval1 - nval2;
+		max_2 += ((mx+1)/2) * subdiv_val2;
+		min_2 -= (mx/2) * subdiv_val2;
+		stretch = (max_2-min_2)/range2;
+		if( (stretch < min_stretch) )
+		{
+		  min_stretch = stretch;
+		  max2sv = max_2; min2sv = min_2;
+		  max1sv = max_1; min1sv = min_1;
+		  nvalsv = nval1;
+		}
+	  }
+	  else
+	  {
+		mx = nval2 - nval1;
+		max_1 += ((mx+1)/2) * subdiv_val1;
+		min_1 -= (mx/2) * subdiv_val1;
+		stretch = (max_1-min_1)/range1;
+		if( (stretch < min_stretch) )
+		{
+		  min_stretch = stretch;
+		  max1sv = max_1; min1sv = min_1;
+		  max2sv = max_2; min2sv = min_2;
+		  nvalsv = nval2;
+		}
+	  }
+
+	} /* for( i1 = 0; i1 < 3; i1++ ) */
+
+  *max1 = max1sv; *min1 = min1sv;
+  *max2 = max2sv; *min2 = min2sv;
+  *nval = nvalsv;
+
+} /* Fit_to_Scale2() */
+
+/*-----------------------------------------------------------------------*/
+
+/* New_Max_Min()
+ *
+ * Calculates new max and min scale
+ * values and the number of steps
+ */
+  void
+New_Max_Min( double *max, double *min, double sval, int *nval )
+{
+  int ix;
+  double i;
+
+  i = ceil(*max / sval - 0.000001);
+  ix = (int)i;
+  *max = (double)ix * sval;
+  i = floor(*min / sval + 0.000001);
+  ix = (int)i;
+  *min = (double)ix * sval;
+  *nval = (int)((*max - *min) / sval + 0.5) + 1;
+
+} /* New_Max_Min() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Plot_Graph2()
+ *
+ * Plots graphs of two functions against a common variable
+ */
+void
+Plot_Graph2(
+	double *fa, double *fb, double *fc, int nc,
+	char *titles[], int nplt, int posn )
+{
+  double max_fa, min_fa, max_fb, min_fb;
+  static int first_call = TRUE;
+  int idx, nval_ab, plot_height, plot_posn;
+  /* Pango layout size */
+  static int layout_width, layout_height;
+
+  if( first_call )
+  {
+	/* Create a pango layout to get scale size */
+	PangoLayout *layout;
+	layout = gtk_widget_create_pango_layout(
+		freqplots_drawingarea, "000000" );
+	pango_layout_get_pixel_size( layout,
+		&layout_width, &layout_height);
+	first_call = FALSE;
+	g_object_unref( layout );
+  }
+
+  /* Available height for each graph.
+   * (np=number of graphs to be plotted) */
+  plot_height = freqplots_pixmap_height/nplt;
+  plot_posn   = (freqplots_pixmap_height * (posn-1))/nplt;
+
+  /* Plot box rectangle */
+  Set_Rectangle(
+	  &plot_rect,
+	  layout_width+4, plot_posn+2,
+	  freqplots_pixmap_width-8 - 2*layout_width,
+	  plot_height-8 - 2*layout_height );
+
+  /*** Draw horizontal (freq) scale ***/
+  Plot_Horizontal_Scale(
+	  YELLOW,
+	  layout_width+2,
+	  plot_posn+plot_height-2 - layout_height,
+	  plot_rect.width,
+	  max_fscale, min_fscale, nval_fscale );
+
+  /*** Draw left and right scale ***/
+  /* Find max and min of fa */
+  max_fa = min_fa = fa[0];
+  for( idx = 1; idx < nc; idx++ )
+  {
+	if( max_fa < fa[idx] )
+	  max_fa = fa[idx];
+	if( min_fa > fa[idx] )
+	  min_fa = fa[idx];
+  }
+
+  /* Find max and min of fb */
+  max_fb = min_fb = fb[0];
+  for( idx = 1; idx < nc; idx++ )
+  {
+	if( max_fb < fb[idx] )
+	  max_fb = fb[idx];
+	if( min_fb > fb[idx] )
+	  min_fb = fb[idx];
+  }
+
+  /* Fit ranges to common scale */
+  nval_ab = plot_height / 50;
+  Fit_to_Scale2( &max_fa, &min_fa, &max_fb, &min_fb, &nval_ab );
+
+  /* Draw left scale */
+  Plot_Vertical_Scale(
+	  MAGENTA,
+	  2, plot_posn+2,
+	  plot_rect.height,
+	  max_fa, min_fa, nval_ab );
+
+  /* Draw right scale */
+  Plot_Vertical_Scale(
+	  CYAN,
+	  freqplots_pixmap_width-2 - layout_width, plot_posn+2,
+	  plot_rect.height,
+	  max_fb, min_fb, nval_ab );
+
+  /* Draw plotting frame */
+  Draw_Plotting_Frame( titles, &plot_rect, nval_ab, nval_fscale );
+
+  /* Draw graph */
+  Draw_Graph(
+	  MAGENTA,
+	  &plot_rect, fa, fc,
+	  max_fa, min_fa,
+	  max_fscale, min_fscale,
+	  nc, LEFT );
+
+  /* Draw graph */
+  Draw_Graph(
+	  CYAN, &plot_rect,
+	  fb, fc,
+	  max_fb, min_fb,
+	  max_fscale, min_fscale,
+	  nc, RIGHT );
+
+} /* Plot_Graph2() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Plot_Graph()
+ *
+ * Plots graph of a functions against a variable
+ */
+void
+Plot_Graph(
+	double *fa, double *fb, int nb,
+	char *titles[], int nplt, int posn )
+{
+  double max_fa, min_fa;
+  static int first_call = TRUE;
+  int idx, nval_fa, plot_height, plot_posn;
+  /* Pango layout size */
+  static int layout_width, layout_height;
+
+
+  if( first_call )
+  {
+	/* Create a pango layout to get scale size */
+	PangoLayout *layout;
+	layout = gtk_widget_create_pango_layout(
+		freqplots_drawingarea, "000000" );
+	pango_layout_get_pixel_size(
+		layout, &layout_width, &layout_height);
+	first_call = FALSE;
+	g_object_unref( layout );
+  }
+
+  /* Available height for each graph.
+   * (np=number of graphs to be plotted) */
+  plot_height = freqplots_pixmap_height/nplt;
+  plot_posn   = (freqplots_pixmap_height * (posn-1))/nplt;
+
+  /* Plot box rectangle */
+  Set_Rectangle(
+	  &plot_rect,
+	  layout_width + 4, plot_posn+2,
+	  freqplots_pixmap_width-8 - 2*layout_width,
+	  plot_height-8 - 2*layout_height );
+
+  /*** Draw horizontal (freq) scale ***/
+  Plot_Horizontal_Scale(
+	  YELLOW,
+	  layout_width+2,
+	  plot_posn+plot_height-2 - layout_height,
+	  plot_rect.width,
+	  max_fscale, min_fscale, nval_fscale );
+
+  /*** Draw left scale ***/
+  /* Find max and min of fa */
+  max_fa = min_fa = fa[0];
+  for( idx = 1; idx < nb; idx++ )
+  {
+	if( max_fa < fa[idx] )
+	  max_fa = fa[idx];
+	if( min_fa > fa[idx] )
+	  min_fa = fa[idx];
+  }
+
+  /* Fit fa range to scale */
+  nval_fa = plot_height / 50;
+  Fit_to_Scale( &max_fa, &min_fa, &nval_fa );
+
+  /* Draw left scale */
+  Plot_Vertical_Scale(
+	  MAGENTA,
+	  2, plot_posn+2,
+	  plot_rect.height,
+	  max_fa, min_fa, nval_fa );
+
+  /* Draw plotting frame */
+  Draw_Plotting_Frame( titles, &plot_rect, nval_fa, nval_fscale );
+
+  /* Draw graph */
+  Draw_Graph(
+	  MAGENTA,
+	  &plot_rect, fa, fb,
+	  max_fa, min_fa,
+	  max_fscale, min_fscale,
+	  nb, LEFT );
+
+} /* Plot_Graph() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Plots_Window_Killed()
+ *
+ * Cleans up after the plots window is closed
+ */
+  void
+Plots_Window_Killed(void)
+{
+  if( isFlagSet(PLOT_ENABLED) )
+  {
+	ClearFlag( PLOT_FLAGS );
+	freqplots_drawingarea = NULL;
+	freqplots_window = NULL;
+
+	gtk_check_menu_item_set_active(
+		GTK_CHECK_MENU_ITEM(lookup_widget(
+			main_window, "main_freqplots")), FALSE );
+  }
+
+} /* Plots_Window_Killed() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Set_Frequecy_On_Click()
+ *
+ * Sets the current freq after click by user on plots drawingarea
+ */
+  void
+Set_Frequency_On_Click( GdkEventButton *event )
+{
+  gdouble fmhz = 0.0;
+  gdouble x, w;
+  int idx;
+
+
+  if( isFlagClear(FREQ_LOOP_DONE) )
+	return;
+
+  /* Width of plot bounding rectangle */
+  w = (double)plot_rect.width;
+
+  /* 'x' posn of click refered to plot bounding rectangle's 'x' */
+  x = event->x - (double)plot_rect.x;
+  if( x < 0.0 ) x = 0.0;
+  else if( x > w ) x = w;
+
+  /* Set freq corresponding to click 'x', to freq spinbuttons */
+  idx = calc_data.lastf;
+  switch( event->button )
+  {
+	case 1: /* Calculate frequency corresponding to mouse position in plot */
+	  /* Enable drawing of freq line */
+	  SetFlag( PLOT_FREQ_LINE );
+
+	  fmhz = max_fscale - min_fscale;
+	  fmhz = min_fscale + fmhz * x/w;
+	  break;
+
+	case 2: /* Disable drawing of freq line */
+	  ClearFlag( PLOT_FREQ_LINE );
+	  Plot_Frequency_Data();
+	  return;
+
+	case 3: /* Calculate frequency corresponding to mouse position in plot */
+	  /* Enable drawing of freq line */
+	  SetFlag( PLOT_FREQ_LINE );
+
+	  fmhz = max_fscale - min_fscale;
+	  fmhz = min_fscale + fmhz * x/w;
+
+	  /* Find nearest freq step */
+	  idx = (int)( (double)idx * (fmhz - save.freq[0]) /
+		  (save.freq[idx] - save.freq[0]) + 0.5 );
+
+	  if( idx > calc_data.lastf )
+		idx = calc_data.lastf;
+	  else if( idx < 0 ) idx = 0;
+
+	  fmhz = save.freq[idx];
+
+  } /* switch( event->button ) */
+
+  /* Set frequency spinbuttons on new freq */
+  if( fmhz != gtk_spin_button_get_value(mainwin_frequency) )
+  {
+	gtk_spin_button_set_value( mainwin_frequency, fmhz );
+	if( isFlagSet(DRAW_ENABLED) )
+	  gtk_spin_button_set_value( rdpattern_frequency, fmhz );
+  }
+  else /* Replot data */
+  {
+	calc_data.fmhz = (double)fmhz;
+	g_idle_add( Redo_Currents, NULL );
+  }
+
+} /* Set_Freq_On_Click() */
+
+/*-----------------------------------------------------------------------*/
+
diff --git a/src/plot_freqdata.h b/src/plot_freqdata.h
new file mode 100644
index 0000000..2954772
--- /dev/null
+++ b/src/plot_freqdata.h
@@ -0,0 +1,30 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	PLOT_FREQDATA_H
+#define	PLOT_FREQDATA_H		1
+
+#include "common.h"
+#include "support.h"
+
+/* For plotting graphs */
+#define	LEFT	1
+#define	RIGHT	2
+
+#endif
+
diff --git a/src/radiation.c b/src/radiation.c
new file mode 100644
index 0000000..4a3d999
--- /dev/null
+++ b/src/radiation.c
@@ -0,0 +1,793 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/******* Translated to the C language by N. Kyriazis  20 Aug 2003 ******
+
+  Program NEC(input,tape5=input,output,tape11,tape12,tape13,tape14,
+  tape15,tape16,tape20,tape21)
+
+  Numerical Electromagnetics Code (NEC2)  developed at Lawrence
+  Livermore lab., Livermore, CA.  (contact G. Burke at 415-422-8414
+  for problems with the NEC code. For problems with the vax implem-
+  entation, contact J. Breakall at 415-422-8196 or E. Domning at 415
+  422-5936)
+  file created 4/11/80.
+
+ ***********Notice**********
+ This computer code material was prepared as an account of work
+ sponsored by the United States government.  Neither the United
+ States nor the United States Department Of Energy, nor any of
+ their employees, nor any of their contractors, subcontractors,
+ or their employees, makes any warranty, express or implied, or
+ assumes any legal liability or responsibility for the accuracy,
+ completeness or usefulness of any information, apparatus, product
+ or process disclosed, or represents that its use would not infringe
+ privately-owned rights.
+
+ ***********************************************************************/
+
+#include "radiation.h"
+#include "shared.h"
+
+/* Radiation pattern data */
+/*-----------------------------------------------------------------------*/
+
+/* ffld calculates the far zone radiated electric fields, */
+/* the factor exp(j*k*r)/(r/lamda) not included */
+void ffld( double thet, double phi,
+	complex double *eth, complex double *eph )
+{
+  int k, i, ip, jump;
+  double phx, phy, roz, rozs, thx, thy, thz, rox, roy;
+  double tthet=0.0, darg=0.0, omega, el, sill, top, bot, a;
+  double too, boo, b, c, d, rr, ri, arg, dr, rfl, rrz;
+  complex double cix=CPLX_00, ciy=CPLX_00, ciz=CPLX_00, ccx=CPLX_00;
+  complex double ccy=CPLX_00, ccz=CPLX_00, exa, cdp;
+  complex double zrsin, rrv=CPLX_00, rrh=CPLX_00, rrv1=CPLX_00;
+  complex double rrh1=CPLX_00, rrv2=CPLX_00, rrh2=CPLX_00;
+  complex double tix, tiy, tiz, zscrn, ex=CPLX_00;
+  complex double ey=CPLX_00, ez=CPLX_00, gx, gy, gz;
+
+  phx= -sin( phi);
+  phy= cos( phi);
+  roz= cos( thet);
+  rozs= roz;
+  thx= roz* phy;
+  thy= -roz* phx;
+  thz= -sin( thet);
+  rox= -thz* phy;
+  roy= thz* phx;
+
+  jump = FALSE;
+  if( data.n != 0)
+  {
+	/* loop for structure image if any */
+	/* calculation of reflection coeffecients */
+	for( k = 0; k < gnd.ksymp; k++ )
+	{
+	  if( k != 0 )
+	  {
+		/* for perfect ground */
+		if( gnd.iperf == 1)
+		{
+		  rrv=-CPLX_10;
+		  rrh=-CPLX_10;
+		}
+		else
+		{
+		  /* for infinite planar ground */
+		  zrsin= csqrt(1.0- gnd.zrati* gnd.zrati* thz* thz);
+		  rrv=-( roz- gnd.zrati* zrsin)/( roz+ gnd.zrati* zrsin);
+		  rrh=( gnd.zrati* roz- zrsin)/( gnd.zrati* roz+ zrsin);
+		} /* if( gnd.iperf == 1) */
+
+		/* for the cliff problem, two reflection coefficients calculated */
+		if( gnd.ifar > 1)
+		{
+		  rrv1= rrv;
+		  rrh1= rrh;
+		  tthet= tan( thet);
+
+		  if( gnd.ifar != 4)
+		  {
+			zrsin= csqrt(1.0- gnd.zrati2* gnd.zrati2* thz* thz);
+			rrv2=-( roz- gnd.zrati2* zrsin)/( roz+ gnd.zrati2* zrsin);
+			rrh2=( gnd.zrati2* roz- zrsin)/( gnd.zrati2* roz+ zrsin);
+			darg= -TP*2.0* gnd.ch* roz;
+		  }
+		} /* if( gnd.ifar > 1) */
+
+		roz= -roz;
+		ccx= cix;
+		ccy= ciy;
+		ccz= ciz;
+
+	  } /* if( k != 0 ) */
+
+	  cix=CPLX_00;
+	  ciy=CPLX_00;
+	  ciz=CPLX_00;
+
+	  /* loop over structure segments */
+	  for( i = 0; i < data.n; i++ )
+	  {
+		omega=-( rox* data.cab[i] +	roy* data.sab[i]+ roz* data.salp[i]);
+		el= PI* data.si[i];
+		sill= omega* el;
+		top= el+ sill;
+		bot= el- sill;
+
+		if( fabs( omega) >= 1.0e-7)
+		  a=2.0* sin( sill)/ omega;
+		else
+		  a=(2.0- omega* omega* el* el/3.0)* el;
+
+		if( fabs( top) >= 1.0e-7)
+		  too= sin( top)/ top;
+		else
+		  too=1.0- top* top/6.0;
+
+		if( fabs( bot) >= 1.0e-7)
+		  boo= sin( bot)/ bot;
+		else
+		  boo=1.0- bot* bot/6.0;
+
+		b= el*( boo- too);
+		c= el*( boo+ too);
+		rr= a* crnt.air[i]+ b* crnt.bii[i]+ c* crnt.cir[i];
+		ri= a* crnt.aii[i]- b* crnt.bir[i]+ c* crnt.cii[i];
+		arg= TP*( data.x[i]* rox+ data.y[i]* roy+ data.z[i]* roz);
+
+		if( (k != 1) || (gnd.ifar < 2) )
+		{
+		  /* summation for far field integral */
+		  exa= cmplx( cos( arg), sin( arg))* cmplx( rr, ri);
+		  cix= cix+ exa* data.cab[i];
+		  ciy= ciy+ exa* data.sab[i];
+		  ciz= ciz+ exa* data.salp[i];
+		  continue;
+		}
+
+		/* calculation of image contribution */
+		/* in cliff and ground screen problems */
+
+		/* specular point distance */
+		dr= data.z[i]* tthet;
+		d= dr* phy+ data.x[i];
+		if( gnd.ifar == 2)
+		{
+		  if(( gnd.cl- d) > 0.0)
+		  {
+			rrv= rrv1;
+			rrh= rrh1;
+		  }
+		  else
+		  {
+			rrv= rrv2;
+			rrh= rrh2;
+			arg= arg+ darg;
+		  }
+		} /* if( gnd.ifar == 2) */
+		else
+		{
+		  d= sqrt( d*d + (data.y[i]-dr*phx)*(data.y[i]-dr*phx) );
+		  if( gnd.ifar == 3)
+		  {
+			if(( gnd.cl- d) > 0.0)
+			{
+			  rrv= rrv1;
+			  rrh= rrh1;
+			}
+			else
+			{
+			  rrv= rrv2;
+			  rrh= rrh2;
+			  arg= arg+ darg;
+			}
+		  } /* if( gnd.ifar == 3) */
+		  else
+		  {
+			if(( gnd.scrwl- d) >= 0.0)
+			{
+			  /* radial wire ground screen reflection coefficient */
+			  d= d+ gnd.t2;
+			  zscrn= gnd.t1* d* log( d/ gnd.t2);
+			  zscrn=( zscrn* gnd.zrati)/( ETA* gnd.zrati+ zscrn);
+			  zrsin= csqrt(1.0- zscrn* zscrn* thz* thz);
+			  rrv=( roz+ zscrn* zrsin)/(- roz+ zscrn* zrsin);
+			  rrh=( zscrn* roz+ zrsin)/( zscrn* roz- zrsin);
+			} /* if(( gnd.scrwl- d) < 0.0) */
+			else
+			{
+			  if( gnd.ifar == 4)
+			  {
+				rrv= rrv1;
+				rrh= rrh1;
+			  } /* if( gnd.ifar == 4) */
+			  else
+			  {
+				if( gnd.ifar == 5)
+				  d= dr* phy+ data.x[i];
+
+				if(( gnd.cl- d) > 0.0)
+				{
+				  rrv= rrv1;
+				  rrh= rrh1;
+				}
+				else
+				{
+				  rrv= rrv2;
+				  rrh= rrh2;
+				  arg= arg+ darg;
+				} /* if(( gnd.cl- d) > 0.0) */
+
+			  } /* if( gnd.ifar == 4) */
+
+			} /* if(( gnd.scrwl- d) < 0.0) */
+
+		  } /* if( gnd.ifar == 3) */
+
+		} /* if( gnd.ifar == 2) */
+
+		/* contribution of each image segment modified by */
+		/* reflection coef, for cliff and ground screen problems */
+		exa= cmplx( cos( arg), sin( arg))* cmplx( rr, ri);
+		tix= exa* data.cab[i];
+		tiy= exa* data.sab[i];
+		tiz= exa* data.salp[i];
+		cdp=( tix* phx+ tiy* phy)*( rrh- rrv);
+		cix= cix+ tix* rrv+ cdp* phx;
+		ciy= ciy+ tiy* rrv+ cdp* phy;
+		ciz= ciz- tiz* rrv;
+
+	  } /* for( i = 0; i < n; i++ ) */
+
+	  if( k == 0 )
+		continue;
+
+	  /* calculation of contribution of
+	   * structure image for infinite ground */
+	  if( gnd.ifar < 2)
+	  {
+		cdp=( cix* phx+ ciy* phy)*( rrh- rrv);
+		cix= ccx+ cix* rrv+ cdp* phx;
+		ciy= ccy+ ciy* rrv+ cdp* phy;
+		ciz= ccz- ciz* rrv;
+	  }
+	  else
+	  {
+		cix= cix+ ccx;
+		ciy= ciy+ ccy;
+		ciz= ciz+ ccz;
+	  }
+
+	} /* for( k=0; k < gnd.ksymp; k++ ) */
+
+	if( data.m > 0)
+	  jump = TRUE;
+	else
+	{
+	  *eth=( cix* thx+ ciy* thy+ ciz* thz)* CONST3;
+	  *eph=( cix* phx+ ciy* phy)* CONST3;
+	  return;
+	}
+
+  } /* if( n != 0) */
+
+  if( ! jump )
+  {
+	cix=CPLX_00;
+	ciy=CPLX_00;
+	ciz=CPLX_00;
+  }
+
+  /* electric field components */
+  roz= rozs;
+  rfl=-1.0;
+  for( ip = 0; ip < gnd.ksymp; ip++ )
+  {
+	rfl= -rfl;
+	rrz= roz* rfl;
+	fflds( rox, roy, rrz, &crnt.cur[data.n], &gx, &gy, &gz);
+
+	if( ip != 1 )
+	{
+	  ex= gx;
+	  ey= gy;
+	  ez= gz;
+	  continue;
+	}
+
+	if( gnd.iperf == 1)
+	{
+	  gx= -gx;
+	  gy= -gy;
+	  gz= -gz;
+	}
+	else
+	{
+	  rrv= csqrt(1.0- gnd.zrati* gnd.zrati* thz* thz);
+	  rrh= gnd.zrati* roz;
+	  rrh=( rrh- rrv)/( rrh+ rrv);
+	  rrv= gnd.zrati* rrv;
+	  rrv=-( roz- rrv)/( roz+ rrv);
+	  *eth=( gx* phx+ gy* phy)*( rrh- rrv);
+	  gx= gx* rrv+ *eth* phx;
+	  gy= gy* rrv+ *eth* phy;
+	  gz= gz* rrv;
+
+	} /* if( gnd.iperf == 1) */
+
+	ex= ex+ gx;
+	ey= ey+ gy;
+	ez= ez- gz;
+
+  } /* for( ip = 0; ip < gnd.ksymp; ip++ ) */
+
+  ex= ex+ cix* CONST3;
+  ey= ey+ ciy* CONST3;
+  ez= ez+ ciz* CONST3;
+  *eth= ex* thx+ ey* thy+ ez* thz;
+  *eph= ex* phx+ ey* phy;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* calculates the xyz components of the electric */
+/* field due to surface currents */
+void fflds( double rox, double roy, double roz,
+	complex double *scur, complex double *ex,
+	complex double *ey, complex double *ez )
+{
+  double *xs, *ys, *zs, *s;
+  int j, i, k;
+  double arg;
+  complex double ct;
+
+  xs = data.px;
+  ys = data.py;
+  zs = data.pz;
+  s = data.pbi;
+
+  *ex=CPLX_00;
+  *ey=CPLX_00;
+  *ez=CPLX_00;
+
+  i= -1;
+  for( j = 0; j < data.m; j++ )
+  {
+	i++;
+	arg= TP*( rox* xs[i]+ roy* ys[i]+ roz* zs[i]);
+	ct= cmplx( cos( arg)* s[i], sin( arg)* s[i]);
+	k=3*j;
+	*ex += scur[k  ]* ct;
+	*ey += scur[k+1]* ct;
+	*ez += scur[k+2]* ct;
+  }
+
+  ct= rox* *ex+ roy* *ey+ roz* *ez;
+  *ex= CONST4*( ct* rox- *ex);
+  *ey= CONST4*( ct* roy- *ey);
+  *ez= CONST4*( ct* roz- *ez);
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* gfld computes the radiated field including ground wave. */
+void gfld( double rho, double phi, double rz,
+	complex double *eth, complex double *epi,
+	complex double *erd, complex double ux, int ksymp )
+{
+  int i, k;
+  double b, r, thet, arg, phx, phy, rx, ry;
+  double dx, dy, dz, rix, riy, rhs, rhp;
+  double rhx, rhy, calp, cbet, sbet, cph;
+  double sph, el, rfl, riz, thx, thy, thz;
+  double rxyz, rnx, rny, rnz, omega, sill;
+  double top, bot, a, too, boo, c, rr, ri;
+  complex double cix, ciy, ciz, exa, erv;
+  complex double ezv, erh, eph, ezh, ex, ey;
+
+  r= sqrt( rho*rho+ rz*rz );
+  if( (ksymp == 1) || (cabs(ux) > .5) || (r > 1.0e5) )
+  {
+	/* computation of space wave only */
+	if( rz >= 1.0e-20)
+	  thet= atan( rho/ rz);
+	else
+	  thet= PI*.5;
+
+	ffld( thet, phi, eth, epi);
+	arg= -TP* r;
+	exa= cmplx( cos( arg), sin( arg))/ r;
+	*eth= *eth* exa;
+	*epi= *epi* exa;
+	*erd=CPLX_00;
+	return;
+  } /* if( (ksymp == 1) && (cabs(ux) > .5) && (r > 1.0e5) ) */
+
+  /* computation of space and ground waves. */
+  gwav.u= ux;
+  gwav.u2= gwav.u* gwav.u;
+  phx= -sin( phi);
+  phy= cos( phi);
+  rx= rho* phy;
+  ry= -rho* phx;
+  cix=CPLX_00;
+  ciy=CPLX_00;
+  ciz=CPLX_00;
+
+  /* summation of field from individual segments */
+  for( i = 0; i < data.n; i++ )
+  {
+	dx= data.cab[i];
+	dy= data.sab[i];
+	dz= data.salp[i];
+	rix= rx- data.x[i];
+	riy= ry- data.y[i];
+	rhs= rix* rix+ riy* riy;
+	rhp= sqrt( rhs);
+
+	if( rhp >= 1.0e-6)
+	{
+	  rhx= rix/ rhp;
+	  rhy= riy/ rhp;
+	}
+	else
+	{
+	  rhx=1.0;
+	  rhy=0.0;
+	}
+
+	calp=1.0- dz* dz;
+	if( calp >= 1.0e-6)
+	{
+	  calp= sqrt( calp);
+	  cbet= dx/ calp;
+	  sbet= dy/ calp;
+	  cph= rhx* cbet+ rhy* sbet;
+	  sph= rhy* cbet- rhx* sbet;
+	}
+	else
+	{
+	  cph= rhx;
+	  sph= rhy;
+	}
+
+	el= PI* data.si[i];
+	rfl=-1.0;
+
+	/* integration of (current)*(phase factor)
+	 * over segment and image for constant,
+	 * sine, and cosine current distributions */
+	for( k = 0; k < 2; k++ )
+	{
+	  rfl= -rfl;
+	  riz= rz- data.z[i]* rfl;
+	  rxyz= sqrt( rix* rix+ riy* riy+ riz* riz);
+	  rnx= rix/ rxyz;
+	  rny= riy/ rxyz;
+	  rnz= riz/ rxyz;
+	  omega=-( rnx* dx+ rny* dy+ rnz* dz* rfl);
+	  sill= omega* el;
+	  top= el+ sill;
+	  bot= el- sill;
+
+	  if( fabs( omega) >= 1.0e-7)
+		a=2.0* sin( sill)/ omega;
+	  else
+		a=(2.0- omega* omega* el* el/3.0)* el;
+
+	  if( fabs( top) >= 1.0e-7)
+		too= sin( top)/ top;
+	  else
+		too=1.0- top* top/6.0;
+
+	  if( fabs( bot) >= 1.0e-7)
+		boo= sin( bot)/ bot;
+	  else
+		boo=1.0- bot* bot/6.0;
+
+	  b= el*( boo- too);
+	  c= el*( boo+ too);
+	  rr= a* crnt.air[i] +
+		b* crnt.bii[i]+ c* crnt.cir[i];
+	  ri= a* crnt.aii[i] -
+		b* crnt.bir[i]+ c* crnt.cii[i];
+	  arg= TP*( data.x[i] *
+		  rnx+ data.y[i]* rny+ data.z[i]* rnz* rfl);
+	  exa= cmplx( cos( arg), sin( arg))* cmplx( rr, ri)/ TP;
+
+	  if( k != 1 )
+	  {
+		gwav.xx1= exa;
+		gwav.r1= rxyz;
+		gwav.zmh= riz;
+		continue;
+	  }
+
+	  gwav.xx2= exa;
+	  gwav.r2= rxyz;
+	  gwav.zph= riz;
+
+	} /* for( k = 0; k < 2; k++ ) */
+
+	/* call subroutine to compute the field */
+	/* of segment including ground wave. */
+	gwave( &erv, &ezv, &erh, &ezh, &eph);
+	erh= erh* cph* calp+ erv* dz;
+	eph= eph* sph* calp;
+	ezh= ezh* cph* calp+ ezv* dz;
+	ex= erh* rhx- eph* rhy;
+	ey= erh* rhy+ eph* rhx;
+	cix= cix+ ex;
+	ciy= ciy+ ey;
+	ciz= ciz+ ezh;
+
+  } /* for( i = 0; i < n; i++ ) */
+
+  arg= -TP* r;
+  exa= cmplx( cos( arg), sin( arg));
+  cix= cix* exa;
+  ciy= ciy* exa;
+  ciz= ciz* exa;
+  rnx= rx/ r;
+  rny= ry/ r;
+  rnz= rz/ r;
+  thx= rnz* phy;
+  thy= -rnz* phx;
+  thz= -rho/ r;
+  *eth= cix* thx+ ciy* thy+ ciz* thz;
+  *epi= cix* phx+ ciy* phy;
+  *erd= cix* rnx+ ciy* rny+ ciz* rnz;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* compute radiation pattern, gain, normalized gain */
+void rdpat(void)
+{
+  int kth, kph, isens;
+  double  prad, gcon, gcop;
+  double phi, pha, thet;
+  double tha, ethm2, ethm;
+  double etha, ephm2, ephm, epha, tilta, emajr2, eminr2;
+  double dfaz, axrat, dfaz2, cdfaz, tstor1=0.0, tstor2;
+  double gnmn, stilta, gnmj, gnv, gnh, gtot;
+  complex double eth, eph, erd;
+  int idx, pol; /* Gain buffer and pol type index */
+  double gain;
+
+
+  if( gnd.ifar != 4 )
+  {
+	gnd.cl= fpat.clt/ data.wlam;
+	gnd.ch= fpat.cht/ data.wlam;
+	gnd.zrati2= csqrt(1.0/ cmplx(
+		  fpat.epsr2,- fpat.sig2* data.wlam*59.96));
+  }
+
+  /* Calculate radiation pattern data */
+  /*** For applied voltage excitation ***/
+  if( (fpat.ixtyp == 0) || (fpat.ixtyp == 5) )
+  {
+	gcop= data.wlam* data.wlam* 2.0* PI/(376.73* fpat.pinr);
+	prad= fpat.pinr- fpat.ploss- fpat.pnlr;
+	gcon= gcop;
+	if( fpat.ipd != 0)
+	  gcon *= fpat.pinr/ prad;
+  }
+  /*** For elementary current source ***/
+  else if( fpat.ixtyp == 4)
+  {
+	fpat.pinr=394.510* calc_data.xpr6*
+	  calc_data.xpr6* data.wlam* data.wlam;
+	gcop= data.wlam* data.wlam*2.0* PI/(376.73* fpat.pinr);
+	prad= fpat.pinr- fpat.ploss- fpat.pnlr;
+	gcon= gcop;
+	if( fpat.ipd != 0)
+	  gcon= gcon* fpat.pinr/ prad;
+  }
+  /*** Incident field source ***/
+  else gcon=4.0* PI/(1.0+ calc_data.xpr6* calc_data.xpr6);
+
+  phi  = fpat.phis - fpat.dph;
+
+  /*** Save radiation pattern data ***/
+  /* Prime max and min gains and index */
+  for( pol = 0; pol < NUM_POL; pol++ )
+  {
+	rad_pattern[calc_data.fstep].max_gain[pol] = -10000.0;
+	rad_pattern[calc_data.fstep].min_gain[pol] =  10000.0;
+	rad_pattern[calc_data.fstep].max_gain_idx[pol] = 0;
+	rad_pattern[calc_data.fstep].min_gain_idx[pol] = 0;
+	rad_pattern[calc_data.fstep].max_gain_tht[pol] = 0;
+	rad_pattern[calc_data.fstep].max_gain_phi[pol] = 0;
+  }
+
+  /* Signal new rad pattern data */
+  SetFlag( DRAW_NEW_RDPAT );
+
+  /* Step over theta and phi angles */
+  idx = 0;
+  for( kph = 1; kph <= fpat.nph; kph++ )
+  {
+	phi += fpat.dph;
+	pha= phi* TA;
+	thet= fpat.thets - fpat.dth;
+
+	for( kth = 1; kth <= fpat.nth; kth++ )
+	{
+	  thet += fpat.dth;
+
+	  if( (gnd.ksymp == 2) && (thet > 90.01) && (gnd.ifar != 1) )
+	  {
+		if( rdpattern_window != NULL )
+		  gtk_widget_destroy( rdpattern_window );
+		fprintf( stderr, "xnec2c: rdpat(): Theta > 90 deg with ground specified\n"
+			"Please check RP card data and correct\n" );
+		stop( _("rdpat(): Theta > 90 deg with ground specified\n"\
+			  "Please check RP card data and correct"), ERR_STOP );
+	  }
+
+	  tha= thet* TA;
+	  if( gnd.ifar != 1)
+		ffld( tha, pha, &eth, &eph);
+	  else
+	  {
+		gfld( fpat.rfld/data.wlam, pha, thet/data.wlam,
+			&eth, &eph, &erd, gnd.zrati, gnd.ksymp);
+	  }
+
+	  ethm2= creal( eth* conj( eth));
+	  ethm= sqrt( ethm2);
+	  etha= cang( eth);
+	  ephm2= creal( eph* conj( eph));
+	  ephm= sqrt( ephm2);
+	  epha= cang( eph);
+
+	  /* elliptical polarization calc. */
+	  if( gnd.ifar != 1)
+	  {
+		if( (ethm2 <= 1.0e-20) && (ephm2 <= 1.0e-20) )
+		{
+		  tilta=0.0;
+		  emajr2=0.0;
+		  eminr2=0.0;
+		  axrat=0.0;
+		  isens= 0;
+		}
+		else
+		{
+		  dfaz= epha- etha;
+		  if( epha >= 0.0)
+			dfaz2= dfaz-360.0;
+		  else
+			dfaz2= dfaz+360.0;
+
+		  if( fabs(dfaz) > fabs(dfaz2) )
+			dfaz= dfaz2;
+
+		  cdfaz= cos( dfaz* TA);
+		  tstor1= ethm2- ephm2;
+		  tstor2=2.0* ephm* ethm* cdfaz;
+		  tilta=atan2( tstor2, tstor1)/2.0;
+		  stilta= sin( tilta);
+		  tstor1= tstor1* stilta* stilta;
+		  tstor2= tstor2* stilta* cos( tilta);
+		  emajr2= -tstor1+ tstor2+ ethm2;
+		  eminr2= tstor1- tstor2+ ephm2;
+		  if( eminr2 < 0.0)	eminr2=0.0;
+
+		  axrat= sqrt( eminr2/ emajr2);
+		  if( axrat <= 1.0e-5)
+			isens= 1;
+		  else if( dfaz <= 0.0)
+			isens= 2;
+		  else
+			isens= 3;
+
+		} /* if( (ethm2 <= 1.0e-20) && (ephm2 <= 1.0e-20) ) */
+
+		gnmj= db10( gcon* emajr2);
+		gnmn= db10( gcon* eminr2);
+		gnv = db10( gcon* ethm2);
+		gnh = db10( gcon* ephm2);
+		gtot= db10( gcon* (ethm2+ ephm2) );
+
+		switch( fpat.inor )
+		{
+		  case 0:
+			tstor1= gtot;
+			break;
+
+		  case 1:
+			tstor1= gnmj;
+			break;
+
+		  case 2:
+			tstor1= gnmn;
+			break;
+
+		  case 3:
+			tstor1= gnv;
+			break;
+
+		  case 4:
+			tstor1= gnh;
+			break;
+
+		  case 5:
+			tstor1= gtot;
+		}
+
+		/* Save rad pattern gains */
+		rad_pattern[calc_data.fstep].gtot[idx] = tstor1;
+
+		/* Save axial ratio, tilt and pol sense */
+		if( isens == 2 )
+		  rad_pattern[calc_data.fstep].axrt[idx] = -axrat;
+		else
+		  rad_pattern[calc_data.fstep].axrt[idx] = axrat;
+		rad_pattern[calc_data.fstep].tilt[idx] = tilta;
+		rad_pattern[calc_data.fstep].sens[idx] = isens;
+
+		/* Find and save max value of gain and direction */
+		for( pol = 0; pol < NUM_POL; pol++ )
+		{
+		  gain = rad_pattern[calc_data.fstep].gtot[idx] + 10.0 *
+			log10( Polarization_Factor( pol, calc_data.fstep, idx) );
+		  if( gain < -999.99 ) gain = -999.99;
+
+		  /* Find and save max value of gain and direction */
+		  if( rad_pattern[calc_data.fstep].max_gain[pol] < gain )
+		  {
+			rad_pattern[calc_data.fstep].max_gain[pol]     = gain;
+			rad_pattern[calc_data.fstep].max_gain_tht[pol] = thet;
+			rad_pattern[calc_data.fstep].max_gain_phi[pol] = phi;
+			rad_pattern[calc_data.fstep].max_gain_idx[pol] = idx;
+		  }
+
+		  /* Find and save min value of gain and buffer idx */
+		  if( rad_pattern[calc_data.fstep].min_gain[pol] > gain )
+		  {
+			rad_pattern[calc_data.fstep].min_gain[pol]     = gain;
+			rad_pattern[calc_data.fstep].min_gain_idx[pol] = idx;
+		  }
+
+		} /* for( pol = 0; pol < NUM_POL; pol++ ) */
+
+		idx++;
+		continue;
+	  } /* if( gnd.ifar != 1) */
+
+	} /* for( kth = 1; kth <= fpat.nth; kth++ ) */
+  } /* for( kph = 1; kph <= fpat.nph; kph++ ) */
+
+  return;
+
+} /* void rdpat() */
+
+/*-----------------------------------------------------------------------*/
+
diff --git a/src/radiation.h b/src/radiation.h
new file mode 100644
index 0000000..c077312
--- /dev/null
+++ b/src/radiation.h
@@ -0,0 +1,28 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	RADIATION_H
+#define	RADIATION_H		1
+
+#include "common.h"
+#include "support.h"
+
+#define	CONST3	(0.0-I*29.97922085)
+
+#endif
+
diff --git a/src/shared.c b/src/shared.c
new file mode 100644
index 0000000..faaa78e
--- /dev/null
+++ b/src/shared.c
@@ -0,0 +1,207 @@
+/*
+ * Shared global variables for nec2c.c
+ */
+
+#include "shared.h"
+
+/*------------------------------------------------------------------------*/
+
+/* Editor windows */
+GtkWidget
+  *wire_editor		= NULL,	/* Wire designer window  */
+  *arc_editor		= NULL,	/* Arc designer window   */
+  *helix_editor		= NULL, /* Helix designer window */
+  *patch_editor		= NULL,	/* Patch designer window */
+  *reflect_editor	= NULL,	/* Reflect design window */
+  *scale_editor		= NULL,	/* Scale designer window */
+  *cylinder_editor	= NULL,	/* Cylinder designer window  */
+  *transform_editor	= NULL, /* Transform designer window */
+  *gend_editor		= NULL;	/* Geom End designer window  */
+
+/* Command windows */
+GtkWidget
+  *excitation_command= NULL, /* Ecitation command editor */
+  *frequency_command = NULL, /* Frequency command editor */
+  *ground_command	 = NULL, /* Ground command editor (GN) */
+  *ground2_command	 = NULL, /* Ground command editor (GD) */
+  *loading_command	 = NULL, /* Loading command editor 	*/
+  *network_command	 = NULL, /* Network command editor	*/
+  *txline_command	 = NULL, /* Tran Line command editor */
+  *radiation_command = NULL, /* Rad Pattern command editor */
+  *nearfield_command = NULL, /* Near Fields command editor */
+  *kernel_command	 = NULL, /* Thin-wire Kernel command editor  */
+  *intrange_command	 = NULL, /* Interaction Range command editor */
+  *execute_command	 = NULL; /* Execute (EX card) command editor */
+
+/* Frequency step entry */
+GtkEntry *rdpattern_fstep_entry = NULL;
+
+/* Radiation pattern rotation, freq and zoom spin buttons */
+GtkSpinButton
+  *rotate_rdpattern    = NULL,
+  *incline_rdpattern   = NULL,
+  *rotate_structure    = NULL,
+  *incline_structure   = NULL,
+  *rdpattern_frequency = NULL,
+  *rdpattern_zoom_spinbutton = NULL;
+
+projection_parameters_t
+  rdpattern_proj_params,
+  structure_proj_params;
+
+/* Scroll adjustments of geometry
+ * and command treeview windows */
+GtkAdjustment
+  *geom_adjustment = NULL,
+  *cmnd_adjustment = NULL;
+
+GtkTreeView
+  *geom_treeview = NULL,
+  *cmnd_treeview = NULL;
+
+/* Main, frequency plots and radation pattern windows */
+GtkWidget
+  *main_window		= NULL,
+  *freqplots_window = NULL,
+  *rdpattern_window = NULL,
+  *nec2_edit_window = NULL;
+
+/* Drawing area widgets */
+GtkWidget *structure_drawingarea = NULL;
+GtkWidget *freqplots_drawingarea = NULL;
+GtkWidget *rdpattern_drawingarea = NULL;
+
+/* Motion event handler id */
+gulong rdpattern_motion_handler;
+
+/* Main window freq spinbutton */
+GtkSpinButton *mainwin_frequency;
+
+/* Dialog widgets */
+GtkWidget *quit_dialog	  = NULL;
+GtkWidget *animate_dialog = NULL;
+
+/* Frequency step entry widget */
+GtkEntry *structure_fstep_entry = NULL;
+
+/* Motion event handler id */
+gulong structure_motion_handler;
+
+/* Commands between parent and child processes */
+char *fork_commands[] = FORK_CMNDS;
+
+/* Forked process data */
+forked_proc_data_t **forked_proc_data = NULL;
+
+/* Zoom spin button */
+GtkSpinButton *structure_zoom_spinbutton = NULL;
+
+/* Number of forked child processes */
+int num_child_procs = 0;
+
+/* Program forked flag */
+gboolean FORKED = FALSE;
+
+/* Used to kill window deleted by user */
+GtkWidget *kill_window = NULL;
+
+/* Animation timeout callback tag */
+guint anim_tag = 0;
+
+/* Pixmap for drawing structures */
+GdkPixmap *structure_pixmap = NULL;
+int structure_pixmap_width, structure_pixmap_height;
+
+/* Pixmap for drawing plots */
+GdkPixmap *freqplots_pixmap = NULL;
+int freqplots_pixmap_width, freqplots_pixmap_height;
+
+/* Pixmap for drawing radiation patterns */
+GdkPixmap *rdpattern_pixmap = NULL;
+int rdpattern_pixmap_width, rdpattern_pixmap_height;
+
+/* Frequency loop idle function tag */
+guint floop_tag = 0;
+
+/* Radiation pattern data */
+rad_pattern_t *rad_pattern = NULL;
+
+/* Near E/H field data */
+near_field_t near_field;
+
+/* Segments for drawing structure */
+GdkSegment *structure_segs = NULL;
+
+/* Global tag number for geometry editors */
+gint gbl_tag_num = 0;
+
+GtkWidget *error_dialog = NULL;
+
+/* Tree list stores */
+GtkListStore
+  *cmnt_store = NULL,
+  *geom_store = NULL,
+  *cmnd_store = NULL;
+
+complex double *cm = NULL;
+
+/* Needed data */
+impedance_data_t impedance_data;
+
+/* Data for various calculations */
+calc_data_t calc_data;
+data_t data;
+
+/* Magnitude of seg/patch current/charge */
+double *cmag = NULL, *ct1m = NULL, *ct2m = NULL;
+
+/* common  /crnt/ */
+crnt_t crnt;
+
+/* common  /dataj/ */
+dataj_t dataj;
+
+/* pointers to input/output files */
+FILE *input_fp = NULL;
+
+/* Input file name */
+char infile[81] = "";
+
+/* common  /fpat/ */
+fpat_t fpat;
+
+/*common  /ggrid/ */
+ggrid_t ggrid;
+
+/* common  /gnd/ */
+gnd_t gnd;
+
+/* common  /gwav/ */
+gwav_t gwav;
+
+/* common  /incom/ */
+incom_t incom;
+
+/* common  /matpar/ */
+matpar_t matpar;
+
+/* common  /netcx/ */
+netcx_t netcx;
+
+/* common  /save/ */
+save_t save;
+
+/* common  /segj/ */
+segj_t segj;
+
+/* common  /smat/ */
+smat_t smat;
+
+/* common  /vsorc/ */
+vsorc_t vsorc;
+
+/* common  /zload/ */
+zload_t zload;
+
+/*------------------------------------------------------------------------*/
+
diff --git a/src/shared.h b/src/shared.h
new file mode 100644
index 0000000..7c315a2
--- /dev/null
+++ b/src/shared.h
@@ -0,0 +1,212 @@
+#ifndef SHARED_H
+#define SHARED_H	1
+
+#include "common.h"
+#include "fork.h"
+
+/*------------------------------------------------------------------------*/
+
+/* Editor windows */
+extern GtkWidget
+  *wire_editor,	/* Wire designer window  */
+  *arc_editor,	/* Arc designer window   */
+  *helix_editor, /* Helix designer window */
+  *patch_editor,	/* Patch designer window */
+  *reflect_editor,	/* Reflect design window */
+  *scale_editor,	/* Scale designer window */
+  *cylinder_editor,	/* Cylinder designer window  */
+  *transform_editor, /* Transform designer window */
+  *gend_editor;	/* Geom End designer window  */
+
+/* Command windows */
+extern GtkWidget
+  *excitation_command, /* Ecitation command editor */
+  *frequency_command, /* Frequency command editor */
+  *ground_command, /* Ground command editor (GN) */
+  *ground2_command, /* Ground command editor (GD) */
+  *loading_command, /* Loading command editor 	*/
+  *network_command, /* Network command editor	*/
+  *txline_command, /* Tran Line command editor */
+  *radiation_command, /* Rad Pattern command editor */
+  *nearfield_command, /* Near Fields command editor */
+  *kernel_command, /* Thin-wire Kernel command editor  */
+  *intrange_command, /* Interaction Range command editor */
+  *execute_command	 ; /* Execute (EX card) command editor */
+
+/* Frequency step entry */
+extern GtkEntry *rdpattern_fstep_entry ;
+
+/* Radiation pattern rotation, freq and zoom spin buttons */
+extern GtkSpinButton
+  *rotate_rdpattern,
+  *incline_rdpattern,
+  *rotate_structure,
+  *incline_structure,
+  *rdpattern_frequency,
+  *rdpattern_zoom_spinbutton ;
+
+/* Motion event handler id */
+extern gulong structure_motion_handler;
+
+/* Commands between parent and child processes */
+extern char *fork_commands[];
+
+/* Forked process data */
+extern forked_proc_data_t **forked_proc_data;
+
+extern projection_parameters_t
+  rdpattern_proj_params,
+  structure_proj_params;
+
+/* Zoom spin button */
+extern GtkSpinButton *structure_zoom_spinbutton;
+
+/* Number of forked child processes */
+extern int num_child_procs;
+
+/* Program forked flag */
+extern gboolean FORKED;
+
+/* Main window freq spinbutton */
+extern GtkSpinButton *mainwin_frequency;
+
+/* Scroll adjustments of geometry
+ * and command treeview windows */
+extern GtkAdjustment
+  *geom_adjustment,
+  *cmnd_adjustment ;
+
+extern GtkTreeView
+  *geom_treeview,
+  *cmnd_treeview ;
+
+/* Main, frequency plots and radation pattern windows */
+extern GtkWidget
+  *main_window,
+  *freqplots_window,
+  *rdpattern_window,
+  *nec2_edit_window ;
+
+/* Drawing area widgets */
+extern GtkWidget *structure_drawingarea ;
+extern GtkWidget *freqplots_drawingarea ;
+extern GtkWidget *rdpattern_drawingarea ;
+
+/* Motion event handler id */
+extern gulong rdpattern_motion_handler;
+
+/* Dialog widgets */
+extern GtkWidget *quit_dialog ;
+extern GtkWidget *animate_dialog ;
+
+/* Used to kill window deleted by user */
+extern GtkWidget *kill_window ;
+
+/* Animation timeout callback tag */
+extern guint anim_tag;
+
+/* Pixmap for drawing structures */
+extern GdkPixmap *structure_pixmap ;
+extern int structure_pixmap_width, structure_pixmap_height;
+
+/* Pixmap for drawing plots */
+extern GdkPixmap *freqplots_pixmap ;
+extern int freqplots_pixmap_width, freqplots_pixmap_height;
+
+/* Pixmap for drawing radiation patterns */
+extern GdkPixmap *rdpattern_pixmap ;
+extern int rdpattern_pixmap_width, rdpattern_pixmap_height;
+
+/* Frequency loop idle function tag */
+extern guint floop_tag;
+
+/* Radiation pattern data */
+extern rad_pattern_t *rad_pattern ;
+
+/* Near E/H field data */
+extern near_field_t near_field;
+
+/* Segments for drawing structure */
+extern GdkSegment *structure_segs ;
+
+/* Global tag number for geometry editors */
+extern gint gbl_tag_num;
+
+extern GtkWidget *error_dialog ;
+
+/* Tree list stores */
+extern GtkListStore
+  *cmnt_store,
+  *geom_store,
+  *cmnd_store ;
+
+extern data_t data;
+
+extern complex double *cm;
+
+/* Frequency step entry widget */
+extern GtkEntry *structure_fstep_entry;
+
+/* Needed data */
+extern impedance_data_t impedance_data;
+
+/* Data for various calculations */
+extern calc_data_t calc_data;
+
+/* Magnitude of seg/patch current/charge */
+extern double *cmag, *ct1m, *ct2m;
+
+/* common  /crnt/ */
+extern crnt_t crnt;
+
+/* common  /dataj/ */
+extern dataj_t dataj;
+
+/* common  /data/ */
+extern data_t data;
+
+/* pointers to input/output files */
+extern FILE *input_fp, *output_fp, *plot_fp;
+
+/* Input file name */
+extern char infile[];
+
+/* common  /fpat/ */
+extern fpat_t fpat;
+
+/*common  /ggrid/ */
+extern ggrid_t ggrid;
+
+/* common  /gnd/ */
+extern gnd_t gnd;
+
+/* common  /gwav/ */
+extern gwav_t gwav;
+
+/* common  /incom/ */
+extern incom_t incom;
+
+/* common  /matpar/ */
+extern matpar_t matpar;
+
+/* common  /netcx/ */
+extern netcx_t netcx;
+
+/* common  /save/ */
+extern save_t save;
+
+/* common  /segj/ */
+extern segj_t segj;
+
+/* common  /smat/ */
+extern smat_t smat;
+
+/* common  /vsorc/ */
+extern vsorc_t vsorc;
+
+/* common  /zload/ */
+extern zload_t zload;
+
+/*------------------------------------------------------------------------*/
+
+#endif
diff --git a/src/somnec.c b/src/somnec.c
new file mode 100644
index 0000000..3e6524c
--- /dev/null
+++ b/src/somnec.c
@@ -0,0 +1,1149 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* last change:  pgm   8 nov 2000    1:04 pm
+   program somnec(input,output,tape21)
+
+   program to generate nec interpolation grids for fields due to
+   ground.  field components are computed by numerical evaluation
+   of modified sommerfeld integrals.
+
+   somnec2d is a double precision version of somnec for use with
+   nec2d.  an alternate version (somnec2sd) is also provided in which
+   computation is in single precision but the output file is written
+   in double precision for use with nec2d.  somnec2sd runs about twic
+   as fast as the full double precision somnec2d.  the difference
+   between nec2d results using a for021 file from this code rather
+   than from somnec2sd was insignficant in the cases tested.
+
+   changes made by j bergervoet, 31-5-95:
+   parameter 0.0 --> 0.0d0 in calling of routine test
+   status of output files set to 'unknown' */
+
+#include "somnec.h"
+#include "shared.h"
+
+/* common /evlcom/ */
+static int jh;
+static double ck2, ck2sq, tkmag, tsmag, ck1r, zph, rho;
+static complex double ct1, ct2, ct3, ck1, ck1sq, cksm;
+
+/* common /cntour/ */
+static complex double a, b;
+
+/*-----------------------------------------------------------------------*/
+
+/* This is the "main" of somnec */
+void somnec( double epr, double sig, double fmhz )
+{
+  int k, nth, ith, irs, ir, nr;
+  double wlam, dr, dth=0.0, r, rk, thet, tfac1, tfac2;
+  complex double erv, ezv, erh, eph, cl1, cl2, con;
+
+  static gboolean first_call = TRUE;
+
+  if( first_call )
+  {
+	first_call = FALSE;
+
+	/* Allocate some buffers */
+	size_t mreq = sizeof(complex double) * 11 * 10 * 4;
+	mem_alloc( (void *)&ggrid.ar1, mreq, "in somnec.c");
+	mreq = sizeof(complex double) * 17 * 5 * 4;
+	mem_alloc( (void *)&ggrid.ar2, mreq, "in somnec.c");
+	mreq = sizeof(complex double) * 9 * 8 * 4;
+	mem_alloc( (void *)&ggrid.ar3, mreq, "in somnec.c");
+
+	mreq = sizeof(int) * 3;
+	mem_alloc( (void *)&ggrid.nxa, mreq, "in somnec.c");
+	mem_alloc( (void *)&ggrid.nya, mreq, "in somnec.c");
+
+	mreq = sizeof(double) * 3;
+	mem_alloc( (void *)&ggrid.dxa, mreq, "in somnec.c");
+	mem_alloc( (void *)&ggrid.dya, mreq, "in somnec.c");
+	mem_alloc( (void *)&ggrid.xsa, mreq, "in somnec.c");
+	mem_alloc( (void *)&ggrid.ysa, mreq, "in somnec.c");
+
+	/* Initialize ground grid parameters for somnec */
+	ggrid.nxa[0] = 11;
+	ggrid.nxa[1] = 17;
+	ggrid.nxa[2] = 9;
+
+	ggrid.nya[0] = 10;
+	ggrid.nya[1] = 5;
+	ggrid.nya[2] = 8;
+
+	ggrid.dxa[0] = .02;
+	ggrid.dxa[1] = .05;
+	ggrid.dxa[2] = .1;
+
+	ggrid.dya[0] = .1745329252;
+	ggrid.dya[1] = .0872664626;
+	ggrid.dya[2] = .1745329252;
+
+	ggrid.xsa[0] = 0.0;
+	ggrid.xsa[1] = .2;
+	ggrid.xsa[2] = .2;
+
+	ggrid.ysa[0] = 0.0;
+	ggrid.ysa[1] = 0.0;
+	ggrid.ysa[2] = .3490658504;
+
+  } /* if( first_call ) */
+
+  if(sig >= 0.0)
+  {
+	wlam=CVEL/fmhz;
+	ggrid.epscf=cmplx(epr,-sig*wlam*59.96);
+  }
+  else ggrid.epscf=cmplx(epr,sig);
+
+  ck2=TP;
+  ck2sq=ck2*ck2;
+
+  /* sommerfeld integral evaluation uses exp(-jwt),
+   * nec uses exp(+jwt), hence need conjg(ggrid.epscf).
+   * conjugate of fields occurs in subroutine evlua. */
+
+  ck1sq=ck2sq*conj(ggrid.epscf);
+  ck1=csqrt(ck1sq);
+  ck1r=creal(ck1);
+  tkmag=100.0*cabs(ck1);
+  tsmag=100.0*creal( ck1*conj(ck1) );
+  cksm=ck2sq/(ck1sq+ck2sq);
+  ct1=.5*(ck1sq-ck2sq);
+  erv=ck1sq*ck1sq;
+  ezv=ck2sq*ck2sq;
+  ct2=.125*(erv-ezv);
+  erv *= ck1sq;
+  ezv *= ck2sq;
+  ct3=.0625*(erv-ezv);
+
+  /* loop over 3 grid regions */
+  for( k = 0; k < 3; k++ )
+  {
+	nr=ggrid.nxa[k];
+	nth=ggrid.nya[k];
+	dr=ggrid.dxa[k];
+	dth=ggrid.dya[k];
+	r=ggrid.xsa[k]-dr;
+	irs=1;
+	if(k == 0)
+	{
+	  r=ggrid.xsa[k];
+	  irs=2;
+	}
+
+	/*  loop over r.  (r=sqrt(rho**2 + (z+h)**2)) */
+	for( ir = irs-1; ir < nr; ir++ )
+	{
+	  r += dr;
+	  thet = ggrid.ysa[k]-dth;
+
+	  /* loop over theta.  (theta=atan((z+h)/rho)) */
+	  for( ith = 0; ith < nth; ith++ )
+	  {
+		thet += dth;
+		rho=r*cos(thet);
+		zph=r*sin(thet);
+		if(rho < 1.0e-7)
+		  rho=1.0e-8;
+		if(zph < 1.0e-7)
+		  zph=0.0;
+
+		evlua( &erv, &ezv, &erh, &eph );
+
+		rk=ck2*r;
+		con=-CONST1*r/cmplx(cos(rk),-sin(rk));
+
+		switch( k )
+		{
+		  case 0:
+			ggrid.ar1[ir+ith*11+  0]=erv*con;
+			ggrid.ar1[ir+ith*11+110]=ezv*con;
+			ggrid.ar1[ir+ith*11+220]=erh*con;
+			ggrid.ar1[ir+ith*11+330]=eph*con;
+			break;
+
+		  case 1:
+			ggrid.ar2[ir+ith*17+  0]=erv*con;
+			ggrid.ar2[ir+ith*17+ 85]=ezv*con;
+			ggrid.ar2[ir+ith*17+170]=erh*con;
+			ggrid.ar2[ir+ith*17+255]=eph*con;
+			break;
+
+		  case 2:
+			ggrid.ar3[ir+ith*9+  0]=erv*con;
+			ggrid.ar3[ir+ith*9+ 72]=ezv*con;
+			ggrid.ar3[ir+ith*9+144]=erh*con;
+			ggrid.ar3[ir+ith*9+216]=eph*con;
+
+		} /* switch( k ) */
+
+	  } /* for( ith = 0; ith < nth; ith++ ) */
+
+	} /* for( ir = irs-1; ir < nr; ir++; ) */
+
+  } /* for( k = 0; k < 3; k++; ) */
+
+  /* fill grid 1 for r equal to zero. */
+  cl2=-CONST4*(ggrid.epscf-1.0)/(ggrid.epscf+1.0);
+  cl1=cl2/(ggrid.epscf+1.0);
+  ezv=ggrid.epscf*cl1;
+  thet=-dth;
+  nth=ggrid.nya[0];
+
+  for( ith = 0; ith < nth; ith++ )
+  {
+	thet += dth;
+	if( (ith+1) != nth )
+	{
+	  tfac2=cos(thet);
+	  tfac1=(1.0-sin(thet))/tfac2;
+	  tfac2=tfac1/tfac2;
+	  erv=ggrid.epscf*cl1*tfac1;
+	  erh=cl1*(tfac2-1.0)+cl2;
+	  eph=cl1*tfac2-cl2;
+	}
+	else
+	{
+	  erv=0.0;
+	  erh=cl2-.5*cl1;
+	  eph=-erh;
+	}
+
+	ggrid.ar1[0+ith*11+  0]=erv;
+	ggrid.ar1[0+ith*11+110]=ezv;
+	ggrid.ar1[0+ith*11+220]=erh;
+	ggrid.ar1[0+ith*11+330]=eph;
+  }
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* bessel evaluates the zero-order bessel function */
+/* and its derivative for complex argument z. */
+void bessel( complex double z,
+	complex double *j0, complex double *j0p )
+{
+  int k, ib;
+  static int *m = NULL, init = FALSE;
+  static double *a1 = NULL, *a2 = NULL;
+  double zms;
+  complex double p0z, p1z, q0z, q1z, zi, zi2, zk, cz, sz;
+  complex double j0x=CPLX_00, j0px=CPLX_00;
+
+  /* initialization of constants */
+  if( !init )
+  {
+	int i;
+
+	size_t mreq = 101 * sizeof(double);
+	mem_alloc( (void *)&m, mreq, "in somnec.c");
+	mem_alloc( (void *)&a1, mreq, "in somnec.c");
+	mem_alloc( (void *)&a2, mreq, "in somnec.c");
+
+	for( k = 1; k <= 25; k++ )
+	{
+	  i = k-1;
+	  a1[i]=-.25/(k*k);
+	  a2[i]=1.0/(k+1.0);
+	}
+
+	for( i = 1; i <= 101; i++ )
+	{
+	  double tst=1.0;
+	  for( k = 0; k < 24; k++ )
+	  {
+		init = k;
+		tst *= -i*a1[k];
+		if( tst < 1.0e-6 )
+		  break;
+	  }
+
+	  m[i-1] = init+1;
+	} /* for( i = 1; i<= 101; i++ ) */
+
+	init = TRUE;
+  } /* if(init == 0) */
+
+  zms=creal( z*conj(z) );
+  if(zms <= 1.0e-12)
+  {
+	*j0=CPLX_10;
+	*j0p=-.5*z;
+	return;
+  }
+
+  ib=0;
+  if(zms <= 37.21)
+  {
+	int iz, miz;
+
+	if(zms > 36.0)
+	  ib=1;
+
+	/* series expansion */
+	iz=(int)zms;
+	miz=m[iz];
+	*j0=CPLX_10;
+	*j0p=*j0;
+	zk=*j0;
+	zi=z*z;
+
+	for( k = 0; k < miz; k++ )
+	{
+	  zk *= a1[k]*zi;
+	  *j0 += zk;
+	  *j0p += a2[k]*zk;
+	}
+	*j0p *= -.5*z;
+
+	if(ib == 0)
+	  return;
+
+	j0x=*j0;
+	j0px=*j0p;
+  }
+
+  /* asymptotic expansion */
+  zi=1.0/z;
+  zi2=zi*zi;
+  p0z=1.0+(P20*zi2-P10)*zi2;
+  p1z=1.0+(P11-P21*zi2)*zi2;
+  q0z=(Q20*zi2-Q10)*zi;
+  q1z=(Q11-Q21*zi2)*zi;
+  zk=cexp(CPLX_01*(z-POF));
+  zi2=1.9/zk;
+  cz=.5*(zk+zi2);
+  sz=CPLX_01*.5*(zi2-zk);
+  zk=C3*csqrt(zi);
+  *j0=zk*(p0z*cz-q0z*sz);
+  *j0p=-zk*(p1z*sz+q1z*cz);
+
+  if(ib == 0)
+	return;
+
+  zms=cos((sqrt(zms)-6.0)*PI10);
+  *j0=.5*(j0x*(1.0+zms)+ *j0*(1.0-zms));
+  *j0p=.5*(j0px*(1.0+zms)+ *j0p*(1.0-zms));
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* evlua controls the integration contour in the complex */
+/* lambda plane for evaluation of the sommerfeld integrals */
+  void
+evlua( complex double *erv, complex double *ezv,
+	complex double *erh, complex double *eph )
+{
+  int i, jump;
+  static double del, slope, rmis;
+  static complex double cp1, cp2, cp3, bk, delta, delta2;
+  static complex double *sum = NULL, *ans = NULL;
+  static gboolean first_call = TRUE;
+
+  if( first_call )
+  {
+	first_call = FALSE;
+	size_t mreq = 6 * sizeof(complex double);
+	mem_alloc( (void *)&sum, mreq, "in somnec.c");
+	mem_alloc( (void *)&ans, mreq, "in somnec.c");
+  }
+
+  del=zph;
+  if( rho > del )
+	del=rho;
+
+  if(zph >= 2.0*rho)
+  {
+	/* bessel function form of sommerfeld integrals */
+	jh=0;
+	a=CPLX_00;
+	del=1.0/del;
+
+	if( del > tkmag)
+	{
+	  b=cmplx(0.1*tkmag,-0.1*tkmag);
+	  rom1(6,sum,2);
+	  a=b;
+	  b=cmplx(del,-del);
+	  rom1 (6,ans,2);
+	  for( i = 0; i < 6; i++ )
+		sum[i] += ans[i];
+	}
+	else
+	{
+	  b=cmplx(del,-del);
+	  rom1(6,sum,2);
+	}
+
+	delta=PTP*del;
+	gshank(b,delta,ans,6,sum,0,b,b);
+	ans[5] *= ck1;
+
+	/* conjugate since nec uses exp(+jwt) */
+	*erv=conj(ck1sq*ans[2]);
+	*ezv=conj(ck1sq*(ans[1]+ck2sq*ans[4]));
+	*erh=conj(ck2sq*(ans[0]+ans[5]));
+	*eph=-conj(ck2sq*(ans[3]+ans[5]));
+
+	return;
+  } /* if(zph >= 2.0*rho) */
+
+  /* hankel function form of sommerfeld integrals */
+  jh=1;
+  cp1=cmplx(0.0, 0.4*ck2);
+  cp2=cmplx(0.6*ck2, -0.2*ck2);
+  cp3=cmplx(1.02*ck2,-0.2*ck2);
+  a=cp1;
+  b=cp2;
+  rom1(6,sum,2);
+  a=cp2;
+  b=cp3;
+  rom1(6,ans,2);
+
+  for( i = 0; i < 6; i++ )
+	sum[i]=-(sum[i]+ans[i]);
+
+  /* path from imaginary axis to -infinity */
+  if(zph > .001*rho)
+	slope=rho/zph;
+  else
+	slope=1000.0;
+
+  del=PTP/del;
+  delta=cmplx(-1.0,slope)*del/sqrt(1.0+slope*slope);
+  delta2=-conj(delta);
+  gshank(cp1,delta,ans,6,sum,0,bk,bk);
+  rmis=rho*(creal(ck1)-ck2);
+
+  jump = FALSE;
+  if( (rmis >= 2.0*ck2) && (rho >= 1.0e-10) )
+  {
+	if(zph >= 1.0e-10)
+	{
+	  bk=cmplx(-zph,rho)*(ck1-cp3);
+	  rmis=-creal(bk)/fabs(cimag(bk));
+	  if(rmis > 4.0*rho/zph)
+		jump = TRUE;
+	}
+
+	if( ! jump )
+	{
+	  /* integrate up between branch cuts, then to + infinity */
+	  cp1=ck1-(0.1+I*0.2);
+	  cp2=cp1+0.2;
+	  bk=cmplx(0.0,del);
+	  gshank(cp1,bk,sum,6,ans,0,bk,bk);
+	  a=cp1;
+	  b=cp2;
+	  rom1(6,ans,1);
+	  for( i = 0; i < 6; i++ )
+		ans[i] -= sum[i];
+
+	  gshank(cp3,bk,sum,6,ans,0,bk,bk);
+	  gshank(cp2,delta2,ans,6,sum,0,bk,bk);
+	}
+
+	jump = TRUE;
+
+  } /* if( (rmis >= 2.0*ck2) || (rho >= 1.0e-10) ) */
+  else jump = FALSE;
+
+  if( ! jump )
+  {
+	/* integrate below branch points, then to + infinity */
+	for( i = 0; i < 6; i++ )
+	  sum[i]=-ans[i];
+
+	rmis=creal(ck1)*1.01;
+	if( (ck2+1.0) > rmis )
+	  rmis=ck2+1.0;
+
+	bk=cmplx(rmis,0.99*cimag(ck1));
+	delta=bk-cp3;
+	delta *= del/cabs(delta);
+	gshank(cp3,delta,ans,6,sum,1,bk,delta2);
+
+  } /* if( ! jump ) */
+
+  ans[5] *= ck1;
+
+  /* conjugate since nec uses exp(+jwt) */
+  *erv=conj(ck1sq*ans[2]);
+  *ezv=conj(ck1sq*(ans[1]+ck2sq*ans[4]));
+  *erh=conj(ck2sq*(ans[0]+ans[5]));
+  *eph=-conj(ck2sq*(ans[3]+ans[5]));
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* fbar is sommerfeld attenuation function for numerical distance p */
+  void
+fbar( complex double p, complex double *fbar )
+{
+  int i, minus;
+  double tms, sms;
+  complex double z, zs, sum, pow, term;
+
+  z= CPLX_01* csqrt( p);
+  if( cabs( z) <= 3.0)
+  {
+	/* series expansion */
+	zs= z* z;
+	sum= z;
+	pow= z;
+
+	for( i = 1; i <= 100; i++ )
+	{
+	  pow= -pow* zs/ (double)i;
+	  term= pow/(2.0* i+1.0);
+	  sum= sum+ term;
+	  tms= creal( term* conj( term));
+	  sms= creal( sum* conj( sum));
+	  if( tms/sms < ACCS)
+		break;
+	}
+
+	*fbar=1.0-(1.0- sum* TOSP)* z* cexp( zs)* SP;
+
+  } /* if( cabs( z) <= 3.0) */
+
+  /* asymptotic expansion */
+  if( creal( z) < 0.0)
+  {
+	minus=1;
+	z= -z;
+  }
+  else minus=0;
+
+  zs=0.5/( z* z);
+  sum=CPLX_00;
+  term=CPLX_10;
+
+  for( i = 1; i <= 6; i++ )
+  {
+	term = -term*(2.0*i -1.0)* zs;
+	sum += term;
+  }
+
+  if( minus == 1)
+	sum -= 2.0* SP* z* cexp( z* z);
+  *fbar= -sum;
+
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* gshank integrates the 6 sommerfeld integrals from start to */
+/* infinity (until convergence) in lambda.  at the break point, bk, */
+/* the step increment may be changed from dela to delb.  shank's */
+/* algorithm to accelerate convergence of a slowly converging series */
+/* is used */
+  void
+gshank( complex double start, complex double dela,
+	complex double *sum, int nans, complex double *seed,
+	int ibk, complex double bk, complex double delb )
+{
+  int ibx, j, i, jm, intx, inx, brk=0, idx;
+  static double rbk, amg, den, denm;
+  complex double a1, a2, as1, as2, del, aa;
+  static complex double *q1 = NULL, *q2 = NULL;
+  static complex double *ans1 = NULL, *ans2 = NULL;
+  static gboolean first_call = TRUE;
+
+  if( first_call )
+  {
+	first_call = FALSE;
+	size_t mreq = 6 * 20 * sizeof(complex double);
+	mem_alloc( (void *)&q1, mreq, "in somnec.c");
+	mem_alloc( (void *)&q2, mreq, "in somnec.c");
+	mreq = 6 * sizeof(complex double);
+	mem_alloc( (void *)&ans1, mreq, "in somnec.c");
+	mem_alloc( (void *)&ans2, mreq, "in somnec.c");
+  }
+
+  rbk=creal(bk);
+  del=dela;
+  if(ibk == 0)
+	ibx=1;
+  else
+	ibx=0;
+
+  for( i = 0; i < nans; i++ )
+	ans2[i]=seed[i];
+
+  b=start;
+  for( intx = 1; intx <= MAXH; intx++ )
+  {
+	inx=intx-1;
+	a=b;
+	b += del;
+
+	if( (ibx == 0) && (creal(b) >= rbk) )
+	{
+	  /* hit break point.  reset seed and start over. */
+	  ibx=1;
+	  b=bk;
+	  del=delb;
+	  rom1(nans,sum,2);
+	  for( i = 0; i < nans; i++ )
+		ans2[i] += sum[i];
+	  intx = 0;
+	  continue;
+	} /* if( (ibx == 0) && (creal(b) >= rbk) ) */
+
+	rom1(nans,sum,2);
+	for( i = 0; i < nans; i++ )
+	  ans1[i] = ans2[i]+sum[i];
+	a=b;
+	b += del;
+
+	if( (ibx == 0) && (creal(b) >= rbk) )
+	{
+	  /* hit break point.  reset seed and start over. */
+	  ibx=2;
+	  b=bk;
+	  del=delb;
+	  rom1(nans,sum,2);
+	  for( i = 0; i < nans; i++ )
+		ans2[i] = ans1[i]+sum[i];
+	  intx = 0;
+	  continue;
+
+	} /* if( (ibx == 0) && (creal(b) >= rbk) ) */
+
+	rom1(nans,sum,2);
+	for( i = 0; i < nans; i++ )
+	  ans2[i]=ans1[i]+sum[i];
+
+	den=0.0;
+	for( i = 0; i < nans; i++ )
+	{
+	  as1=ans1[i];
+	  as2=ans2[i];
+
+	  if(intx >= 2)
+	  {
+		for( j = 1; j < intx; j++ )
+		{
+		  jm=j-1;
+		  idx = i + 6*jm;
+		  aa=q2[idx];
+		  a1=q1[idx]+as1-2.0*aa;
+
+		  if( (creal(a1) != 0.0) || (cimag(a1) != 0.0) )
+		  {
+			a2=aa-q1[idx];
+			a1=q1[idx]-a2*a2/a1;
+		  }
+		  else a1=q1[idx];
+
+		  a2=aa+as2-2.0*as1;
+		  if( (creal(a2) != 0.0) || (cimag(a2) != 0.0) )
+			a2=aa-(as1-aa)*(as1-aa)/a2;
+		  else
+			a2=aa;
+
+		  q1[idx]=as1;
+		  q2[idx]=as2;
+		  as1=a1;
+		  as2=a2;
+
+		} /* for( j = 1; i < intx; i++ ) */
+
+	  } /* if(intx >= 2) */
+
+	  idx = i + 6*(intx-1);
+	  q1[idx]=as1;
+	  q2[idx]=as2;
+	  amg=fabs(creal(as2))+fabs(cimag(as2));
+	  if(amg > den)
+		den=amg;
+
+	} /* for( i = 0; i < nans; i++ ) */
+
+	denm=1.0e-3*den*CRIT;
+	jm=intx-3;
+	if(jm < 1)
+	  jm=1;
+
+	for( j = jm-1; j < intx; j++ )
+	{
+	  brk = FALSE;
+	  for( i = 0; i < nans; i++ )
+	  {
+		idx = i +6*j;
+		a1=q2[idx];
+		den=(fabs(creal(a1))+fabs(cimag(a1)))*CRIT;
+		if(den < denm)
+		  den=denm;
+		a1=q1[idx]-a1;
+		amg=fabs(creal(a1)+fabs(cimag(a1)));
+		if(amg > den)
+		{
+		  brk = TRUE;
+		  break;
+		}
+
+	  } /* for( i = 0; i < nans; i++ ) */
+
+	  if( brk ) break;
+
+	} /* for( j = jm-1; j < intx; j++ ) */
+
+	if( ! brk )
+	{
+	  for( i = 0; i < nans; i++ )
+	  {
+		idx = i + 6*inx;
+		sum[i]=0.5*(q1[idx]+q2[idx]);
+	  }
+	  return;
+	}
+
+  } /* for( intx = 1; intx <= maxh; intx++ ) */
+
+  /* No convergence */
+  fprintf( stderr, "xnec2c: gshank(): No convergence\n" );
+  stop( _("gshank(): No convergencn"), ERR_STOP );
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* hankel evaluates hankel function of the first kind,   */
+/* order zero, and its derivative for complex argument z */
+  void
+hankel( complex double z,
+	complex double *h0, complex double *h0p )
+{
+  int k, ib;
+  static int *m = NULL, init = FALSE;
+  static double *a1 = NULL, *a2 = NULL, *a3 = NULL;
+  static double *a4, psi, tst, zms;
+  complex double clogz, j0, j0p, p0z, p1z, q0z, q1z;
+  complex double y0 = CPLX_00, y0p = CPLX_00, zi, zi2, zk;
+  static gboolean first_call = TRUE;
+
+  if( first_call )
+  {
+	first_call = FALSE;
+	size_t mreq = 101 * sizeof(int);
+	mem_alloc( (void *)&m, mreq, "in somnec.c");
+	mreq = 25 * sizeof(double);
+	mem_alloc( (void *)&a1, mreq, "in somnec.c");
+	mem_alloc( (void *)&a2, mreq, "in somnec.c");
+	mem_alloc( (void *)&a3, mreq, "in somnec.c");
+	mem_alloc( (void *)&a4, mreq, "in somnec.c");
+  }
+
+  /* initialization of constants */
+  if( ! init )
+  {
+	int i;
+
+	psi=-GAMMA;
+	for( k = 1; k <= 25; k++ )
+	{
+	  i = k-1;
+	  a1[i]=-0.25/(k*k);
+	  a2[i]=1.0/(k+1.0);
+	  psi += 1.0/k;
+	  a3[i]=psi+psi;
+	  a4[i]=(psi+psi+1.0/(k+1.0))/(k+1.0);
+	}
+
+	for( i = 1; i <= 101; i++ )
+	{
+	  tst=1.0;
+	  for( k = 0; k < 24; k++ )
+	  {
+		init = k;
+		tst *= -i*a1[k];
+		if(tst*a3[k] < 1.0e-6)
+		  break;
+	  }
+	  m[i-1]=init+1;
+	}
+
+	init = TRUE;
+
+  } /* if( ! init ) */
+
+  zms=creal( z*conj(z) );
+  if(zms == 0.0)
+  {
+  fprintf( stderr, "xnec2c: hankel(): Hankel not valid for z = 0\n" );
+	stop( _("hankel(): Hankel not valid for z = 0"), ERR_STOP );
+  }
+
+  ib=0;
+  if(zms <= 16.81)
+  {
+	int iz, miz;
+
+	if(zms > 16.0)
+	  ib=1;
+
+	/* series expansion */
+	iz=(int)zms;
+	miz=m[iz];
+	j0=CPLX_10;
+	j0p=j0;
+	y0=CPLX_00;
+	y0p=y0;
+	zk=j0;
+	zi=z*z;
+
+	for( k = 0; k < miz; k++ )
+	{
+	  zk *= a1[k]*zi;
+	  j0 += zk;
+	  j0p += a2[k]*zk;
+	  y0 += a3[k]*zk;
+	  y0p += a4[k]*zk;
+	}
+
+	j0p *= -0.5*z;
+	clogz=clog(0.5*z);
+	y0=(2.0*j0*clogz-y0)/PI+C2;
+	y0p=(2.0/z+2.0*j0p*clogz+0.5*y0p*z)/PI+C1*z;
+	*h0=j0+CPLX_01*y0;
+	*h0p=j0p+CPLX_01*y0p;
+
+	if(ib == 0) return;
+
+	y0=*h0;
+	y0p=*h0p;
+  } /* if(zms <= 16.81) */
+
+  /* asymptotic expansion */
+  zi=1.0/z;
+  zi2=zi*zi;
+  p0z=1.0+(P20*zi2-P10)*zi2;
+  p1z=1.0+(P11-P21*zi2)*zi2;
+  q0z=(Q20*zi2-Q10)*zi;
+  q1z=(Q11-Q21*zi2)*zi;
+  zk=cexp(CPLX_01*(z-POF))*csqrt(zi)*C3;
+  *h0=zk*(p0z+CPLX_01*q0z);
+  *h0p=CPLX_01*zk*(p1z+CPLX_01*q1z);
+
+  if(ib == 0) return;
+
+  zms=cos((sqrt(zms)-4.0)*31.41592654);
+  *h0=0.5*(y0*(1.0+zms)+ *h0*(1.0-zms));
+  *h0p=0.5*(y0p*(1.0+zms)+ *h0p*(1.0-zms));
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* compute integration parameter xlam=lambda from parameter t. */
+void lambda( double t,
+	complex double *xlam, complex double *dxlam )
+{
+  *dxlam=b-a;
+  *xlam=a+*dxlam*t;
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* rom1 integrates the 6 sommerfeld integrals from a to b in lambda. */
+/* the method of variable interval width romberg integration is used. */
+void rom1( int n, complex double *sum, int nx )
+{
+  int jump, lstep, nogo, i, ns, nt;
+  static double z, ze, s, ep, zend, dz=0.0, dzot=0.0, tr, ti;
+  static complex double t00, t11, t02;
+  static complex double *g1 = NULL, *g2 = NULL;
+  static complex double *g3 = NULL, *g4 = NULL;
+  static complex double *g5 = NULL, *t01 = NULL;
+  static complex double *t10 = NULL, *t20 = NULL;
+  static gboolean first_call = TRUE;
+
+  if( first_call )
+  {
+	first_call = FALSE;
+	size_t mreq = 6 * sizeof(complex double);
+	mem_alloc( (void *)&g1, mreq, "in somnec.c");
+	mem_alloc( (void *)&g2, mreq, "in somnec.c");
+	mem_alloc( (void *)&g3, mreq, "in somnec.c");
+	mem_alloc( (void *)&g4, mreq, "in somnec.c");
+	mem_alloc( (void *)&g5, mreq, "in somnec.c");
+	mem_alloc( (void *)&t01, mreq, "in somnec.c");
+	mem_alloc( (void *)&t10, mreq, "in somnec.c");
+	mem_alloc( (void *)&t20, mreq, "in somnec.c");
+  }
+
+  lstep=0;
+  z=0.0;
+  ze=1.0;
+  s=1.0;
+  ep=s/(1.0e4*NM);
+  zend=ze-ep;
+  for( i = 0; i < n; i++ )
+	sum[i]=CPLX_00;
+  ns=nx;
+  nt=0;
+  saoa(z,g1);
+
+  jump = FALSE;
+  while( TRUE )
+  {
+	if( ! jump )
+	{
+	  dz=s/ns;
+	  if( (z+dz) > ze )
+	  {
+		dz=ze-z;
+		if( dz <= ep ) return;
+	  }
+
+	  dzot=dz*.5;
+	  saoa(z+dzot,g3);
+	  saoa(z+dz,g5);
+
+	} /* if( ! jump ) */
+
+	nogo=FALSE;
+	for( i = 0; i < n; i++ )
+	{
+	  t00=(g1[i]+g5[i])*dzot;
+	  t01[i]=(t00+dz*g3[i])*.5;
+	  t10[i]=(4.0*t01[i]-t00)/3.0;
+
+	  /* test convergence of 3 point romberg result */
+	  test( creal(t01[i]), creal(t10[i]), &tr,
+		  cimag(t01[i]), cimag(t10[i]), &ti, 0.0 );
+	  if( (tr > CRIT) || (ti > CRIT) )
+		nogo = TRUE;
+	}
+
+	if( ! nogo )
+	{
+	  for( i = 0; i < n; i++ )
+		sum[i] += t10[i];
+
+	  nt += 2;
+	  z += dz;
+	  if(z > zend) return;
+
+	  for( i = 0; i < n; i++ )
+		g1[i]=g5[i];
+
+	  if( (nt >= NTS) && (ns > nx) )
+	  {
+		ns=ns/2;
+		nt=1;
+	  }
+
+	  jump = FALSE;
+	  continue;
+
+	} /* if( ! nogo ) */
+
+	saoa(z+dz*.250,g2);
+	saoa(z+dz*.75,g4);
+	nogo=FALSE;
+	for( i = 0; i < n; i++ )
+	{
+	  t02=(t01[i]+dzot*(g2[i]+g4[i]))*0.50;
+	  t11=(4.0*t02-t01[i])/3.0;
+	  t20[i]=(16.0*t11-t10[i])/15.0;
+
+	  /* test convergence of 5 point romberg result */
+	  test( creal(t11), creal(t20[i]), &tr,
+		  cimag(t11), cimag(t20[i]), &ti, 0.0 );
+	  if( (tr > CRIT) || (ti > CRIT) )
+		nogo = TRUE;
+	}
+
+	if( ! nogo )
+	{
+	  for( i = 0; i < n; i++ )
+		sum[i] += t20[i];
+
+	  nt++;
+	  z += dz;
+	  if(z > zend) return;
+
+	  for( i = 0; i < n; i++ )
+		g1[i]=g5[i];
+
+	  if( (nt >= NTS) && (ns > nx) )
+	  {
+		ns=ns/2;
+		nt=1;
+	  }
+
+	  jump = FALSE;
+	  continue;
+
+	} /* if( ! nogo ) */
+
+	nt=0;
+	if(ns < NM)
+	{
+	  ns *= 2;
+	  dz=s/ns;
+	  dzot=dz*0.50;
+
+	  for( i = 0; i < n; i++ )
+	  {
+		g5[i]=g3[i];
+		g3[i]=g2[i];
+	  }
+
+	  jump = TRUE;
+	  continue;
+
+	} /* if(ns < nm) */
+
+	if( ! lstep )
+	{
+	  lstep = TRUE;
+	  lambda( z, &t00, &t11 );
+	}
+
+	for( i = 0; i < n; i++ )
+	  sum[i] += t20[i];
+
+	nt++;
+	z += dz;
+	if(z > zend) return;
+
+	for( i = 0; i < n; i++ )
+	  g1[i]=g5[i];
+
+	jump = FALSE;
+
+  } /* while( TRUE ) */
+
+}
+
+/*-----------------------------------------------------------------------*/
+
+/* saoa computes the integrand for each of the 6 sommerfeld */
+/* integrals for source and observer above ground */
+void saoa( double t, complex double *ans)
+{
+  double xlr;
+  static complex double xl, dxl, cgam1, cgam2, b0;
+  static complex double b0p, com, dgam, den1, den2;
+
+  lambda(t, &xl, &dxl);
+  if( jh == 0 )
+  {
+	/* bessel function form */
+	bessel(xl*rho, &b0, &b0p);
+	b0  *=2.0;
+	b0p *=2.0;
+	cgam1=csqrt(xl*xl-ck1sq);
+	cgam2=csqrt(xl*xl-ck2sq);
+	if(creal(cgam1) == 0.0)
+	  cgam1=cmplx(0.0,-fabs(cimag(cgam1)));
+	if(creal(cgam2) == 0.0)
+	  cgam2=cmplx(0.0,-fabs(cimag(cgam2)));
+  }
+  else
+  {
+	/* hankel function form */
+	hankel(xl*rho, &b0, &b0p);
+	com=xl-ck1;
+	cgam1=csqrt(xl+ck1)*csqrt(com);
+	if(creal(com) < 0.0 && cimag(com) >= 0.0)
+	  cgam1=-cgam1;
+	com=xl-ck2;
+	cgam2=csqrt(xl+ck2)*csqrt(com);
+	if(creal(com) < 0.0 && cimag(com) >= 0.0)
+	  cgam2=-cgam2;
+  }
+
+  xlr=creal( xl*conj(xl) );
+  if(xlr >= tsmag)
+  {
+	double sign;
+	if(cimag(xl) >= 0.0)
+	{
+	  xlr=creal(xl);
+	  if(xlr >= ck2)
+	  {
+		if(xlr <= ck1r)
+		  dgam=cgam2-cgam1;
+		else
+		{
+		  sign=1.0;
+		  dgam=1.0/(xl*xl);
+		  dgam=sign*((ct3*dgam+ct2)*dgam+ct1)/xl;
+		}
+	  }
+	  else
+	  {
+		sign=-1.0;
+		dgam=1.0/(xl*xl);
+		dgam=sign*((ct3*dgam+ct2)*dgam+ct1)/xl;
+	  } /* if(xlr >= ck2) */
+
+	} /* if(cimag(xl) >= 0.0) */
+	else
+	{
+	  sign=1.0;
+	  dgam=1.0/(xl*xl);
+	  dgam=sign*((ct3*dgam+ct2)*dgam+ct1)/xl;
+	}
+
+  } /* if(xlr < tsmag) */
+  else dgam=cgam2-cgam1;
+
+  den2=cksm*dgam/(cgam2*(ck1sq*cgam2+ck2sq*cgam1));
+  den1=1.0/(cgam1+cgam2)-cksm/cgam2;
+  com=dxl*xl*cexp(-cgam2*zph);
+  ans[5]=com*b0*den1/ck1;
+  com *= den2;
+
+  if(rho != 0.0)
+  {
+	b0p=b0p/rho;
+	ans[0]=-com*xl*(b0p+b0*xl);
+	ans[3]=com*xl*b0p;
+  }
+  else
+  {
+	ans[0]=-com*xl*xl*0.5;
+	ans[3]=ans[0];
+  }
+
+  ans[1]=com*cgam2*cgam2*b0;
+  ans[2]=-ans[3]*cgam2*rho;
+  ans[4]=com*b0;
+
+  return;
+}
+
+/*-----------------------------------------------------------------------*/
+
diff --git a/src/somnec.h b/src/somnec.h
new file mode 100644
index 0000000..7fc3d38
--- /dev/null
+++ b/src/somnec.h
@@ -0,0 +1,49 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	SOMNEC_H
+#define	SOMNEC_H	1
+
+#include "common.h"
+#include "support.h"
+
+#define	PTP		.6283185308
+#define PI10	31.41592654
+#define	TOSP	1.128379167
+#define	SP		1.772453851
+#define ACCS	1.0E-12
+#define	GAMMA	.5772156649
+#define C1		-.02457850915
+#define C2		.3674669052
+#define C3		.7978845608
+#define P10		.0703125
+#define P20		.1121520996
+#define Q10		.125
+#define Q20		.0732421875
+#define P11		.1171875
+#define P21		.1441955566
+#define Q11		.375
+#define Q21		.1025390625
+#define POF		.7853981635
+#define MAXH	20
+#define CRIT	1.0E-4
+#define NM		131072
+#define NTS		4
+
+#endif
+
diff --git a/src/support.c b/src/support.c
new file mode 100644
index 0000000..00aff29
--- /dev/null
+++ b/src/support.c
@@ -0,0 +1,144 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+#include <string.h>
+#include <stdio.h>
+
+#include <gtk/gtk.h>
+
+#include "support.h"
+
+GtkWidget*
+lookup_widget                          (GtkWidget       *widget,
+                                        const gchar     *widget_name)
+{
+  GtkWidget *parent, *found_widget;
+
+  for (;;)
+    {
+      if (GTK_IS_MENU (widget))
+        parent = gtk_menu_get_attach_widget (GTK_MENU (widget));
+      else
+        parent = widget->parent;
+      if (!parent)
+        parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey");
+      if (parent == NULL)
+        break;
+      widget = parent;
+    }
+
+  found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget),
+                                                 widget_name);
+  if (!found_widget)
+    g_warning ("Widget not found: %s", widget_name);
+  return found_widget;
+}
+
+static GList *pixmaps_directories = NULL;
+
+/* Use this function to set the directory containing installed pixmaps. */
+void
+add_pixmap_directory                   (const gchar     *directory)
+{
+  pixmaps_directories = g_list_prepend (pixmaps_directories,
+                                        g_strdup (directory));
+}
+
+/* This is an internally used function to find pixmap files. */
+static gchar*
+find_pixmap_file                       (const gchar     *filename)
+{
+  GList *elem;
+
+  /* We step through each of the pixmaps directory to find it. */
+  elem = pixmaps_directories;
+  while (elem)
+    {
+      gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data,
+                                         G_DIR_SEPARATOR_S, filename);
+      if (g_file_test (pathname, G_FILE_TEST_EXISTS))
+        return pathname;
+      g_free (pathname);
+      elem = elem->next;
+    }
+  return NULL;
+}
+
+/* This is an internally used function to create pixmaps. */
+GtkWidget*
+create_pixmap                          (GtkWidget       *widget,
+                                        const gchar     *filename)
+{
+  gchar *pathname = NULL;
+  GtkWidget *pixmap;
+
+  if (!filename || !filename[0])
+      return gtk_image_new ();
+
+  pathname = find_pixmap_file (filename);
+
+  if (!pathname)
+    {
+      g_warning (_("Couldn't find pixmap file: %s"), filename);
+      return gtk_image_new ();
+    }
+
+  pixmap = gtk_image_new_from_file (pathname);
+  g_free (pathname);
+  return pixmap;
+}
+
+/* This is an internally used function to create pixmaps. */
+GdkPixbuf*
+create_pixbuf                          (const gchar     *filename)
+{
+  gchar *pathname = NULL;
+  GdkPixbuf *pixbuf;
+  GError *error = NULL;
+
+  if (!filename || !filename[0])
+      return NULL;
+
+  pathname = find_pixmap_file (filename);
+
+  if (!pathname)
+    {
+      g_warning (_("Couldn't find pixmap file: %s"), filename);
+      return NULL;
+    }
+
+  pixbuf = gdk_pixbuf_new_from_file (pathname, &error);
+  if (!pixbuf)
+    {
+      fprintf (stderr, "Failed to load pixbuf file: %s: %s\n",
+               pathname, error->message);
+      g_error_free (error);
+    }
+  g_free (pathname);
+  return pixbuf;
+}
+
+/* This is used to set ATK action descriptions. */
+void
+glade_set_atk_action_description       (AtkAction       *action,
+                                        const gchar     *action_name,
+                                        const gchar     *description)
+{
+  gint n_actions, i;
+
+  n_actions = atk_action_get_n_actions (action);
+  for (i = 0; i < n_actions; i++)
+    {
+      if (!strcmp (atk_action_get_name (action, i), action_name))
+        atk_action_set_description (action, i, description);
+    }
+}
+
diff --git a/src/support.h b/src/support.h
new file mode 100644
index 0000000..a32649e
--- /dev/null
+++ b/src/support.h
@@ -0,0 +1,69 @@
+/*
+ * DO NOT EDIT THIS FILE - it is generated by Glade.
+ */
+
+#ifdef HAVE_CONFIG_H
+#  include <config.h>
+#endif
+
+#include <gtk/gtk.h>
+
+/*
+ * Standard gettext macros.
+ */
+#ifdef ENABLE_NLS
+#  include <libintl.h>
+#  undef _
+#  define _(String) dgettext (PACKAGE, String)
+#  define Q_(String) g_strip_context ((String), gettext (String))
+#  ifdef gettext_noop
+#    define N_(String) gettext_noop (String)
+#  else
+#    define N_(String) (String)
+#  endif
+#else
+#  define textdomain(String) (String)
+#  define gettext(String) (String)
+#  define dgettext(Domain,Message) (Message)
+#  define dcgettext(Domain,Message,Type) (Message)
+#  define bindtextdomain(Domain,Directory) (Domain)
+#  define _(String) (String)
+#  define Q_(String) g_strip_context ((String), (String))
+#  define N_(String) (String)
+#endif
+
+
+/*
+ * Public Functions.
+ */
+
+/*
+ * This function returns a widget in a component created by Glade.
+ * Call it with the toplevel widget in the component (i.e. a window/dialog),
+ * or alternatively any widget in the component, and the name of the widget
+ * you want returned.
+ */
+GtkWidget*  lookup_widget              (GtkWidget       *widget,
+                                        const gchar     *widget_name);
+
+
+/* Use this function to set the directory containing installed pixmaps. */
+void        add_pixmap_directory       (const gchar     *directory);
+
+
+/*
+ * Private Functions.
+ */
+
+/* This is used to create the pixmaps used in the interface. */
+GtkWidget*  create_pixmap              (GtkWidget       *widget,
+                                        const gchar     *filename);
+
+/* This is used to create the pixbufs used in the interface. */
+GdkPixbuf*  create_pixbuf              (const gchar     *filename);
+
+/* This is used to set ATK action descriptions. */
+void        glade_set_atk_action_description (AtkAction       *action,
+                                              const gchar     *action_name,
+                                              const gchar     *description);
+
diff --git a/src/utils.c b/src/utils.c
new file mode 100644
index 0000000..fa09732
--- /dev/null
+++ b/src/utils.c
@@ -0,0 +1,467 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* misc.c
+ *
+ * Miscellaneous support functions for xnec2c.c
+ */
+
+#include "utils.h"
+
+/*------------------------------------------------------------------------*/
+
+/*  usage()
+ *
+ *  Prints usage information
+ */
+
+void usage(void)
+{
+  fprintf( stderr,
+	  _("Usage: xnec2c <input-file-name>\n"\
+		"              [-i <input-file-name>]\n"\
+		"              [-j <number of processors in SMP machine>]\n"\
+		"              [-h: print this usage information and exit]\n"\
+		"              [-v: print xnec2c version number and exit]\n") );
+
+} /* end of usage() */
+
+/*------------------------------------------------------------------------*/
+
+/* Does the STOP function of fortran but with a warning dialog */
+  int
+stop( char *mesg, int err )
+{
+  /* For child processes */
+  if( CHILD )
+  {
+	fprintf( stderr, "%s\n", mesg );
+	if( err )
+	{
+	  fprintf( stderr,
+		  _("xnec2c: fatal: child process %d exiting\n"),
+		  num_child_procs );
+	  _exit(-1);
+	}
+	else return( err );
+
+  } /* if( CHILD ) */
+
+  /* Stop operation */
+  Stop_Frequency_Loop();
+  error_dialog = create_error_dialog();
+  gtk_label_set_text( GTK_LABEL(
+		lookup_widget(error_dialog, "error_label")), mesg );
+
+  /* Hide ok button according to error */
+  if( err == TRUE )
+	gtk_widget_hide( lookup_widget(
+		  error_dialog, "error_okbutton") );
+  gtk_widget_show( error_dialog );
+
+  /* Loop over usleep till user decides what to do */
+  /* Could not think of another way to do this :-( */
+  SetFlag( ERROR_CONDX );
+  while( isFlagSet(ERROR_CONDX) )
+  {
+	if( isFlagSet(MAIN_QUIT) ) exit(-1);
+
+	/* Wait for GTK to complete its tasks */
+	while( g_main_context_iteration(NULL, FALSE) );
+	usleep(100000);
+  }
+
+  return( err );
+} /* stop */
+
+/*------------------------------------------------------------------*/
+
+  gboolean
+Nec2_Save_Warn( const gchar *mesg )
+{
+  if( isFlagSet(FREQ_LOOP_RUNNING) )
+  {
+	error_dialog = create_error_dialog();
+	gtk_label_set_text( GTK_LABEL(
+		  lookup_widget(error_dialog, "error_label")), mesg );
+	gtk_widget_hide( lookup_widget(
+		  error_dialog, "error_stopbutton") );
+	gtk_widget_show( error_dialog );
+
+	/* Loop over usleep till user decides what to do */
+	/* Could not think of another way to do this :-( */
+	SetFlag( ERROR_CONDX );
+	while( isFlagSet(ERROR_CONDX) )
+	{
+	  if( isFlagSet(MAIN_QUIT) ) exit(-1);
+
+	  /* Wait for GTK to complete its tasks */
+	  while( g_main_context_iteration(NULL, FALSE) );
+	  usleep(100000);
+	}
+
+	return( FALSE );
+  }
+
+  return( TRUE );
+} /* Nec2_Save_Warn() */
+
+/*------------------------------------------------------------------*/
+
+/*  Load_Line()
+ *
+ *  loads a line from a file, aborts on failure. lines beginning
+ *  with a '#' or ''' are ignored as comments. At the end of file
+ *  EOF is returned.
+ */
+
+int Load_Line( char *buff, FILE *pfile )
+{
+  int
+	num_chr, /* number of characters read, excluding lf/cr */
+	eof,	 /* EOF flag */
+	chr;     /* character read by getc */
+
+  num_chr = 0;
+  eof     = 0;
+
+  /* clear buffer at start */
+  buff[0] = '\0';
+
+  /* ignore commented lines, white spaces and eol/cr */
+  if( (chr = fgetc(pfile)) == EOF )
+	return( EOF );
+
+  while(
+	  (chr == '#')	||
+	  (chr == '\'') ||
+	  (chr == CR )  ||
+	  (chr == LF ) )
+  {
+	/* go to the end of line (look for lf or cr) */
+	while( (chr != CR) && (chr != LF) )
+	  if( (chr = fgetc(pfile)) == EOF )
+		return( EOF );
+
+	/* dump any cr/lf remaining */
+	while( (chr == CR) || (chr == LF) )
+	  if( (chr = fgetc(pfile)) == EOF )
+		return( EOF );
+
+  } /* end of while( (chr == '#') || ... */
+
+  while( num_chr < LINE_LEN )
+  {
+	/* if lf/cr reached before filling buffer, return */
+	if( (chr == CR) || (chr == LF) )
+	  break;
+
+	/* enter new char to buffer */
+	buff[num_chr++] = (char)chr;
+
+	/* terminate buffer as a string on EOF */
+	if( (chr = fgetc(pfile)) == EOF )
+	{
+	  buff[num_chr] = '\0';
+	  eof = EOF;
+	}
+
+  } /* end of while( num_chr < max_chr ) */
+
+  /* Capitalize first two characters (mnemonics) */
+  if( (buff[0] > 0x60) && (buff[0] < 0x79) )
+	buff[0] = (char)toupper( (int)buff[1] );
+  if( (buff[1] > 0x60) && (buff[1] < 0x79) )
+	buff[1] = (char)toupper( (int)buff[1] );
+
+  /* terminate buffer as a string */
+  buff[num_chr] = '\0';
+
+  return( eof );
+} /* end of Load_Line() */
+
+/*------------------------------------------------------------------------*/
+
+/***  Memory allocation/freeing utils ***/
+static size_t cnt = 0; /* Total allocation */
+void mem_alloc( void **ptr, size_t req, gchar *str )
+{
+  gchar mesg[100];
+
+  free_ptr( ptr );
+  *ptr = malloc( req );
+  cnt += req;
+  if( *ptr == NULL )
+  {
+	snprintf( mesg, 99, _("Memory allocation denied %s\n"), str );
+	mesg[99] = '\0';
+	fprintf( stderr, "%s: Total memory request %ld\n", mesg, cnt );
+	stop( mesg, ERR_STOP );
+  }
+
+} /* End of mem_alloc() */
+
+/*------------------------------------------------------------------------*/
+
+void mem_realloc( void **ptr, size_t req, gchar *str )
+{
+  gchar mesg[100];
+
+  *ptr = realloc( *ptr, req );
+  cnt += req;
+  if( *ptr == NULL )
+  {
+	snprintf( mesg, 99, _("Memory re-allocation denied %s\n"), str );
+	mesg[99] = '\0';
+	fprintf( stderr, "%s: Total memory request %ld\n", mesg, cnt );
+	stop( mesg, ERR_STOP );
+  }
+
+} /* End of mem_realloc() */
+
+/*------------------------------------------------------------------------*/
+
+void free_ptr( void **ptr )
+{
+  if( *ptr != NULL )
+	free( *ptr );
+  *ptr = NULL;
+
+} /* End of free_ptr() */
+
+/*------------------------------------------------------------------------*/
+
+/* Open_File()
+ *
+ * Opens a file path, returns fp
+ */
+  gboolean
+Open_File( FILE **fp, char *fname, const char *mode )
+{
+  /* Abort if file name is blank */
+  if( strlen(infile) == 0 ) return( TRUE );
+
+  /* Close file path if open */
+  Close_File( fp );
+  if( (*fp = fopen(fname, mode)) == NULL )
+  {
+	char mesg[110];
+	snprintf( mesg, 109,
+		_("xnec2c: %s: Failed to open file\n"), fname );
+	mesg[109] = '\0';
+	stop( mesg, ERR_STOP );
+	return( FALSE );
+  }
+
+  return(TRUE);
+} /* Open_File() */
+
+/*------------------------------------------------------------------------*/
+
+/*  Close_File()
+ *
+ *  Closes a file pointer
+ */
+  void
+Close_File( FILE **fp )
+{
+  if( *fp != NULL )
+	fclose( *fp );
+  *fp = NULL;
+
+} /* Close_File() */
+
+/*------------------------------------------------------------------------*/
+
+/* Display_Fstep()
+ *
+ * Displays the current frequency step number
+ */
+  void
+Display_Fstep( GtkEntry *entry, int fstep )
+{
+  char str[4];
+
+  snprintf( str, 4, "%3d", fstep );
+  str[3] = '\0';
+  gtk_entry_set_text( entry, str );
+}
+
+/*------------------------------------------------------------------------*/
+
+/* Functions for testing and setting/clearing flow control flags
+ *
+ *  See xnec2c.h for definition of flow control flags
+ */
+
+/* An int variable holding the single-bit flags */
+static unsigned long long int Flags = 0;
+
+  int
+isFlagSet( unsigned long long int flag )
+{
+  return( (Flags & flag) == flag );
+}
+
+  int
+isFlagClear( unsigned long long int flag )
+{
+  return( (~Flags & flag) == flag );
+}
+
+  void
+SetFlag( unsigned long long int flag )
+{
+  Flags |= flag;
+}
+
+  void
+ClearFlag( unsigned long long int flag )
+{
+  Flags &= ~flag;
+}
+
+  void
+ToggleFlag( unsigned long long int flag )
+{
+  Flags ^= flag;
+}
+
+  void
+SaveFlag( unsigned long long int *flag, unsigned long long int mask )
+{
+  *flag |= (Flags & mask);
+}
+
+/*------------------------------------------------------------------------*/
+
+/* Strlcpy()
+ *
+ * Copies n-1 chars from src string into dest string. Unlike other
+ * such library fuctions, this makes sure that the dest string is
+ * null terminated by copying only n-1 chars to leave room for the
+ * terminating char. n would normally be the sizeof(dest) string but
+ * copying will not go beyond the terminating null of src string
+ */
+  void
+Strlcpy( char *dest, const char *src, size_t n )
+{
+  char ch = src[0];
+  int idx = 0;
+
+  /* Leave room for terminating null in dest */
+  n--;
+
+  /* Copy till terminating null of src or to n-1 */
+  while( (ch != '\0') && (n > 0) )
+  {
+	dest[idx] = src[idx];
+	idx++;
+	ch = src[idx];
+	n--;
+  }
+
+  /* Terminate dest string */
+  dest[idx] = '\0';
+
+} /* Strlcpy() */
+
+/*------------------------------------------------------------------*/
+
+/* Strlcat()
+ *
+ * Concatenates at most n-1 chars from src string into dest string.
+ * Unlike other such library fuctions, this makes sure that the dest
+ * string is null terminated by copying only n-1 chars to leave room
+ * for the terminating char. n would normally be the sizeof(dest)
+ * string but copying will not go beyond the terminating null of src
+
+ */
+  void
+Strlcat( char *dest, const char *src, size_t n )
+{
+  char ch = dest[0];
+  int idd = 0; /* dest index */
+  int ids = 0; /* src  index */
+
+  /* Find terminating null of dest */
+  while( (ch != '\0') )
+  {
+	idd++;
+	ch = dest[idd];
+  }
+
+  /* Copy n-1 chars to leave room for terminating null */
+  n--;
+  ch = src[ids];
+  while( (n > 0) && (ch != '\0') )
+  {
+	dest[idd] = src[ids];
+	ids++;
+	ch = src[ids];
+	idd++;
+	n--;
+  }
+
+  /* Terminate dest string */
+  dest[idd] = '\0';
+
+} /* Strlcat() */
+
+/*------------------------------------------------------------------*/
+
+/* Strtod()
+ *
+ * Replaces strtod() to take into account the
+ * locale-dependent decimal point character
+ */
+double Strtod( const char *nptr, char **endptr )
+{
+  int idx;
+  size_t len;
+  double d = 0.0;
+  char *s;
+  static gboolean first_call = TRUE;
+  static char dp = '.';
+
+
+  /* Find locale-dependent decimal point character */
+  if( first_call )
+  {
+	struct lconv *lcnv;
+	lcnv = localeconv();
+	dp = *lcnv->decimal_point;
+	first_call = FALSE;
+  }
+
+  /* Look for a . or , decimal point character
+   * in the supplied number buffer (string) */
+  len = strlen( nptr );
+  for( idx = 0; idx < (int)len; idx++ )
+	if( (nptr[idx] == ',') || (nptr[idx] == '.') )
+	  break;
+
+  /* If a decimal point character is found, replace */
+  s = (char *)nptr;
+  if( idx < (int)len ) s[idx] = dp;
+  d = strtod( s, endptr );
+
+  return( d );
+} /* End of Strtod() */
+
+/*------------------------------------------------------------------*/
diff --git a/src/utils.h b/src/utils.h
new file mode 100644
index 0000000..460afcb
--- /dev/null
+++ b/src/utils.h
@@ -0,0 +1,34 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	UTILS_H
+#define	UTILS_H		1
+
+#include "common.h"
+#include "interface.h"
+#include "support.h"
+#include "shared.h"
+#include <locale.h>
+#include <ctype.h>
+
+/* Carriage return and line feed */
+#define	CR	0x0d
+#define	LF	0x0a
+
+#endif
+
diff --git a/src/xnec2c.c b/src/xnec2c.c
new file mode 100644
index 0000000..1087371
--- /dev/null
+++ b/src/xnec2c.c
@@ -0,0 +1,738 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/* xnec2c.c
+ *
+ * Contains functions that carry out various
+ * operations that were packed spaggetti-fashion
+ * in the original NEC2 main() function
+ */
+
+#include "xnec2c.h"
+#include "shared.h"
+
+/* Left-overs from fortran code :-( */
+static double tmp1, tmp2, tmp3, tmp4, tmp5, tmp6;
+
+/*-----------------------------------------------------------------------*/
+
+/* Frequency_Scale_Geometry()
+ *
+ * Scales geometric parameters to frequency
+ */
+  void
+Frequency_Scale_Geometry()
+{
+  double fr;
+  int idx;
+
+  /* Calculate wavelength */
+  data.wlam= CVEL/ calc_data.fmhz;
+
+  /* frequency scaling of geometric parameters */
+  fr= calc_data.fmhz / CVEL;
+  if( data.n != 0)
+  {
+	for( idx = 0; idx < data.n; idx++ )
+	{
+	  data.x[idx] = save.xtemp[idx] * fr;
+	  data.y[idx] = save.ytemp[idx] * fr;
+	  data.z[idx] = save.ztemp[idx] * fr;
+	  data.si[idx]= save.sitemp[idx]* fr;
+	  data.bi[idx]= save.bitemp[idx]* fr;
+	}
+  }
+
+  if( data.m != 0)
+  {
+	double fr2= fr* fr;
+	for( idx = 0; idx < data.m; idx++ )
+	{
+	  int j;
+
+	  j = idx + data.n;
+	  data.px[idx] = save.xtemp[j] * fr;
+	  data.py[idx] = save.ytemp[j] * fr;
+	  data.pz[idx] = save.ztemp[j] * fr;
+	  data.pbi[idx]= save.bitemp[j]* fr2;
+	}
+  }
+
+} /* Frequency_Scale_Geometry() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Struct_Impedance_Loading()
+ *
+ * Calculates structure (segment) impedance loading
+ */
+  void
+Structure_Impedance_Loading( void )
+{
+  /* Calculate some loading parameters */
+  if( zload.nload != 0)
+	load(
+		calc_data.ldtyp,  calc_data.ldtag,
+		calc_data.ldtagf, calc_data.ldtagt,
+		calc_data.zlr,    calc_data.zli,
+		calc_data.zlc );
+
+} /* Struct_Impedance_Loading() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Ground_Parameters()
+ *
+ * Calculates ground parameters (antenna environment)
+ */
+  void
+Ground_Parameters( void )
+{
+  complex double epsc;
+
+  if( gnd.ksymp != 1)
+  {
+	gnd.frati = CPLX_10;
+
+	if( gnd.iperf != 1)
+	{
+	  if( save.sig < 0.0 )
+		save.sig = -save.sig / (59.96 * data.wlam);
+
+	  epsc = cmplx( save.epsr, -save.sig * data.wlam * 59.96 );
+	  gnd.zrati = 1.0 / csqrt( epsc);
+	  gwav.u = gnd.zrati;
+	  gwav.u2 = gwav.u * gwav.u;
+
+	  if( gnd.nradl > 0 )
+	  {
+		gnd.scrwl = save.scrwlt / data.wlam;
+		gnd.scrwr = save.scrwrt / data.wlam;
+		gnd.t1 = CPLX_01 * 2367.067/ (double)gnd.nradl;
+		gnd.t2 = gnd.scrwr * (double)gnd.nradl;
+	  } /* if( gnd.nradl > 0 ) */
+
+	  if( gnd.iperf == 2)
+	  {
+		somnec( save.epsr, save.sig, calc_data.fmhz );
+		gnd.frati =( epsc - 1.0) / ( epsc + 1.0);
+		if( cabs(( ggrid.epscf - epsc) / epsc) >= 1.0e-3 )
+		{
+		  fprintf( stderr,
+			  "xnec2c: Ground_Parameters(): error in ground parameters\n"
+			  "complex dielectric constant from file: %12.5E%+12.5Ej\n"
+			  "                            requested: %12.5E%+12.5Ej\n",
+			  creal(ggrid.epscf), cimag(ggrid.epscf),
+			  creal(epsc), cimag(epsc) );
+		  stop( _("Ground_Parameters():"\
+				"Error in ground parameters"), ERR_STOP );
+		}
+	  } /* if( gnd.iperf != 2) */
+	} /* if( gnd.iperf != 1) */
+	else
+	{
+	  gnd.scrwl = 0.0;
+	  gnd.scrwr = 0.0;
+	  gnd.t1 = 0.0;
+	  gnd.t2 = 0.0;
+	}
+  } /* if( gnd.ksymp != 1) */
+
+  return;
+} /* Ground_Parameters() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Set_Interaction_Matrix()
+ *
+ * Sets and factors the interaction matrix
+ */
+  void
+Set_Interaction_Matrix( void )
+{
+  /* Memory allocation for symmetry array */
+  smat.nop = netcx.neq/netcx.npeq;
+  size_t mreq = (size_t)(smat.nop * smat.nop) * sizeof( complex double);
+  mem_realloc( (void *)&smat.ssx, mreq, "in xnec2c.c" );
+
+  /* irngf is not used (NGF function not implemented) */
+  int iresrv = data.np2m * (data.np + 2 * data.mp);
+  if( matpar.imat == 0)
+	fblock( netcx.npeq, netcx.neq, iresrv, data.ipsym);
+
+  cmset( netcx.neq, cm, calc_data.rkh, calc_data.iexk );
+  factrs( netcx.npeq, netcx.neq, cm, save.ip );
+  netcx.ntsol = 0;
+
+} /* Set_Interaction_Matrix() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Set_Excitation()
+ *
+ * Sets the excitation part of the matrix
+ */
+  void
+Set_Excitation( void )
+{
+  if( (fpat.ixtyp >= 1) && (fpat.ixtyp <= 4) )
+  {
+	tmp4= TA* calc_data.xpr4;
+	tmp5= TA* calc_data.xpr5;
+
+	if( fpat.ixtyp == 4)
+	{
+	  tmp1= calc_data.xpr1/ data.wlam;
+	  tmp2= calc_data.xpr2/ data.wlam;
+	  tmp3= calc_data.xpr3/ data.wlam;
+	  tmp6= calc_data.xpr6/( data.wlam* data.wlam);
+	}
+	else
+	{
+	  tmp1= TA* calc_data.xpr1;
+	  tmp2= TA* calc_data.xpr2;
+	  tmp3= TA* calc_data.xpr3;
+	  tmp6= calc_data.xpr6;
+	} /* if( fpat.ixtyp == 4) */
+
+  } /* if( (fpat.ixtyp >= 1) && (fpat.ixtyp <= 4) ) */
+
+  /* fills e field right-hand matrix */
+  etmns( tmp1, tmp2, tmp3, tmp4, tmp5, tmp6, fpat.ixtyp, crnt.cur );
+
+} /* Set_Excitation() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Set_Network_Data()
+ *
+ * Sets up network data and solves for currents
+ */
+  void
+Set_Network_Data( void )
+{
+  if( netcx.nonet != 0 )
+  {
+	int i, j, itmp1, itmp2, itmp3;
+
+	itmp3=0;
+	itmp1= netcx.ntyp[0];
+	for( i = 0; i < 2; i++ )
+	{
+	  if( itmp1 == 3) itmp1=2;
+
+	  for( j = 0; j < netcx.nonet; j++)
+	  {
+		itmp2= netcx.ntyp[j];
+
+		if( (itmp2/itmp1) != 1 ) itmp3 = itmp2;
+		else if( (itmp2 >= 2) && (netcx.x11i[j] <= 0.0) )
+		{
+		  double xx, yy, zz;
+		  int idx4, idx5;
+
+		  idx4 = netcx.iseg1[j]-1;
+		  idx5 = netcx.iseg2[j]-1;
+		  xx = data.x[idx5]- data.x[idx4];
+		  yy = data.y[idx5]- data.y[idx4];
+		  zz = data.z[idx5]- data.z[idx4];
+		  netcx.x11i[j] = data.wlam* sqrt( xx*xx + yy*yy + zz*zz );
+		}
+
+	  } /* for( j = 0; j < netcx.nonet; j++) */
+
+	  if( itmp3 == 0) break;
+
+	  itmp1= itmp3;
+
+	} /* for( i = 0; i < 2; i++ ) */
+
+  } /* if( netcx.nonet != 0 ) */
+
+  /* Set network data */
+  netwk( cm, save.ip, crnt.cur );
+  netcx.ntsol = 1;
+
+  /* Save impedance data for normalization */
+  if( ((calc_data.nfrq > 1) && isFlagSet(FREQ_LOOP_RUNNING)) || CHILD )
+  {
+	impedance_data.zreal[calc_data.fstep] = (double)creal( netcx.zped);
+	impedance_data.zimag[calc_data.fstep] = (double)cimag( netcx.zped);
+	impedance_data.zmagn[calc_data.fstep] = (double)cabs( netcx.zped);
+	impedance_data.zphase[calc_data.fstep]= (double)cang( netcx.zped);
+
+	if( (calc_data.iped == 1) &&
+		((double)impedance_data.zmagn[calc_data.fstep] >
+		 calc_data.zpnorm) )
+	  calc_data.zpnorm =
+		(double)impedance_data.zmagn[calc_data.fstep];
+  }
+
+} /* Set_Network_Data() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Power_Loss()
+ *
+ * Calculate power loss due to segment loading
+ */
+  void
+Power_Loss( void )
+{
+  int i;
+  double cmg;
+  complex double curi;
+
+
+  /* No wire/segments in structure */
+  if( data.n == 0) return;
+
+  fpat.ploss = 0.0;
+  /* Loop over all wire segs */
+  for( i = 0; i < data.n; i++ )
+  {
+	/* Calculate segment current (mag/phase) */
+	curi= crnt.cur[i]* data.wlam;
+	cmg= cabs( curi);
+
+	/* Calculate power loss in segment */
+	if( (zload.nload != 0) &&
+		(fabs(creal(zload.zarray[i])) >= 1.0e-20) )
+	  fpat.ploss += 0.5* cmg* cmg* creal( zload.zarray[i])* data.si[i];
+
+  } /* for( i = 0; i < n; i++ ) */
+
+} /* Power_Loss() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Radiation_Pattern()
+ *
+ * Calculates far field (radiation) pattern
+ */
+  void
+Radiation_Pattern( void )
+{
+  if( (gnd.ifar != 1) && isFlagSet(ENABLE_RDPAT) )
+  {
+	fpat.pinr= netcx.pin;
+	fpat.pnlr= netcx.pnls;
+	rdpat();
+  }
+
+} /* Radiation_Pattern() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Near_Field_Pattern()
+ *
+ * Calculates near field pattern if enabled/needed
+ */
+  void
+Near_Field_Pattern( void )
+{
+  if( near_field.valid ||
+	  isFlagClear(DRAW_EHFIELD) ||
+	  isFlagClear(ENABLE_NEAREH) )
+	return;
+
+  if( isFlagSet(DRAW_EFIELD) )
+	nfpat(0);
+
+  if( isFlagSet(DRAW_HFIELD) )
+	nfpat(1);
+
+} /* Near_Field_Pattern() */
+
+/*-----------------------------------------------------------------------*/
+
+/* New_Frequency()
+ *
+ * (Re)calculates all frequency-dependent parameters
+ */
+  void
+New_Frequency( void )
+{
+  /* Abort if freq has not really changed, as when changing
+   * between current or charge density structure coloring */
+  if( (save.last_freq == calc_data.fmhz) || isFlagClear(ENABLE_EXCITN) )
+	return;
+  save.last_freq = calc_data.fmhz;
+
+  /* Frequency scaling of geometric parameters */
+  Frequency_Scale_Geometry();
+
+  /* Structure segment loading */
+  Structure_Impedance_Loading();
+
+  /* Calculate ground parameters */
+  Ground_Parameters();
+
+  /* Fill and factor primary interaction matrix */
+  Set_Interaction_Matrix();
+
+  /* Fill excitation part of matrix */
+  Set_Excitation();
+
+  /* Matrix solving (netwk calls solves) */
+  crnt.valid = 0;
+  Set_Network_Data();
+
+  /* Calculate power loss */
+  Power_Loss();
+
+  /* Calculate radiation pattern */
+  Radiation_Pattern();
+
+  /* Near field calculation */
+  near_field.valid = 0;
+  Near_Field_Pattern();
+
+} /* New_Frequency()  */
+
+/*-----------------------------------------------------------------------*/
+
+static gboolean retval;	/* Function's return value */
+
+/* Frequency_Loop()
+ *
+ * Loops over frequency if calculations over a frequency range is
+ * requested, dividing the job between child processes if forked
+ */
+  gboolean
+Frequency_Loop( gpointer udata )
+{
+  /* Value of frequency and step num in the loop */
+  static double freq;
+
+  /* Current freq step, saved steps
+   * index, num of busy processes */
+  static int fstep, num_busy_procs;
+
+  int idx, job_num = 0;
+  size_t len;
+  char *buff;				/* Used to pass on structure poiners */
+  fd_set read_fds;			/* Read file descriptors for select() */
+
+
+  /* (Re) initialize freq loop */
+  if( isFlagSet(FREQ_LOOP_INIT) )
+  {
+	/* Clear global flags */
+	ClearFlag( FREQ_LOOP_INIT |	FREQ_LOOP_DONE );
+
+	/* (Re)-enable freq loop (back to start freq) */
+	freq = save.fmhz;
+
+	/* Step back frequency and step count since incrementing
+	 * is done at start of frequency loop calculations */
+	fstep = -1;
+	if( calc_data.ifrq == 1)
+	  freq /= calc_data.delfrq;
+	else
+	  freq -= calc_data.delfrq;
+
+	/* Clear list of "valid" (processed) loop steps */
+	for( idx = 0; idx < calc_data.nfrq; idx++ )
+	  save.fstep[idx] = 0;
+
+	/* Clear "last-used-frequency" buffer */
+	save.last_freq = 0.0;
+
+	/* Zero num of busy processes */
+	num_busy_procs = 0;
+
+	/* Signal global freq step "illegal" */
+	calc_data.fstep = -1;
+
+	/* Inherited from NEC2 */
+	if( calc_data.zpnorm > 0.0 )
+	  calc_data.iped = 2;
+
+	/* Continue gtk_main idle callbacks */
+	retval = TRUE;
+	return ( retval );
+
+  } /* isFlagSet(INIT_FREQ_LOOP) */
+
+  /* Repeat freq stepping over number of child processes
+   * if forked. calc_data.num_jobs = 1 for non-forked runs.
+   * If not forked (no multi-threading), following block will
+   * execute only once, since only one instance is running */
+  for( idx = 0; idx < calc_data.num_jobs; idx++ )
+  {
+	/* Up frequency step count */
+	fstep++;
+
+	/* Frequency loop is completed or was paused by user */
+	if( (fstep >= calc_data.nfrq) || isFlagSet(FREQ_LOOP_STOP) )
+	{
+	  /* Re-initialize if loop completed all steps */
+	  if( fstep >= calc_data.nfrq )
+		SetFlag( FREQ_LOOP_INIT );
+
+	  /* Points to last buffer in rad_pattern filled by loop */
+	  fstep--;
+
+	  /* Last freq step that was processed by children */
+	  calc_data.lastf = fstep;
+
+	  /* Re-enable pausing of freq loop */
+	  ClearFlag( FREQ_LOOP_STOP );
+
+	  /* Cancel idle callbacks on exit */
+	  retval = FALSE;
+
+	  break;
+	} /* if( (fstep >= calc_data.nfrq) || isFlagSet(FREQ_LOOP_STOP) ) */
+
+	/* Increment frequency */
+	if( calc_data.ifrq == 1)
+	  freq *= calc_data.delfrq;	/* Multiplicative stepping */
+	else
+	  freq += calc_data.delfrq; /* Additive stepping */
+
+	/* Save frequencies for plotting */
+	save.freq[fstep] = (double)freq;
+
+	/* Delegate calculations to child processes if forked */
+	if( FORKED )
+	{
+	  /* Look for an idle process */
+	  for( job_num = 0; job_num < calc_data.num_jobs; job_num++ )
+	  {
+		/* If an idle process is found, give it a job and
+		 * then step the frequency loop by breaking out */
+		if( ! forked_proc_data[job_num]->busy )
+		{
+		  /* Signal and count busy processes */
+		  forked_proc_data[job_num]->busy  = TRUE;
+		  forked_proc_data[job_num]->fstep = fstep;
+		  num_busy_procs++;
+
+		  /* Tell process to calculate freq dependent data */
+		  len = strlen( fork_commands[FRQDATA] );
+		  Write_Pipe( job_num, fork_commands[FRQDATA], (ssize_t)len, TRUE );
+
+		  /* When it responds, give it next frequency */
+		  buff = (char *)&freq;
+		  len = sizeof( double );
+		  Write_Pipe( job_num, buff, (ssize_t)len, TRUE );
+		  break;
+		}
+	  } /* for( job_num = 0; job_num < calc_data.num_jobs; job_num++ ) */
+
+	} /* if( FORKED ) */
+	else /* Calculate freq dependent data (no fork) */
+	{
+	  calc_data.fmhz  = freq;
+	  calc_data.fstep = fstep;
+	  calc_data.lastf = fstep;
+	  New_Frequency();
+	  break;
+	}
+
+	/* All idle processes are given a job */
+	if( num_busy_procs >= calc_data.num_jobs )
+	  break;
+
+  } /* for( idx = 0; idx < calc_data.num_jobs; idx++ ) */
+
+  /* Receive results from forked children */
+  if( FORKED && num_busy_procs )
+	do
+	{
+	  int n = 0;
+
+	  /* Set read fd's to watch for child writes */
+	  FD_ZERO( &read_fds );
+	  for( idx = 0; idx < calc_data.num_jobs; idx++ )
+	  {
+		FD_SET( forked_proc_data[idx]->child2pnt_pipe[READ], &read_fds );
+		if( n < forked_proc_data[idx]->child2pnt_pipe[READ] )
+		  n = forked_proc_data[idx]->child2pnt_pipe[READ];
+	  }
+
+	  /* Wait for data from finished child processes */
+	  if( select( n+1, &read_fds, NULL, NULL, NULL ) == -1 )
+	  {
+		perror( "xnec2c: select()" );
+		_exit(0);
+	  }
+
+	  /* Check for finished child processes */
+	  for( idx = 0; idx < num_child_procs; idx++ )
+	  {
+		if( FD_ISSET(forked_proc_data[idx]->child2pnt_pipe[READ], &read_fds) )
+		{
+		  /* Read data from finished child process */
+		  Get_Freq_Data( idx, forked_proc_data[idx]->fstep );
+
+		  /* Mark freq step in list of processed steps */
+		  save.fstep[forked_proc_data[idx]->fstep] = 1;
+
+		  /* Mark finished child process as ready for next job */
+		  forked_proc_data[idx]->busy = FALSE;
+
+		  /* Count down number of busy processes */
+		  num_busy_procs--;
+		}
+	  } /* for( idx = 0; idx < num_child_procs; idx++ ) */
+
+	  /* Find highest freq step that has no steps below it
+	   * that have not been processed by a child process */
+	  for( idx = 0; idx < calc_data.nfrq; idx++ )
+		if( save.fstep[idx] ) calc_data.fstep = idx;
+		else break;
+
+	} /* do */
+	/* Loop terminated and busy children */
+	while( !retval && num_busy_procs );
+
+  /* Return if freq step 0 not ready yet */
+  if( calc_data.fstep < 0 ) return( retval );
+
+  /* Set frequency and step to global variables */
+  calc_data.lastf = calc_data.fstep;
+  calc_data.fmhz = (double)save.freq[calc_data.fstep];
+
+  /* Trigger a redraw of plots drawingarea */
+  Plot_Frequency_Data();
+
+  /* Set frequency spinbuttons */
+  gtk_spin_button_set_value(
+	  mainwin_frequency, (gdouble)calc_data.fmhz );
+
+  if( isFlagSet(DRAW_ENABLED) )
+	gtk_spin_button_set_value(
+		rdpattern_frequency, (gdouble)calc_data.fmhz );
+
+  if( isFlagSet(PLOT_ENABLED) )
+  {
+	char txt[10];
+	snprintf( txt, 10, "%10.3f", (gdouble)calc_data.fmhz );
+	txt[9] = '\0';
+	gtk_entry_set_text( GTK_ENTRY(
+		  lookup_widget(freqplots_window, "freqplots_fmhz_entry")), txt );
+  }
+
+  /* Change flags at exit if loop is done */
+  if( !retval && !num_busy_procs )
+  {
+	ClearFlag( FREQ_LOOP_RUNNING );
+	SetFlag( FREQ_LOOP_DONE );
+  }
+
+  return( retval );
+
+} /* Frequency_Loop() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Start_Frequency_Loop()
+ *
+ * Starts frequency loop
+ */
+  gboolean
+Start_Frequency_Loop( void )
+{
+  if( isFlagClear(FREQ_LOOP_RUNNING) && (calc_data.nfrq > 1) )
+  {
+	retval = TRUE;
+	SetFlag(FREQ_LOOP_RUNNING);
+	floop_tag = g_idle_add( Frequency_Loop, NULL );
+	return( TRUE );
+  }
+  else return( FALSE );
+
+} /* Start_Frequency_Loop() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Stop_Frequency_Loop()
+ *
+ * Stops and resets freq loop
+ */
+  void
+Stop_Frequency_Loop( void )
+{
+  if( floop_tag > 0 )
+  {
+	g_source_remove( floop_tag );
+	floop_tag = 0;
+  }
+  ClearFlag( FREQ_LOOP_RUNNING );
+
+} /* Stop_Frequency_Loop() */
+
+/*-----------------------------------------------------------------------*/
+
+/* Incident_Field_Loop()
+ *
+ * Loops over incident field directions if
+ * receiving pattern calculations are requested
+ */
+  void
+Incident_Field_Loop( void )
+{
+  int phi_step, theta_step;
+
+  /* Frequency scaling of geometric parameters */
+  Frequency_Scale_Geometry();
+
+  /* Structure segment loading */
+  Structure_Impedance_Loading();
+
+  /* Calculate ground parameters */
+  Ground_Parameters();
+
+  /* Fill and factor primary interaction matrix */
+  Set_Interaction_Matrix();
+
+  /* Loop over incident field angles */
+  netcx.nprint=0;
+  /* Loop over phi */
+  for( phi_step = 0; phi_step < calc_data.nphi; phi_step++ )
+  {
+	/* Loop over theta */
+	for( theta_step = 0; theta_step < calc_data.nthi; theta_step++ )
+	{
+	  /* Fill excitation part of matrix */
+	  Set_Excitation();
+
+	  /* Matrix solving (netwk calls solves) */
+	  Set_Network_Data();
+
+	  /* Calculate power loss */
+	  Power_Loss();
+
+	  calc_data.xpr1 += calc_data.xpr4;
+
+	} /* for( theta_step = 0; theta_step < calc_data.nthi.. */
+
+	calc_data.xpr1= calc_data.thetis;
+	calc_data.xpr2= calc_data.xpr2+ calc_data.xpr5;
+
+  } /* for( phi_step = 0; phi_step < calc_data.nphi.. */
+
+  calc_data.xpr2  = calc_data.phiss;
+
+} /* Incident_Field_Loop() */
+
+/*-----------------------------------------------------------------------*/
+
diff --git a/src/xnec2c.h b/src/xnec2c.h
new file mode 100644
index 0000000..9d8a88e
--- /dev/null
+++ b/src/xnec2c.h
@@ -0,0 +1,26 @@
+/*
+ *  xnec2c - GTK2-based version of nec2c, the C translation of NEC2
+ *
+ *  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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+#ifndef	XNEC2C_H
+#define XNEC2C_H		1
+
+#include "fork.h"
+#include "support.h"
+
+#endif
+
diff --git a/xnec2c.glade b/xnec2c.glade
new file mode 100644
index 0000000..9ad813b
--- /dev/null
+++ b/xnec2c.glade
@@ -0,0 +1,19636 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-interface SYSTEM "http://glade.gnome.org/glade-2.0.dtd">
+
+<glade-interface>
+
+<widget class="GtkWindow" id="main_window">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Xnec2c: Structure Display</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_EAST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_main_window_destroy" last_modification_time="Wed, 09 Feb 2005 11:30:01 GMT"/>
+  <signal name="delete_event" handler="on_main_window_delete_event" last_modification_time="Wed, 09 Feb 2005 11:30:12 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkHBox" id="hbox8">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkMenuBar" id="menubar1">
+	      <property name="visible">True</property>
+	      <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
+	      <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
+
+	      <child>
+		<widget class="GtkMenuItem" id="menuitem1">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">_File</property>
+		  <property name="use_underline">True</property>
+
+		  <child>
+		    <widget class="GtkMenu" id="menuitem1_menu">
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="main_new">
+			  <property name="visible">True</property>
+			  <property name="label">gtk-new</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_new_activate" last_modification_time="Sat, 25 Nov 2006 10:53:52 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="main_open_input">
+			  <property name="visible">True</property>
+			  <property name="label">gtk-open</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_open_input_activate" last_modification_time="Sat, 25 Nov 2006 10:53:52 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="nec2_edit">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Edit NEC2 Input File</property>
+			  <property name="label">gtk-edit</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_nec2_edit_activate" last_modification_time="Wed, 04 Jan 2006 05:31:42 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="main_save">
+			  <property name="visible">True</property>
+			  <property name="label">gtk-save</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_main_save_activate" last_modification_time="Tue, 10 Jan 2006 15:46:10 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="main_save_as">
+			  <property name="visible">True</property>
+			  <property name="label">gtk-save-as</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_main_save_as_activate" last_modification_time="Fri, 18 Mar 2005 14:16:02 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="struct_save_as_gnuplot">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Save As gnuplot</property>
+			  <property name="use_underline">True</property>
+			  <signal name="activate" handler="on_struct_save_as_gnuplot_activate" last_modification_time="Tue, 26 Jun 2012 05:04:59 GMT"/>
+
+			  <child internal-child="image">
+			    <widget class="GtkImage" id="image102">
+			      <property name="visible">True</property>
+			      <property name="stock">gtk-save-as</property>
+			      <property name="icon_size">1</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkSeparatorMenuItem" id="separator1">
+			  <property name="visible">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="main_quit">
+			  <property name="visible">True</property>
+			  <property name="label">gtk-quit</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_quit_activate" last_modification_time="Tue, 15 Feb 2005 12:40:34 GMT"/>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkMenuItem" id="main_view_menuitem">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">_View</property>
+		  <property name="use_underline">True</property>
+		  <signal name="activate" handler="main_view_menuitem_activate" last_modification_time="Sun, 28 Aug 2005 11:28:47 GMT"/>
+
+		  <child>
+		    <widget class="GtkMenu" id="main_view_menuitem_menu">
+
+		      <child>
+			<widget class="GtkCheckMenuItem" id="main_rdpattern">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Open radiation pattern window</property>
+			  <property name="label" translatable="yes">Radiation Pattern</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">False</property>
+			  <signal name="activate" handler="on_main_rdpattern_activate" last_modification_time="Sat, 30 Jul 2005 05:40:22 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkCheckMenuItem" id="main_freqplots">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Open frequency data plots window</property>
+			  <property name="label" translatable="yes">Frequency Plots</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">False</property>
+			  <signal name="activate" handler="on_main_freqplots_activate" last_modification_time="Sat, 30 Jul 2005 05:40:22 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="main_pol_menu">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Display gain data relevant to polarization</property>
+			  <property name="label" translatable="yes">Polarization</property>
+			  <property name="use_underline">True</property>
+			  <signal name="activate" handler="main_pol_menu_activate" last_modification_time="Sun, 28 Aug 2005 11:28:47 GMT"/>
+
+			  <child>
+			    <widget class="GtkMenu" id="main_pol_menu_menu">
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_total">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Total gain</property>
+				  <property name="label" translatable="yes">Total</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">True</property>
+				  <signal name="activate" handler="on_rdpattern_total_activate" last_modification_time="Wed, 20 Jul 2005 05:00:18 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_horizontal">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Gain in horizontal polarization</property>
+				  <property name="label" translatable="yes">Horizontal</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">False</property>
+				  <property name="group">rdpattern_total</property>
+				  <signal name="activate" handler="on_rdpattern_horizontal_activate" last_modification_time="Wed, 20 Jul 2005 05:00:18 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_vertical">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Gain in vertical polarization</property>
+				  <property name="label" translatable="yes">Vertical</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">False</property>
+				  <property name="group">rdpattern_total</property>
+				  <signal name="activate" handler="on_rdpattern_vertical_activate" last_modification_time="Wed, 20 Jul 2005 05:00:18 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_right_hand">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Gain in rhcp</property>
+				  <property name="label" translatable="yes">Right Hand</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">False</property>
+				  <property name="group">rdpattern_total</property>
+				  <signal name="activate" handler="on_rdpattern_right_hand_activate" last_modification_time="Wed, 20 Jul 2005 05:00:18 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_left_hand">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Gain in lhcp</property>
+				  <property name="label" translatable="yes">Left Hand</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">False</property>
+				  <property name="group">rdpattern_total</property>
+				  <signal name="activate" handler="on_rdpattern_left_hand_activate" last_modification_time="Wed, 20 Jul 2005 05:00:18 GMT"/>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkCheckMenuItem" id="common_projection">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Synchronize projection parameters in different windows</property>
+			  <property name="label" translatable="yes">Common Projection</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">True</property>
+			  <signal name="activate" handler="on_common_projection_activate" last_modification_time="Sat, 09 Jul 2005 09:27:59 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkCheckMenuItem" id="common_freq">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Synchronize frequency selection in different windows</property>
+			  <property name="label" translatable="yes">Common Frequency</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">True</property>
+			  <signal name="activate" handler="on_common_freq_activate" last_modification_time="Sun, 17 Jul 2005 07:24:47 GMT"/>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkMenuItem" id="menuitem4">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">_Help</property>
+		  <property name="use_underline">True</property>
+
+		  <child>
+		    <widget class="GtkMenu" id="menuitem4_menu">
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="about">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">About</property>
+			  <property name="use_underline">True</property>
+			  <signal name="activate" handler="on_about_activate" last_modification_time="Tue, 27 Nov 2007 07:10:02 GMT"/>
+
+			  <child internal-child="image">
+			    <widget class="GtkImage" id="image103">
+			      <property name="visible">True</property>
+			      <property name="stock">gtk-about</property>
+			      <property name="icon_size">1</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="main_hbox1">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkVSeparator" id="vseparator2">
+		  <property name="visible">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">4</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkToggleButton" id="main_currents_togglebutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Calculate and Display
+Structure Currents</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Currents</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <signal name="toggled" handler="on_main_currents_togglebutton_toggled" last_modification_time="Wed, 13 Apr 2005 14:15:50 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkToggleButton" id="main_charges_togglebutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Calculate and Display
+Charge Densities</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Charges</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <signal name="toggled" handler="on_main_charges_togglebutton_toggled" last_modification_time="Wed, 13 Apr 2005 14:15:38 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVSeparator" id="vseparator7">
+		  <property name="visible">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">4</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label214">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Frequency Loop </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">True</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="main_loop_start">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Start Frequency Loop</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_loop_start_clicked" last_modification_time="Mon, 30 Oct 2006 05:52:41 GMT"/>
+
+		  <child>
+		    <widget class="GtkAlignment" id="alignment49">
+		      <property name="visible">True</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xscale">0</property>
+		      <property name="yscale">0</property>
+		      <property name="top_padding">0</property>
+		      <property name="bottom_padding">0</property>
+		      <property name="left_padding">0</property>
+		      <property name="right_padding">0</property>
+
+		      <child>
+			<widget class="GtkHBox" id="hbox47">
+			  <property name="visible">True</property>
+			  <property name="homogeneous">False</property>
+			  <property name="spacing">2</property>
+
+			  <child>
+			    <widget class="GtkImage" id="image52">
+			      <property name="visible">True</property>
+			      <property name="stock">gtk-media-play</property>
+			      <property name="icon_size">4</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+
+			  <child>
+			    <widget class="GtkLabel" id="label213">
+			      <property name="visible">True</property>
+			      <property name="label" translatable="yes"></property>
+			      <property name="use_underline">True</property>
+			      <property name="use_markup">False</property>
+			      <property name="justify">GTK_JUSTIFY_LEFT</property>
+			      <property name="wrap">False</property>
+			      <property name="selectable">False</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			      <property name="width_chars">-1</property>
+			      <property name="single_line_mode">False</property>
+			      <property name="angle">0</property>
+			    </widget>
+			    <packing>
+			      <property name="padding">0</property>
+			      <property name="expand">False</property>
+			      <property name="fill">False</property>
+			    </packing>
+			  </child>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="main_loop_pause">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Pause Frequency Loop</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_loop_pause_clicked" last_modification_time="Mon, 30 Oct 2006 05:53:27 GMT"/>
+		  <accelerator key="h" modifiers="0" signal="clicked"/>
+
+		  <child>
+		    <widget class="GtkImage" id="image54">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-media-pause</property>
+		      <property name="icon_size">4</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="main_loop_reset">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Reset Frequency Loop</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_loop_reset_clicked" last_modification_time="Mon, 30 Oct 2006 05:54:27 GMT"/>
+		  <accelerator key="r" modifiers="0" signal="clicked"/>
+
+		  <child>
+		    <widget class="GtkImage" id="image53">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-media-rewind</property>
+		      <property name="icon_size">4</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label244">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes"> Step </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">True</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="structure_fstep_entry">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Current Frequency Step</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">False</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">3</property>
+		  <property name="text" translatable="yes">1</property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char">●</property>
+		  <property name="activates_default">False</property>
+		  <property name="width_chars">3</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHSeparator" id="hseparator1">
+	  <property name="visible">True</property>
+	</widget>
+	<packing>
+	  <property name="padding">4</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="main_hbox2">
+	  <property name="height_request">30</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="main_colorcode_zerolabel">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">0</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">2</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkDrawingArea" id="main_colorcode_drawingarea">
+	      <property name="width_request">160</property>
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Color Code for Structure's
+Current or Charge Values</property>
+	      <signal name="expose_event" handler="on_main_colorcode_drawingarea_expose_event" last_modification_time="Sat, 16 Apr 2005 07:32:14 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="main_colorcode_maxlabel">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">0.00</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">11</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="main_gain_entry">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Gain in Direction of Viewer
+(Perpenticular to Screen)</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"> - - - - -</property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	      <property name="width_chars">6</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">2</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label10">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">dB </property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">True</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkSpinButton" id="main_freq_spinbutton">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Enter Frequency in MHz</property>
+	      <property name="can_focus">True</property>
+	      <property name="climb_rate">0.0010000000475</property>
+	      <property name="digits">3</property>
+	      <property name="numeric">True</property>
+	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="snap_to_ticks">False</property>
+	      <property name="wrap">False</property>
+	      <property name="adjustment">0.00999999977648 0.00999999977648 9999 0.00999999977648 10 0</property>
+	      <signal name="value_changed" handler="on_main_freq_spinbutton_value_changed" last_modification_time="Sat, 16 Apr 2005 07:31:47 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">2</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="main_freq_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">MHz </property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">True</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="main_freq_checkbutton">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Enable Data Calculation
+on Frequency Change</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Apply</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">False</property>
+	      <property name="active">True</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_main_freq_checkbutton_toggled" last_modification_time="Wed, 11 Oct 2006 06:44:53 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">2</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="main_new_freq_button">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Calculate Data
+for New Frequency</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_main_new_freq_clicked" last_modification_time="Mon, 11 Apr 2005 12:11:27 GMT"/>
+	      <accelerator key="a" modifiers="0" signal="clicked"/>
+
+	      <child>
+		<widget class="GtkImage" id="image46">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-apply</property>
+		  <property name="icon_size">4</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHSeparator" id="hseparator11">
+	  <property name="visible">True</property>
+	</widget>
+	<packing>
+	  <property name="padding">4</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame1">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment1">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">0</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkDrawingArea" id="structure_drawingarea">
+		  <property name="width_request">681</property>
+		  <property name="height_request">769</property>
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <signal name="configure_event" handler="on_structure_drawingarea_configure_event" last_modification_time="Wed, 09 Feb 2005 06:20:26 GMT"/>
+		  <signal name="expose_event" handler="on_structure_drawingarea_expose_event" last_modification_time="Wed, 17 Aug 2005 05:14:01 GMT"/>
+		  <signal name="button_press_event" handler="on_structure_drawingarea_button_press_event" last_modification_time="Thu, 24 May 2012 17:11:23 GMT"/>
+		  <signal name="scroll_event" handler="on_structure_drawingarea_scroll_event" last_modification_time="Sat, 26 May 2012 04:30:42 GMT"/>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="main_hbox3">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="struct_label">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">View Geometry</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">14</property>
+		  <property name="single_line_mode">True</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="main_x_axis">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">View Structure along X-axis</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">X</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_main_x_axis_clicked" last_modification_time="Sat, 16 Apr 2005 07:05:39 GMT"/>
+		  <accelerator key="x" modifiers="0" signal="clicked"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="main_y_axis">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">View Structure along Y-axis</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Y</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_main_y_axis_clicked" last_modification_time="Sat, 16 Apr 2005 07:05:51 GMT"/>
+		  <accelerator key="y" modifiers="0" signal="clicked"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="main_z-axis">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">View Strucure along Z-axis</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Z</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_main_z_axis_clicked" last_modification_time="Sat, 16 Apr 2005 07:06:03 GMT"/>
+		  <accelerator key="z" modifiers="0" signal="clicked"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="main_default_view">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">View Strucure
+in Default Projection</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_main_default_view_clicked" last_modification_time="Sat, 16 Apr 2005 07:33:52 GMT"/>
+		  <accelerator key="r" modifiers="0" signal="clicked"/>
+
+		  <child>
+		    <widget class="GtkImage" id="image32">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-redo</property>
+		      <property name="icon_size">4</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVSeparator" id="vseparator1">
+		  <property name="visible">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkImage" id="image50">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-refresh</property>
+		  <property name="icon_size">4</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="main_rotate_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Rotate Structure
+ around Z-axis</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">1</property>
+		  <property name="digits">0</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">45 -360 360 1 10 0</property>
+		  <signal name="value_changed" handler="on_main_rotate_spinbutton_value_changed" last_modification_time="Sat, 16 Apr 2005 07:33:16 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkImage" id="image51">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-go-down</property>
+		  <property name="icon_size">4</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="main_incline_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Incline Structure
+to Plane of Screen</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">1</property>
+		  <property name="digits">0</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">45 -180 180 1 10 0</property>
+		  <signal name="value_changed" handler="on_main_incline_spinbutton_value_changed" last_modification_time="Sat, 16 Apr 2005 07:32:55 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label245">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes"> Zoom % </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">True</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="structure_zoom_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Zoom Structure Display</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">1</property>
+		  <property name="digits">0</property>
+		  <property name="numeric">False</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">100 10 999 1 10 0</property>
+		  <signal name="value_changed" handler="on_structure_zoom_spinbutton_value_changed" last_modification_time="Fri, 25 May 2012 08:46:11 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="structure_plus_button">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Zoom In</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_structure_plus_button_clicked" last_modification_time="Fri, 25 May 2012 08:46:50 GMT"/>
+
+		  <child>
+		    <widget class="GtkImage" id="image94">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-zoom-in</property>
+		      <property name="icon_size">4</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="structure_minus_button">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Zoom Out</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_structure_minus_button_clicked" last_modification_time="Fri, 25 May 2012 08:47:27 GMT"/>
+
+		  <child>
+		    <widget class="GtkImage" id="image95">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-zoom-out</property>
+		      <property name="icon_size">4</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="structure_one_button">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Zoom to Default 1:1</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_structure_one_button_clicked" last_modification_time="Fri, 25 May 2012 08:48:03 GMT"/>
+
+		  <child>
+		    <widget class="GtkImage" id="image96">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-zoom-100</property>
+		      <property name="icon_size">4</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkFileChooserDialog" id="filechooserdialog">
+  <property name="border_width">5</property>
+  <property name="visible">True</property>
+  <property name="action">GTK_FILE_CHOOSER_ACTION_OPEN</property>
+  <property name="local_only">True</property>
+  <property name="select_multiple">False</property>
+  <property name="show_hidden">True</property>
+  <property name="do_overwrite_confirmation">False</property>
+  <property name="title" translatable="yes">xnec2c</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_MOUSE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="role">GtkFileChooserDialog</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="response" handler="on_filechooserdialog_response" last_modification_time="Wed, 16 Feb 2005 05:49:28 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox1">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">24</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area1">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="filechoser_cancel">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="clicked" handler="on_filechoser_cancel_clicked" last_modification_time="Sat, 10 Sep 2005 04:30:01 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="filechooser_open">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="has_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-open</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkFileSelection" id="fileselection">
+  <property name="border_width">10</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Select File</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_MOUSE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <property name="show_fileops">True</property>
+  <signal name="response" handler="on_fileselection_response" last_modification_time="Tue, 15 Feb 2005 17:19:19 GMT"/>
+
+  <child internal-child="cancel_button">
+    <widget class="GtkButton" id="fileselection_cancel">
+      <property name="visible">True</property>
+      <property name="can_default">True</property>
+      <property name="can_focus">True</property>
+      <property name="relief">GTK_RELIEF_NORMAL</property>
+      <property name="focus_on_click">True</property>
+      <signal name="clicked" handler="on_fileselection_cancel_clicked" last_modification_time="Thu, 15 Sep 2005 08:31:34 GMT"/>
+    </widget>
+  </child>
+
+  <child internal-child="ok_button">
+    <widget class="GtkButton" id="ok_button1">
+      <property name="visible">True</property>
+      <property name="can_default">True</property>
+      <property name="can_focus">True</property>
+      <property name="relief">GTK_RELIEF_NORMAL</property>
+      <property name="focus_on_click">True</property>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="freqplots_window">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Xnec2c: Frequency Data Plots</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_EAST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="delete_event" handler="on_freqplots_window_delete_event" last_modification_time="Sun, 20 Mar 2005 16:54:15 GMT"/>
+  <signal name="destroy" handler="on_freqplots_window_destroy" last_modification_time="Sun, 20 Mar 2005 16:54:25 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkHBox" id="freqplots_hbox1">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkMenuBar" id="menubar2">
+	      <property name="visible">True</property>
+	      <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
+	      <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
+
+	      <child>
+		<widget class="GtkMenuItem" id="menuitem5">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">_File</property>
+		  <property name="use_underline">True</property>
+
+		  <child>
+		    <widget class="GtkMenu" id="menuitem5_menu">
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="freqplots_new">
+			  <property name="visible">True</property>
+			  <property name="label">gtk-new</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_new_activate" last_modification_time="Sat, 25 Nov 2006 10:06:28 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="freqplots_open_input">
+			  <property name="visible">True</property>
+			  <property name="label">gtk-open</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_open_input_activate" last_modification_time="Sat, 25 Nov 2006 10:06:40 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="freqplots_save">
+			  <property name="visible">True</property>
+			  <property name="label">gtk-save</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_freqplots_save_activate" last_modification_time="Fri, 18 Mar 2005 14:19:27 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="freqplots_save_as">
+			  <property name="visible">True</property>
+			  <property name="label">gtk-save-as</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_freqplots_save_as_activate" last_modification_time="Fri, 18 Mar 2005 14:19:27 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="freqplots_save_as_gnuplot">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Save As gnuplot</property>
+			  <property name="use_underline">True</property>
+			  <signal name="activate" handler="on_freqplots_save_as_gnuplot_activate" last_modification_time="Fri, 22 Jun 2012 10:54:20 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkSeparatorMenuItem" id="separatormenuitem2">
+			  <property name="visible">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="freqplots_quit">
+			  <property name="visible">True</property>
+			  <property name="label">gtk-quit</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_quit_activate" last_modification_time="Fri, 18 Mar 2005 14:19:27 GMT"/>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkMenuItem" id="view_menuitem">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">_View</property>
+		  <property name="use_underline">True</property>
+
+		  <child>
+		    <widget class="GtkMenu" id="view_menuitem_menu">
+
+		      <child>
+			<widget class="GtkMenuItem" id="freqplots_pol_menu">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Disply gain data relevant to polarization</property>
+			  <property name="label" translatable="yes">Polarization</property>
+			  <property name="use_underline">True</property>
+			  <signal name="activate" handler="freqplots_pol_menu_activate" last_modification_time="Sun, 28 Aug 2005 11:30:19 GMT"/>
+
+			  <child>
+			    <widget class="GtkMenu" id="freqplots_pol_menu_menu">
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_total">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Total gain</property>
+				  <property name="label" translatable="yes">Total</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">True</property>
+				  <signal name="activate" handler="on_rdpattern_total_activate" last_modification_time="Sun, 17 Jul 2005 07:22:26 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_horizontal">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Gain in horizontal polarization</property>
+				  <property name="label" translatable="yes">Horizontal</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">False</property>
+				  <property name="group">rdpattern_total</property>
+				  <signal name="activate" handler="on_rdpattern_horizontal_activate" last_modification_time="Sun, 17 Jul 2005 07:22:26 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_vertical">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Plot gain in vertical polarization</property>
+				  <property name="label" translatable="yes">Vertical</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">False</property>
+				  <property name="group">rdpattern_total</property>
+				  <signal name="activate" handler="on_rdpattern_vertical_activate" last_modification_time="Sun, 17 Jul 2005 07:22:26 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_right_hand">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Plot gain in rhcp</property>
+				  <property name="label" translatable="yes">Right Hand</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">False</property>
+				  <property name="group">rdpattern_total</property>
+				  <signal name="activate" handler="on_rdpattern_right_hand_activate" last_modification_time="Sun, 17 Jul 2005 07:22:26 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_left_hand">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Plot gain in lhcp</property>
+				  <property name="label" translatable="yes">Left Hand</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">False</property>
+				  <property name="group">rdpattern_total</property>
+				  <signal name="activate" handler="on_rdpattern_left_hand_activate" last_modification_time="Sun, 17 Jul 2005 07:22:26 GMT"/>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkCheckMenuItem" id="net_gain">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Display Net Gain towards Viewer</property>
+			  <property name="label" translatable="yes">Net Gain</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">False</property>
+			  <signal name="activate" handler="on_net_gain_activate" last_modification_time="Thu, 26 Jun 2008 07:43:18 GMT"/>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="hbox10">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkToggleButton" id="freqplots_gmax_togglebutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Plot maximum gain over frequency range</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Max Gain</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <signal name="toggled" handler="on_freqplots_gmax_togglebutton_toggled" last_modification_time="Sat, 25 Jun 2005 13:21:18 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkToggleButton" id="freqplots_gdir_togglebutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Plot direction of maximum gain</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Direct.</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <signal name="toggled" handler="on_freqplots_gdir_togglebutton_toggled" last_modification_time="Sat, 25 Jun 2005 13:12:12 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkToggleButton" id="freqplots_gviewer_togglebutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Plot gain in direction of viewer
+(perpenticular to screen)</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Viewer</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <signal name="toggled" handler="on_freqplots_gviewer_togglebutton_toggled" last_modification_time="Sat, 25 Jun 2005 13:12:23 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkToggleButton" id="freqplots_vswr_togglebutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Plot VSWR over frequency</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">VSWR</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <signal name="toggled" handler="on_freqplots_vswr_togglebutton_toggled" last_modification_time="Sat, 25 Jun 2005 13:41:01 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkToggleButton" id="freqplots_zrlzim_togglebutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Plot real and imaginary input impedances</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Zr/Zi</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <signal name="toggled" handler="on_freqplots_zrlzim_togglebutton_toggled" last_modification_time="Sat, 25 Jun 2005 13:41:14 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkToggleButton" id="freqplots_zmgzph_togglebutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Plot magnitude and phase of input impedance</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Zm/Zph</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <signal name="toggled" handler="on_freqplots_zmgzph_togglebutton_toggled" last_modification_time="Sat, 25 Jun 2005 13:42:01 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label215">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">  Freq Loop </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="plot_loop_start">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Start Frequency Loop</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_loop_start_clicked" last_modification_time="Mon, 30 Oct 2006 05:55:15 GMT"/>
+
+	      <child>
+		<widget class="GtkImage" id="image61">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-media-play</property>
+		  <property name="icon_size">4</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="plot_loop_pause">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Pause Frequency Loop</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_loop_pause_clicked" last_modification_time="Mon, 30 Oct 2006 05:56:30 GMT"/>
+
+	      <child>
+		<widget class="GtkImage" id="image64">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-media-pause</property>
+		  <property name="icon_size">4</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="plot_loop_reset">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Reset Frequency Loop</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_loop_reset_clicked" last_modification_time="Mon, 30 Oct 2006 05:56:53 GMT"/>
+
+	      <child>
+		<widget class="GtkImage" id="image63">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-media-rewind</property>
+		  <property name="icon_size">4</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHSeparator" id="hseparator4">
+	  <property name="visible">True</property>
+	</widget>
+	<packing>
+	  <property name="padding">4</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox15">
+	  <property name="height_request">30</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label16">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">F MHz</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="freqplots_fmhz_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"> - - - - - - -</property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	      <property name="width_chars">8</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label12">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes"> Max Gain</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="freqplots_maxgain_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"> - - - - -</property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	      <property name="width_chars">6</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label13">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes"> VSWR</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">1</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="freqplots_vswr_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"> - - - -</property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	      <property name="width_chars">5</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label14">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes"> Zreal</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">1</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="freqplots_zreal_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"> - - - -</property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	      <property name="width_chars">5</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label15">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes"> Zim</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">1</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="freqplots_zimag_entry">
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"> - - - -</property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	      <property name="width_chars">5</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label212">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes"> Zo</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkSpinButton" id="freqplots_zo_spinbutton">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Specify Zo of transmission line</property>
+	      <property name="can_focus">True</property>
+	      <property name="climb_rate">0.20000000298</property>
+	      <property name="digits">1</property>
+	      <property name="numeric">True</property>
+	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="snap_to_ticks">False</property>
+	      <property name="wrap">False</property>
+	      <property name="adjustment">50 1 999 0.10000000149 10 0</property>
+	      <signal name="value_changed" handler="on_freqplots_zo_spinbutton_value_changed" last_modification_time="Thu, 14 Jul 2005 05:09:01 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">4</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame2">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment2">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">0</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkDrawingArea" id="freqplots_drawingarea">
+		  <property name="width_request">681</property>
+		  <property name="height_request">769</property>
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="events">GDK_BUTTON_PRESS_MASK</property>
+		  <signal name="expose_event" handler="on_freqplots_drawingarea_expose_event" last_modification_time="Sun, 20 Mar 2005 16:58:32 GMT"/>
+		  <signal name="configure_event" handler="on_freqplots_drawingarea_configure_event" last_modification_time="Sun, 20 Mar 2005 16:58:37 GMT"/>
+		  <signal name="button_press_event" handler="on_freqplots_drawingarea_button_press_event" last_modification_time="Sat, 06 Aug 2005 06:40:15 GMT"/>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="freqplots_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Structure Data Plots</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="rdpattern_window">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Xnec2c: Radiation Patterns</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="delete_event" handler="on_rdpattern_window_delete_event" last_modification_time="Sun, 20 Mar 2005 16:54:47 GMT"/>
+  <signal name="destroy" handler="on_rdpattern_window_destroy" last_modification_time="Sun, 20 Mar 2005 16:54:54 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox3">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkHBox" id="hbox11">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkMenuBar" id="menubar3">
+	      <property name="visible">True</property>
+	      <property name="pack_direction">GTK_PACK_DIRECTION_LTR</property>
+	      <property name="child_pack_direction">GTK_PACK_DIRECTION_LTR</property>
+
+	      <child>
+		<widget class="GtkMenuItem" id="menuitem9">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">_File</property>
+		  <property name="use_underline">True</property>
+
+		  <child>
+		    <widget class="GtkMenu" id="menuitem9_menu">
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="rdpattern_new">
+			  <property name="visible">True</property>
+			  <property name="label">gtk-new</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_new_activate" last_modification_time="Sat, 25 Nov 2006 10:07:20 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="rdpattern_open">
+			  <property name="visible">True</property>
+			  <property name="label">gtk-open</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_open_input_activate" last_modification_time="Sat, 25 Nov 2006 10:07:20 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="rdpattern_save">
+			  <property name="visible">True</property>
+			  <property name="label">gtk-save</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_rdpattern_save_activate" last_modification_time="Fri, 18 Mar 2005 15:39:15 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="rdpattern_save_as">
+			  <property name="visible">True</property>
+			  <property name="label">gtk-save-as</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_rdpattern_save_as_activate" last_modification_time="Mon, 21 Mar 2005 09:55:37 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="rdpattern_save_as_gnuplot">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Save As gnuplot</property>
+			  <property name="use_underline">True</property>
+			  <signal name="activate" handler="on_rdpattern_save_as_gnuplot_activate" last_modification_time="Thu, 21 Jun 2012 05:56:35 GMT"/>
+
+			  <child internal-child="image">
+			    <widget class="GtkImage" id="image101">
+			      <property name="visible">True</property>
+			      <property name="stock">gtk-save-as</property>
+			      <property name="icon_size">1</property>
+			      <property name="xalign">0.5</property>
+			      <property name="yalign">0.5</property>
+			      <property name="xpad">0</property>
+			      <property name="ypad">0</property>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkSeparatorMenuItem" id="separatormenuitem3">
+			  <property name="visible">True</property>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkImageMenuItem" id="rdpattern_quit">
+			  <property name="visible">True</property>
+			  <property name="label">gtk-quit</property>
+			  <property name="use_stock">True</property>
+			  <signal name="activate" handler="on_quit_activate" last_modification_time="Fri, 18 Mar 2005 14:19:27 GMT"/>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkMenuItem" id="rdpattern_view_menuitem">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">_View</property>
+		  <property name="use_underline">True</property>
+		  <signal name="activate" handler="rdpattern_view_menuitem_activate" last_modification_time="Sun, 28 Aug 2005 11:31:15 GMT"/>
+
+		  <child>
+		    <widget class="GtkMenu" id="rdpattern_view_menuitem_menu">
+
+		      <child>
+			<widget class="GtkMenuItem" id="rdpattern_pol_menu">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Display gain data relevant to polarization</property>
+			  <property name="label" translatable="yes">Polarization</property>
+			  <property name="use_underline">True</property>
+			  <signal name="activate" handler="rdpattern_pol_menu_activate" last_modification_time="Sun, 28 Aug 2005 11:31:57 GMT"/>
+
+			  <child>
+			    <widget class="GtkMenu" id="rdpattern_pol_menu_menu">
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_total">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Total gain</property>
+				  <property name="label" translatable="yes">Total</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">True</property>
+				  <signal name="activate" handler="on_rdpattern_total_activate" last_modification_time="Sat, 09 Jul 2005 04:06:55 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_horizontal">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Gain in horizontal polarization</property>
+				  <property name="label" translatable="yes">Horizontal</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">False</property>
+				  <property name="group">rdpattern_total</property>
+				  <signal name="activate" handler="on_rdpattern_horizontal_activate" last_modification_time="Sat, 09 Jul 2005 04:06:55 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_vertical">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Gain in vertical polarization</property>
+				  <property name="label" translatable="yes">Vertical</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">False</property>
+				  <property name="group">rdpattern_total</property>
+				  <signal name="activate" handler="on_rdpattern_vertical_activate" last_modification_time="Sat, 09 Jul 2005 04:06:55 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_right_hand">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Gain in rhcp</property>
+				  <property name="label" translatable="yes">Right Hand</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">False</property>
+				  <property name="group">rdpattern_total</property>
+				  <signal name="activate" handler="on_rdpattern_right_hand_activate" last_modification_time="Sat, 09 Jul 2005 04:06:55 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_left_hand">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Gain in lhcp</property>
+				  <property name="label" translatable="yes">Left Hand</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">False</property>
+				  <property name="group">rdpattern_total</property>
+				  <signal name="activate" handler="on_rdpattern_left_hand_activate" last_modification_time="Sat, 09 Jul 2005 04:06:55 GMT"/>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="rdpattern_gain_scaling">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Select a style of gain scaling</property>
+			  <property name="label" translatable="yes">Gain Scaling</property>
+			  <property name="use_underline">True</property>
+
+			  <child>
+			    <widget class="GtkMenu" id="rdpattern_gain_scaling_menu">
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_linear_power">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Linear power scaling</property>
+				  <property name="label" translatable="yes">Linear Power</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">True</property>
+				  <signal name="activate" handler="on_rdpattern_linear_power_activate" last_modification_time="Sat, 09 Jul 2005 03:50:42 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_linear_voltage">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Linear field voltage scaling</property>
+				  <property name="label" translatable="yes">Linear Voltage</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">False</property>
+				  <property name="group">rdpattern_linear_power</property>
+				  <signal name="activate" handler="on_rdpattern_linear_voltage_activate" last_modification_time="Sat, 09 Jul 2005 03:50:42 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_arrl_style">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Scale gain in ARRL style</property>
+				  <property name="label" translatable="yes">ARRL Style</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">False</property>
+				  <property name="group">rdpattern_linear_power</property>
+				  <signal name="activate" handler="on_rdpattern_arrl_style_activate" last_modification_time="Sat, 09 Jul 2005 03:50:42 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkRadioMenuItem" id="rdpattern_logarithmic">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Logarithmic gain scaling</property>
+				  <property name="label" translatable="yes">Logarithmic</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">False</property>
+				  <property name="group">rdpattern_linear_power</property>
+				  <signal name="activate" handler="on_rdpattern_logarithmic_activate" last_modification_time="Sat, 09 Jul 2005 03:50:42 GMT"/>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkMenuItem" id="near_field">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Near Field</property>
+			  <property name="use_underline">True</property>
+
+			  <child>
+			    <widget class="GtkMenu" id="near_field_menu">
+
+			      <child>
+				<widget class="GtkCheckMenuItem" id="rdpattern_e_field">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Display near E field</property>
+				  <property name="label" translatable="yes">Near E Field</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">True</property>
+				  <signal name="activate" handler="on_rdpattern_e_field_activate" last_modification_time="Thu, 18 Aug 2005 06:53:35 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckMenuItem" id="rdpattern_h_field">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Display near H field</property>
+				  <property name="label" translatable="yes">Near H Field</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">True</property>
+				  <signal name="activate" handler="on_rdpattern_h_field_activate" last_modification_time="Thu, 18 Aug 2005 06:53:35 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkCheckMenuItem" id="rdpattern_poynting_vector">
+				  <property name="visible">True</property>
+				  <property name="tooltip" translatable="yes">Display Poynting vector</property>
+				  <property name="label" translatable="yes">Poynting Vector</property>
+				  <property name="use_underline">True</property>
+				  <property name="active">True</property>
+				  <signal name="activate" handler="on_rdpattern_poynting_vector_activate" last_modification_time="Thu, 18 Aug 2005 06:53:35 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="rdpattern_animate">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Animate Dialog</property>
+				  <property name="use_underline">True</property>
+				  <signal name="activate" handler="on_rdpattern_animate_activate" last_modification_time="Sun, 06 Nov 2005 12:59:55 GMT"/>
+				</widget>
+			      </child>
+
+			      <child>
+				<widget class="GtkMenuItem" id="total_field">
+				  <property name="visible">True</property>
+				  <property name="label" translatable="yes">Total Field</property>
+				  <property name="use_underline">True</property>
+
+				  <child>
+				    <widget class="GtkMenu" id="total_field_menu">
+
+				      <child>
+					<widget class="GtkRadioMenuItem" id="near_peak_value">
+					  <property name="visible">True</property>
+					  <property name="label" translatable="yes">Peak Value</property>
+					  <property name="use_underline">True</property>
+					  <property name="active">True</property>
+					  <signal name="activate" handler="on_near_peak_value_activate" last_modification_time="Sun, 30 Oct 2005 18:27:25 GMT"/>
+					</widget>
+				      </child>
+
+				      <child>
+					<widget class="GtkRadioMenuItem" id="near_snapshot">
+					  <property name="visible">True</property>
+					  <property name="label" translatable="yes">Snapshot</property>
+					  <property name="use_underline">True</property>
+					  <property name="active">False</property>
+					  <property name="group">near_peak_value</property>
+					  <signal name="activate" handler="on_near_snapshot_activate" last_modification_time="Sun, 30 Oct 2005 18:27:25 GMT"/>
+					</widget>
+				      </child>
+				    </widget>
+				  </child>
+				</widget>
+			      </child>
+			    </widget>
+			  </child>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkCheckMenuItem" id="common_projection">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Synchronize projection parametrs in different windows</property>
+			  <property name="label" translatable="yes">Common Projection</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">True</property>
+			  <signal name="activate" handler="on_common_projection_activate" last_modification_time="Sat, 09 Jul 2005 09:47:18 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkCheckMenuItem" id="common_freq">
+			  <property name="visible">True</property>
+			  <property name="tooltip" translatable="yes">Synchronize frequency selection in different windows</property>
+			  <property name="label" translatable="yes">Common Frequency</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">True</property>
+			  <signal name="activate" handler="on_common_freq_activate" last_modification_time="Sun, 17 Jul 2005 07:29:53 GMT"/>
+			</widget>
+		      </child>
+
+		      <child>
+			<widget class="GtkCheckMenuItem" id="rdpattern_overlay_structure">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Overlay Structure</property>
+			  <property name="use_underline">True</property>
+			  <property name="active">False</property>
+			  <signal name="activate" handler="on_rdpattern_overlay_structure_activate" last_modification_time="Sat, 26 May 2012 14:41:35 GMT"/>
+			</widget>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkVSeparator" id="vseparator8">
+	      <property name="visible">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">4</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="rdpattern_hbox1">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkToggleButton" id="rdpattern_gain_togglebutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Calculate and display radiation pattern</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Gain Pattern</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <signal name="toggled" handler="on_rdpattern_gain_togglebutton_toggled" last_modification_time="Thu, 07 Jul 2005 06:35:07 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkToggleButton" id="rdpattern_eh_togglebutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Calculate and display the near E/H fields</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">E/H Fields</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <signal name="toggled" handler="on_rdpattern_eh_togglebutton_toggled" last_modification_time="Thu, 07 Jul 2005 06:35:19 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkVSeparator" id="vseparator9">
+		  <property name="visible">True</property>
+		</widget>
+		<packing>
+		  <property name="padding">4</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label216">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Frequency Loop </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">True</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="rdpatttern_loop_start">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Start Frequency Loop</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_loop_start_clicked" last_modification_time="Mon, 30 Oct 2006 05:58:03 GMT"/>
+
+		  <child>
+		    <widget class="GtkImage" id="image59">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-media-play</property>
+		      <property name="icon_size">4</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="rdpattern_loop_pause">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Pause Frequency Loop</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_loop_pause_clicked" last_modification_time="Mon, 30 Oct 2006 05:59:03 GMT"/>
+
+		  <child>
+		    <widget class="GtkImage" id="image60">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-media-pause</property>
+		      <property name="icon_size">4</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="rdpattern_loop_reset">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Reset Frequency Loop</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_loop_reset_clicked" last_modification_time="Mon, 30 Oct 2006 05:59:40 GMT"/>
+
+		  <child>
+		    <widget class="GtkImage" id="image58">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-media-rewind</property>
+		      <property name="icon_size">4</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label246">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes"> Step </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">True</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkEntry" id="rdpattern_fstep_entry">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Current Frequency Step</property>
+		  <property name="can_focus">True</property>
+		  <property name="editable">False</property>
+		  <property name="visibility">True</property>
+		  <property name="max_length">3</property>
+		  <property name="text" translatable="yes">1</property>
+		  <property name="has_frame">True</property>
+		  <property name="invisible_char">●</property>
+		  <property name="activates_default">False</property>
+		  <property name="width_chars">3</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHSeparator" id="hseparator3">
+	  <property name="visible">True</property>
+	</widget>
+	<packing>
+	  <property name="padding">4</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="rdpattern_hbox2">
+	  <property name="height_request">30</property>
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="rdpattern_colorcode_minlabel">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">0.0</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">5</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">1</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkDrawingArea" id="rdpattern_colorcode_drawingarea">
+	      <property name="width_request">160</property>
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Color code for Gain or E/H field values</property>
+	      <signal name="expose_event" handler="on_rdpattern_colorcode_drawingarea_expose_event" last_modification_time="Thu, 07 Jul 2005 06:35:49 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">1</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="rdpattern_colorcode_maxlabel">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">0.00</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">9</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">1</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkEntry" id="rdpattern_viewer_gain">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Gain in direction of viewer
+(perpenticular to screen)</property>
+	      <property name="can_focus">True</property>
+	      <property name="editable">True</property>
+	      <property name="visibility">True</property>
+	      <property name="max_length">0</property>
+	      <property name="text" translatable="yes"> - - - - -</property>
+	      <property name="has_frame">True</property>
+	      <property name="invisible_char">*</property>
+	      <property name="activates_default">False</property>
+	      <property name="width_chars">6</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">1</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label11">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">dB</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">0</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">True</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">1</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkSpinButton" id="rdpattern_freq_spinbutton">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Enter frequency in MHz</property>
+	      <property name="can_focus">True</property>
+	      <property name="climb_rate">0.0010000000475</property>
+	      <property name="digits">3</property>
+	      <property name="numeric">True</property>
+	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="snap_to_ticks">False</property>
+	      <property name="wrap">False</property>
+	      <property name="adjustment">0.00999999977648 0.00999999977648 9999 0.00999999977648 10 0</property>
+	      <signal name="value_changed" handler="on_rdpattern_freq_spinbutton_value_changed" last_modification_time="Fri, 08 Jul 2005 18:10:35 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">1</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="rdpattern_freq_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">MHz</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">True</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">1</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="rdpattern_freq_checkbutton">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Enable data calculation on frequency change</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Apply</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">True</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">2</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="rdpattern_new_freq_button">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Calculate data for new frequency</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_rdpattern_new_freq_clicked" last_modification_time="Sat, 09 Jul 2005 15:27:05 GMT"/>
+
+	      <child>
+		<widget class="GtkImage" id="image49">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-apply</property>
+		  <property name="icon_size">4</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">2</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHSeparator" id="hseparator12">
+	  <property name="visible">True</property>
+	</widget>
+	<packing>
+	  <property name="padding">4</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkLabel" id="rdpattern_label">
+	  <property name="visible">True</property>
+	  <property name="label" translatable="yes">Radiation Patterns</property>
+	  <property name="use_underline">False</property>
+	  <property name="use_markup">False</property>
+	  <property name="justify">GTK_JUSTIFY_LEFT</property>
+	  <property name="wrap">False</property>
+	  <property name="selectable">False</property>
+	  <property name="xalign">0.5</property>
+	  <property name="yalign">0.5</property>
+	  <property name="xpad">0</property>
+	  <property name="ypad">0</property>
+	  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	  <property name="width_chars">14</property>
+	  <property name="single_line_mode">True</property>
+	  <property name="angle">0</property>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame3">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment3">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">0</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkDrawingArea" id="rdpattern_drawingarea">
+		  <property name="width_request">681</property>
+		  <property name="height_request">769</property>
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <signal name="configure_event" handler="on_rdpattern_drawingarea_configure_event" last_modification_time="Sat, 19 Mar 2005 14:26:17 GMT"/>
+		  <signal name="expose_event" handler="on_rdpattern_drawingarea_expose_event" last_modification_time="Sat, 19 Mar 2005 14:26:27 GMT"/>
+		  <signal name="button_press_event" handler="on_rdpattern_drawingarea_button_press_event" last_modification_time="Fri, 25 May 2012 09:46:58 GMT"/>
+		  <signal name="scroll_event" handler="on_rdpattern_drawingarea_scroll_event" last_modification_time="Sat, 26 May 2012 04:31:04 GMT"/>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkHBox" id="rdpattern_hbox3">
+	      <property name="visible">True</property>
+	      <property name="homogeneous">False</property>
+	      <property name="spacing">0</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label248">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">View Radiation</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">14</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="rdpattern_x_axis">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">View radiation pattern along X-axis</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">X</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_rdpattern_x_axis_clicked" last_modification_time="Fri, 08 Jul 2005 18:07:46 GMT"/>
+		  <accelerator key="X" modifiers="0" signal="clicked"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="rdpattern_y_axis">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">View radiation pattern along Y-axis</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Y</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_rdpattern_y_axis_clicked" last_modification_time="Fri, 08 Jul 2005 18:08:05 GMT"/>
+		  <accelerator key="Y" modifiers="0" signal="clicked"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="rdpattern_z_axis">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">View radiation pattern along Z-axis</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Z</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_rdpattern_z_axis_clicked" last_modification_time="Fri, 08 Jul 2005 18:08:20 GMT"/>
+		  <accelerator key="Z" modifiers="0" signal="clicked"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="rdpattern_default_view">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">View radiation pattern in default projection</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_rdpattern_default_view_clicked" last_modification_time="Fri, 08 Jul 2005 18:41:58 GMT"/>
+
+		  <child>
+		    <widget class="GtkImage" id="image34">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-redo</property>
+		      <property name="icon_size">4</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkImage" id="image55">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-refresh</property>
+		  <property name="icon_size">4</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="rdpattern_rotate_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Rotate radiation pattern around Z-axis</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">1</property>
+		  <property name="digits">0</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">45 -360 360 1 10 0</property>
+		  <signal name="value_changed" handler="on_rdpattern_rotate_spinbutton_value_changed" last_modification_time="Fri, 08 Jul 2005 18:41:18 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkImage" id="image56">
+		  <property name="visible">True</property>
+		  <property name="stock">gtk-go-down</property>
+		  <property name="icon_size">4</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="rdpattern_incline_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Incline radiation pattern to plane of screen</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">1</property>
+		  <property name="digits">0</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">45 -180 180 1 10 0</property>
+		  <signal name="value_changed" handler="on_rdpattern_incline_spinbutton_value_changed" last_modification_time="Fri, 08 Jul 2005 18:42:24 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label247">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes"> Zoom % </property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">True</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="rdpattern_zoom_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Zoom Structure Display</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">1</property>
+		  <property name="digits">0</property>
+		  <property name="numeric">False</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">100 10 999 1 10 0</property>
+		  <signal name="value_changed" handler="on_rdpattern_zoom_spinbutton_value_changed" last_modification_time="Fri, 25 May 2012 09:43:50 GMT"/>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">True</property>
+		  <property name="fill">True</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="rdpattern_plus_button">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Zoom In</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_rdpattern_plus_button_clicked" last_modification_time="Fri, 25 May 2012 09:44:13 GMT"/>
+
+		  <child>
+		    <widget class="GtkImage" id="image98">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-zoom-in</property>
+		      <property name="icon_size">4</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="rdpattern_minus_button">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Zoom Out</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_rdpattern_minus_button_clicked" last_modification_time="Fri, 25 May 2012 09:44:29 GMT"/>
+
+		  <child>
+		    <widget class="GtkImage" id="image99">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-zoom-out</property>
+		      <property name="icon_size">4</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkButton" id="rdpattern_one_button">
+		  <property name="visible">True</property>
+		  <property name="tooltip" translatable="yes">Zoom to Default 1:1</property>
+		  <property name="can_focus">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <signal name="clicked" handler="on_rdpattern_one_button_clicked" last_modification_time="Fri, 25 May 2012 09:45:00 GMT"/>
+
+		  <child>
+		    <widget class="GtkImage" id="image100">
+		      <property name="visible">True</property>
+		      <property name="stock">gtk-zoom-100</property>
+		      <property name="icon_size">4</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		    </widget>
+		  </child>
+		</widget>
+		<packing>
+		  <property name="padding">0</property>
+		  <property name="expand">False</property>
+		  <property name="fill">False</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="quit_dialog">
+  <property name="border_width">2</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Confirmation</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_MOUSE</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <property name="has_separator">True</property>
+  <signal name="destroy" handler="on_quit_dialog_destroy" last_modification_time="Fri, 16 Dec 2005 12:08:18 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox2">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area2">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="quit_cancelbutton">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="clicked" handler="on_quit_cancelbutton_clicked" last_modification_time="Wed, 31 Aug 2005 05:57:10 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="quit_okbutton">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <signal name="clicked" handler="on_quit_okbutton_clicked" last_modification_time="Tue, 02 Aug 2005 17:48:36 GMT"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox12">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkImage" id="image36">
+	      <property name="visible">True</property>
+	      <property name="stock">gtk-dialog-question</property>
+	      <property name="icon_size">6</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="quit_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Quit xnec2c?</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="error_dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Error</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_CENTER</property>
+  <property name="modal">True</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <property name="has_separator">True</property>
+  <signal name="delete_event" handler="on_error_dialog_delete_event" last_modification_time="Fri, 16 Dec 2005 12:33:54 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox4">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area4">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="error_quitbutton">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-quit</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <signal name="clicked" handler="on_error_quitbutton_clicked" last_modification_time="Sun, 15 Jan 2006 08:57:12 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="error_okbutton">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <signal name="clicked" handler="on_error_okbutton_clicked" last_modification_time="Sun, 15 Jan 2006 08:56:32 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="error_stopbutton">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-stop</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">0</property>
+	      <signal name="clicked" handler="on_error_stopbutton_clicked" last_modification_time="Sun, 15 Jan 2006 08:54:54 GMT"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox14">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkImage" id="image38">
+	      <property name="visible">True</property>
+	      <property name="stock">gtk-dialog-error</property>
+	      <property name="icon_size">6</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="error_label">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Error</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">False</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkDialog" id="animate_dialog">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Near Field Animation</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_MOUSE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <property name="has_separator">True</property>
+  <signal name="destroy" handler="on_animate_dialog_destroy" last_modification_time="Fri, 16 Dec 2005 11:19:27 GMT"/>
+
+  <child internal-child="vbox">
+    <widget class="GtkVBox" id="dialog-vbox5">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child internal-child="action_area">
+	<widget class="GtkHButtonBox" id="dialog-action_area5">
+	  <property name="visible">True</property>
+	  <property name="layout_style">GTK_BUTTONBOX_END</property>
+
+	  <child>
+	    <widget class="GtkButton" id="animation_applybutton">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-10</property>
+	      <signal name="clicked" handler="on_animation_applybutton_clicked" last_modification_time="Sun, 06 Nov 2005 13:17:25 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="animation_cancelbutton">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-cancel</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-6</property>
+	      <signal name="clicked" handler="on_animation_cancelbutton_clicked" last_modification_time="Sun, 06 Nov 2005 13:17:32 GMT"/>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="animation_okbutton">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="has_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="response_id">-5</property>
+	      <signal name="clicked" handler="on_animation_okbutton_clicked" last_modification_time="Sun, 06 Nov 2005 13:20:17 GMT"/>
+	    </widget>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	  <property name="pack_type">GTK_PACK_END</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkTable" id="table1">
+	  <property name="visible">True</property>
+	  <property name="n_rows">2</property>
+	  <property name="n_columns">2</property>
+	  <property name="homogeneous">False</property>
+	  <property name="row_spacing">0</property>
+	  <property name="column_spacing">0</property>
+
+	  <child>
+	    <widget class="GtkLabel" id="label17">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Steps/Cycle</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">2</property>
+	      <property name="ypad">2</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_padding">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label18">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Animate Frequency (Hz)</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">2</property>
+	      <property name="ypad">2</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">0</property>
+	      <property name="bottom_attach">1</property>
+	      <property name="x_padding">2</property>
+	      <property name="x_options">fill</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkSpinButton" id="animate_steps_spinbutton">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Steps per Cycle of Excitation</property>
+	      <property name="can_focus">True</property>
+	      <property name="climb_rate">1</property>
+	      <property name="digits">0</property>
+	      <property name="numeric">True</property>
+	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="snap_to_ticks">False</property>
+	      <property name="wrap">False</property>
+	      <property name="adjustment">36 12 360 1 10 0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">0</property>
+	      <property name="right_attach">1</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="y_padding">4</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkSpinButton" id="animate_freq_spinbutton">
+	      <property name="visible">True</property>
+	      <property name="tooltip" translatable="yes">Frequency of Excitaion Animation</property>
+	      <property name="can_focus">True</property>
+	      <property name="climb_rate">1</property>
+	      <property name="digits">1</property>
+	      <property name="numeric">True</property>
+	      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+	      <property name="snap_to_ticks">False</property>
+	      <property name="wrap">False</property>
+	      <property name="adjustment">1 0.10000000149 10 0.10000000149 10 0</property>
+	    </widget>
+	    <packing>
+	      <property name="left_attach">1</property>
+	      <property name="right_attach">2</property>
+	      <property name="top_attach">1</property>
+	      <property name="bottom_attach">2</property>
+	      <property name="y_padding">4</property>
+	      <property name="y_options"></property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="nec2_editor">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Xnec2c: NEC2 Input File Editor</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="delete_event" handler="on_nec2_editor_delete_event" last_modification_time="Wed, 04 Jan 2006 05:48:29 GMT"/>
+  <signal name="destroy" handler="on_nec2_editor_destroy" last_modification_time="Wed, 04 Jan 2006 05:48:41 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox4">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkHBox" id="hbox16">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">False</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame8">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment8">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">1</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">12</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox17">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkButton" id="nec2_row_add">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label">gtk-add</property>
+			  <property name="use_stock">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="on_nec2_row_add_clicked" last_modification_time="Thu, 12 Jan 2006 12:49:14 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="nec2_row_remv">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label">gtk-remove</property>
+			  <property name="use_stock">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="on_nec2_row_remv_clicked" last_modification_time="Thu, 12 Jan 2006 12:48:51 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="nec2_treeview_clear">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label">gtk-clear</property>
+			  <property name="use_stock">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="on_nec2_treeview_clear_clicked" last_modification_time="Thu, 12 Jan 2006 17:02:08 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label23">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Edit Tree View Rows</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">2</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkFrame" id="frame7">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="label_xalign">0</property>
+	      <property name="label_yalign">0.5</property>
+	      <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment7">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">1</property>
+		  <property name="yscale">1</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">12</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox18">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">0</property>
+
+		      <child>
+			<widget class="GtkButton" id="nec2_save_as">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label">gtk-save-as</property>
+			  <property name="use_stock">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="on_nec2_save_as_clicked" last_modification_time="Wed, 11 Jan 2006 11:50:38 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="nec2_save">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label">gtk-save</property>
+			  <property name="use_stock">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <signal name="clicked" handler="on_nec2_save_clicked" last_modification_time="Wed, 11 Jan 2006 11:44:36 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkCheckButton" id="nec2_apply_checkbutton">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label">gtk-apply</property>
+			  <property name="use_stock">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">True</property>
+			  <property name="active">True</property>
+			  <property name="inconsistent">False</property>
+			  <property name="draw_indicator">True</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkButton" id="nec2_revert">
+			  <property name="border_width">2</property>
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="label">gtk-revert-to-saved</property>
+			  <property name="use_stock">True</property>
+			  <property name="relief">GTK_RELIEF_NORMAL</property>
+			  <property name="focus_on_click">False</property>
+			  <signal name="clicked" handler="on_nec2_revert_clicked" last_modification_time="Fri, 13 Jan 2006 05:05:19 GMT"/>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label22">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">NEC2 Input File</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">2</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="type">label_item</property>
+		</packing>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">False</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame6">
+	  <property name="border_width">2</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment6">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow5">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkTreeView" id="nec2_cmnt_treeview">
+		      <property name="height_request">170</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="headers_visible">True</property>
+		      <property name="rules_hint">True</property>
+		      <property name="reorderable">True</property>
+		      <property name="enable_search">True</property>
+		      <property name="fixed_height_mode">False</property>
+		      <property name="hover_selection">False</property>
+		      <property name="hover_expand">False</property>
+		      <signal name="button_press_event" handler="on_nec2_cmnt_treeview_button_press_event" last_modification_time="Thu, 12 Jan 2006 15:11:02 GMT"/>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label21">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Comments</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">2</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame9">
+	  <property name="border_width">2</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment9">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table34">
+		  <property name="visible">True</property>
+		  <property name="n_rows">2</property>
+		  <property name="n_columns">8</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkButton" id="gw">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Wire</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_gw_clicked" last_modification_time="Sat, 21 Jan 2006 12:55:37 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="ga">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Arc</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_ga_clicked" last_modification_time="Sat, 21 Jan 2006 12:55:17 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="gh">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Helix</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_gh_clicked" last_modification_time="Sat, 21 Jan 2006 12:55:05 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="sp">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Patch</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_sp_clicked" last_modification_time="Sat, 21 Jan 2006 12:54:56 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">3</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="gr">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Cylinder</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_gr_clicked" last_modification_time="Sat, 21 Jan 2006 12:54:34 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">4</property>
+		      <property name="right_attach">5</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="gm">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Move</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_gm_clicked" last_modification_time="Sat, 21 Jan 2006 12:54:23 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">5</property>
+		      <property name="right_attach">6</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="gx">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Reflect</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_gx_clicked" last_modification_time="Sat, 21 Jan 2006 12:54:13 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">6</property>
+		      <property name="right_attach">7</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="gs">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Scale</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_gs_clicked" last_modification_time="Sat, 21 Jan 2006 12:54:00 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">7</property>
+		      <property name="right_attach">8</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label24">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Edit Geometry Data</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">2</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame5">
+	  <property name="border_width">2</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment5">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow4">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkTreeView" id="nec2_geom_treeview">
+		      <property name="height_request">170</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="headers_visible">True</property>
+		      <property name="rules_hint">True</property>
+		      <property name="reorderable">True</property>
+		      <property name="enable_search">True</property>
+		      <property name="fixed_height_mode">False</property>
+		      <property name="hover_selection">False</property>
+		      <property name="hover_expand">False</property>
+		      <signal name="button_press_event" handler="on_nec2_geom_treeview_button_press_event" last_modification_time="Thu, 12 Jan 2006 15:11:24 GMT"/>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label20">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Geometry</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">2</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame10">
+	  <property name="border_width">2</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment10">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table4">
+		  <property name="visible">True</property>
+		  <property name="n_rows">2</property>
+		  <property name="n_columns">6</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkButton" id="ex">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Excitation</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_ex_clicked" last_modification_time="Tue, 18 Apr 2006 07:38:18 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="fr">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Frequency</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_fr_clicked" last_modification_time="Tue, 18 Apr 2006 07:38:29 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="gn">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Ground (GN)</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_gn_clicked" last_modification_time="Tue, 18 Apr 2006 07:38:38 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="rp">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Radiation</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_rp_clicked" last_modification_time="Tue, 18 Apr 2006 07:39:46 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="ld">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Loading</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_ld_clicked" last_modification_time="Tue, 18 Apr 2006 07:38:45 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">3</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="nt">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Network</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_nt_clicked" last_modification_time="Tue, 18 Apr 2006 07:38:52 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">4</property>
+		      <property name="right_attach">5</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="tl">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Trans. Line</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_tl_clicked" last_modification_time="Tue, 18 Apr 2006 07:39:36 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">5</property>
+		      <property name="right_attach">6</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="ne">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Near Fields</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_ne_clicked" last_modification_time="Fri, 11 Aug 2006 18:48:46 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="xq">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Execute</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_xq_clicked" last_modification_time="Tue, 18 Apr 2006 07:50:10 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">5</property>
+		      <property name="right_attach">6</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="kh">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Interaction</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_kh_clicked" last_modification_time="Tue, 18 Apr 2006 07:40:05 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">4</property>
+		      <property name="right_attach">5</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="ek">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Kernel</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_ek_clicked" last_modification_time="Tue, 18 Apr 2006 07:39:59 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">3</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkButton" id="gd">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Ground (GD)</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <signal name="clicked" handler="on_gd_clicked" last_modification_time="Fri, 18 Aug 2006 08:33:53 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label25">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Edit Control Commands</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">2</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame4">
+	  <property name="border_width">2</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment4">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkScrolledWindow" id="scrolledwindow3">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="hscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		  <property name="vscrollbar_policy">GTK_POLICY_ALWAYS</property>
+		  <property name="shadow_type">GTK_SHADOW_IN</property>
+		  <property name="window_placement">GTK_CORNER_TOP_LEFT</property>
+
+		  <child>
+		    <widget class="GtkTreeView" id="nec2_cmnd_treeview">
+		      <property name="height_request">170</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="headers_visible">True</property>
+		      <property name="rules_hint">True</property>
+		      <property name="reorderable">True</property>
+		      <property name="enable_search">True</property>
+		      <property name="fixed_height_mode">False</property>
+		      <property name="hover_selection">False</property>
+		      <property name="hover_expand">False</property>
+		      <signal name="button_press_event" handler="on_nec2_cmnd_treeview_button_press_event" last_modification_time="Thu, 12 Jan 2006 15:11:36 GMT"/>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label19">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Commands</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">2</property>
+	      <property name="ypad">0</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="wire_editor">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Wire Element (GW & GC cards)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_wire_editor_destroy" last_modification_time="Tue, 17 Jan 2006 13:00:03 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox5">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">2</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame11">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkTable" id="table2">
+	      <property name="visible">True</property>
+	      <property name="n_rows">6</property>
+	      <property name="n_columns">4</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">2</property>
+	      <property name="column_spacing">2</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label29">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">No. Segments</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label30">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Segs % lambda</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label31">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes"></property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label32">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Wire X1</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label33">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Wire Y1</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">True</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label34">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Wire Z1</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label36">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Wire X2</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">4</property>
+		  <property name="bottom_attach">5</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label37">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Wire Y2</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">4</property>
+		  <property name="bottom_attach">5</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label38">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Wire Z2</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">4</property>
+		  <property name="bottom_attach">5</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="wire_tagnum_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">0</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">1 1 100000 1 10 0</property>
+		  <signal name="value_changed" handler="on_wire_tagnum_spinbutton_value_changed" last_modification_time="Sat, 29 Jul 2006 07:53:57 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="wire_numseg_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">0</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">15 1 100000 1 10 0</property>
+		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:41:21 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="wire_pcl_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">5 0.0010000000475 30 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_wire_pcl_spinbutton_value_changed" last_modification_time="Sat, 21 Jan 2006 05:14:49 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="wire_x1_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:39:02 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="wire_y1_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:39:11 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="wire_z1_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">-1 -10000 10000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:41:42 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="wire_z2_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:41:51 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">5</property>
+		  <property name="bottom_attach">6</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="wire_y2_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:39:37 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">5</property>
+		  <property name="bottom_attach">6</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="wire_x2_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:39:51 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">5</property>
+		  <property name="bottom_attach">6</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label28">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Tag Number</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="wire_dia_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">0.00300000002608 0 100 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Thu, 19 Jan 2006 17:49:54 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label35">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Wire Diameter</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label39">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Wire Length</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="wire_len_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">2 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_wire_len_spinbutton_value_changed" last_modification_time="Thu, 19 Jan 2006 17:35:13 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label44">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Conductivity S/m</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">4</property>
+		  <property name="bottom_attach">5</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="wire_res_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">0 0 1000000000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_wire_res_spinbutton_value_changed" last_modification_time="Mon, 06 Mar 2006 16:17:50 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">5</property>
+		  <property name="bottom_attach">6</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="wire_taper_checkbutton">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Tapered Wire</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_wire_taper_checkbutton_toggled" last_modification_time="Tue, 17 Jan 2006 13:52:40 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">2</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="wire_taperframe">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment12">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table3">
+		  <property name="visible">True</property>
+		  <property name="n_rows">2</property>
+		  <property name="n_columns">4</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">2</property>
+		  <property name="column_spacing">2</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label40">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Length Taper</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label41">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Diameter Seg 1</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label42">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Diameter Seg N</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label43">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Diam. Taper</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">3</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="wire_rdia_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0.920000016689 0.5 2 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_wire_rdia_spinbutton_value_changed" last_modification_time="Thu, 19 Jan 2006 17:36:34 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">3</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="wire_dian_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0.0179999992251 9.99999974738e-06 100 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_wire_data_spinbutton_value_changed" last_modification_time="Tue, 24 Jan 2006 17:03:55 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="wire_dia1_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0.0309999994934 9.99999974738e-06 100 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_wire_rdia_spinbutton_value_changed" last_modification_time="Mon, 23 Jan 2006 08:41:05 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="wire_rlen_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0.920000016689 0.5 2 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_wire_rlen_spinbutton_value_changed" last_modification_time="Thu, 19 Jan 2006 17:36:02 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label27">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Wire Taper Data</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox21">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">2</property>
+
+	  <child>
+	    <widget class="GtkButton" id="wire_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_wire_new_button_clicked" last_modification_time="Mon, 23 Jan 2006 09:12:34 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="wire_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_wire_cancel_button_clicked" last_modification_time="Tue, 17 Jan 2006 14:32:24 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment50">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox48">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image70">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label222">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="wire_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_wire_apply_button_clicked" last_modification_time="Tue, 17 Jan 2006 14:32:42 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="wire_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_wire_ok_button_clicked" last_modification_time="Tue, 17 Jan 2006 14:33:02 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="patch_editor">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Patch Element (SP & SC Cards)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_patch_editor_destroy" last_modification_time="Tue, 25 Jul 2006 05:59:53 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox6">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">2</property>
+
+      <child>
+	<widget class="GtkFrame" id="patch_type_frame">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment13">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox22">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="patch_arbitrary_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Arbitary</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_patch_arbitrary_radiobutton_toggled" last_modification_time="Tue, 25 Jul 2006 09:28:57 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="patch_rectangular_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Rectangle</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">patch_arbitrary_radiobutton</property>
+		      <signal name="toggled" handler="on_patch_rectangular_radiobutton_toggled" last_modification_time="Tue, 25 Jul 2006 09:29:10 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="patch_triangular_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Triangle</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">patch_arbitrary_radiobutton</property>
+		      <signal name="toggled" handler="on_patch_triangular_radiobutton_toggled" last_modification_time="Tue, 25 Jul 2006 09:29:22 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="patch_quadrilateral_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Quadrilateral</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">patch_arbitrary_radiobutton</property>
+		      <signal name="toggled" handler="on_patch_quadrilateral_radiobutton_toggled" last_modification_time="Tue, 25 Jul 2006 09:29:32 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="patch_surface_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Surface</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">patch_arbitrary_radiobutton</property>
+		      <signal name="toggled" handler="on_patch_surface_radiobutton_toggled" last_modification_time="Thu, 03 Aug 2006 07:11:38 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label45">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Patch Type</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="patch_sm_frame">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment18">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table10">
+		  <property name="visible">True</property>
+		  <property name="n_rows">2</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label87">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Corners 1-2 sub-division (NX)</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label88">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Corners 2-3 sub-division (NY)</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="patch_nx_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">8 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:58:26 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="patch_ny_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">8 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:58:26 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label86">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Surface Sub-division</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame13">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment14">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table5">
+		  <property name="visible">True</property>
+		  <property name="n_rows">4</property>
+		  <property name="n_columns">3</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">2</property>
+		  <property name="column_spacing">2</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="patch_x1_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Center - X</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="patch_y1_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Center - Y</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="patch_z1_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Center - Z</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="patch_x1_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:58:26 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="patch_y1_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:58:37 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="patch_z1_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:58:51 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="patch_x2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">45 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 10:01:32 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="patch_y2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">45 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:59:15 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="patch_z2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0.10000000149 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:59:43 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="patch_x2_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Normal - Elev.</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="patch_y2_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Normal - Azim.</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="patch_z2_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Patch Area</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label46">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">SP/SM Cards</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="patch_sc_frame">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment15">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox7">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">2</property>
+
+		  <child>
+		    <widget class="GtkTable" id="table6">
+		      <property name="visible">True</property>
+		      <property name="n_rows">2</property>
+		      <property name="n_columns">3</property>
+		      <property name="homogeneous">False</property>
+		      <property name="row_spacing">2</property>
+		      <property name="column_spacing">2</property>
+
+		      <child>
+			<widget class="GtkSpinButton" id="patch_x3_spinbutton">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">0.00999999977648</property>
+			  <property name="digits">5</property>
+			  <property name="numeric">True</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">False</property>
+			  <property name="wrap">False</property>
+			  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+			  <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 09:59:54 GMT"/>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_padding">2</property>
+			  <property name="y_padding">4</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkSpinButton" id="patch_y3_spinbutton">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">0.00999999977648</property>
+			  <property name="digits">5</property>
+			  <property name="numeric">True</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">False</property>
+			  <property name="wrap">False</property>
+			  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+			  <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 10:00:23 GMT"/>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">2</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_padding">2</property>
+			  <property name="y_padding">4</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkSpinButton" id="patch_z3_spinbutton">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">0.00999999977648</property>
+			  <property name="digits">5</property>
+			  <property name="numeric">True</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">False</property>
+			  <property name="wrap">False</property>
+			  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+			  <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 10:00:36 GMT"/>
+			</widget>
+			<packing>
+			  <property name="left_attach">2</property>
+			  <property name="right_attach">3</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_padding">2</property>
+			  <property name="y_padding">4</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label54">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Corner 3 - X</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.10000000149</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label57">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Corner 3 - Y</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.10000000149</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">2</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label58">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Corner 3 - Z</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.10000000149</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">2</property>
+			  <property name="right_attach">3</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkTable" id="patch_sc_table">
+		      <property name="visible">True</property>
+		      <property name="n_rows">2</property>
+		      <property name="n_columns">3</property>
+		      <property name="homogeneous">False</property>
+		      <property name="row_spacing">2</property>
+		      <property name="column_spacing">2</property>
+
+		      <child>
+			<widget class="GtkSpinButton" id="patch_x4_spinbutton">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">0.00999999977648</property>
+			  <property name="digits">5</property>
+			  <property name="numeric">True</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">False</property>
+			  <property name="wrap">False</property>
+			  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+			  <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 10:00:47 GMT"/>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_padding">2</property>
+			  <property name="y_padding">4</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkSpinButton" id="patch_y4_spinbutton">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">0.00999999977648</property>
+			  <property name="digits">5</property>
+			  <property name="numeric">True</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">False</property>
+			  <property name="wrap">False</property>
+			  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+			  <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 10:01:00 GMT"/>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">2</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_padding">2</property>
+			  <property name="y_padding">4</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkSpinButton" id="patch_z4_spinbutton">
+			  <property name="visible">True</property>
+			  <property name="can_focus">True</property>
+			  <property name="climb_rate">0.00999999977648</property>
+			  <property name="digits">5</property>
+			  <property name="numeric">True</property>
+			  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+			  <property name="snap_to_ticks">False</property>
+			  <property name="wrap">False</property>
+			  <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+			  <signal name="value_changed" handler="on_patch_data_spinbutton_value_changed" last_modification_time="Mon, 24 Jul 2006 10:01:10 GMT"/>
+			</widget>
+			<packing>
+			  <property name="left_attach">2</property>
+			  <property name="right_attach">3</property>
+			  <property name="top_attach">1</property>
+			  <property name="bottom_attach">2</property>
+			  <property name="x_padding">2</property>
+			  <property name="y_padding">4</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label55">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Corner 4 - X</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.10000000149</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">0</property>
+			  <property name="right_attach">1</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label56">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Corner 4 - Y</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.10000000149</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">1</property>
+			  <property name="right_attach">2</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label59">
+			  <property name="visible">True</property>
+			  <property name="label" translatable="yes">Corner 4 - Z</property>
+			  <property name="use_underline">False</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.10000000149</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="left_attach">2</property>
+			  <property name="right_attach">3</property>
+			  <property name="top_attach">0</property>
+			  <property name="bottom_attach">1</property>
+			  <property name="x_options">fill</property>
+			  <property name="y_options"></property>
+			</packing>
+		      </child>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label47">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">SC Card</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox23">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">2</property>
+
+	  <child>
+	    <widget class="GtkButton" id="patch_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_patch_new_button_clicked" last_modification_time="Tue, 25 Jul 2006 04:49:47 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="patch_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_patch_cancel_button_clicked" last_modification_time="Tue, 25 Jul 2006 04:49:54 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment51">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox49">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image71">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label223">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="patch_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_patch_apply_button_clicked" last_modification_time="Tue, 25 Jul 2006 04:50:00 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="patch_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_patch_ok_button_clicked" last_modification_time="Tue, 25 Jul 2006 04:50:07 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="arc_editor">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Arc Element (GA card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">True</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_arc_editor_destroy" last_modification_time="Mon, 31 Jul 2006 04:10:17 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox8">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame14">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment16">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table7">
+		  <property name="visible">True</property>
+		  <property name="n_rows">4</property>
+		  <property name="n_columns">4</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">2</property>
+		  <property name="column_spacing">2</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label66">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">End 1 Angle</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label67">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">End 2 Angle</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="arc_end1_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">45 -360 360 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_arc_data_spinbutton_value_changed" last_modification_time="Sun, 30 Jul 2006 15:13:56 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="arc_end2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">135 -360 360 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_arc_data_spinbutton_value_changed" last_modification_time="Sun, 30 Jul 2006 15:14:07 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="arc_tagnum_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 1 100000 1 10 0</property>
+		      <signal name="value_changed" handler="on_arc_tagnum_spinbutton_value_changed" last_modification_time="Sun, 30 Jul 2006 15:15:04 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="arc_numseg_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">15 1 100000 1 10 0</property>
+		      <signal name="value_changed" handler="on_arc_data_spinbutton_value_changed" last_modification_time="Sun, 30 Jul 2006 15:13:06 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label63">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Tag Number</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label64">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">No. Segments</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label65">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Radius from Y</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="arc_rad_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_arc_data_spinbutton_value_changed" last_modification_time="Sun, 30 Jul 2006 15:13:21 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label69">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Segs % lambda</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="arc_pcl_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">5 0.0010000000475 30 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_arc_pcl_spinbutton_value_changed" last_modification_time="Mon, 31 Jul 2006 10:27:40 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="arc_res_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 0 1000000000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_arc_res_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 17:37:42 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">3</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label70">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Conductivity S/m</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">3</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label68">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Wire Diameter</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">3</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="arc_dia_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0.00300000002608 9.99999974738e-06 100 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_arc_data_spinbutton_value_changed" last_modification_time="Sun, 30 Jul 2006 15:14:19 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">3</property>
+		      <property name="right_attach">4</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label60">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Wire Arc Data</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox24">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">2</property>
+
+	  <child>
+	    <widget class="GtkButton" id="arc_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_arc_new_button_clicked" last_modification_time="Sun, 30 Jul 2006 15:11:26 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="arc_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_arc_cancel_button_clicked" last_modification_time="Sun, 30 Jul 2006 15:11:15 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment52">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox50">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image72">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label224">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="arc_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_arc_apply_button_clicked" last_modification_time="Sun, 30 Jul 2006 15:11:04 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="arc_ok_buttonbutton">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_arc_ok_button_clicked" last_modification_time="Sun, 30 Jul 2006 15:10:53 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="transform_editor">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Co-ordinate Transformation (GM card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_transform_editor_destroy" last_modification_time="Sat, 05 Aug 2006 10:48:57 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox9">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame15">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment17">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table8">
+		  <property name="visible">True</property>
+		  <property name="n_rows">6</property>
+		  <property name="n_columns">3</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">2</property>
+		  <property name="column_spacing">2</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label62">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Tag Increment</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label98">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">New Structures</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label99">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Start From Tag</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label100">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Rotate about X</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label101">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Rotate about Y</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label102">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Rotate about Z</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label103">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Move along X</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label104">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Move along Y</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label105">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Move along Z</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="transform_my_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:26:37 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="transform_mx_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:26:27 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="transform_mz_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:26:52 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="transform_rx_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -360 360 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 11:13:43 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="transform_taginc_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 0 100000 1 10 0</property>
+		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:24:27 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="transform_new_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 0 100000 1 10 0</property>
+		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:24:53 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="transform_start_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 0 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:25:26 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="transform_ry_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -360 360 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:26:00 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="transform_rz_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -360 360 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_transform_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 09:26:10 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label61">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Co-ordinate Transformation Data</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox25">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="transform_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_transform_new_button_clicked" last_modification_time="Sat, 05 Aug 2006 09:34:23 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="transform_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_transform_cancel_button_clicked" last_modification_time="Sat, 05 Aug 2006 09:34:13 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment53">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox51">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image73">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label225">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="transform_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_transform_apply_button_clicked" last_modification_time="Sat, 05 Aug 2006 09:33:56 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="transform_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_transform_ok_button_clicked" last_modification_time="Sat, 05 Aug 2006 09:33:43 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="helix_editor">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Helical Element (GA card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_helix_editor_destroy" last_modification_time="Tue, 01 Aug 2006 07:43:24 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox10">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">2</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame16">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkTable" id="table9">
+	      <property name="visible">True</property>
+	      <property name="n_rows">7</property>
+	      <property name="n_columns">4</property>
+	      <property name="homogeneous">False</property>
+	      <property name="row_spacing">2</property>
+	      <property name="column_spacing">2</property>
+
+	      <child>
+		<widget class="GtkLabel" id="label72">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Segments/Turn</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label73">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Segs % lambda</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label75">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Turns Spacing</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label76">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Helix Length</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">True</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label77">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Radius @ X,Z=0</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label78">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Rad. @ X,Z=HL</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">5</property>
+		  <property name="bottom_attach">6</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label79">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Rad. @ Y,Z=HL</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">5</property>
+		  <property name="bottom_attach">6</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label80">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Wire Diameter</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">5</property>
+		  <property name="bottom_attach">6</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="helix_tagnum_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">0</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">1 1 100000 1 10 0</property>
+		  <signal name="value_changed" handler="on_helix_tagnum_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 07:05:59 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="helix_numseg_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">0</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">8 1 100000 1 10 0</property>
+		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 17:34:39 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="helix_pcl_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">5 0.0010000000475 30 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_helix_pcl_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 07:06:22 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="helix_tspace_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">1 0 10000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 17:34:15 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">4</property>
+		  <property name="bottom_attach">5</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="helix_len_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">5 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 17:33:39 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">4</property>
+		  <property name="bottom_attach">5</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="helix_radxzo_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 08:34:20 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">4</property>
+		  <property name="bottom_attach">5</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="helix_dia_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">0.00300000002608 9.99999974738e-06 100 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 08:35:15 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">6</property>
+		  <property name="bottom_attach">7</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="helix_radyzhl_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 08:34:55 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">6</property>
+		  <property name="bottom_attach">7</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="helix_radxzhl_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 08:35:35 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">6</property>
+		  <property name="bottom_attach">7</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label81">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Tag Number</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="helix_nturns_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">8 0.10000000149 10000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_helix_nturns_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 07:06:36 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">2</property>
+		  <property name="bottom_attach">3</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label82">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Num. of Turns</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">1</property>
+		  <property name="bottom_attach">2</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label83">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Radius @ Y,Z=0</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">3</property>
+		  <property name="bottom_attach">4</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="helix_radyzo_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_helix_data_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 08:35:46 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">4</property>
+		  <property name="bottom_attach">5</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkLabel" id="label84">
+		  <property name="visible">True</property>
+		  <property name="label" translatable="yes">Conductivity S/m</property>
+		  <property name="use_underline">False</property>
+		  <property name="use_markup">False</property>
+		  <property name="justify">GTK_JUSTIFY_LEFT</property>
+		  <property name="wrap">False</property>
+		  <property name="selectable">False</property>
+		  <property name="xalign">0.10000000149</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xpad">0</property>
+		  <property name="ypad">0</property>
+		  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		  <property name="width_chars">-1</property>
+		  <property name="single_line_mode">False</property>
+		  <property name="angle">0</property>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">5</property>
+		  <property name="bottom_attach">6</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkSpinButton" id="helix_res_spinbutton">
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="climb_rate">0.00999999977648</property>
+		  <property name="digits">5</property>
+		  <property name="numeric">True</property>
+		  <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		  <property name="snap_to_ticks">False</property>
+		  <property name="wrap">False</property>
+		  <property name="adjustment">0 0 1000000000 9.99999974738e-06 10 0</property>
+		  <signal name="value_changed" handler="on_helix_res_spinbutton_value_changed" last_modification_time="Tue, 01 Aug 2006 07:09:23 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">6</property>
+		  <property name="bottom_attach">7</property>
+		  <property name="x_padding">2</property>
+		  <property name="y_padding">4</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkRadioButton" id="helix_linkzo_radiobutton">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Link @ Z=0</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <signal name="toggled" handler="on_helix_linkzo_radiobutton_toggled" last_modification_time="Tue, 01 Aug 2006 18:18:11 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">2</property>
+		  <property name="right_attach">3</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkRadioButton" id="helix_linkzhl_radiobutton">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Link @ Z=HL</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <property name="group">helix_linkzo_radiobutton</property>
+		  <signal name="toggled" handler="on_helix_linkzhl_radiobutton_toggled" last_modification_time="Tue, 01 Aug 2006 18:18:17 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">3</property>
+		  <property name="right_attach">4</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkRadioButton" id="helix_linkall_radiobutton">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Link all Radii</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">True</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <property name="group">helix_linkzo_radiobutton</property>
+		  <signal name="toggled" handler="on_helix_linkall_radiobutton_toggled" last_modification_time="Tue, 01 Aug 2006 18:18:05 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">1</property>
+		  <property name="right_attach">2</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+
+	      <child>
+		<widget class="GtkCheckButton" id="helix_lh_checkbutton">
+		  <property name="border_width">2</property>
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Left Hand</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">False</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <signal name="toggled" handler="on_helix_lh_checkbutton_toggled" last_modification_time="Tue, 01 Aug 2006 06:22:08 GMT"/>
+		</widget>
+		<packing>
+		  <property name="left_attach">0</property>
+		  <property name="right_attach">1</property>
+		  <property name="top_attach">0</property>
+		  <property name="bottom_attach">1</property>
+		  <property name="x_options">fill</property>
+		  <property name="y_options"></property>
+		</packing>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label85">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">GH Card</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">2</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox26">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">2</property>
+
+	  <child>
+	    <widget class="GtkButton" id="helix_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_helix_new_button_clicked" last_modification_time="Tue, 01 Aug 2006 07:10:09 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="helix_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_helix_cancel_button_clicked" last_modification_time="Tue, 01 Aug 2006 07:10:22 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment54">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox52">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image74">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label226">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="helix_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_helix_apply_button_clicked" last_modification_time="Tue, 01 Aug 2006 07:10:33 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="helix_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_default">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_helix_ok_button_clicked" last_modification_time="Tue, 01 Aug 2006 07:10:46 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="reflect_editor">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Reflect Structure (GX card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_reflect_editor_destroy" last_modification_time="Fri, 04 Aug 2006 09:47:36 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox11">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame17">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment19">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table11">
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">8</property>
+		  <property name="column_spacing">8</property>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="reflect_y_checkbutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Reflect in XZ plane</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_reflect_checkbutton_toggled" last_modification_time="Fri, 04 Aug 2006 07:43:05 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="reflect_taginc_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">1</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 0 100000 1 10 0</property>
+		      <signal name="value_changed" handler="on_reflect_taginc_spinbutton_value_changed" last_modification_time="Fri, 25 Aug 2006 14:41:57 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="reflect_z_checkbutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Reflect in XY plane</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_reflect_checkbutton_toggled" last_modification_time="Fri, 04 Aug 2006 07:43:30 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="reflect_x_checkbutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Reflect in YZ plane</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_reflect_checkbutton_toggled" last_modification_time="Fri, 04 Aug 2006 07:43:20 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label91">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Tag Number Increment</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label90">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Reflect Options</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox27">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="reflect_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_reflect_new_button_clicked" last_modification_time="Fri, 04 Aug 2006 07:47:25 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="reflect_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_reflect_cancel_button_clicked" last_modification_time="Fri, 04 Aug 2006 07:47:18 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment55">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox53">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image75">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label227">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="reflect_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_reflect_apply_button_clicked" last_modification_time="Fri, 04 Aug 2006 07:47:07 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="reflect_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_reflect_ok_button_clicked" last_modification_time="Fri, 04 Aug 2006 07:46:53 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="scale_editor">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Scale Structure (GS card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_scale_editor_destroy" last_modification_time="Fri, 04 Aug 2006 13:21:55 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox12">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame18">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment20">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table35">
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">True</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label217">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Structure Scale Factor</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label220">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">From Tag No.</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label221">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">To Tag No.</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="scale_from_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 0 100000 1 10 0</property>
+		      <signal name="value_changed" handler="on_scale_spinbutton_value_changed" last_modification_time="Wed, 10 Jan 2007 09:07:00 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="scale_to_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 0 100000 1 10 0</property>
+		      <signal name="value_changed" handler="on_scale_spinbutton_value_changed" last_modification_time="Wed, 10 Jan 2007 09:07:11 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="scale_factor_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 0 100000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_scale_spinbutton_value_changed" last_modification_time="Wed, 10 Jan 2007 09:06:47 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label93">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Scale Strucure</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox28">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="scale_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_scale_new_button_clicked" last_modification_time="Fri, 04 Aug 2006 14:38:11 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="scale_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_scale_cancel_button_clicked" last_modification_time="Fri, 04 Aug 2006 13:28:15 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment56">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox54">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image76">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label228">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="scale_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_scale_apply_button_clicked" last_modification_time="Fri, 04 Aug 2006 13:28:51 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="scale_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_scale_ok_button_clicked" last_modification_time="Fri, 04 Aug 2006 13:29:14 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="cylinder_editor">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Cylindrical Structure (GR card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_cylinder_editor_destroy" last_modification_time="Sat, 05 Aug 2006 07:28:12 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox13">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame19">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment21">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table12">
+		  <property name="visible">True</property>
+		  <property name="n_rows">2</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">2</property>
+		  <property name="column_spacing">8</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label95">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Tag Number Increment</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label97">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Number of Structures</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="cylinder_taginc_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 0 100000 1 10 0</property>
+		      <signal name="value_changed" handler="on_cylinder_taginc_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 07:09:19 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="cylinder_total_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">4 1 100000 1 10 0</property>
+		      <signal name="value_changed" handler="on_cylinder_total_spinbutton_value_changed" last_modification_time="Sat, 05 Aug 2006 07:09:11 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label96">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Cylindrical Structure</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox30">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="cylinder_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_cylinder_new_button_clicked" last_modification_time="Sat, 05 Aug 2006 07:23:31 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="cylinder_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_cylinder_cancel_button_clicked" last_modification_time="Sat, 05 Aug 2006 07:23:42 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment57">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox55">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image77">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label229">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="cylinder_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_cylinder_apply_button_clicked" last_modification_time="Sat, 05 Aug 2006 07:23:53 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="cylinder_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_cylinder_ok_button_clicked" last_modification_time="Sat, 05 Aug 2006 07:24:07 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="kernel_command">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Thin Wire Kernel (EK Card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_kernel_command_destroy" last_modification_time="Tue, 08 Aug 2006 06:40:15 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox14">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame21">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment23">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkCheckButton" id="kernel_checkbutton">
+		  <property name="border_width">8</property>
+		  <property name="visible">True</property>
+		  <property name="can_focus">True</property>
+		  <property name="label" translatable="yes">Extended Thin Wire Kernel</property>
+		  <property name="use_underline">True</property>
+		  <property name="relief">GTK_RELIEF_NORMAL</property>
+		  <property name="focus_on_click">True</property>
+		  <property name="active">True</property>
+		  <property name="inconsistent">False</property>
+		  <property name="draw_indicator">True</property>
+		  <signal name="toggled" handler="on_kernel_checkbutton_toggled" last_modification_time="Tue, 08 Aug 2006 06:29:05 GMT"/>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label107">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Thin Wire Kernel</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox31">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="kernel_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_kernel_new_button_clicked" last_modification_time="Tue, 08 Aug 2006 06:29:13 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="kernel_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_kernel_cancel_button_clicked" last_modification_time="Tue, 08 Aug 2006 06:29:25 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment58">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox56">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image78">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label230">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="kernel_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_kernel_apply_button_clicked" last_modification_time="Tue, 08 Aug 2006 06:29:33 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="kernel_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_kernel_ok_button_clicked" last_modification_time="Tue, 08 Aug 2006 06:29:44 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="execute_command">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Execute Command (XQ Card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_execute_command_destroy" last_modification_time="Tue, 08 Aug 2006 06:40:03 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox15">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame20">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment22">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table14">
+		  <property name="visible">True</property>
+		  <property name="n_rows">2</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">2</property>
+		  <property name="column_spacing">2</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="execute_none_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">No Pattern Cuts</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_execute_radiobutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:31:55 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="execute_xz_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Pattern in XZ Plane</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">execute_none_radiobutton</property>
+		      <signal name="toggled" handler="on_execute_radiobutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:32:03 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="execute_yz_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Pattern in YZ Plane</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">execute_none_radiobutton</property>
+		      <signal name="toggled" handler="on_execute_radiobutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:32:12 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="execute_both_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Both XZ/YZ Patterns</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">execute_none_radiobutton</property>
+		      <signal name="toggled" handler="on_execute_radiobutton_toggled" last_modification_time="Sat, 12 Aug 2006 06:41:18 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label106">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Execute Command</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox32">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="execute_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_execute_new_button_clicked" last_modification_time="Tue, 08 Aug 2006 07:28:26 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="execute_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_execute_cancel_button_clicked" last_modification_time="Tue, 08 Aug 2006 07:28:39 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment59">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox57">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image79">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label231">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="execute_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_execute_apply_button_clicked" last_modification_time="Tue, 08 Aug 2006 07:28:46 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="execute_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_execute_ok_button_clicked" last_modification_time="Tue, 08 Aug 2006 07:28:59 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="intrange_command">
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Interaction Approx Range (KH Card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_intrange_command_destroy" last_modification_time="Tue, 08 Aug 2006 11:28:25 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox16">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame22">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment24">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox34">
+		  <property name="border_width">8</property>
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label109">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Approximation Range (W/lengths)</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.5</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="intrange_wlen_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_intrange_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:31:33 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">4</property>
+		      <property name="expand">True</property>
+		      <property name="fill">True</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label108">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Interaction Approximation Range</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox33">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="intrange_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_intrange_new_button_clicked" last_modification_time="Tue, 08 Aug 2006 08:27:05 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="intrange_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_intrange_cancel_button_clicked" last_modification_time="Tue, 08 Aug 2006 08:26:55 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment60">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox58">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image80">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label232">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="intrange_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_intrange_apply_button_clicked" last_modification_time="Tue, 08 Aug 2006 08:26:49 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="intrange_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_intrange_ok_button_clicked" last_modification_time="Tue, 08 Aug 2006 08:26:39 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="ground_command">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Ground Parameters (GN & GD Cards)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_ground_command_destroy" last_modification_time="Tue, 08 Aug 2006 08:57:08 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox17">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame23">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment25">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table15">
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">2</property>
+		  <property name="column_spacing">2</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="ground_perf_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Perfect Ground</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_ground_radiobutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:28:27 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="ground_refl_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Reflection Coeff. Approx</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">ground_perf_radiobutton</property>
+		      <signal name="toggled" handler="on_ground_radiobutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:28:35 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="ground_smfld_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Sommerfeld/Norton</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">ground_perf_radiobutton</property>
+		      <signal name="toggled" handler="on_ground_radiobutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:28:43 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="ground_null_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Nullify Previous Params</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">ground_perf_radiobutton</property>
+		      <signal name="toggled" handler="on_ground_radiobutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:28:52 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="ground_radl_checkbutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Radial Ground Screen</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_ground_checkbutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:29:15 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="ground_secmd_checkbutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Second Medium (Cliff)</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_ground_checkbutton_toggled" last_modification_time="Fri, 11 Aug 2006 08:29:06 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label110">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Ground Type</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="ground_med1_frame">
+	  <property name="border_width">4</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment26">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table16">
+		  <property name="visible">True</property>
+		  <property name="n_rows">2</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">2</property>
+		  <property name="column_spacing">2</property>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="ground_diel1_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">12 0 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:29:29 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="ground_res1_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0.005 0 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:29:38 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label116">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Relative Dielectric Const.</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label117">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Ground Conductivity S/m</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label111">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">1st Medium Parameters</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="ground_med2_frame">
+	  <property name="border_width">4</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment27">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table18">
+		  <property name="visible">True</property>
+		  <property name="n_rows">4</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">2</property>
+		  <property name="column_spacing">2</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label118">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Relative Dielectric Const.</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label123">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Ground Conductivity S/m</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label124">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Distance to 2nd Medium</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label125">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Dist. below 1st Medium</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="ground_diel2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">12 0 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:29:46 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="ground_res2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0.005 0 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:29:55 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="ground_below_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Sat, 12 Aug 2006 06:24:10 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="ground_dist2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:30:04 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label114">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">2nd Medium Parameters</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="ground_radial_frame">
+	  <property name="border_width">4</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment28">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table17">
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">2</property>
+		  <property name="column_spacing">2</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label126">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Number of Radials</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.899999976158</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label127">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Radial Screen Radius</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label128">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Radial Wire Diameter</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="ground_nrad_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">4 1 1000 1 10 0</property>
+		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:30:37 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="ground_diam_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0.00499999988824 9.99999974738e-06 10 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:31:00 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="ground_scrnrd_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_ground_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 08:30:50 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label115">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Radial Screen Parameters</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox35">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="ground_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_ground_new_button_clicked" last_modification_time="Tue, 08 Aug 2006 12:30:53 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="ground_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_ground_cancel_button_clicked" last_modification_time="Tue, 08 Aug 2006 12:31:02 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment61">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox59">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image81">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label233">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="ground_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_ground_apply_button_clicked" last_modification_time="Tue, 08 Aug 2006 12:31:13 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="ground_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_ground_ok_button_clicked" last_modification_time="Tue, 08 Aug 2006 12:31:19 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="nearfield_command">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Near Fields Command (NE/NH Cards)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_nearfield_command_destroy" last_modification_time="Fri, 11 Aug 2006 08:12:30 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox18">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame27">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment29">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table20">
+		  <property name="visible">True</property>
+		  <property name="n_rows">2</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">True</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="nearfield_nh_checkbutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Near Magnetic Field</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_nearfield_nh_checkbutton_toggled" last_modification_time="Sun, 20 Aug 2006 05:19:50 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="nearfield_ne_checkbutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Near Electric Field</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_nearfield_ne_checkbutton_toggled" last_modification_time="Sun, 20 Aug 2006 05:19:40 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="nearfield_rect_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Rectangular Co-ordinates</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_nearfield_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:58:34 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="nearfield_sph_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Spherical Co-ordinates</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">nearfield_rect_radiobutton</property>
+		      <signal name="toggled" handler="on_nearfield_radiobutton_toggled" last_modification_time="Sat, 12 Aug 2006 05:40:46 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label129">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Field Type & Co-ordinates</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame28">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment30">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table19">
+		  <property name="visible">True</property>
+		  <property name="n_rows">6</property>
+		  <property name="n_columns">3</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="nearfield_i1_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">NX</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="nearfield_i2_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">NY</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="nearfield_i3_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">NZ</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="nearfield_f1_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">X</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="nearfield_f2_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Y</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="nearfield_f3_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Z</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="nearfield_f4_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">DX</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="nearfield_f5_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">DY</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="nearfield_f6_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">DZ</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="nearfield_nx_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">4 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:55:44 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="nearfield_ny_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">4 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:55:52 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="nearfield_nz_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">4 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:56:05 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="nearfield_f1_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:56:19 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="nearfield_f2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:56:33 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="nearfield_f3_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:56:42 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="nearfield_f4_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -1000 1000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:56:50 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="nearfield_f5_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -1000 1000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:57:00 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="nearfield_f6_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -1000 1000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_nearfield_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:57:09 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label130">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Field Pattern Parameters</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox36">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="nearfield_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_nearfield_new_button_clicked" last_modification_time="Tue, 08 Aug 2006 13:37:42 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="nearfield_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_nearfield_cancel_button_clicked" last_modification_time="Tue, 08 Aug 2006 13:37:48 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment62">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox60">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image82">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label234">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="nearfield_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_nearfield_apply_button_clicked" last_modification_time="Tue, 08 Aug 2006 13:38:03 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="nearfield_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_nearfield_ok_button_clicked" last_modification_time="Tue, 08 Aug 2006 13:38:10 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="radiation_command">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Radiation Pattern (RP Card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="icon_name">gtk-dialog-info</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_radiation_command_destroy" last_modification_time="Wed, 09 Aug 2006 13:24:07 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox19">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame29">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment31">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table21">
+		  <property name="visible">True</property>
+		  <property name="n_rows">4</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_i10_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Normal (Space) Wave</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:43:16 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_i16_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Circular Cliff + Radials</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiation_i10_radiobutton</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:46:54 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_i14_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Radial wire screen</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiation_i10_radiobutton</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:46:18 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_i12_radiobutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Linear Cliff</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiation_i10_radiobutton</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:45:55 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_i11_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Space + Ground Wave</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiation_i10_radiobutton</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:45:43 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_i13_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Circular Cliff</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiation_i10_radiobutton</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:46:08 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_i15_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Linear Cliff + Radials</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiation_i10_radiobutton</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:46:29 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label145">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes"><b>See GN/GD Card Documentation</b></property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label140">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Wave Type and Ground (I1)</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame33">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment35">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table22">
+		  <property name="visible">True</property>
+		  <property name="n_rows">10</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_x0_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Major & Minor Axis & Total Gain</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:47:08 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_x1_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Vertical, Horizontal & Total Gain</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiation_x0_radiobutton</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:47:20 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_n0_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">No Normalized Gain</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:47:32 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_n2_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Minor Axis Gain Normalized</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiation_n0_radiobutton</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:47:51 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_n4_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Horizontal Axis Gain Normalized</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiation_n0_radiobutton</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:48:11 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_d0_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Print/Normalize Power Gain</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:48:28 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">6</property>
+		      <property name="bottom_attach">7</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_a0_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">No Gain Averaging</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:48:46 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">8</property>
+		      <property name="bottom_attach">9</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_a2_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Points in Average Not Printed</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiation_a0_radiobutton</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:49:03 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">9</property>
+		      <property name="bottom_attach">10</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_a1_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Average Gain Computed</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiation_a0_radiobutton</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:48:55 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">8</property>
+		      <property name="bottom_attach">9</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_d1_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Print/Normalize Directive Gain</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiation_d0_radiobutton</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:48:37 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">6</property>
+		      <property name="bottom_attach">7</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_n5_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Total Gain Normalized</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiation_n0_radiobutton</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:48:19 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_n3_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Vertical Axis Gain Normalized</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiation_n0_radiobutton</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:48:00 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="radiation_n1_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Major Axis Gain Normalized</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">radiation_n0_radiobutton</property>
+		      <signal name="toggled" handler="on_radiation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 08:47:41 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label146">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes"><b>See RP Card Documentation</b></property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">True</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">9</property>
+		      <property name="bottom_attach">10</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHSeparator" id="hseparator5">
+		      <property name="visible">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHSeparator" id="hseparator6">
+		      <property name="visible">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHSeparator" id="hseparator7">
+		      <property name="visible">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHSeparator" id="hseparator8">
+		      <property name="visible">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHSeparator" id="hseparator9">
+		      <property name="visible">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">7</property>
+		      <property name="bottom_attach">8</property>
+		      <property name="x_options">fill</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkHSeparator" id="hseparator10">
+		      <property name="visible">True</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">7</property>
+		      <property name="bottom_attach">8</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options">fill</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label144">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Data Output Control (XNDA)</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame31">
+	  <property name="border_width">5</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment33">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table23">
+		  <property name="visible">True</property>
+		  <property name="n_rows">6</property>
+		  <property name="n_columns">3</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="radiation_f6_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Gain Normalization</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="radiation_f1_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:49:46 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="radiation_f2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:49:57 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="radiation_f6_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -1000 1000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:52:04 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="radiation_f1_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Initial Theta (deg)</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label148">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Initial Phi (deg)</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="radiation_i3_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">4 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:49:46 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="radiation_i2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">4 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:49:46 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="radiation_i1_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Points in Phi</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label210">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Points in Theta</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="radiation_f3_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Increment in Theta</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="radiation_f3_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">5 -1000 1000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:50:09 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="radiation_f5_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Field Point Distance</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="radiation_f5_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -1000 1000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:50:36 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label150">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Increment in Phi</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="radiation_f4_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">5 -1000 1000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_radiation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 08:50:25 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label142">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Radiation Pattern Parameters</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox37">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="radiation_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_radiation_new_button_clicked" last_modification_time="Wed, 09 Aug 2006 13:26:01 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="radiation_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_radiation_cancel_button_clicked" last_modification_time="Wed, 09 Aug 2006 13:25:46 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment63">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox61">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image83">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label235">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="radiation_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_radiation_apply_button_clicked" last_modification_time="Wed, 09 Aug 2006 13:25:40 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="radiation_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_radiation_ok_button_clicked" last_modification_time="Wed, 09 Aug 2006 13:25:23 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="excitation_command">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Excitation Command (EX Card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_excitation_command_destroy" last_modification_time="Fri, 11 Aug 2006 08:12:19 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox20">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame34">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment36">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table24">
+		  <property name="visible">True</property>
+		  <property name="n_rows">2</property>
+		  <property name="n_columns">3</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="excitation_i10_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Voltage Source</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_excitation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 13:27:13 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="excitation_i11_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Incident Linear Wave </property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">excitation_i10_radiobutton</property>
+		      <signal name="toggled" handler="on_excitation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 13:27:41 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="excitation_i12_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Incident RH Wave</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">excitation_i10_radiobutton</property>
+		      <signal name="toggled" handler="on_excitation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 13:27:56 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="excitation_i13_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Incident LH Wave</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">excitation_i10_radiobutton</property>
+		      <signal name="toggled" handler="on_excitation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 13:28:07 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="excitation_i15_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Current Slope Discontinuity</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">excitation_i10_radiobutton</property>
+		      <signal name="toggled" handler="on_excitation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 13:28:29 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="excitation_i14_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Current Source</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">excitation_i10_radiobutton</property>
+		      <signal name="toggled" handler="on_excitation_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 13:28:18 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label153">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Excitation Type</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame35">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment37">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox39">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="excitation_i419_checkbutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Maximum Admittance Matrix Asymmetry</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_excitation_checkbutton_toggled" last_modification_time="Tue, 15 Aug 2006 07:56:58 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkCheckButton" id="excitation_i420_checkbutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Impedance of Source Segment</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_excitation_checkbutton_toggled" last_modification_time="Tue, 15 Aug 2006 07:57:08 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label154">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Print Control</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame36">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment38">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table25">
+		  <property name="visible">True</property>
+		  <property name="n_rows">6</property>
+		  <property name="n_columns">3</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="excitation_i2_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Tag Number</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="excitation_i3_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Segment Number</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="excitation_f1_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Voltage - Real Part</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="excitation_f2_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Voltage - Imaginary Part</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="excitation_f3_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Eta</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="excitation_f4_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Theta</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="excitation_f5_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Phi</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="excitation_f6_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Ratio</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="excitation_i2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:29:13 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="excitation_i3_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:29:27 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="excitation_f2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:29:48 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="excitation_f3_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:29:57 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="excitation_f4_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:30:07 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="excitation_f5_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:30:16 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="excitation_f6_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:30:25 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="excitation_f1_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_excitation_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 13:29:39 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label155">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Excitation Parameters</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox38">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="excitation_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_excitation_new_button_clicked" last_modification_time="Thu, 10 Aug 2006 13:32:39 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="excitation_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_excitation_cancel_button_clicked" last_modification_time="Thu, 10 Aug 2006 13:32:30 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment64">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox62">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image84">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label236">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="excitation_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_excitation_apply_button_clicked" last_modification_time="Thu, 10 Aug 2006 13:32:20 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="excitation_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_excitation_ok_button_clicked" last_modification_time="Thu, 10 Aug 2006 13:32:13 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="frequency_command">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Frequecy Command (FR Card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_frequency_command_destroy" last_modification_time="Fri, 11 Aug 2006 08:12:05 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox21">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame37">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment39">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkHBox" id="hbox41">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="frequency_add_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Additive Stepping</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_frequency_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 14:11:28 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="frequency_mul_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Multiplicative Stepping</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">frequency_add_radiobutton</property>
+		      <signal name="toggled" handler="on_frequency_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 14:11:38 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label165">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Frequency Stepping</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame38">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment40">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table26">
+		  <property name="visible">True</property>
+		  <property name="n_rows">4</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label167">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">No. Frequency Points</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label168">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Frequency Step (MHz)</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="frequency_num_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">11 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_frequency_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 14:11:49 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="frequency_step_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0.10000000149 -1000 1000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_frequency_step_spinbutton_value_changed" last_modification_time="Wed, 16 Aug 2006 06:38:58 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label170">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Start Frequency (MHz)</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label171">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">End Frequency (MHz)</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="frequency_start_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">50 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_frequency_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 14:12:06 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="frequency_end_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">100 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_frequency_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 14:14:12 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label166">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Frequency Stepping Parameters</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox40">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="frequency_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_frequency_new_button_clicked" last_modification_time="Thu, 10 Aug 2006 14:12:59 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="frequency_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_frequency_cancel_button_clicked" last_modification_time="Thu, 10 Aug 2006 14:13:08 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment65">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox63">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image85">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label237">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="frequency_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_frequency_apply_button_clicked" last_modification_time="Thu, 10 Aug 2006 14:13:18 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="frequency_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_frequency_ok_button_clicked" last_modification_time="Thu, 10 Aug 2006 14:13:27 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="loading_command">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Loading Command (LD Card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_loading_command_destroy" last_modification_time="Fri, 11 Aug 2006 08:11:52 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox22">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame39">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment41">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table27">
+		  <property name="visible">True</property>
+		  <property name="n_rows">3</property>
+		  <property name="n_columns">3</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="loading_slrlc_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Series, Lumped</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_loading_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 15:41:06 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="loading_pdrlc_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Parallel, Distributed</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">loading_slrlc_radiobutton</property>
+		      <signal name="toggled" handler="on_loading_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 15:40:48 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="loading_rr_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Resistance & Reactance</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">loading_slrlc_radiobutton</property>
+		      <signal name="toggled" handler="on_loading_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 15:41:37 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="loading_plrlc_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Parallel, Lumped</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">loading_slrlc_radiobutton</property>
+		      <signal name="toggled" handler="on_loading_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 15:41:29 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="loading_sdrlc_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Series, Distributed</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">loading_slrlc_radiobutton</property>
+		      <signal name="toggled" handler="on_loading_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 15:41:56 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="loading_wcon_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Wire Conductivity</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">loading_slrlc_radiobutton</property>
+		      <signal name="toggled" handler="on_loading_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 15:41:48 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="loading_null_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Short all Loads (Nulls previous Loading Cards)</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">loading_slrlc_radiobutton</property>
+		      <signal name="toggled" handler="on_loading_radiobutton_toggled" last_modification_time="Thu, 10 Aug 2006 15:40:58 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label172">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Loading Type</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="loading_frame">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment42">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table28">
+		  <property name="visible">True</property>
+		  <property name="n_rows">4</property>
+		  <property name="n_columns">3</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="loading_i2_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Load Tag Number</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="loading_i3_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">From Segment #</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="loading_i4_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">To Segment #</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="loading_f1_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Resistance</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="loading_f2_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Inductance</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="loading_f3_label">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Capacitance</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="loading_f1_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 0 1000000000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_loading_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 15:40:20 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="loading_i2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 0 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_loading_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 15:38:11 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="loading_i3_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">2 0 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_loading_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 15:38:25 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="loading_i4_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">3 0 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_loading_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 15:38:40 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="loading_f2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -1000000 1000000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_loading_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 15:39:54 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="loading_f3_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 0 1000000000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_loading_spinbutton_value_changed" last_modification_time="Thu, 10 Aug 2006 15:39:44 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">2</property>
+		      <property name="right_attach">3</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label173">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Loading Parameters</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox42">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="loading_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_loading_new_button_clicked" last_modification_time="Thu, 10 Aug 2006 15:31:15 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="loading_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_loading_cancel_button_clicked" last_modification_time="Thu, 10 Aug 2006 15:31:07 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment66">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox64">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image86">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label238">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="loading_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_loading_apply_button_clicked" last_modification_time="Thu, 10 Aug 2006 15:30:49 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="loading_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_loading_ok_button_clicked" last_modification_time="Thu, 10 Aug 2006 15:30:42 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="network_command">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Network Command (NT Card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_network_command_destroy" last_modification_time="Fri, 11 Aug 2006 08:11:42 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox23">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame41">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment43">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table29">
+		  <property name="visible">True</property>
+		  <property name="n_rows">4</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label184">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Tag Number, Port 2  </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="network_i4_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:15:33 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="network_i1_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:14:27 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="network_i2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:14:41 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label183">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Segment Num, Port 1</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label182">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Tag Number, Port 1  </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label185">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Segment Num, Port 2</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="network_i3_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">2 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:15:15 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label180">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Segment Identity</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame42">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment44">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table30">
+		  <property name="visible">True</property>
+		  <property name="n_rows">6</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label186">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Element 1,1 Real Part</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label187">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Element 1,1 Imag Part</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label189">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Element 1,2 Real Part</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label190">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Element 1,2 Imag Part</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="network_f3_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:17:25 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="network_f4_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:17:35 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label191">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Element 2,2 Real Part</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label192">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Element 2,2 Imag Part</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="network_f1_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:17:05 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="network_f2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:17:15 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="network_f6_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:17:55 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="network_f5_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_network_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:17:46 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label181">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Admittance Matrix Elements</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox43">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="network_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_network_new_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:18:05 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="network_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_network_cancel_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:18:25 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment67">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox65">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image87">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label239">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="network_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_network_apply_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:18:37 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="network_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_network_ok_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:18:45 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="txline_command">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Trans. Line Command (TL Card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_txline_command_destroy" last_modification_time="Fri, 11 Aug 2006 08:11:29 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox24">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame43">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment45">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table31">
+		  <property name="visible">True</property>
+		  <property name="n_rows">4</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="txline_i4_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:39:54 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="txline_i1_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:39:10 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="txline_i2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:39:25 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label194">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Segment Num, End 1</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label195">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Tag Number, End 1  </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label196">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Segment Num, End 2</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="txline_i3_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">0</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">2 1 10000 1 10 0</property>
+		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:39:37 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label193">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Tag Number, End 2  </property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label197">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Segment Identity</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkFrame" id="frame44">
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment46">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table32">
+		  <property name="visible">True</property>
+		  <property name="n_rows">6</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">0</property>
+		  <property name="column_spacing">0</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label198">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Characteristic Impedance</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">4</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label199">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Length of Tx Line (m)</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">4</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label200">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">End 1 Y Real Part (S)</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label201">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">End 1 Y Imag Part (S)</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="txline_f3_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:40:44 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="txline_f4_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:40:56 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label202">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">End 2 Y Real Part (S)</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label203">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">End 2 Y Imag Part (S)</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0.10000000149</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">4</property>
+		      <property name="bottom_attach">5</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="txline_f1_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:40:19 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="txline_f2_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:40:33 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="txline_f6_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:41:19 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="txline_f5_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 -10000 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_txline_spinbutton_value_changed" last_modification_time="Fri, 11 Aug 2006 07:41:08 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">5</property>
+		      <property name="bottom_attach">6</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkCheckButton" id="txline_crossed_checkbutton">
+	      <property name="border_width">4</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label" translatable="yes">Crossed Transmission Line</property>
+	      <property name="use_underline">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <property name="active">False</property>
+	      <property name="inconsistent">False</property>
+	      <property name="draw_indicator">True</property>
+	      <signal name="toggled" handler="on_txline_checkbutton_toggled" last_modification_time="Sat, 12 Aug 2006 05:51:26 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox44">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="txline_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_txline_new_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:41:45 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="txline_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_txline_cancel_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:41:55 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment68">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox66">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image88">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label240">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="txline_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_txline_apply_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:42:05 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="txline_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_txline_ok_button_clicked" last_modification_time="Fri, 11 Aug 2006 07:42:17 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="ground2_command">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Ground Parameters (GD Card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_ground2_command_destroy" last_modification_time="Fri, 18 Aug 2006 10:54:46 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox25">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame45">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment47">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkTable" id="table33">
+		  <property name="visible">True</property>
+		  <property name="n_rows">4</property>
+		  <property name="n_columns">2</property>
+		  <property name="homogeneous">False</property>
+		  <property name="row_spacing">2</property>
+		  <property name="column_spacing">2</property>
+
+		  <child>
+		    <widget class="GtkLabel" id="label204">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Relative Dielectric Const.</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label205">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Ground Conductivity S/m</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">0</property>
+		      <property name="bottom_attach">1</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label206">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Distance to 2nd Medium</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkLabel" id="label207">
+		      <property name="visible">True</property>
+		      <property name="label" translatable="yes">Dist. below 1st Medium</property>
+		      <property name="use_underline">False</property>
+		      <property name="use_markup">False</property>
+		      <property name="justify">GTK_JUSTIFY_LEFT</property>
+		      <property name="wrap">False</property>
+		      <property name="selectable">False</property>
+		      <property name="xalign">0</property>
+		      <property name="yalign">0.5</property>
+		      <property name="xpad">0</property>
+		      <property name="ypad">0</property>
+		      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+		      <property name="width_chars">-1</property>
+		      <property name="single_line_mode">False</property>
+		      <property name="angle">0</property>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">2</property>
+		      <property name="bottom_attach">3</property>
+		      <property name="x_options">fill</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="ground2_diel_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">12 0 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_ground2_spinbutton_value_changed" last_modification_time="Fri, 18 Aug 2006 11:05:02 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="ground2_res_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">0.005 0 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_ground2_spinbutton_value_changed" last_modification_time="Fri, 18 Aug 2006 12:13:38 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">1</property>
+		      <property name="bottom_attach">2</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="ground2_below_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_ground2_spinbutton_value_changed" last_modification_time="Fri, 18 Aug 2006 11:04:48 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">1</property>
+		      <property name="right_attach">2</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkSpinButton" id="ground2_dist_spinbutton">
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="climb_rate">0.00999999977648</property>
+		      <property name="digits">5</property>
+		      <property name="numeric">True</property>
+		      <property name="update_policy">GTK_UPDATE_ALWAYS</property>
+		      <property name="snap_to_ticks">False</property>
+		      <property name="wrap">False</property>
+		      <property name="adjustment">1 9.99999974738e-06 10000 9.99999974738e-06 10 0</property>
+		      <signal name="value_changed" handler="on_ground2_spinbutton_value_changed" last_modification_time="Fri, 18 Aug 2006 11:04:56 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="left_attach">0</property>
+		      <property name="right_attach">1</property>
+		      <property name="top_attach">3</property>
+		      <property name="bottom_attach">4</property>
+		      <property name="x_padding">2</property>
+		      <property name="y_padding">4</property>
+		      <property name="y_options"></property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label208">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">2nd Medium Parameters</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox45">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="ground2_new_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-new</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_ground2_new_button_clicked" last_modification_time="Fri, 18 Aug 2006 11:07:21 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="ground2_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_ground2_cancel_button_clicked" last_modification_time="Fri, 18 Aug 2006 11:07:29 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment69">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox67">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image89">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label241">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="ground2_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_ground2_apply_button_clicked" last_modification_time="Fri, 18 Aug 2006 11:07:06 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="ground2_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_ground2_ok_button_clicked" last_modification_time="Fri, 18 Aug 2006 11:06:59 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkWindow" id="gend_editor">
+  <property name="border_width">4</property>
+  <property name="visible">True</property>
+  <property name="title" translatable="yes">Geometry End (GE Card)</property>
+  <property name="type">GTK_WINDOW_TOPLEVEL</property>
+  <property name="window_position">GTK_WIN_POS_NONE</property>
+  <property name="modal">False</property>
+  <property name="resizable">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="decorated">True</property>
+  <property name="skip_taskbar_hint">False</property>
+  <property name="skip_pager_hint">False</property>
+  <property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
+  <property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
+  <property name="focus_on_map">True</property>
+  <property name="urgency_hint">False</property>
+  <signal name="destroy" handler="on_gend_editor_destroy" last_modification_time="Tue, 22 Aug 2006 07:30:16 GMT"/>
+
+  <child>
+    <widget class="GtkVBox" id="vbox26">
+      <property name="visible">True</property>
+      <property name="homogeneous">False</property>
+      <property name="spacing">0</property>
+
+      <child>
+	<widget class="GtkFrame" id="frame46">
+	  <property name="border_width">4</property>
+	  <property name="visible">True</property>
+	  <property name="label_xalign">0</property>
+	  <property name="label_yalign">0.5</property>
+	  <property name="shadow_type">GTK_SHADOW_ETCHED_IN</property>
+
+	  <child>
+	    <widget class="GtkAlignment" id="alignment48">
+	      <property name="visible">True</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xscale">1</property>
+	      <property name="yscale">1</property>
+	      <property name="top_padding">0</property>
+	      <property name="bottom_padding">0</property>
+	      <property name="left_padding">12</property>
+	      <property name="right_padding">0</property>
+
+	      <child>
+		<widget class="GtkVBox" id="vbox27">
+		  <property name="visible">True</property>
+		  <property name="homogeneous">False</property>
+		  <property name="spacing">0</property>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="gend_nognd_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">No Ground, Free Space condition</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">True</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <signal name="toggled" handler="on_gend_radiobutton_toggled" last_modification_time="Tue, 22 Aug 2006 06:15:39 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">True</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="gend_img_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Ground present, Strucure reflection</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">gend_nognd_radiobutton</property>
+		      <signal name="toggled" handler="on_gend_radiobutton_toggled" last_modification_time="Tue, 22 Aug 2006 06:16:02 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+
+		  <child>
+		    <widget class="GtkRadioButton" id="gend_noimg_radiobutton">
+		      <property name="border_width">2</property>
+		      <property name="visible">True</property>
+		      <property name="can_focus">True</property>
+		      <property name="label" translatable="yes">Ground present, no Structure reflection</property>
+		      <property name="use_underline">True</property>
+		      <property name="relief">GTK_RELIEF_NORMAL</property>
+		      <property name="focus_on_click">True</property>
+		      <property name="active">False</property>
+		      <property name="inconsistent">False</property>
+		      <property name="draw_indicator">True</property>
+		      <property name="group">gend_nognd_radiobutton</property>
+		      <signal name="toggled" handler="on_gend_radiobutton_toggled" last_modification_time="Tue, 22 Aug 2006 06:16:20 GMT"/>
+		    </widget>
+		    <packing>
+		      <property name="padding">0</property>
+		      <property name="expand">False</property>
+		      <property name="fill">False</property>
+		    </packing>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	  </child>
+
+	  <child>
+	    <widget class="GtkLabel" id="label211">
+	      <property name="visible">True</property>
+	      <property name="label" translatable="yes">Ground Plane type</property>
+	      <property name="use_underline">False</property>
+	      <property name="use_markup">False</property>
+	      <property name="justify">GTK_JUSTIFY_LEFT</property>
+	      <property name="wrap">False</property>
+	      <property name="selectable">False</property>
+	      <property name="xalign">0.5</property>
+	      <property name="yalign">0.5</property>
+	      <property name="xpad">4</property>
+	      <property name="ypad">4</property>
+	      <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+	      <property name="width_chars">-1</property>
+	      <property name="single_line_mode">False</property>
+	      <property name="angle">0</property>
+	    </widget>
+	    <packing>
+	      <property name="type">label_item</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">True</property>
+	  <property name="fill">True</property>
+	</packing>
+      </child>
+
+      <child>
+	<widget class="GtkHBox" id="hbox46">
+	  <property name="visible">True</property>
+	  <property name="homogeneous">True</property>
+	  <property name="spacing">0</property>
+
+	  <child>
+	    <widget class="GtkButton" id="gend_cancel_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_gend_cancel_button_clicked" last_modification_time="Tue, 22 Aug 2006 06:17:10 GMT"/>
+
+	      <child>
+		<widget class="GtkAlignment" id="alignment70">
+		  <property name="visible">True</property>
+		  <property name="xalign">0.5</property>
+		  <property name="yalign">0.5</property>
+		  <property name="xscale">0</property>
+		  <property name="yscale">0</property>
+		  <property name="top_padding">0</property>
+		  <property name="bottom_padding">0</property>
+		  <property name="left_padding">0</property>
+		  <property name="right_padding">0</property>
+
+		  <child>
+		    <widget class="GtkHBox" id="hbox68">
+		      <property name="visible">True</property>
+		      <property name="homogeneous">False</property>
+		      <property name="spacing">2</property>
+
+		      <child>
+			<widget class="GtkImage" id="image90">
+			  <property name="visible">True</property>
+			  <property name="stock">gtk-delete</property>
+			  <property name="icon_size">4</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+
+		      <child>
+			<widget class="GtkLabel" id="label242">
+			  <property name="visible">True</property>
+			  <property name="label">Delete Card</property>
+			  <property name="use_underline">True</property>
+			  <property name="use_markup">False</property>
+			  <property name="justify">GTK_JUSTIFY_LEFT</property>
+			  <property name="wrap">False</property>
+			  <property name="selectable">False</property>
+			  <property name="xalign">0.5</property>
+			  <property name="yalign">0.5</property>
+			  <property name="xpad">0</property>
+			  <property name="ypad">0</property>
+			  <property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
+			  <property name="width_chars">-1</property>
+			  <property name="single_line_mode">False</property>
+			  <property name="angle">0</property>
+			</widget>
+			<packing>
+			  <property name="padding">0</property>
+			  <property name="expand">False</property>
+			  <property name="fill">False</property>
+			</packing>
+		      </child>
+		    </widget>
+		  </child>
+		</widget>
+	      </child>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="gend_apply_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-apply</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_gend_apply_button_clicked" last_modification_time="Tue, 22 Aug 2006 06:17:16 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+
+	  <child>
+	    <widget class="GtkButton" id="gend_ok_button">
+	      <property name="border_width">2</property>
+	      <property name="visible">True</property>
+	      <property name="can_focus">True</property>
+	      <property name="label">gtk-ok</property>
+	      <property name="use_stock">True</property>
+	      <property name="relief">GTK_RELIEF_NORMAL</property>
+	      <property name="focus_on_click">True</property>
+	      <signal name="clicked" handler="on_gend_ok_button_clicked" last_modification_time="Tue, 22 Aug 2006 06:17:32 GMT"/>
+	    </widget>
+	    <packing>
+	      <property name="padding">0</property>
+	      <property name="expand">True</property>
+	      <property name="fill">True</property>
+	    </packing>
+	  </child>
+	</widget>
+	<packing>
+	  <property name="padding">0</property>
+	  <property name="expand">False</property>
+	  <property name="fill">False</property>
+	</packing>
+      </child>
+    </widget>
+  </child>
+</widget>
+
+<widget class="GtkAboutDialog" id="aboutdialog">
+  <property name="border_width">5</property>
+  <property name="visible">True</property>
+  <property name="destroy_with_parent">False</property>
+  <property name="name" translatable="yes">Xnec2c</property>
+  <property name="copyright" translatable="yes">(C) 2007-2010 Neoklis Kyriazis</property>
+  <property name="comments" translatable="yes">xnec2c is an interactive graphical wrapper around a modified version of nec2c, which is itself a translation to C of the original FORTRAN NEC2 Numerical Electromagnetics Code.
+
+xnec2c can display frequency-dependent data (gain, input impedance, vswr etc) in a graphical format. It can also display radiation pattern data in a rotatable wire frame format and near-field (E, H, S vectors) in a grid format.
+
+xnec2c has a built-in NEC2 input file editor that makes it easier to create or edit antenna description files and specify NEC2 commands.
+
+PLEASE read the documantation in the doc/ sub-directory as xnec2c is not fully compatible with NEC2 input files and it works in different ways!</property>
+  <property name="license" translatable="yes">GPL v2 or higher</property>
+  <property name="wrap_license">False</property>
+  <property name="website">http://www.qsl.net/5b4az</property>
+  <property name="authors">Neoklis Kyriazis
+Ham Radio Call: 5B4AZ
+http://www.qsl.net/5b4az</property>
+  <property name="documenters">Neoklis Kyriazis</property>
+  <property name="translator_credits" translatable="yes" comments="TRANSLATORS: Replace this string with your names, one name per line.">translator-credits</property>
+  <signal name="close" handler="on_aboutdialog_close" last_modification_time="Tue, 27 Nov 2007 07:13:44 GMT"/>
+  <signal name="response" handler="on_aboutdialog_response" last_modification_time="Tue, 27 Nov 2007 07:42:36 GMT"/>
+</widget>
+
+</glade-interface>
diff --git a/xnec2c.gladep b/xnec2c.gladep
new file mode 100644
index 0000000..212a661
--- /dev/null
+++ b/xnec2c.gladep
@@ -0,0 +1,8 @@
+<?xml version="1.0" standalone="no"?> <!--*- mode: xml -*-->
+<!DOCTYPE glade-project SYSTEM "http://glade.gnome.org/glade-project-2.0.dtd">
+
+<glade-project>
+  <name>Xnec2c</name>
+  <program_name>xnec2c</program_name>
+  <gnome_support>FALSE</gnome_support>
+</glade-project>

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



More information about the pkg-hamradio-commits mailing list