Sentinel commit pointing at new location in Chromium.
diff --git a/BUILD.gn b/BUILD.gn
deleted file mode 100644
index 8c34f50..0000000
--- a/BUILD.gn
+++ /dev/null
@@ -1,103 +0,0 @@
-# Copyright 2014 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-config("hunspell_config") {
-  defines = [
-    "HUNSPELL_STATIC",
-    "HUNSPELL_CHROME_CLIENT",
-    "USE_HUNSPELL",
-  ]
-}
-
-source_set("hunspell") {
-  sources = [
-    "google/bdict.cc",
-    "google/bdict.h",
-    "google/bdict_reader.cc",
-    "google/bdict_reader.h",
-    "google/bdict_writer.cc",
-    "google/bdict_writer.h",
-    "src/hunspell/affentry.cxx",
-    "src/hunspell/affentry.hxx",
-    "src/hunspell/affixmgr.cxx",
-    "src/hunspell/affixmgr.hxx",
-    "src/hunspell/atypes.hxx",
-    "src/hunspell/baseaffix.hxx",
-    "src/hunspell/csutil.cxx",
-    "src/hunspell/csutil.hxx",
-    "src/hunspell/dictmgr.cxx",
-    "src/hunspell/dictmgr.hxx",
-    "src/hunspell/filemgr.cxx",
-    "src/hunspell/filemgr.hxx",
-    "src/hunspell/hashmgr.cxx",
-    "src/hunspell/hashmgr.hxx",
-    "src/hunspell/htypes.hxx",
-    "src/hunspell/hunspell.cxx",
-    "src/hunspell/hunspell.h",
-    "src/hunspell/hunspell.hxx",
-    "src/hunspell/hunzip.cxx",
-    "src/hunspell/hunzip.hxx",
-    "src/hunspell/langnum.hxx",
-    "src/hunspell/phonet.cxx",
-    "src/hunspell/phonet.hxx",
-    "src/hunspell/replist.cxx",
-    "src/hunspell/replist.hxx",
-    "src/hunspell/suggestmgr.cxx",
-    "src/hunspell/suggestmgr.hxx",
-    "src/hunspell/utf_info.hxx",
-    "src/hunspell/w_char.hxx",
-    "src/parsers/textparser.cxx",
-    "src/parsers/textparser.hxx",
-  ]
-
-  configs -= [ "//build/config/compiler:chromium_code" ]
-  configs += [ "//build/config/compiler:no_chromium_code" ]
-  direct_dependent_configs = [
-    ":hunspell_config",
-  ]
-
-  defines = [
-    "OPENOFFICEORG",
-  ]
-
-  deps = [
-    "//base",
-    "//third_party/icu"
-  ]
-
-  cflags = []
-
-  if (is_win) {
-    cflags += [
-      # TODO(jschuh): http://crbug.com/167187 size_t -> int
-      "/wd4267",
-    ]
-  }
-
-  if (is_posix && !is_mac) {
-    cflags += [
-      "-Wno-unused-value",
-      "-Wno-unused-variable",
-      "-Wno-write-strings",
-    ]
-  }
-
-  if (is_posix && !is_mac && !is_ios) {
-    cflags += [
-      # affentry.hxx has NULL as default parameter for a FLAG in two
-      # places.
-      "-Wno-conversion-null",
-    ]
-  }
-
-  if (is_clang) {
-    cflags += [
-      # affentry.cxx has one `while ((p = nextchar(p)));` parsing loop.
-      "-Wno-empty-body",
-      # affentry.hxx has NULL as default parameter for a FLAG in two
-      # places.
-      "-Wno-null-conversion",
-    ]
-  }
-}
diff --git a/COPYING b/COPYING
deleted file mode 100644
index 5bede4f..0000000
--- a/COPYING
+++ /dev/null
@@ -1,12 +0,0 @@
-GPL 2.0/LGPL 2.1/MPL 1.1 tri-license
-
-The contents of this software may be used under the terms of
-the GNU General Public License Version 2 or later (the "GPL"), or
-the GNU Lesser General Public License Version 2.1 or later (the "LGPL",
-see COPYING.LGPL) or (excepting the LGPLed GNU gettext library in the
-intl/ directory) the Mozilla Public License Version 1.1 or later
-(the "MPL", see COPYING.MPL).
-
-Software distributed under these licenses is distributed on an "AS IS" basis,
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the licences
-for the specific language governing rights and limitations under the licenses.
diff --git a/COPYING.LGPL b/COPYING.LGPL
deleted file mode 100644
index c4792dd..0000000
--- a/COPYING.LGPL
+++ /dev/null
@@ -1,515 +0,0 @@
-
-                  GNU LESSER GENERAL PUBLIC LICENSE
-                       Version 2.1, February 1999
-
- Copyright (C) 1991, 1999 Free Software Foundation, Inc.
-     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-[This is the first released version of the Lesser GPL.  It also counts
- as the successor of the GNU Library Public License, version 2, hence
- the version number 2.1.]
-
-                            Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-Licenses are intended to guarantee your freedom to share and change
-free software--to make sure the software is free for all its users.
-
-  This license, the Lesser General Public License, applies to some
-specially designated software packages--typically libraries--of the
-Free Software Foundation and other authors who decide to use it.  You
-can use it too, but we suggest you first think carefully about whether
-this license or the ordinary General Public License is the better
-strategy to use in any particular case, based on the explanations
-below.
-
-  When we speak of free software, we are referring to freedom of use,
-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 this service if you wish); that you receive source code or can get
-it if you want it; that you can change the software and use pieces of
-it in new free programs; and that you are informed that you can do
-these things.
-
-  To protect your rights, we need to make restrictions that forbid
-distributors to deny you these rights or to ask you to surrender these
-rights.  These restrictions translate to certain responsibilities for
-you if you distribute copies of the library or if you modify it.
-
-  For example, if you distribute copies of the library, whether gratis
-or for a fee, you must give the recipients all the rights that we gave
-you.  You must make sure that they, too, receive or can get the source
-code.  If you link other code with the library, you must provide
-complete object files to the recipients, so that they can relink them
-with the library after making changes to the library and recompiling
-it.  And you must show them these terms so they know their rights.
-
-  We protect your rights with a two-step method: (1) we copyright the
-library, and (2) we offer you this license, which gives you legal
-permission to copy, distribute and/or modify the library.
-
-  To protect each distributor, we want to make it very clear that
-there is no warranty for the free library.  Also, if the library is
-modified by someone else and passed on, the recipients should know
-that what they have is not the original version, so that the original
-author's reputation will not be affected by problems that might be
-introduced by others.
-^L
-  Finally, software patents pose a constant threat to the existence of
-any free program.  We wish to make sure that a company cannot
-effectively restrict the users of a free program by obtaining a
-restrictive license from a patent holder.  Therefore, we insist that
-any patent license obtained for a version of the library must be
-consistent with the full freedom of use specified in this license.
-
-  Most GNU software, including some libraries, is covered by the
-ordinary GNU General Public License.  This license, the GNU Lesser
-General Public License, applies to certain designated libraries, and
-is quite different from the ordinary General Public License.  We use
-this license for certain libraries in order to permit linking those
-libraries into non-free programs.
-
-  When a program is linked with a library, whether statically or using
-a shared library, the combination of the two is legally speaking a
-combined work, a derivative of the original library.  The ordinary
-General Public License therefore permits such linking only if the
-entire combination fits its criteria of freedom.  The Lesser General
-Public License permits more lax criteria for linking other code with
-the library.
-
-  We call this license the "Lesser" General Public License because it
-does Less to protect the user's freedom than the ordinary General
-Public License.  It also provides other free software developers Less
-of an advantage over competing non-free programs.  These disadvantages
-are the reason we use the ordinary General Public License for many
-libraries.  However, the Lesser license provides advantages in certain
-special circumstances.
-
-  For example, on rare occasions, there may be a special need to
-encourage the widest possible use of a certain library, so that it
-becomes
-a de-facto standard.  To achieve this, non-free programs must be
-allowed to use the library.  A more frequent case is that a free
-library does the same job as widely used non-free libraries.  In this
-case, there is little to gain by limiting the free library to free
-software only, so we use the Lesser General Public License.
-
-  In other cases, permission to use a particular library in non-free
-programs enables a greater number of people to use a large body of
-free software.  For example, permission to use the GNU C Library in
-non-free programs enables many more people to use the whole GNU
-operating system, as well as its variant, the GNU/Linux operating
-system.
-
-  Although the Lesser General Public License is Less protective of the
-users' freedom, it does ensure that the user of a program that is
-linked with the Library has the freedom and the wherewithal to run
-that program using a modified version of the Library.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.  Pay close attention to the difference between a
-"work based on the library" and a "work that uses the library".  The
-former contains code derived from the library, whereas the latter must
-be combined with the library in order to run.
-^L
-                  GNU LESSER GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License Agreement applies to any software library or other
-program which contains a notice placed by the copyright holder or
-other authorized party saying it may be distributed under the terms of
-this Lesser General Public License (also called "this License").
-Each licensee is addressed as "you".
-
-  A "library" means a collection of software functions and/or data
-prepared so as to be conveniently linked with application programs
-(which use some of those functions and data) to form executables.
-
-  The "Library", below, refers to any such software library or work
-which has been distributed under these terms.  A "work based on the
-Library" means either the Library or any derivative work under
-copyright law: that is to say, a work containing the Library or a
-portion of it, either verbatim or with modifications and/or translated
-straightforwardly into another language.  (Hereinafter, translation is
-included without limitation in the term "modification".)
-
-  "Source code" for a work means the preferred form of the work for
-making modifications to it.  For a library, complete source code means
-all the source code for all modules it contains, plus any associated
-interface definition files, plus the scripts used to control
-compilation
-and installation of the library.
-
-  Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running a program using the Library is not restricted, and output from
-such a program is covered only if its contents constitute a work based
-on the Library (independent of the use of the Library in a tool for
-writing it).  Whether that is true depends on what the Library does
-and what the program that uses the Library does.
-
-  1. You may copy and distribute verbatim copies of the Library's
-complete source code as you receive it, in any medium, provided that
-you conspicuously and appropriately publish on each copy an
-appropriate copyright notice and disclaimer of warranty; keep intact
-all the notices that refer to this License and to the absence of any
-warranty; and distribute a copy of this License along with the
-Library.
-
-  You may charge a fee for the physical act of transferring a copy,
-and you may at your option offer warranty protection in exchange for a
-fee.
-
-  2. You may modify your copy or copies of the Library or any portion
-of it, thus forming a work based on the Library, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) The modified work must itself be a software library.
-
-    b) You must cause the files modified to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    c) You must cause the whole of the work to be licensed at no
-    charge to all third parties under the terms of this License.
-
-    d) If a facility in the modified Library refers to a function or a
-    table of data to be supplied by an application program that uses
-    the facility, other than as an argument passed when the facility
-    is invoked, then you must make a good faith effort to ensure that,
-    in the event an application does not supply such function or
-    table, the facility still operates, and performs whatever part of
-    its purpose remains meaningful.
-
-    (For example, a function in a library to compute square roots has
-    a purpose that is entirely well-defined independent of the
-    application.  Therefore, Subsection 2d requires that any
-    application-supplied function or table used by this function must
-    be optional: if the application does not supply it, the square
-    root function must still compute square roots.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Library,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Library, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote
-it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Library.
-
-In addition, mere aggregation of another work not based on the Library
-with the Library (or with a work based on the Library) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may opt to apply the terms of the ordinary GNU General Public
-License instead of this License to a given copy of the Library.  To do
-this, you must alter all the notices that refer to this License, so
-that they refer to the ordinary GNU General Public License, version 2,
-instead of to this License.  (If a newer version than version 2 of the
-ordinary GNU General Public License has appeared, then you can specify
-that version instead if you wish.)  Do not make any other change in
-these notices.
-^L
-  Once this change is made in a given copy, it is irreversible for
-that copy, so the ordinary GNU General Public License applies to all
-subsequent copies and derivative works made from that copy.
-
-  This option is useful when you wish to copy part of the code of
-the Library into a program that is not a library.
-
-  4. You may copy and distribute the Library (or a portion or
-derivative of it, under Section 2) in object code or executable form
-under the terms of Sections 1 and 2 above provided that you accompany
-it with the complete corresponding machine-readable source code, which
-must be distributed under the terms of Sections 1 and 2 above on a
-medium customarily used for software interchange.
-
-  If distribution of object code is made by offering access to copy
-from a designated place, then offering equivalent access to copy the
-source code from the same place satisfies the requirement to
-distribute the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  5. A program that contains no derivative of any portion of the
-Library, but is designed to work with the Library by being compiled or
-linked with it, is called a "work that uses the Library".  Such a
-work, in isolation, is not a derivative work of the Library, and
-therefore falls outside the scope of this License.
-
-  However, linking a "work that uses the Library" with the Library
-creates an executable that is a derivative of the Library (because it
-contains portions of the Library), rather than a "work that uses the
-library".  The executable is therefore covered by this License.
-Section 6 states terms for distribution of such executables.
-
-  When a "work that uses the Library" uses material from a header file
-that is part of the Library, the object code for the work may be a
-derivative work of the Library even though the source code is not.
-Whether this is true is especially significant if the work can be
-linked without the Library, or if the work is itself a library.  The
-threshold for this to be true is not precisely defined by law.
-
-  If such an object file uses only numerical parameters, data
-structure layouts and accessors, and small macros and small inline
-functions (ten lines or less in length), then the use of the object
-file is unrestricted, regardless of whether it is legally a derivative
-work.  (Executables containing this object code plus portions of the
-Library will still fall under Section 6.)
-
-  Otherwise, if the work is a derivative of the Library, you may
-distribute the object code for the work under the terms of Section 6.
-Any executables containing that work also fall under Section 6,
-whether or not they are linked directly with the Library itself.
-^L
-  6. As an exception to the Sections above, you may also combine or
-link a "work that uses the Library" with the Library to produce a
-work containing portions of the Library, and distribute that work
-under terms of your choice, provided that the terms permit
-modification of the work for the customer's own use and reverse
-engineering for debugging such modifications.
-
-  You must give prominent notice with each copy of the work that the
-Library is used in it and that the Library and its use are covered by
-this License.  You must supply a copy of this License.  If the work
-during execution displays copyright notices, you must include the
-copyright notice for the Library among them, as well as a reference
-directing the user to the copy of this License.  Also, you must do one
-of these things:
-
-    a) Accompany the work with the complete corresponding
-    machine-readable source code for the Library including whatever
-    changes were used in the work (which must be distributed under
-    Sections 1 and 2 above); and, if the work is an executable linked
-    with the Library, with the complete machine-readable "work that
-    uses the Library", as object code and/or source code, so that the
-    user can modify the Library and then relink to produce a modified
-    executable containing the modified Library.  (It is understood
-    that the user who changes the contents of definitions files in the
-    Library will not necessarily be able to recompile the application
-    to use the modified definitions.)
-
-    b) Use a suitable shared library mechanism for linking with the
-    Library.  A suitable mechanism is one that (1) uses at run time a
-    copy of the library already present on the user's computer system,
-    rather than copying library functions into the executable, and (2)
-    will operate properly with a modified version of the library, if
-    the user installs one, as long as the modified version is
-    interface-compatible with the version that the work was made with.
-
-    c) Accompany the work with a written offer, valid for at
-    least three years, to give the same user the materials
-    specified in Subsection 6a, above, for a charge no more
-    than the cost of performing this distribution.
-
-    d) If distribution of the work is made by offering access to copy
-    from a designated place, offer equivalent access to copy the above
-    specified materials from the same place.
-
-    e) Verify that the user has already received a copy of these
-    materials or that you have already sent this user a copy.
-
-  For an executable, the required form of the "work that uses the
-Library" must include any data and utility programs needed for
-reproducing the executable from it.  However, as a special exception,
-the materials to be distributed need not include anything that is
-normally distributed (in either source or binary form) with the major
-components (compiler, kernel, and so on) of the operating system on
-which the executable runs, unless that component itself accompanies
-the executable.
-
-  It may happen that this requirement contradicts the license
-restrictions of other proprietary libraries that do not normally
-accompany the operating system.  Such a contradiction means you cannot
-use both them and the Library together in an executable that you
-distribute.
-^L
-  7. You may place library facilities that are a work based on the
-Library side-by-side in a single library together with other library
-facilities not covered by this License, and distribute such a combined
-library, provided that the separate distribution of the work based on
-the Library and of the other library facilities is otherwise
-permitted, and provided that you do these two things:
-
-    a) Accompany the combined library with a copy of the same work
-    based on the Library, uncombined with any other library
-    facilities.  This must be distributed under the terms of the
-    Sections above.
-
-    b) Give prominent notice with the combined library of the fact
-    that part of it is a work based on the Library, and explaining
-    where to find the accompanying uncombined form of the same work.
-
-  8. You may not copy, modify, sublicense, link with, or distribute
-the Library except as expressly provided under this License.  Any
-attempt otherwise to copy, modify, sublicense, link with, or
-distribute the Library is void, and will automatically terminate your
-rights under this License.  However, parties who have received copies,
-or rights, from you under this License will not have their licenses
-terminated so long as such parties remain in full compliance.
-
-  9. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Library or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Library (or any work based on the
-Library), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Library or works based on it.
-
-  10. Each time you redistribute the Library (or any work based on the
-Library), the recipient automatically receives a license from the
-original licensor to copy, distribute, link with or modify the Library
-subject to these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties with
-this License.
-^L
-  11. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-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
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Library at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Library by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Library.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply, and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  12. If the distribution and/or use of the Library is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Library under this License
-may add an explicit geographical distribution limitation excluding those
-countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  13. The Free Software Foundation may publish revised and/or new
-versions of the Lesser 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 Library
-specifies a version number of this License which applies to it and
-"any later version", you have the option of following the terms and
-conditions either of that version or of any later version published by
-the Free Software Foundation.  If the Library does not specify a
-license version number, you may choose any version ever published by
-the Free Software Foundation.
-^L
-  14. If you wish to incorporate parts of the Library into other free
-programs whose distribution conditions are incompatible with these,
-write to the author to ask for permission.  For software which is
-copyrighted by the Free Software Foundation, write to the Free
-Software Foundation; we sometimes make exceptions for this.  Our
-decision will be guided by the two goals of preserving the free status
-of all derivatives of our free software and of promoting the sharing
-and reuse of software generally.
-
-                            NO WARRANTY
-
-  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
-WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
-EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
-OTHER PARTIES PROVIDE THE LIBRARY "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
-LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
-THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
-  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
-WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
-AND/OR REDISTRIBUTE THE LIBRARY 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
-LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
-SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
-DAMAGES.
-
-                     END OF TERMS AND CONDITIONS
-^L
-           How to Apply These Terms to Your New Libraries
-
-  If you develop a new library, and you want it to be of the greatest
-possible use to the public, we recommend making it free software that
-everyone can redistribute and change.  You can do so by permitting
-redistribution under these terms (or, alternatively, under the terms
-of the ordinary General Public License).
-
-  To apply these terms, attach the following notices to the library.
-It is safest to attach them to the start of each source file to most
-effectively convey 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 library's name and a brief idea of what it
-does.>
-    Copyright (C) <year>  <name of author>
-
-    This library is free software; you can redistribute it and/or
-    modify it under the terms of the GNU Lesser General Public
-    License as published by the Free Software Foundation; either
-    version 2 of the License, or (at your option) any later version.
-
-    This library 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
-    Lesser General Public License for more details.
-
-    You should have received a copy of the GNU Lesser General Public
-    License along with this library; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307  USA
-
-Also add information on how to contact you by electronic and paper
-mail.
-
-You should also get your employer (if you work as a programmer) or
-your
-school, if any, to sign a "copyright disclaimer" for the library, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the
-  library `Frob' (a library for tweaking knobs) written by James
-Random Hacker.
-
-  <signature of Ty Coon>, 1 April 1990
-  Ty Coon, President of Vice
-
-That's all there is to it!
-
-
diff --git a/COPYING.MPL b/COPYING.MPL
deleted file mode 100644
index 7714141..0000000
--- a/COPYING.MPL
+++ /dev/null
@@ -1,470 +0,0 @@
-                          MOZILLA PUBLIC LICENSE
-                                Version 1.1
-
-                              ---------------
-
-1. Definitions.
-
-     1.0.1. "Commercial Use" means distribution or otherwise making the
-     Covered Code available to a third party.
-
-     1.1. "Contributor" means each entity that creates or contributes to
-     the creation of Modifications.
-
-     1.2. "Contributor Version" means the combination of the Original
-     Code, prior Modifications used by a Contributor, and the Modifications
-     made by that particular Contributor.
-
-     1.3. "Covered Code" means the Original Code or Modifications or the
-     combination of the Original Code and Modifications, in each case
-     including portions thereof.
-
-     1.4. "Electronic Distribution Mechanism" means a mechanism generally
-     accepted in the software development community for the electronic
-     transfer of data.
-
-     1.5. "Executable" means Covered Code in any form other than Source
-     Code.
-
-     1.6. "Initial Developer" means the individual or entity identified
-     as the Initial Developer in the Source Code notice required by Exhibit
-     A.
-
-     1.7. "Larger Work" means a work which combines Covered Code or
-     portions thereof with code not governed by the terms of this License.
-
-     1.8. "License" means this document.
-
-     1.8.1. "Licensable" means having the right to grant, to the maximum
-     extent possible, whether at the time of the initial grant or
-     subsequently acquired, any and all of the rights conveyed herein.
-
-     1.9. "Modifications" means any addition to or deletion from the
-     substance or structure of either the Original Code or any previous
-     Modifications. When Covered Code is released as a series of files, a
-     Modification is:
-          A. Any addition to or deletion from the contents of a file
-          containing Original Code or previous Modifications.
-
-          B. Any new file that contains any part of the Original Code or
-          previous Modifications.
-
-     1.10. "Original Code" means Source Code of computer software code
-     which is described in the Source Code notice required by Exhibit A as
-     Original Code, and which, at the time of its release under this
-     License is not already Covered Code governed by this License.
-
-     1.10.1. "Patent Claims" means any patent claim(s), now owned or
-     hereafter acquired, including without limitation,  method, process,
-     and apparatus claims, in any patent Licensable by grantor.
-
-     1.11. "Source Code" means the preferred form of the Covered Code for
-     making modifications to it, including all modules it contains, plus
-     any associated interface definition files, scripts used to control
-     compilation and installation of an Executable, or source code
-     differential comparisons against either the Original Code or another
-     well known, available Covered Code of the Contributor's choice. The
-     Source Code can be in a compressed or archival form, provided the
-     appropriate decompression or de-archiving software is widely available
-     for no charge.
-
-     1.12. "You" (or "Your")  means an individual or a legal entity
-     exercising rights under, and complying with all of the terms of, this
-     License or a future version of this License issued under Section 6.1.
-     For legal entities, "You" includes any entity which controls, is
-     controlled by, or is under common control with You. For purposes of
-     this definition, "control" means (a) the power, direct or indirect,
-     to cause the direction or management of such entity, whether by
-     contract or otherwise, or (b) ownership of more than fifty percent
-     (50%) of the outstanding shares or beneficial ownership of such
-     entity.
-
-2. Source Code License.
-
-     2.1. The Initial Developer Grant.
-     The Initial Developer hereby grants You a world-wide, royalty-free,
-     non-exclusive license, subject to third party intellectual property
-     claims:
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Initial Developer to use, reproduce,
-          modify, display, perform, sublicense and distribute the Original
-          Code (or portions thereof) with or without Modifications, and/or
-          as part of a Larger Work; and
-
-          (b) under Patents Claims infringed by the making, using or
-          selling of Original Code, to make, have made, use, practice,
-          sell, and offer for sale, and/or otherwise dispose of the
-          Original Code (or portions thereof).
-
-          (c) the licenses granted in this Section 2.1(a) and (b) are
-          effective on the date Initial Developer first distributes
-          Original Code under the terms of this License.
-
-          (d) Notwithstanding Section 2.1(b) above, no patent license is
-          granted: 1) for code that You delete from the Original Code; 2)
-          separate from the Original Code;  or 3) for infringements caused
-          by: i) the modification of the Original Code or ii) the
-          combination of the Original Code with other software or devices.
-
-     2.2. Contributor Grant.
-     Subject to third party intellectual property claims, each Contributor
-     hereby grants You a world-wide, royalty-free, non-exclusive license
-
-          (a)  under intellectual property rights (other than patent or
-          trademark) Licensable by Contributor, to use, reproduce, modify,
-          display, perform, sublicense and distribute the Modifications
-          created by such Contributor (or portions thereof) either on an
-          unmodified basis, with other Modifications, as Covered Code
-          and/or as part of a Larger Work; and
-
-          (b) under Patent Claims infringed by the making, using, or
-          selling of  Modifications made by that Contributor either alone
-          and/or in combination with its Contributor Version (or portions
-          of such combination), to make, use, sell, offer for sale, have
-          made, and/or otherwise dispose of: 1) Modifications made by that
-          Contributor (or portions thereof); and 2) the combination of
-          Modifications made by that Contributor with its Contributor
-          Version (or portions of such combination).
-
-          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
-          effective on the date Contributor first makes Commercial Use of
-          the Covered Code.
-
-          (d)    Notwithstanding Section 2.2(b) above, no patent license is
-          granted: 1) for any code that Contributor has deleted from the
-          Contributor Version; 2)  separate from the Contributor Version;
-          3)  for infringements caused by: i) third party modifications of
-          Contributor Version or ii)  the combination of Modifications made
-          by that Contributor with other software  (except as part of the
-          Contributor Version) or other devices; or 4) under Patent Claims
-          infringed by Covered Code in the absence of Modifications made by
-          that Contributor.
-
-3. Distribution Obligations.
-
-     3.1. Application of License.
-     The Modifications which You create or to which You contribute are
-     governed by the terms of this License, including without limitation
-     Section 2.2. The Source Code version of Covered Code may be
-     distributed only under the terms of this License or a future version
-     of this License released under Section 6.1, and You must include a
-     copy of this License with every copy of the Source Code You
-     distribute. You may not offer or impose any terms on any Source Code
-     version that alters or restricts the applicable version of this
-     License or the recipients' rights hereunder. However, You may include
-     an additional document offering the additional rights described in
-     Section 3.5.
-
-     3.2. Availability of Source Code.
-     Any Modification which You create or to which You contribute must be
-     made available in Source Code form under the terms of this License
-     either on the same media as an Executable version or via an accepted
-     Electronic Distribution Mechanism to anyone to whom you made an
-     Executable version available; and if made available via Electronic
-     Distribution Mechanism, must remain available for at least twelve (12)
-     months after the date it initially became available, or at least six
-     (6) months after a subsequent version of that particular Modification
-     has been made available to such recipients. You are responsible for
-     ensuring that the Source Code version remains available even if the
-     Electronic Distribution Mechanism is maintained by a third party.
-
-     3.3. Description of Modifications.
-     You must cause all Covered Code to which You contribute to contain a
-     file documenting the changes You made to create that Covered Code and
-     the date of any change. You must include a prominent statement that
-     the Modification is derived, directly or indirectly, from Original
-     Code provided by the Initial Developer and including the name of the
-     Initial Developer in (a) the Source Code, and (b) in any notice in an
-     Executable version or related documentation in which You describe the
-     origin or ownership of the Covered Code.
-
-     3.4. Intellectual Property Matters
-          (a) Third Party Claims.
-          If Contributor has knowledge that a license under a third party's
-          intellectual property rights is required to exercise the rights
-          granted by such Contributor under Sections 2.1 or 2.2,
-          Contributor must include a text file with the Source Code
-          distribution titled "LEGAL" which describes the claim and the
-          party making the claim in sufficient detail that a recipient will
-          know whom to contact. If Contributor obtains such knowledge after
-          the Modification is made available as described in Section 3.2,
-          Contributor shall promptly modify the LEGAL file in all copies
-          Contributor makes available thereafter and shall take other steps
-          (such as notifying appropriate mailing lists or newsgroups)
-          reasonably calculated to inform those who received the Covered
-          Code that new knowledge has been obtained.
-
-          (b) Contributor APIs.
-          If Contributor's Modifications include an application programming
-          interface and Contributor has knowledge of patent licenses which
-          are reasonably necessary to implement that API, Contributor must
-          also include this information in the LEGAL file.
-
-               (c)    Representations.
-          Contributor represents that, except as disclosed pursuant to
-          Section 3.4(a) above, Contributor believes that Contributor's
-          Modifications are Contributor's original creation(s) and/or
-          Contributor has sufficient rights to grant the rights conveyed by
-          this License.
-
-     3.5. Required Notices.
-     You must duplicate the notice in Exhibit A in each file of the Source
-     Code.  If it is not possible to put such notice in a particular Source
-     Code file due to its structure, then You must include such notice in a
-     location (such as a relevant directory) where a user would be likely
-     to look for such a notice.  If You created one or more Modification(s)
-     You may add your name as a Contributor to the notice described in
-     Exhibit A.  You must also duplicate this License in any documentation
-     for the Source Code where You describe recipients' rights or ownership
-     rights relating to Covered Code.  You may choose to offer, and to
-     charge a fee for, warranty, support, indemnity or liability
-     obligations to one or more recipients of Covered Code. However, You
-     may do so only on Your own behalf, and not on behalf of the Initial
-     Developer or any Contributor. You must make it absolutely clear than
-     any such warranty, support, indemnity or liability obligation is
-     offered by You alone, and You hereby agree to indemnify the Initial
-     Developer and every Contributor for any liability incurred by the
-     Initial Developer or such Contributor as a result of warranty,
-     support, indemnity or liability terms You offer.
-
-     3.6. Distribution of Executable Versions.
-     You may distribute Covered Code in Executable form only if the
-     requirements of Section 3.1-3.5 have been met for that Covered Code,
-     and if You include a notice stating that the Source Code version of
-     the Covered Code is available under the terms of this License,
-     including a description of how and where You have fulfilled the
-     obligations of Section 3.2. The notice must be conspicuously included
-     in any notice in an Executable version, related documentation or
-     collateral in which You describe recipients' rights relating to the
-     Covered Code. You may distribute the Executable version of Covered
-     Code or ownership rights under a license of Your choice, which may
-     contain terms different from this License, provided that You are in
-     compliance with the terms of this License and that the license for the
-     Executable version does not attempt to limit or alter the recipient's
-     rights in the Source Code version from the rights set forth in this
-     License. If You distribute the Executable version under a different
-     license You must make it absolutely clear that any terms which differ
-     from this License are offered by You alone, not by the Initial
-     Developer or any Contributor. You hereby agree to indemnify the
-     Initial Developer and every Contributor for any liability incurred by
-     the Initial Developer or such Contributor as a result of any such
-     terms You offer.
-
-     3.7. Larger Works.
-     You may create a Larger Work by combining Covered Code with other code
-     not governed by the terms of this License and distribute the Larger
-     Work as a single product. In such a case, You must make sure the
-     requirements of this License are fulfilled for the Covered Code.
-
-4. Inability to Comply Due to Statute or Regulation.
-
-     If it is impossible for You to comply with any of the terms of this
-     License with respect to some or all of the Covered Code due to
-     statute, judicial order, or regulation then You must: (a) comply with
-     the terms of this License to the maximum extent possible; and (b)
-     describe the limitations and the code they affect. Such description
-     must be included in the LEGAL file described in Section 3.4 and must
-     be included with all distributions of the Source Code. Except to the
-     extent prohibited by statute or regulation, such description must be
-     sufficiently detailed for a recipient of ordinary skill to be able to
-     understand it.
-
-5. Application of this License.
-
-     This License applies to code to which the Initial Developer has
-     attached the notice in Exhibit A and to related Covered Code.
-
-6. Versions of the License.
-
-     6.1. New Versions.
-     Netscape Communications Corporation ("Netscape") may publish revised
-     and/or new versions of the License from time to time. Each version
-     will be given a distinguishing version number.
-
-     6.2. Effect of New Versions.
-     Once Covered Code has been published under a particular version of the
-     License, You may always continue to use it under the terms of that
-     version. You may also choose to use such Covered Code under the terms
-     of any subsequent version of the License published by Netscape. No one
-     other than Netscape has the right to modify the terms applicable to
-     Covered Code created under this License.
-
-     6.3. Derivative Works.
-     If You create or use a modified version of this License (which you may
-     only do in order to apply it to code which is not already Covered Code
-     governed by this License), You must (a) rename Your license so that
-     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
-     "MPL", "NPL" or any confusingly similar phrase do not appear in your
-     license (except to note that your license differs from this License)
-     and (b) otherwise make it clear that Your version of the license
-     contains terms which differ from the Mozilla Public License and
-     Netscape Public License. (Filling in the name of the Initial
-     Developer, Original Code or Contributor in the notice described in
-     Exhibit A shall not of themselves be deemed to be modifications of
-     this License.)
-
-7. DISCLAIMER OF WARRANTY.
-
-     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
-     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
-     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
-     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
-     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
-     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
-     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
-     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
-     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
-     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
-
-8. TERMINATION.
-
-     8.1.  This License and the rights granted hereunder will terminate
-     automatically if You fail to comply with terms herein and fail to cure
-     such breach within 30 days of becoming aware of the breach. All
-     sublicenses to the Covered Code which are properly granted shall
-     survive any termination of this License. Provisions which, by their
-     nature, must remain in effect beyond the termination of this License
-     shall survive.
-
-     8.2.  If You initiate litigation by asserting a patent infringement
-     claim (excluding declatory judgment actions) against Initial Developer
-     or a Contributor (the Initial Developer or Contributor against whom
-     You file such action is referred to as "Participant")  alleging that:
-
-     (a)  such Participant's Contributor Version directly or indirectly
-     infringes any patent, then any and all rights granted by such
-     Participant to You under Sections 2.1 and/or 2.2 of this License
-     shall, upon 60 days notice from Participant terminate prospectively,
-     unless if within 60 days after receipt of notice You either: (i)
-     agree in writing to pay Participant a mutually agreeable reasonable
-     royalty for Your past and future use of Modifications made by such
-     Participant, or (ii) withdraw Your litigation claim with respect to
-     the Contributor Version against such Participant.  If within 60 days
-     of notice, a reasonable royalty and payment arrangement are not
-     mutually agreed upon in writing by the parties or the litigation claim
-     is not withdrawn, the rights granted by Participant to You under
-     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
-     the 60 day notice period specified above.
-
-     (b)  any software, hardware, or device, other than such Participant's
-     Contributor Version, directly or indirectly infringes any patent, then
-     any rights granted to You by such Participant under Sections 2.1(b)
-     and 2.2(b) are revoked effective as of the date You first made, used,
-     sold, distributed, or had made, Modifications made by that
-     Participant.
-
-     8.3.  If You assert a patent infringement claim against Participant
-     alleging that such Participant's Contributor Version directly or
-     indirectly infringes any patent where such claim is resolved (such as
-     by license or settlement) prior to the initiation of patent
-     infringement litigation, then the reasonable value of the licenses
-     granted by such Participant under Sections 2.1 or 2.2 shall be taken
-     into account in determining the amount or value of any payment or
-     license.
-
-     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
-     all end user license agreements (excluding distributors and resellers)
-     which have been validly granted by You or any distributor hereunder
-     prior to termination shall survive termination.
-
-9. LIMITATION OF LIABILITY.
-
-     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
-     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
-     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
-     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
-     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
-     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
-     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
-     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
-     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
-     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
-     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
-     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
-     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
-     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
-
-10. U.S. GOVERNMENT END USERS.
-
-     The Covered Code is a "commercial item," as that term is defined in
-     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
-     software" and "commercial computer software documentation," as such
-     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
-     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
-     all U.S. Government End Users acquire Covered Code with only those
-     rights set forth herein.
-
-11. MISCELLANEOUS.
-
-     This License represents the complete agreement concerning subject
-     matter hereof. If any provision of this License is held to be
-     unenforceable, such provision shall be reformed only to the extent
-     necessary to make it enforceable. This License shall be governed by
-     California law provisions (except to the extent applicable law, if
-     any, provides otherwise), excluding its conflict-of-law provisions.
-     With respect to disputes in which at least one party is a citizen of,
-     or an entity chartered or registered to do business in the United
-     States of America, any litigation relating to this License shall be
-     subject to the jurisdiction of the Federal Courts of the Northern
-     District of California, with venue lying in Santa Clara County,
-     California, with the losing party responsible for costs, including
-     without limitation, court costs and reasonable attorneys' fees and
-     expenses. The application of the United Nations Convention on
-     Contracts for the International Sale of Goods is expressly excluded.
-     Any law or regulation which provides that the language of a contract
-     shall be construed against the drafter shall not apply to this
-     License.
-
-12. RESPONSIBILITY FOR CLAIMS.
-
-     As between Initial Developer and the Contributors, each party is
-     responsible for claims and damages arising, directly or indirectly,
-     out of its utilization of rights under this License and You agree to
-     work with Initial Developer and Contributors to distribute such
-     responsibility on an equitable basis. Nothing herein is intended or
-     shall be deemed to constitute any admission of liability.
-
-13. MULTIPLE-LICENSED CODE.
-
-     Initial Developer may designate portions of the Covered Code as
-     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
-     Developer permits you to utilize portions of the Covered Code under
-     Your choice of the NPL or the alternative licenses, if any, specified
-     by the Initial Developer in the file described in Exhibit A.
-
-EXHIBIT A -Mozilla Public License.
-
-     ``The contents of this file are subject to the Mozilla Public License
-     Version 1.1 (the "License"); you may not use this file except in
-     compliance with the License. You may obtain a copy of the License at
-     http://www.mozilla.org/MPL/
-
-     Software distributed under the License is distributed on an "AS IS"
-     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
-     License for the specific language governing rights and limitations
-     under the License.
-
-     The Original Code is ______________________________________.
-
-     The Initial Developer of the Original Code is ________________________.
-     Portions created by ______________________ are Copyright (C) ______
-     _______________________. All Rights Reserved.
-
-     Contributor(s): ______________________________________.
-
-     Alternatively, the contents of this file may be used under the terms
-     of the _____ license (the  "[___] License"), in which case the
-     provisions of [______] License are applicable instead of those
-     above.  If you wish to allow use of your version of this file only
-     under the terms of the [____] License and not to allow others to use
-     your version of this file under the MPL, indicate your decision by
-     deleting  the provisions above and replace  them with the notice and
-     other provisions required by the [___] License.  If you do not delete
-     the provisions above, a recipient may use your version of this file
-     under either the MPL or the [___] License."
-
-     [NOTE: The text of this Exhibit A may differ slightly from the text of
-     the notices in the Source Code files of the Original Code. You should
-     use the text of this Exhibit A rather than the text found in the
-     Original Code Source Code for Your Modifications.]
-
diff --git a/README b/README
index ee34e26..d4cd4f3 100644
--- a/README
+++ b/README
@@ -1,179 +1,2 @@
-About Hunspell
---------------
-
-Hunspell is a spell checker and morphological analyzer library and program
-designed for languages with rich morphology and complex word compounding or
-character encoding. Hunspell interfaces: Ispell-like terminal interface
-using Curses library, Ispell pipe interface, OpenOffice.org UNO module.
-
-Hunspell's code base comes from the OpenOffice.org MySpell
-(http://lingucomponent.openoffice.org/MySpell-3.zip). See README.MYSPELL,
-AUTHORS.MYSPELL and license.myspell files.
-Hunspell is designed to eventually replace Myspell in OpenOffice.org.
-
-Main features of Hunspell spell checker and morphological analyzer:
-
-- Unicode support (affix rules work only with the first 65535 Unicode characters)
-
-- Morphological analysis (in custom item and arrangement style) and stemming
-
-- Max. 65535 affix classes and twofold affix stripping (for agglutinative
-  languages, like Azeri, Basque, Estonian, Finnish, Hungarian, Turkish, etc.)
-
-- Support complex compoundings (for example, Hungarian and German)
-
-- Support language specific features (for example, special casing of
-  Azeri and Turkish dotted i, or German sharp s)
-
-- Handle conditional affixes, circumfixes, fogemorphemes,
-  forbidden words, pseudoroots and homonyms.
-
-- Free software (LGPL, GPL, MPL tri-license)
-
-Compiling on Unix/Linux
------------------------
-
-./configure
-make
-make install
-
-For dictionary development, use the --with-warnings option of configure.
-
-For interactive user interface of Hunspell executable, use the --with-ui option.
-
-The developer packages you need to compile Hunspell's interface:
-
-glibc-devel
-
-optional developer packages:
-
-ncurses (need for --with-ui)
-readline (for fancy input line editing,
-  configure parameter: --with-readline)
-locale and gettext (but you can also use the
-  --with-included-gettext configure parameter)
-
-Hunspell distribution uses new Autoconf (2.59) and Automake (1.9).
-
-Compiling on Windows
---------------------
-
-1. Compiling with Windows SDK
-
-Download the free Windows SDK of Microsoft, open a command prompt
-window and cd into hunspell/src/win_api. Use the following command
-to compile hunspell:
-
-vcbuild
-
-2. Compiling in Cygwin environment
-
-Download and install Cygwin environment for Windows with the following
-extra packages: 
-
-make
-gcc-g++ development package
-mingw development package (for cygwin.dll free native Windows compilation)
-ncurses, readline (for user interface)
-iconv (character conversion)
-
-2.1. Cygwin1.dll dependent compiling
-
-Open a Cygwin shell, cd into the hunspell root directory:
-
-./configure
-make
-make install
-
-For dictionary development, use the --with-warnings option of configure.
-
-For interactive user interface of Hunspell executable, use the --with-ui option.
-
-readline configure parameter: --with-readline (for fancy input line editing)
-
-1.2. Cygwin1.dll free compiling
-
-Open a Cygwin shell, cd into the hunspell/src/win_api and
-
-make -f Makefile.cygwin
-
-Testing
--------
-
-Testing Hunspell (see tests in tests/ subdirectory):
-
-make check
-
-or with Valgrind debugger:
-
-make check
-VALGRIND=[Valgrind_tool] make check
-
-For example:
-
-make check
-VALGRIND=memcheck make check
-
-Documentation
--------------
-
-features and dictionary format:
-man 4 hunspell
-
-man hunspell
-hunspell -h
-http://hunspell.sourceforge.net
-
-Usage
------
-
-The src/tools dictionary contains ten executables after compiling
-(or some of them are in the src/win_api):
-
-affixcompress: dictionary generation from large (millions of words) vocabularies
-  analyze: example of spell checking, stemming and morphological analysis
-  chmorph: example of automatic morphological generation and conversion
-  example: example of spell checking and suggestion
- hunspell: main program for spell checking and others (see manual)
-   hunzip: decompressor of hzip format
-     hzip: compressor of hzip format
-makealias: alias compression (Hunspell only, not back compatible with MySpell)
-    munch: dictionary generation from vocabularies (it needs an affix file, too).
-  unmunch: list all recognized words of a MySpell dictionary
-wordforms: word generation (Hunspell version of unmunch)
-
-After compiling and installing (see INSTALL) you can
-run the Hunspell spell checker (compiled with user interface)
-with a Hunspell or Myspell dictionary:
-
-hunspell -d en_US text.txt
-
-or without interface:
-
-hunspell
-hunspell -d en_UK -l <text.txt
-
-Dictionaries consist of an affix and dictionary file, see tests/
-or http://wiki.services.openoffice.org/wiki/Dictionaries.
-
-Using Hunspell library with GCC
--------------------------------
-
-Including in your program:
-#include <hunspell.hxx>
-
-Linking with Hunspell static library:
-g++ -lhunspell example.cxx 
-
-Dictionaries
-------------
-
-Myspell & Hunspell dictionaries:
-http://wiki.services.openoffice.org/wiki/Dictionaries
-
-Aspell dictionaries (need some conversion):
-ftp://ftp.gnu.org/gnu/aspell/dict
-Conversion steps: see relevant feature request at http://hunspell.sf.net.
-
-László Németh
-nemeth at OOo
+This repository has been merged directly into Chromium. You can now find it at
+https://chromium.googlesource.com/chromium/src/+/master/third_party/hunspell
diff --git a/README.chromium b/README.chromium
deleted file mode 100644
index fb9e2f2..0000000
--- a/README.chromium
+++ /dev/null
@@ -1,42 +0,0 @@
-Name: hunspell
-URL: http://hunspell.sourceforge.net/
-Version: 1.3.2
-License: MPL 1.1/GPL 2.0/LGPL 2.1
-License File: COPYING
-Security Critical: yes
-
-Description:
-This is a partial copy of Hunspell 1.3.2 with the following changes:
-* Remove '#include "config.h"' from src/hunspell/hunspell.hxx
-* Remove '#include "config.h"' from src/hunspell/license.hunspell
-* Change src/hunspell/filemgr.hxx and src/hunspell/filemgr.cxx to use
-  LineIterator.
-* Add ScopedHashEntry, which creates temporary hentry objects, to
-  src/hunspell/suggestmgr.cxx
-* Change the input params of the constructors to receive a BDICTReader instead
-  of a file path.
-* Merge http://hunspell.cvs.sourceforge.net/viewvc/hunspell/hunspell/src/hunspell/affixmgr.cxx?r1=1.40&r2=1.41
-The patch is in google.patch.
-* Add a pointer to the bdict_reader into the "SuggestMgr" so that it can use the
-  replacement table from the bdict file for the secondary suggestion mechanism.
-* Avoid crash in SuggestMgr::forgotchar_utf() and SuggestMgr::forgotchar() on
-  Windows by using a one-character larger buffer.
-* calloc buffers in SuggestMgr::lcs to avoid reads from uninintialized buffers.
-
-Chromium-specific changes are in google.patch. To update the patch, follow these
-steps, or simply run update_google_patch.sh from the commandline.
-1) Checkout hunspell:
-   $ cvs -z3 \
-         -d:pserver:anonymous@hunspell.cvs.sourceforge.net:/cvsroot/hunspell \
-         co -D "23 Mar 2012" -P hunspell
-2) Apply the existing patch:
-   $ cd hunspell
-   $ patch -p0 -i ~/src/third_party/hunspell/google.patch
-3) Make your new changes inside the CVS hunspell directory.
-4) Generate the updated patch:
-   $ cvs diff -u > ~/src/third_party/hunspell/google.patch
-
-All dictionaries used by Chromium has been checked in to the
-'third_party/hunspell_dictionaries' directory. They have several additions over
-the default myspell/hunspell dictionaries.
-(See 'third_party/hunspell_dictionaries/README.chromium' for their details.)
diff --git a/README.myspell b/README.myspell
deleted file mode 100644
index 25934ee..0000000
--- a/README.myspell
+++ /dev/null
@@ -1,69 +0,0 @@
-MySpell is a simple spell checker that uses affix 
-compression and is modelled after the spell checker
-ispell.  
-
-MySpell was written to explore how affix compression 
-can be implemented. 
-
-The Main features of MySpell are:
-
-1. written in C++ to make it easier to interface with 
-   Pspell, OpenOffice, AbiWord, etc
-
-2. it is stateless, uses no static variables and
-   should be completely reentrant with almost no 
-   ifdefs  
-
-3. it tries to be as compatible with ispell to
-   the extent it can.  It can read slightly modified 
-   versions of munched ispell dictionaries (and it 
-   comes with a munched english wordlist borrowed from 
-   Kevin Atkinson's excellent Aspell.
-
-4. it uses a heavily modified aff file format that
-   can be derived from ispell aff files but uses
-   the iso-8859-X character sets only
- 
-5. it is simple with *lots* of comments that 
-   describes how the affixes are stored
-   and tested for (based on the approach used by 
-   ispell).
-
-6. it supports improved suggestions with replacement
-   tables and ngram-scoring based mechanisms in addition
-   to the main suggestion mechanisms
-
-7. like ispell it has a BSD license (and  no 
-   advertising clause)
-
-But ... it has *no* support for adding words
-to a personal dictionary, *no* support for converting
-between various text encodings, and *no* command line
-interface (it is purely meant to be a library).
-
-It can not (in any way) replace all of the functionality
-of ispell or aspell/pspell.  It is meant as a learning
-tool for understanding affix compression and for 
-being used by front ends like OpenOffice, Abiword, etc.
-
-MySpell has been tested under Linux and Solaris
-and has the world's simplest Makefile and no 
-configure support.
-
-It does come with a simple example program that 
-spell checks some words and returns suggestions.
-
-To build a static library and an example
-program under Linux simply type:
-
-tar -zxvf myspell.tar.gz
-cd myspell2
-make
-
-To run the example program:
-./example ./en_US.aff ./en_US.dic checkme.lst
-
-Please play around with it and let me know
-what you think.
-
-Please see the file CONTRIBUTORS for more info.
diff --git a/codereview.settings b/codereview.settings
deleted file mode 100644
index a454922..0000000
--- a/codereview.settings
+++ /dev/null
@@ -1,9 +0,0 @@
-CODE_REVIEW_SERVER: codereview.chromium.org
-CC_LIST: chromium-reviews@chromium.org
-VIEW_VC: https://chromium.googlesource.com/chromium/deps/hunspell/+/
-STATUS: http://chromium-status.appspot.com/status
-TRY_ON_UPLOAD: False
-TRYSERVER_SVN_URL: svn://svn.chromium.org/chrome-try/try
-GITCL_PREUPLOAD: http://src.chromium.org/viewvc/chrome/trunk/tools/depot_tools/git-cl-upload-hook?revision=HEAD
-GITCL_PREDCOMMIT: http://src.chromium.org/viewvc/chrome/trunk/tools/depot_tools/git-cl-upload-hook?revision=HEAD
-PROJECT: chromium_deps
diff --git a/copy_dictionary_files.rules b/copy_dictionary_files.rules
deleted file mode 100644
index e69de29..0000000
--- a/copy_dictionary_files.rules
+++ /dev/null
diff --git a/google.patch b/google.patch
deleted file mode 100644
index 0134ce1..0000000
--- a/google.patch
+++ /dev/null
@@ -1,1354 +0,0 @@
-Index: src/hunspell/affixmgr.cxx
-===================================================================
-RCS file: /cvsroot/hunspell/hunspell/src/hunspell/affixmgr.cxx,v
-retrieving revision 1.41
-diff -u -r1.41 affixmgr.cxx
---- src/hunspell/affixmgr.cxx	16 Dec 2011 09:15:34 -0000	1.41
-+++ src/hunspell/affixmgr.cxx	29 May 2014 01:05:07 -0000
-@@ -14,8 +14,14 @@
- 
- #include "csutil.hxx"
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+AffixMgr::AffixMgr(hunspell::BDictReader* reader, HashMgr** ptr, int * md)
-+{
-+  bdict_reader = reader;
-+#else
- AffixMgr::AffixMgr(const char * affpath, HashMgr** ptr, int * md, const char * key) 
- {
-+#endif
-   // register hash manager and load affix data from aff file
-   pHMgr = ptr[0];
-   alldic = ptr;
-@@ -107,9 +113,17 @@
-      sFlag[i] = NULL;
-   }
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  // Define dummy parameters for parse_file() to avoid changing the parameters
-+  // of parse_file(). This may make it easier to merge the changes of the
-+  // original hunspell.
-+  const char* affpath = NULL;
-+  const char* key = NULL;
-+#else
-   for (int j=0; j < CONTSIZE; j++) {
-     contclasses[j] = 0;
-   }
-+#endif
- 
-   if (parse_file(affpath, key)) {
-      HUNSPELL_WARNING(stderr, "Failure loading aff file %s\n",affpath);
-@@ -269,6 +283,43 @@
-   char * line; // io buffers
-   char ft;     // affix type
-   
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  // open the affix file
-+  // We're always UTF-8
-+  utf8 = 1;
-+
-+  // A BDICT file stores PFX and SFX lines in a special section and it provides
-+  // a special line iterator for reading PFX and SFX lines.
-+  // We create a FileMgr object from this iterator and parse PFX and SFX lines
-+  // before parsing other lines.
-+  hunspell::LineIterator affix_iterator = bdict_reader->GetAffixLineIterator();
-+  FileMgr* iterator = new FileMgr(&affix_iterator);
-+  if (!iterator) {
-+    HUNSPELL_WARNING(stderr,
-+        "error: could not create a FileMgr from an affix line iterator.\n");
-+    return 1;
-+  }
-+
-+  while ((line = iterator->getline())) {
-+    ft = ' ';
-+    if (strncmp(line,"PFX",3) == 0) ft = complexprefixes ? 'S' : 'P';
-+    if (strncmp(line,"SFX",3) == 0) ft = complexprefixes ? 'P' : 'S';
-+    if (ft != ' ')
-+      parse_affix(line, ft, iterator, NULL);
-+  }
-+  delete iterator;
-+
-+  // Create a FileMgr object for reading lines except PFX and SFX lines.
-+  // We don't need to change the loop below since our FileMgr emulates the
-+  // original one.
-+  hunspell::LineIterator other_iterator = bdict_reader->GetOtherLineIterator();
-+  FileMgr * afflst = new FileMgr(&other_iterator);
-+  if (!afflst) {
-+    HUNSPELL_WARNING(stderr,
-+        "error: could not create a FileMgr from an other line iterator.\n");
-+    return 1;
-+  }
-+#else
-   // checking flag duplication
-   char dupflags[CONTSIZE];
-   char dupflags_ini = 1;
-@@ -282,6 +333,7 @@
-     HUNSPELL_WARNING(stderr, "error: could not open affix description file %s\n",affpath);
-     return 1;
-   }
-+#endif
- 
-   // step one is to parse the affix file building up the internal
-   // affix data structures
-@@ -291,6 +343,7 @@
-     while ((line = afflst->getline()) != NULL) {
-        mychomp(line);
- 
-+#ifndef HUNSPELL_CHROME_CLIENT
-        /* remove byte order mark */
-        if (firstline) {
-          firstline = 0;
-@@ -299,6 +352,7 @@
-             memmove(line, line+3, strlen(line+3)+1);
-          }
-        }
-+#endif
- 
-        /* parse in the keyboard string */
-        if (strncmp(line,"KEY",3) == 0) {
-@@ -545,6 +599,7 @@
-           }
-        }
- 
-+#ifndef HUNSPELL_CHROME_CLIENT
-        /* parse in the typical fault correcting table */
-        if (strncmp(line,"REP",3) == 0) {
-           if (parse_reptable(line, afflst)) {
-@@ -552,6 +607,7 @@
-              return 1;
-           }
-        }
-+#endif
- 
-        /* parse in the input conversion table */
-        if (strncmp(line,"ICONV",5) == 0) {
-@@ -699,6 +755,7 @@
-                    checksharps=1;
-        }
- 
-+#ifndef HUNSPELL_CHROME_CLIENT
-        /* parse this affix: P - prefix, S - suffix */
-        ft = ' ';
-        if (strncmp(line,"PFX",3) == 0) ft = complexprefixes ? 'S' : 'P';
-@@ -713,6 +770,7 @@
-              return 1;
-           }
-        }
-+#endif
-     }
- 
-     finishFileMgr(afflst);
-@@ -1307,6 +1365,26 @@
-   const char * r;
-   int lenr, lenp;
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  const char *pattern, *pattern2;
-+  hunspell::ReplacementIterator iterator = bdict_reader->GetReplacementIterator();
-+  while (iterator.GetNext(&pattern, &pattern2)) {
-+    r = word;
-+    lenr = strlen(pattern2);
-+    lenp = strlen(pattern);
-+
-+    // search every occurence of the pattern in the word
-+    while ((r=strstr(r, pattern)) != NULL) {
-+      strcpy(candidate, word);
-+      if (r-word + lenr + strlen(r+lenp) >= MAXLNLEN) break;
-+      strcpy(candidate+(r-word), pattern2);
-+      strcpy(candidate+(r-word)+lenr, r+lenp);
-+      if (candidate_check(candidate,strlen(candidate))) return 1;
-+      r++; // search for the next letter
-+    }
-+  }
-+
-+#else
-   if ((wl < 2) || !numrep) return 0;
- 
-   for (int i=0; i < numrep; i++ ) {
-@@ -1323,6 +1401,7 @@
-           r++; // search for the next letter
-       }
-    }
-+#endif
-    return 0;
- }
- 
-@@ -4219,6 +4298,7 @@
-              case 1: { 
-                     np++;
-                     aflag = pHMgr->decode_flag(piece);
-+#ifndef HUNSPELL_CHROME_CLIENT // We don't check for duplicates.
-                     if (((at == 'S') && (dupflags[aflag] & dupSFX)) ||
-                         ((at == 'P') && (dupflags[aflag] & dupPFX))) {
-                         HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions of an affix flag\n",
-@@ -4226,6 +4306,7 @@
-                         // return 1; XXX permissive mode for bad dictionaries
-                     }
-                     dupflags[aflag] += (char) ((at == 'S') ? dupSFX : dupPFX);
-+#endif
-                     break; 
-                     }
-              // piece 3 - is cross product indicator 
-Index: src/hunspell/affixmgr.hxx
-===================================================================
-RCS file: /cvsroot/hunspell/hunspell/src/hunspell/affixmgr.hxx,v
-retrieving revision 1.15
-diff -u -r1.15 affixmgr.hxx
---- src/hunspell/affixmgr.hxx	13 Oct 2011 13:41:54 -0000	1.15
-+++ src/hunspell/affixmgr.hxx	29 May 2014 01:05:07 -0000
-@@ -18,6 +18,40 @@
- class PfxEntry;
- class SfxEntry;
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+
-+#include <vector>
-+
-+// This class provides an implementation of the contclasses array in AffixMgr
-+// that is normally a large static array. We should almost never need more than
-+// 256 elements, so this class only allocates that much to start off with. If
-+// elements higher than that are actually used, we'll automatically expand.
-+class ContClasses {
-+ public:
-+  ContClasses() {
-+    // Pre-allocate a buffer so that typically, we'll never have to resize.
-+    EnsureSizeIs(256);
-+  }
-+
-+  char& operator[](size_t index) {
-+    EnsureSizeIs(index + 1);
-+    return data[index];
-+  }
-+
-+  void EnsureSizeIs(size_t new_size) {
-+    if (data.size() >= new_size)
-+      return;  // Nothing to do.
-+
-+    size_t old_size = data.size();
-+    data.resize(new_size);
-+    memset(&data[old_size], 0, new_size - old_size);
-+  }
-+
-+  std::vector<char> data;
-+};
-+
-+#endif  // HUNSPELL_CHROME_CLIENT
-+
- class LIBHUNSPELL_DLL_EXPORTED AffixMgr
- {
- 
-@@ -106,12 +140,20 @@
-   int                 fullstrip;
- 
-   int                 havecontclass; // boolean variable
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  ContClasses         contclasses;
-+#else
-   char                contclasses[CONTSIZE]; // flags of possible continuing classes (twofold affix)
-+#endif
- 
- public:
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  AffixMgr(hunspell::BDictReader* reader, HashMgr** ptr, int * md);
-+#else
-   AffixMgr(const char * affpath, HashMgr** ptr, int * md,
-     const char * key = NULL);
-+#endif
-   ~AffixMgr();
-   struct hentry *     affix_check(const char * word, int len,
-             const unsigned short needflag = (unsigned short) 0,
-@@ -218,6 +260,10 @@
-   int                 get_fullstrip() const;
- 
- private:
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  // Not owned by us, owned by the Hunspell object.
-+  hunspell::BDictReader* bdict_reader;
-+#endif
-   int  parse_file(const char * affpath, const char * key);
-   int  parse_flag(char * line, unsigned short * out, FileMgr * af);
-   int  parse_num(char * line, int * out, FileMgr * af);
-@@ -249,4 +295,3 @@
- };
- 
- #endif
--
-Index: src/hunspell/filemgr.cxx
-===================================================================
-RCS file: /cvsroot/hunspell/hunspell/src/hunspell/filemgr.cxx,v
-retrieving revision 1.5
-diff -u -r1.5 filemgr.cxx
---- src/hunspell/filemgr.cxx	23 Jun 2011 09:21:50 -0000	1.5
-+++ src/hunspell/filemgr.cxx	29 May 2014 01:05:07 -0000
-@@ -7,6 +7,32 @@
- 
- #include "filemgr.hxx"
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+#include "third_party/hunspell/google/bdict_reader.h"
-+
-+FileMgr::FileMgr(hunspell::LineIterator* iterator) : iterator_(iterator) {
-+}
-+
-+FileMgr::~FileMgr() {
-+}
-+
-+char * FileMgr::getline() {
-+  // Read one line from a BDICT file and store the line to our line buffer.
-+  // To emulate the original FileMgr::getline(), this function returns
-+  // the pointer to our line buffer if we can read a line without errors.
-+  // Otherwise, this function returns NULL.
-+  bool result = iterator_->AdvanceAndCopy(line_, BUFSIZE - 1);
-+  return result ? line_ : NULL;
-+}
-+
-+int FileMgr::getlinenum() {
-+  // This function is used only for displaying a line number that causes a
-+  // parser error. For a BDICT file, providing a line number doesn't help
-+  // identifying the place where causes a parser error so much since it is a
-+  // binary file. So, we just return 0.
-+  return 0;
-+}
-+#else
- int FileMgr::fail(const char * err, const char * par) {
-     fprintf(stderr, err, par);
-     return -1;
-@@ -47,3 +73,4 @@
- int FileMgr::getlinenum() {
-     return linenum;
- }
-+#endif
-Index: src/hunspell/filemgr.hxx
-===================================================================
-RCS file: /cvsroot/hunspell/hunspell/src/hunspell/filemgr.hxx,v
-retrieving revision 1.3
-diff -u -r1.3 filemgr.hxx
---- src/hunspell/filemgr.hxx	15 Apr 2010 11:22:08 -0000	1.3
-+++ src/hunspell/filemgr.hxx	29 May 2014 01:05:07 -0000
-@@ -7,6 +7,30 @@
- #include "hunzip.hxx"
- #include <stdio.h>
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+namespace hunspell {
-+class LineIterator;
-+}  // namespace hunspell
-+
-+// A class which encapsulates operations of reading a BDICT file.
-+// Chrome uses a BDICT file to compress hunspell dictionaries. A BDICT file is
-+// a binary file converted from a DIC file and an AFF file. (See
-+// "bdict_reader.h" for its format.)
-+// This class encapsulates the operations of reading a BDICT file and emulates
-+// the original FileMgr operations for AffixMgr so that it can read a BDICT
-+// file without so many changes.
-+class FileMgr {
-+ public:
-+  FileMgr(hunspell::LineIterator* iterator);
-+  ~FileMgr();
-+  char* getline();
-+  int getlinenum();
-+
-+ protected:
-+  hunspell::LineIterator* iterator_;
-+  char line_[BUFSIZE + 50]; // input buffer
-+};
-+#else
- class LIBHUNSPELL_DLL_EXPORTED FileMgr
- {
- protected:
-@@ -23,3 +47,4 @@
-     int getlinenum();
- };
- #endif
-+#endif
-Index: src/hunspell/hashmgr.cxx
-===================================================================
-RCS file: /cvsroot/hunspell/hunspell/src/hunspell/hashmgr.cxx,v
-retrieving revision 1.12
-diff -u -r1.12 hashmgr.cxx
---- src/hunspell/hashmgr.cxx	23 Jun 2011 09:21:50 -0000	1.12
-+++ src/hunspell/hashmgr.cxx	29 May 2014 01:05:07 -0000
-@@ -12,8 +12,14 @@
- 
- // build a hash table from a munched word list
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+HashMgr::HashMgr(hunspell::BDictReader* reader)
-+{
-+  bdict_reader = reader;
-+#else
- HashMgr::HashMgr(const char * tpath, const char * apath, const char * key)
- {
-+#endif
-   tablesize = 0;
-   tableptr = NULL;
-   flag_mode = FLAG_CHAR;
-@@ -31,8 +37,14 @@
-   numaliasm = 0;
-   aliasm = NULL;
-   forbiddenword = FORBIDDENWORD; // forbidden word signing flag
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  // No tables to load, just the AF lines.
-+  load_config(NULL, NULL);
-+  int ec = LoadAFLines();
-+#else
-   load_config(apath, key);
-   int ec = load_tables(tpath, key);
-+#endif
-   if (ec) {
-     /* error condition - what should we do here */
-     HUNSPELL_WARNING(stderr, "Hash Manager Error : %d\n",ec);
-@@ -91,15 +103,58 @@
-   if (ignorechars) free(ignorechars);
-   if (ignorechars_utf16) free(ignorechars_utf16);
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  EmptyHentryCache();
-+  for (std::vector<std::string*>::iterator it = pointer_to_strings_.begin();
-+       it != pointer_to_strings_.end(); ++it) {
-+    delete *it;
-+  }
-+#endif
- #ifdef MOZILLA_CLIENT
-     delete [] csconv;
- #endif
- }
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+void HashMgr::EmptyHentryCache() {
-+  // We need to delete each cache entry, and each additional one in the linked
-+  // list of homonyms.
-+  for (HEntryCache::iterator i = hentry_cache.begin();
-+       i != hentry_cache.end(); ++i) {
-+    hentry* cur = i->second;
-+    while (cur) {
-+      hentry* next = cur->next_homonym;
-+      DeleteHashEntry(cur);
-+      cur = next;
-+    }
-+  }
-+  hentry_cache.clear();
-+}
-+#endif
-+
- // lookup a root word in the hashtable
- 
- struct hentry * HashMgr::lookup(const char *word) const
- {
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  int affix_ids[hunspell::BDict::MAX_AFFIXES_PER_WORD];
-+  int affix_count = bdict_reader->FindWord(word, affix_ids);
-+  if (affix_count == 0) { // look for custom added word
-+    std::map<base::StringPiece, int>::const_iterator iter = 
-+      custom_word_to_affix_id_map_.find(word);
-+    if (iter != custom_word_to_affix_id_map_.end()) {
-+      affix_count = 1;
-+      affix_ids[0] = iter->second;
-+    }
-+  }
-+
-+  static const int kMaxWordLen = 128;
-+  static char word_buf[kMaxWordLen];
-+  // To take account of null-termination, we use upto 127.
-+  strncpy(word_buf, word, kMaxWordLen - 1);
-+
-+  return AffixIDsToHentry(word_buf, affix_ids, affix_count);
-+#else
-     struct hentry * dp;
-     if (tableptr) {
-        dp = tableptr[hash(word)];
-@@ -109,12 +164,14 @@
-        }
-     }
-     return NULL;
-+#endif
- }
- 
- // add a word to the hash table (private)
- int HashMgr::add_word(const char * word, int wbl, int wcl, unsigned short * aff,
-     int al, const char * desc, bool onlyupcase)
- {
-+#ifndef HUNSPELL_CHROME_CLIENT
-     bool upcasehomonym = false;
-     int descl = desc ? (aliasm ? sizeof(short) : strlen(desc) + 1) : 0;
-     // variable-length hash record with word and optional fields
-@@ -206,6 +263,17 @@
-     	    if (hp->astr) free(hp->astr);
-     	    free(hp);
-        }
-+#else
-+    std::map<base::StringPiece, int>::iterator iter =
-+        custom_word_to_affix_id_map_.find(word);
-+    if(iter == custom_word_to_affix_id_map_.end()) {  // word needs to be added
-+      std::string* new_string_word = new std::string(word);
-+      pointer_to_strings_.push_back(new_string_word);
-+      base::StringPiece sp(*(new_string_word));
-+      custom_word_to_affix_id_map_[sp] = 0; // no affixes for custom words
-+      return 1;
-+    }
-+#endif
-     return 0;
- }     
- 
-@@ -256,6 +324,12 @@
- // remove word (personal dictionary function for standalone applications)
- int HashMgr::remove(const char * word)
- {
-+#ifdef HUNSPELL_CHROME_CLIENT
-+    std::map<base::StringPiece, int>::iterator iter =
-+        custom_word_to_affix_id_map_.find(word);
-+    if (iter != custom_word_to_affix_id_map_.end())
-+        custom_word_to_affix_id_map_.erase(iter);
-+#else
-     struct hentry * dp = lookup(word);
-     while (dp) {
-         if (dp->alen == 0 || !TESTAFF(dp->astr, forbiddenword, dp->alen)) {
-@@ -270,6 +344,7 @@
-         }
-         dp = dp->next_homonym;
-     }
-+#endif
-     return 0;
- }
- 
-@@ -339,6 +414,44 @@
- // initialize: col=-1; hp = NULL; hp = walk_hashtable(&col, hp);
- struct hentry * HashMgr::walk_hashtable(int &col, struct hentry * hp) const
- {  
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  // Return NULL if dictionary is not valid.
-+  if (!bdict_reader->IsValid())
-+    return NULL;
-+
-+  // This function is only ever called by one place and not nested. We can
-+  // therefore keep static state between calls and use |col| as a "reset" flag
-+  // to avoid changing the API. It is set to -1 for the first call.
-+  // Allocate the iterator on the heap to prevent an exit time destructor.
-+  static hunspell::WordIterator& word_iterator =
-+      *new hunspell::WordIterator(bdict_reader->GetAllWordIterator());
-+  if (col < 0) {
-+    col = 1;
-+    word_iterator = bdict_reader->GetAllWordIterator();
-+  }
-+
-+  int affix_ids[hunspell::BDict::MAX_AFFIXES_PER_WORD];
-+  static const int kMaxWordLen = 128;
-+  static char word[kMaxWordLen];
-+  int affix_count = word_iterator.Advance(word, kMaxWordLen, affix_ids);
-+  if (affix_count == 0)
-+    return NULL;
-+  short word_len = static_cast<short>(strlen(word));
-+
-+  // Since hunspell 1.2.8, an hentry struct becomes a variable-length struct,
-+  // i.e. a struct which uses its array 'word[1]' as a variable-length array.
-+  // As noted above, this function is not nested. So, we just use a static
-+  // struct which consists of an hentry and a char[kMaxWordLen], and initialize
-+  // the static struct and return it for now.
-+  // No need to create linked lists for the extra affixes.
-+  static struct {
-+    hentry entry;
-+    char word[kMaxWordLen];
-+  } hash_entry;
-+
-+  return InitHashEntry(&hash_entry.entry, sizeof(hash_entry),
-+                       &word[0], word_len, affix_ids[0]);
-+#else
-   if (hp && hp->next != NULL) return hp->next;
-   for (col++; col < tablesize; col++) {
-     if (tableptr[col]) return tableptr[col];
-@@ -346,11 +459,13 @@
-   // null at end and reset to start
-   col = -1;
-   return NULL;
-+#endif
- }
- 
- // load a munched word list and build a hash table on the fly
- int HashMgr::load_tables(const char * tpath, const char * key)
- {
-+#ifndef HUNSPELL_CHROME_CLIENT
-   int al;
-   char * ap;
-   char * dp;
-@@ -471,6 +586,7 @@
-   }
- 
-   delete dict;
-+#endif
-   return 0;
- }
- 
-@@ -479,6 +595,9 @@
- 
- int HashMgr::hash(const char * word) const
- {
-+#ifdef HUNSPELL_CHROME_CLIENT
-+    return 0;
-+#else
-     long  hv = 0;
-     for (int i=0; i < 4  &&  *word != 0; i++)
-         hv = (hv << 8) | (*word++);
-@@ -487,6 +606,7 @@
-       hv ^= (*word++);
-     }
-     return (unsigned long) hv % tablesize;
-+#endif
- }
- 
- int HashMgr::decode_flags(unsigned short ** result, char * flags, FileMgr * af) {
-@@ -607,7 +727,12 @@
-   int firstline = 1;
-  
-   // open the affix file
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  hunspell::LineIterator iterator = bdict_reader->GetOtherLineIterator();
-+  FileMgr * afflst = new FileMgr(&iterator);
-+#else
-   FileMgr * afflst = new FileMgr(affpath, key);
-+#endif
-   if (!afflst) {
-     HUNSPELL_WARNING(stderr, "Error - could not open affix description file %s\n",affpath);
-     return 1;
-@@ -802,6 +927,121 @@
-    return 0;
- }
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+int HashMgr::LoadAFLines()
-+{
-+  utf8 = 1;  // We always use UTF-8.
-+
-+  // Read in all the AF lines which tell us the rules for each affix group ID.
-+  hunspell::LineIterator iterator = bdict_reader->GetAfLineIterator();
-+  FileMgr afflst(&iterator);
-+  while (char* line = afflst.getline()) {
-+    int rv = parse_aliasf(line, &afflst);
-+    if (rv)
-+      return rv;
-+  }
-+
-+  return 0;
-+}
-+
-+hentry* HashMgr::InitHashEntry(hentry* entry,
-+                               size_t item_size,
-+                               const char* word,
-+                               int word_length,
-+                               int affix_index) const {
-+  // Return if the given buffer doesn't have enough space for a hentry struct
-+  // or the given word is too long.
-+  // Our BDICT cannot handle words longer than (128 - 1) bytes. So, it is
-+  // better to return an error if the given word is too long and prevent
-+  // an unexpected result caused by a long word.
-+  const int kMaxWordLen = 128;
-+  if (item_size < sizeof(hentry) + word_length + 1 ||
-+      word_length >= kMaxWordLen)
-+    return NULL;
-+
-+  // Initialize a hentry struct with the given parameters, and
-+  // append the given string at the end of this hentry struct.
-+  memset(entry, 0, item_size);
-+  FileMgr af(NULL);
-+  entry->alen = static_cast<short>(
-+      const_cast<HashMgr*>(this)->get_aliasf(affix_index, &entry->astr, &af));
-+  entry->blen = static_cast<unsigned char>(word_length);
-+  memcpy(&entry->word, word, word_length);
-+
-+  return entry;
-+}
-+
-+hentry* HashMgr::CreateHashEntry(const char* word,
-+                                 int word_length,
-+                                 int affix_index) const {
-+  // Return if the given word is too long.
-+  // (See the comment in HashMgr::InitHashEntry().)
-+  const int kMaxWordLen = 128;
-+  if (word_length >= kMaxWordLen)
-+    return NULL;
-+
-+  const size_t kEntrySize = sizeof(hentry) + word_length + 1;
-+  struct hentry* entry = reinterpret_cast<hentry*>(malloc(kEntrySize));
-+  if (entry)
-+    InitHashEntry(entry, kEntrySize, word, word_length, affix_index);
-+
-+  return entry;
-+}
-+
-+void HashMgr::DeleteHashEntry(hentry* entry) const {
-+  free(entry);
-+}
-+
-+hentry* HashMgr::AffixIDsToHentry(char* word,
-+                                  int* affix_ids, 
-+                                  int affix_count) const
-+{
-+  if (affix_count == 0)
-+    return NULL;
-+
-+  HEntryCache& cache = const_cast<HashMgr*>(this)->hentry_cache;
-+  std::string std_word(word);
-+  HEntryCache::iterator found = cache.find(std_word);
-+  if (found != cache.end()) {
-+    // We must return an existing hentry for the same word if we've previously
-+    // handed one out. Hunspell will compare pointers in some cases to see if
-+    // two words it has found are the same.
-+    return found->second;
-+  }
-+
-+  short word_len = static_cast<short>(strlen(word));
-+
-+  // We can get a number of prefixes per word. There will normally be only one,
-+  // but if not, there will be a linked list of "hentry"s for the "homonym"s 
-+  // for the word.
-+  struct hentry* first_he = NULL;
-+  struct hentry* prev_he = NULL;  // For making linked list.
-+  for (int i = 0; i < affix_count; i++) {
-+    struct hentry* he = CreateHashEntry(word, word_len, affix_ids[i]);
-+    if (!he)
-+      break;
-+    if (i == 0)
-+      first_he = he;
-+    if (prev_he)
-+      prev_he->next_homonym = he;
-+    prev_he = he;
-+  }
-+
-+  cache[std_word] = first_he;  // Save this word in the cache for later.
-+  return first_he;
-+}
-+
-+hentry* HashMgr::GetHentryFromHEntryCache(char* word) {
-+  HEntryCache& cache = const_cast<HashMgr*>(this)->hentry_cache;
-+  std::string std_word(word);
-+  HEntryCache::iterator found = cache.find(std_word);
-+  if (found != cache.end())
-+    return found->second;
-+  else
-+    return NULL;
-+}
-+#endif
-+
- int HashMgr::is_aliasf() {
-     return (aliasf != NULL);
- }
-Index: src/hunspell/hashmgr.hxx
-===================================================================
-RCS file: /cvsroot/hunspell/hunspell/src/hunspell/hashmgr.hxx,v
-retrieving revision 1.3
-diff -u -r1.3 hashmgr.hxx
---- src/hunspell/hashmgr.hxx	15 Apr 2010 11:22:08 -0000	1.3
-+++ src/hunspell/hashmgr.hxx	29 May 2014 01:05:07 -0000
-@@ -8,10 +8,25 @@
- #include "htypes.hxx"
- #include "filemgr.hxx"
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+#include <string>
-+#include <map>
-+
-+#include "base/stl_util.h"
-+#include "base/strings/string_piece.h"
-+#include "third_party/hunspell/google/bdict_reader.h"
-+#endif
-+
- enum flag { FLAG_CHAR, FLAG_LONG, FLAG_NUM, FLAG_UNI };
- 
- class LIBHUNSPELL_DLL_EXPORTED HashMgr
- {
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  // Not owned by this class, owned by the Hunspell object.
-+  hunspell::BDictReader* bdict_reader;
-+  std::map<base::StringPiece, int> custom_word_to_affix_id_map_;
-+  std::vector<std::string*> pointer_to_strings_;
-+#endif
-   int               tablesize;
-   struct hentry **  tableptr;
-   int               userword;
-@@ -34,7 +49,23 @@
- 
- 
- public:
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  HashMgr(hunspell::BDictReader* reader);
-+
-+  // Return the hentry corresponding to the given word. Returns NULL if the
-+  // word is not there in the cache.
-+  hentry* GetHentryFromHEntryCache(char* word);
-+
-+  // Called before we do a new operation. This will empty the cache of pointers
-+  // to hentries that we have cached. In Chrome, we make these on-demand, but
-+  // they must live as long as the single spellcheck operation that they're part
-+  // of since Hunspell will save pointers to various ones as it works.
-+  //
-+  // This function allows that cache to be emptied and not grow infinitely.
-+  void EmptyHentryCache();
-+#else
-   HashMgr(const char * tpath, const char * apath, const char * key = NULL);
-+#endif
-   ~HashMgr();
- 
-   struct hentry * lookup(const char *) const;
-@@ -59,6 +90,40 @@
-     int al, const char * desc, bool onlyupcase);
-   int load_config(const char * affpath, const char * key);
-   int parse_aliasf(char * line, FileMgr * af);
-+
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  // Loads the AF lines from a BDICT.
-+  // A BDICT file compresses its AF lines to save memory.
-+  // This function decompresses each AF line and call parse_aliasf().
-+  int LoadAFLines();
-+
-+  // Helper functions that create a new hentry struct, initialize it, and
-+  // delete it.
-+  // These functions encapsulate non-trivial operations in creating and
-+  // initializing a hentry struct from BDICT data to avoid changing code so much
-+  // even when a hentry struct is changed.
-+  hentry* InitHashEntry(hentry* entry,
-+                        size_t item_size,
-+                        const char* word,
-+                        int word_length,
-+                        int affix_index) const;
-+  hentry* CreateHashEntry(const char* word,
-+                          int word_length,
-+                          int affix_index) const;
-+  void DeleteHashEntry(hentry* entry) const;
-+
-+  // Converts the list of affix IDs to a linked list of hentry structures. The
-+  // hentry structures will point to the given word. The returned pointer will
-+  // be a statically allocated variable that will change for the next call. The
-+  // |word| buffer must be the same.
-+  hentry* AffixIDsToHentry(char* word, int* affix_ids, int affix_count) const;
-+
-+  // See EmptyHentryCache above. Note that each one is actually a linked list
-+  // followed by the homonym pointer.
-+  typedef std::map<std::string, hentry*> HEntryCache;
-+  HEntryCache hentry_cache;
-+#endif
-+
-   int add_hidden_capitalized_word(char * word, int wbl, int wcl,
-     unsigned short * flags, int al, char * dp, int captype);
-   int parse_aliasm(char * line, FileMgr * af);
-Index: src/hunspell/htypes.hxx
-===================================================================
-RCS file: /cvsroot/hunspell/hunspell/src/hunspell/htypes.hxx,v
-retrieving revision 1.3
-diff -u -r1.3 htypes.hxx
---- src/hunspell/htypes.hxx	6 Sep 2010 07:58:53 -0000	1.3
-+++ src/hunspell/htypes.hxx	29 May 2014 01:05:07 -0000
-@@ -1,6 +1,16 @@
- #ifndef _HTYPES_HXX_
- #define _HTYPES_HXX_
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+// This is a workaround for preventing errors in parsing Turkish BDICs, which
-+// contain very long AF lines (~ 12,000 chars).
-+// TODO(hbono) change the HashMgr::parse_aliasf() function to be able to parse
-+// longer lines than MAXDELEN.
-+#define MAXDELEN    (8192 * 2)
-+#else
-+#define MAXDELEN    8192
-+#endif  // HUNSPELL_CHROME_CLIENT
-+
- #define ROTATE_LEN   5
- 
- #define ROTATE(v,q) \
-Index: src/hunspell/hunspell.cxx
-===================================================================
-RCS file: /cvsroot/hunspell/hunspell/src/hunspell/hunspell.cxx,v
-retrieving revision 1.29
-diff -u -r1.29 hunspell.cxx
---- src/hunspell/hunspell.cxx	23 Jun 2011 09:21:50 -0000	1.29
-+++ src/hunspell/hunspell.cxx	29 May 2014 01:05:07 -0000
-@@ -7,20 +7,37 @@
- 
- #include "hunspell.hxx"
- #include "hunspell.h"
-+#ifndef HUNSPELL_CHROME_CLIENT
- #ifndef MOZILLA_CLIENT
- #    include "config.h"
- #endif
-+#endif
- #include "csutil.hxx"
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+Hunspell::Hunspell(const unsigned char* bdict_data, size_t bdict_length)
-+#else
- Hunspell::Hunspell(const char * affpath, const char * dpath, const char * key)
-+#endif
- {
-     encoding = NULL;
-     csconv = NULL;
-     utf8 = 0;
-     complexprefixes = 0;
-+#ifndef HUNSPELL_CHROME_CLIENT
-     affixpath = mystrdup(affpath);
-+#endif
-     maxdic = 0;
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+    bdict_reader = new hunspell::BDictReader;
-+    bdict_reader->Init(bdict_data, bdict_length);
-+
-+    pHMgr[0] = new HashMgr(bdict_reader);
-+    if (pHMgr[0]) maxdic = 1;
-+
-+    pAMgr = new AffixMgr(bdict_reader, pHMgr, &maxdic);
-+#else
-     /* first set up the hash manager */
-     pHMgr[0] = new HashMgr(dpath, affpath, key);
-     if (pHMgr[0]) maxdic = 1;
-@@ -28,6 +45,7 @@
-     /* next set up the affix manager */
-     /* it needs access to the hash manager lookup methods */
-     pAMgr = new AffixMgr(affpath, pHMgr, &maxdic, key);
-+#endif
- 
-     /* get the preferred try string and the dictionary */
-     /* encoding from the Affix Manager for that dictionary */
-@@ -41,7 +59,11 @@
-     wordbreak = pAMgr->get_breaktable();
- 
-     /* and finally set up the suggestion manager */
-+#ifdef HUNSPELL_CHROME_CLIENT
-+    pSMgr = new SuggestMgr(bdict_reader, try_string, MAXSUGGESTION, pAMgr);
-+#else
-     pSMgr = new SuggestMgr(try_string, MAXSUGGESTION, pAMgr);
-+#endif
-     if (try_string) free(try_string);
- }
- 
-@@ -59,10 +81,16 @@
-     csconv= NULL;
-     if (encoding) free(encoding);
-     encoding = NULL;
-+#ifdef HUNSPELL_CHROME_CLIENT
-+    if (bdict_reader) delete bdict_reader;
-+    bdict_reader = NULL;
-+#else
-     if (affixpath) free(affixpath);
-     affixpath = NULL;
-+#endif
- }
- 
-+#ifndef HUNSPELL_CHROME_CLIENT
- // load extra dictionaries
- int Hunspell::add_dic(const char * dpath, const char * key) {
-     if (maxdic == MAXDIC || !affixpath) return 1;
-@@ -70,6 +98,7 @@
-     if (pHMgr[maxdic]) maxdic++; else return 1;
-     return 0;
- }
-+#endif
- 
- // make a copy of src at destination while removing all leading
- // blanks and removing any trailing periods after recording
-@@ -322,6 +351,9 @@
- 
- int Hunspell::spell(const char * word, int * info, char ** root)
- {
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  if (pHMgr[0]) pHMgr[0]->EmptyHentryCache();
-+#endif
-   struct hentry * rv=NULL;
-   // need larger vector. For example, Turkish capital letter I converted a
-   // 2-byte UTF-8 character (dotless i) by mkallsmall.
-@@ -586,6 +618,13 @@
-   if (!len)
-       return NULL;
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  // We need to check if the word length is valid to make coverity (Event
-+  // fixed_size_dest: Possible overrun of N byte fixed size buffer) happy.
-+  if ((utf8 && strlen(word) >= MAXWORDUTF8LEN) || (!utf8 && strlen(word) >= MAXWORDLEN))
-+    return NULL;
-+#endif
-+
-   // word reversing wrapper for complex prefixes
-   if (complexprefixes) {
-     if (word != w2) {
-@@ -675,6 +714,9 @@
- 
- int Hunspell::suggest(char*** slst, const char * word)
- {
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  if (pHMgr[0]) pHMgr[0]->EmptyHentryCache();
-+#endif
-   int onlycmpdsug = 0;
-   char cw[MAXWORDUTF8LEN];
-   char wspace[MAXWORDUTF8LEN];
-@@ -1921,13 +1963,21 @@
- 
- Hunhandle *Hunspell_create(const char * affpath, const char * dpath)
- {
-+#ifdef HUNSPELL_CHROME_CLIENT
-+        return NULL;
-+#else
-         return (Hunhandle*)(new Hunspell(affpath, dpath));
-+#endif
- }
- 
- Hunhandle *Hunspell_create_key(const char * affpath, const char * dpath,
-     const char * key)
- {
-+#ifdef HUNSPELL_CHROME_CLIENT
-+        return NULL;
-+#else
-         return (Hunhandle*)(new Hunspell(affpath, dpath, key));
-+#endif
- }
- 
- void Hunspell_destroy(Hunhandle *pHunspell)
-Index: src/hunspell/hunspell.hxx
-===================================================================
-RCS file: /cvsroot/hunspell/hunspell/src/hunspell/hunspell.hxx,v
-retrieving revision 1.6
-diff -u -r1.6 hunspell.hxx
---- src/hunspell/hunspell.hxx	21 Jan 2011 17:30:41 -0000	1.6
-+++ src/hunspell/hunspell.hxx	29 May 2014 01:05:07 -0000
-@@ -5,6 +5,10 @@
- #include "suggestmgr.hxx"
- #include "langnum.hxx"
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+#include "third_party/hunspell/google/bdict_reader.h"
-+#endif
-+
- #define  SPELL_XML "<?xml?>"
- 
- #define MAXDIC 20
-@@ -23,7 +27,9 @@
-   HashMgr*        pHMgr[MAXDIC];
-   int             maxdic;
-   SuggestMgr*     pSMgr;
-+#ifndef HUNSPELL_CHROME_CLIENT // We are using BDict instead.
-   char *          affixpath;
-+#endif
-   char *          encoding;
-   struct cs_info * csconv;
-   int             langnum;
-@@ -31,17 +37,28 @@
-   int             complexprefixes;
-   char**          wordbreak;
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  // Not owned by us, owned by the Hunspell object.
-+  hunspell::BDictReader* bdict_reader;
-+#endif
-+
- public:
- 
-   /* Hunspell(aff, dic) - constructor of Hunspell class
-    * input: path of affix file and dictionary file
-    */
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  Hunspell(const unsigned char* bdict_data, size_t bdict_length);
-+#else
-   Hunspell(const char * affpath, const char * dpath, const char * key = NULL);
-+#endif
-   ~Hunspell();
- 
-+#ifndef HUNSPELL_CHROME_CLIENT
-   /* load extra dictionaries (only dic files) */
-   int add_dic(const char * dpath, const char * key = NULL);
-+#endif
- 
-   /* spell(word) - spellcheck word
-    * output: 0 = bad word, not 0 = good word
-Index: src/hunspell/replist.hxx
-===================================================================
-RCS file: /cvsroot/hunspell/hunspell/src/hunspell/replist.hxx,v
-retrieving revision 1.2
-diff -u -r1.2 replist.hxx
---- src/hunspell/replist.hxx	15 Apr 2010 11:22:09 -0000	1.2
-+++ src/hunspell/replist.hxx	29 May 2014 01:05:07 -0000
-@@ -2,6 +2,12 @@
- #ifndef _REPLIST_HXX_
- #define _REPLIST_HXX_
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+// Compilation issues in spellchecker.cc think near is a macro, therefore
-+// removing it here solves that problem.
-+#undef near
-+#endif
-+
- #include "hunvisapi.h"
- 
- #include "w_char.hxx"
-Index: src/hunspell/suggestmgr.cxx
-===================================================================
-RCS file: /cvsroot/hunspell/hunspell/src/hunspell/suggestmgr.cxx,v
-retrieving revision 1.24
-diff -u -r1.24 suggestmgr.cxx
---- src/hunspell/suggestmgr.cxx	14 Feb 2011 21:47:24 -0000	1.24
-+++ src/hunspell/suggestmgr.cxx	29 May 2014 01:05:07 -0000
-@@ -12,9 +12,114 @@
- 
- const w_char W_VLINE = { '\0', '|' };
- 
-+#ifdef HUNSPELL_CHROME_CLIENT
-+namespace {
-+// A simple class which creates temporary hentry objects which are available
-+// only in a scope. To conceal memory operations from SuggestMgr functions,
-+// this object automatically deletes all hentry objects created through
-+// CreateScopedHashEntry() calls in its destructor. So, the following snippet
-+// raises a memory error.
-+//
-+//   hentry* bad_copy = NULL;
-+//   {
-+//     ScopedHashEntryFactory factory;
-+//     hentry* scoped_copy = factory.CreateScopedHashEntry(0, source);
-+//     ...
-+//     bad_copy = scoped_copy;
-+//   }
-+//   if (bad_copy->word[0])  // memory for scoped_copy has been deleted!
-+//
-+// As listed in the above snippet, it is simple to use this class.
-+// 1. Declare an instance of this ScopedHashEntryFactory, and;
-+// 2. Call its CreateHashEntry() member instead of using 'new hentry' or
-+//    'operator='.
-+//
-+class ScopedHashEntryFactory {
-+ public:
-+  ScopedHashEntryFactory();
-+  ~ScopedHashEntryFactory();
-+
-+  // Creates a temporary copy of the given hentry struct.
-+  // The returned copy is available only while this object is available.
-+  // NOTE: this function just calls memcpy() in creating a copy of the given
-+  // hentry struct, i.e. it does NOT copy objects referred by pointers of the
-+  // given hentry struct.
-+  hentry* CreateScopedHashEntry(int index, const hentry* source);
-+
-+ private:
-+  // A struct which encapsulates the new hentry struct introduced in hunspell
-+  // 1.2.8. For a pointer to an hentry struct 'h', hunspell 1.2.8 stores a word
-+  // (including a NUL character) into 'h->word[0]',...,'h->word[h->blen]' even
-+  // though arraysize(h->word[]) is 1. Also, it changed 'astr' to a pointer so
-+  // it can store affix flags into 'h->astr[0]',...,'h->astr[alen-1]'. To handle
-+  // this new hentry struct, we define a struct which combines three values: an
-+  // hentry struct 'hentry'; a char array 'word[kMaxWordLen]', and; an unsigned
-+  // short array 'astr' so a hentry struct 'h' returned from
-+  // CreateScopedHashEntry() satisfies the following equations:
-+  //   hentry* h = factory.CreateScopedHashEntry(0, source);
-+  //   h->word[0] == ((HashEntryItem*)h)->entry.word[0].
-+  //   h->word[1] == ((HashEntryItem*)h)->word[0].
-+  //   ...
-+  //   h->word[h->blen] == ((HashEntryItem*)h)->word[h->blen-1].
-+  //   h->astr[0] == ((HashEntryItem*)h)->astr[0].
-+  //   h->astr[1] == ((HashEntryItem*)h)->astr[1].
-+  //   ...
-+  //   h->astr[h->alen-1] == ((HashEntryItem*)h)->astr[h->alen-1].
-+  enum {
-+    kMaxWordLen = 128,
-+    kMaxAffixLen = 8,
-+  };
-+  struct HashEntryItem {
-+    hentry entry;
-+    char word[kMaxWordLen];
-+    unsigned short astr[kMaxAffixLen];
-+  };
-+
-+  HashEntryItem hash_items_[MAX_ROOTS];
-+};
-+
-+ScopedHashEntryFactory::ScopedHashEntryFactory() {
-+  memset(&hash_items_[0], 0, sizeof(hash_items_));
-+}
-+
-+ScopedHashEntryFactory::~ScopedHashEntryFactory() {
-+}
-+
-+hentry* ScopedHashEntryFactory::CreateScopedHashEntry(int index,
-+                                                      const hentry* source) {
-+  if (index >= MAX_ROOTS || source->blen >= kMaxWordLen)
-+    return NULL;
-+
-+  // Retrieve a HashEntryItem struct from our spool, initialize it, and
-+  // returns the address of its 'hentry' member.
-+  size_t source_size = sizeof(hentry) + source->blen + 1;
-+  HashEntryItem* hash_item = &hash_items_[index];
-+  memcpy(&hash_item->entry, source, source_size);
-+  if (source->astr) {
-+    hash_item->entry.alen = source->alen;
-+    if (hash_item->entry.alen > kMaxAffixLen)
-+      hash_item->entry.alen = kMaxAffixLen;
-+    memcpy(hash_item->astr, source->astr, hash_item->entry.alen * sizeof(hash_item->astr[0]));
-+    hash_item->entry.astr = &hash_item->astr[0];
-+  }
-+  return &hash_item->entry;
-+}
-+
-+}  // namespace
-+#endif
-+
-+
-+#ifdef HUNSPELL_CHROME_CLIENT
-+SuggestMgr::SuggestMgr(hunspell::BDictReader* reader,
-+                       const char * tryme, int maxn, 
-+                       AffixMgr * aptr)
-+{
-+  bdict_reader = reader;
-+#else
- SuggestMgr::SuggestMgr(const char * tryme, int maxn, 
-                        AffixMgr * aptr)
- {
-+#endif
- 
-   // register affix manager and check in string of chars to 
-   // try when building candidate suggestions
-@@ -407,6 +512,49 @@
-   int lenr, lenp;
-   int wl = strlen(word);
-   if (wl < 2 || ! pAMgr) return ns;
-+  
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  const char *pattern, *pattern2;
-+  hunspell::ReplacementIterator iterator = bdict_reader->GetReplacementIterator();
-+  while (iterator.GetNext(&pattern, &pattern2)) {
-+      r = word;
-+      lenr = strlen(pattern2);
-+      lenp = strlen(pattern);
-+      
-+      // search every occurence of the pattern in the word
-+      while ((r=strstr(r, pattern)) != NULL) {
-+          strcpy(candidate, word);
-+          if (r-word + lenr + strlen(r+lenp) >= MAXLNLEN) break;
-+          strcpy(candidate+(r-word), pattern2);
-+          strcpy(candidate+(r-word)+lenr, r+lenp);
-+          ns = testsug(wlst, candidate, wl-lenp+lenr, ns, cpdsuggest, NULL, NULL);
-+          if (ns == -1) return -1;
-+          // check REP suggestions with space
-+          char * sp = strchr(candidate, ' ');
-+          if (sp) {
-+            char * prev = candidate;
-+            while (sp) {
-+              *sp = '\0';
-+              if (checkword(prev, strlen(prev), 0, NULL, NULL)) {
-+                int oldns = ns;
-+                *sp = ' ';
-+                ns = testsug(wlst, sp + 1, strlen(sp + 1), ns, cpdsuggest, NULL, NULL);
-+                if (ns == -1) return -1;
-+                if (oldns < ns) {
-+                  free(wlst[ns - 1]);
-+                  wlst[ns - 1] = mystrdup(candidate);
-+                  if (!wlst[ns - 1]) return -1;
-+                }
-+              }
-+              *sp = ' ';
-+              prev = sp + 1;
-+              sp = strchr(prev, ' ');
-+            }
-+          }
-+          r++; // search for the next letter
-+    }
-+  }
-+#else
-   int numrep = pAMgr->get_numrep();
-   struct replentry* reptable = pAMgr->get_reptable();
-   if (reptable==NULL) return ns;
-@@ -448,6 +596,7 @@
-           r++; // search for the next letter
-       }
-    }
-+#endif
-    return ns;
- }
- 
-@@ -678,7 +827,9 @@
- // error is missing a letter it needs
- int SuggestMgr::forgotchar(char ** wlst, const char * word, int ns, int cpdsuggest)
- {
--   char candidate[MAXSWUTF8L];
-+   // TODO(rouslan): Remove the interim change below when this patch lands:
-+   // http://sf.net/tracker/?func=detail&aid=3595024&group_id=143754&atid=756395
-+   char candidate[MAXSWUTF8L + 4];
-    char * p;
-    clock_t timelimit = clock();
-    int timer = MINTIMER;
-@@ -700,8 +851,10 @@
- // error is missing a letter it needs
- int SuggestMgr::forgotchar_utf(char ** wlst, const w_char * word, int wl, int ns, int cpdsuggest)
- {
--   w_char  candidate_utf[MAXSWL];
--   char    candidate[MAXSWUTF8L];
-+   // TODO(rouslan): Remove the interim change below when this patch lands:
-+   // http://sf.net/tracker/?func=detail&aid=3595024&group_id=143754&atid=756395
-+   w_char  candidate_utf[MAXSWL + 1];
-+   char    candidate[MAXSWUTF8L + 4];
-    w_char * p;
-    clock_t timelimit = clock();
-    int timer = MINTIMER;
-@@ -1057,6 +1210,9 @@
- 
-   struct hentry* hp = NULL;
-   int col = -1;
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  ScopedHashEntryFactory hash_entry_factory;
-+#endif
-   phonetable * ph = (pAMgr) ? pAMgr->get_phonetable() : NULL;
-   char target[MAXSWUTF8L];
-   char candidate[MAXSWUTF8L];
-@@ -1115,7 +1271,11 @@
- 
-     if (sc > scores[lp]) {
-       scores[lp] = sc;  
-+#ifdef HUNSPELL_CHROME_CLIENT
-+      roots[lp] = hash_entry_factory.CreateScopedHashEntry(lp, hp);
-+#else
-       roots[lp] = hp;
-+#endif
-       lval = sc;
-       for (j=0; j < MAX_ROOTS; j++)
-         if (scores[j] < lval) {
-@@ -1948,16 +2108,14 @@
-     m = strlen(s);
-     n = strlen(s2);
-   }
--  c = (char *) malloc((m + 1) * (n + 1));
--  b = (char *) malloc((m + 1) * (n + 1));
-+  c = (char *) calloc(m + 1, n + 1);
-+  b = (char *) calloc(m + 1, n + 1);
-   if (!c || !b) {
-     if (c) free(c);
-     if (b) free(b);
-     *result = NULL;
-     return;
-   }
--  for (i = 1; i <= m; i++) c[i*(n+1)] = 0;
--  for (j = 0; j <= n; j++) c[j] = 0;
-   for (i = 1; i <= m; i++) {
-     for (j = 1; j <= n; j++) {
-       if ( ((utf8) && (*((short *) su+i-1) == *((short *)su2+j-1)))
-Index: src/hunspell/suggestmgr.hxx
-===================================================================
-RCS file: /cvsroot/hunspell/hunspell/src/hunspell/suggestmgr.hxx,v
-retrieving revision 1.5
-diff -u -r1.5 suggestmgr.hxx
---- src/hunspell/suggestmgr.hxx	21 Jan 2011 22:10:24 -0000	1.5
-+++ src/hunspell/suggestmgr.hxx	29 May 2014 01:05:07 -0000
-@@ -52,7 +52,11 @@
- 
- 
- public:
-+#ifdef HUNSPELL_CHROME_CLIENT
-+  SuggestMgr(hunspell::BDictReader* reader, const char * tryme, int maxn, AffixMgr *aptr);
-+#else
-   SuggestMgr(const char * tryme, int maxn, AffixMgr *aptr);
-+#endif
-   ~SuggestMgr();
- 
-   int suggest(char*** slst, const char * word, int nsug, int * onlycmpdsug);
-@@ -66,6 +70,10 @@
-   char * suggest_morph_for_spelling_error(const char * word);
- 
- private:
-+#ifdef HUNSPELL_CHROME_CLIENT
-+   // Not owned by us, owned by the Hunspell object.
-+   hunspell::BDictReader* bdict_reader;
-+#endif
-    int testsug(char** wlst, const char * candidate, int wl, int ns, int cpdsuggest,
-      int * timer, clock_t * timelimit);
-    int checkword(const char *, int, int, int *, clock_t *);
diff --git a/google/DEPS b/google/DEPS
deleted file mode 100644
index ab03e0d..0000000
--- a/google/DEPS
+++ /dev/null
@@ -1,3 +0,0 @@
-include_rules = [

-  "+chrome/tools/convert_dict",

-]

diff --git a/google/bdict.cc b/google/bdict.cc
deleted file mode 100644
index 3756f35..0000000
--- a/google/bdict.cc
+++ /dev/null
@@ -1,40 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "third_party/hunspell/google/bdict.h"
-
-// static
-bool hunspell::BDict::Verify(const char* bdict_data, size_t bdict_length) {
-  if (bdict_length <= sizeof(hunspell::BDict::Header))
-    return false;
-
-  const BDict::Header* header =
-      reinterpret_cast<const hunspell::BDict::Header*>(bdict_data);
-  if (header->signature != hunspell::BDict::SIGNATURE ||
-      header->major_version > hunspell::BDict::MAJOR_VERSION ||
-      header->dic_offset > bdict_length)
-    return false;
-
-  // Get the affix header, make sure there is enough room for it.
-  if (header->aff_offset + sizeof(hunspell::BDict::AffHeader) > bdict_length)
-    return false;
-
-  // Make sure there is enough room for the affix group count dword.
-  const hunspell::BDict::AffHeader* aff_header =
-      reinterpret_cast<const hunspell::BDict::AffHeader*>(
-          &bdict_data[header->aff_offset]);
-  if (aff_header->affix_group_offset + sizeof(uint32) > bdict_length)
-    return false;
-
-  // The new BDICT header has a MD5 digest of the dictionary data. Compare the
-  // MD5 digest of the data with the one in the BDICT header.
-  if (header->major_version >= 2) {
-    base::MD5Digest digest;
-    base::MD5Sum(aff_header, bdict_length - header->aff_offset, &digest);
-    if (memcmp(&digest, &header->digest, sizeof(digest)))
-      return false;
-  }
-
-  return true;
-}
diff --git a/google/bdict.h b/google/bdict.h
deleted file mode 100644
index 7219710..0000000
--- a/google/bdict.h
+++ /dev/null
@@ -1,211 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_THIRD_PARTY_HUNSPELL_GOOGLE_BDICT_H__
-#define CHROME_THIRD_PARTY_HUNSPELL_GOOGLE_BDICT_H__
-
-#include "base/basictypes.h"
-#include "base/md5.h"
-
-// BDict (binary dictionary) format. All offsets are little endian.
-//
-// Header (28 bytes).
-//   "BDic" Signature (4 bytes)
-//   Version (little endian 4 bytes)
-//   Absolute offset in file of the aff info. (4 bytes)
-//   Absolute offset in file of the dic table. (4 bytes)
-//   (Added by v2.0) MD5 checksum of the aff info and the dic table. (16 bytes)
-//
-// Aff information:
-//   Absolute offset in file of the affix group table (4 bytes)
-//   Absolute offset in file of the affix rules table (4 bytes)
-//   Absolute offset in file of the replacements table (4 bytes)
-//   Absolute offset in file of the "other rules" table (4 bytes)
-//
-//   The data between the aff header and the affix rules table is the comment
-//   from the beginning of the .aff file which often contains copyrights, etc.
-//
-//   Affix group table:
-//     Array of NULL terminated strings. It will end in a double-NULL.
-//
-//   Affix rules table:
-//     List of LF termianted lines. NULL terminated.
-//
-//   Replacements table:
-//     List of pairs of NULL teminated words. The end is indicated by a
-//     double-NULL. The first word in the pair is the replacement source, the
-//     second is what to replace it with. Example:
-//       foo\0bar\0a\0b\0\0
-//     for replacing ("foo" with "bar") and ("a" with "b").
-//
-//   Other rules table:
-//     List of LF termianted lines. NULL terminated.
-//
-//
-// Dic table. This stores the .dic file which contains the words in the
-// dictionary, and indices for each one that indicate a set of suffixes or
-// prefixes that can be applied. We store it in a trie to save space. It
-// replaces Hunspell's hash manager.
-//
-//   0abxxxxx xxxxxxxx (in binary) Leaf node:
-//     The number stored in the bits represented by x is the affix index.
-//
-//     If bit <a> is set, the leaf node has an additional string. Following the
-//     2 byte header is a NULL-terminated (possibly 0-length) string that should
-//     be appended to the node. This allows long unique endings to be handled
-//     efficiently.
-//
-//     If bit <b> is set, the leaf node has a supplimental list of affix IDs
-//     following the ordinary data for the leaf node. These affix group IDs are
-//     additional rules for the same word. For example, two prefixes may go
-//     with distinct sets of suffixes.
-//
-//     If the affix index is all 1's, then that means that there is only the
-//     supplimental list, and the 13-bit of affix built-in to the node don't
-//     count. This is used to represent numbers greater than 13 bits, since
-//     the supplimentary list has 16 bits per entry. The node must have a
-//     supplimenal list if this is set.
-//
-//     This additional array is an array of 16-bit little-endian values,
-//     terminated by 0xFFFF (since 0 is an affix ID meaning "no affix ID".
-//
-//   0x110000ab: Lookup node.
-//     When <a> is set, addresses are 32-bits relative to the beginning of the
-//     dictionary data. When unset, addresses are 16-bits relative to the
-//     beginning of this node. All values are little endian.
-//
-//     When <b> is set, there is one additional entry before the table begins.
-//     This is the 0th character. 0 is a common addition (meaning no more data)
-//     and this prevents us from having to store entries for all the control
-//     characters. This magic element is not counted in the table size.
-//
-//     The ID byte is followeed by two bytes:
-//       XX: First character value in the lookup table.
-//       XX: Number of characters in the lookup table.
-//
-//     This is followed optionally by the entry for 0, and then by a table of
-//     size indicated by the second charatcer after the ID.
-//
-//   1110xxxx: List node with 8-bit addresses.
-//     The number of items (max 16) in the list is stored in the bits xxxx.
-//     Followed by N (character byte, 8-bit offset) pairs. These offsets are
-//     relative to the end of the list of pairs.
-//   1111xxxx: List node with 16-bit addresses. Same as above but offsets are
-//     2-bytes each. LITTLE ENDIAN!
-
-namespace hunspell {
-
-#pragma pack(push, 1)
-
-class BDict {
- public:
-  // File header.
-  enum { SIGNATURE = 0x63694442 };
-  enum {
-    MAJOR_VERSION = 2,
-    MINOR_VERSION = 0
-  };
-  struct Header {
-    uint32 signature;
-
-    // Major versions are incompatible with other major versions. Minor versions
-    // should be readable by older programs expecting the same major version.
-    uint16 major_version;
-    uint16 minor_version;
-
-    uint32 aff_offset;  // Offset of the aff data.
-    uint32 dic_offset;  // Offset of the dic data.
-
-    // Added by version 2.0.
-    base::MD5Digest digest;  // MD5 digest of the aff data and the dic data.
-  };
-
-  // AFF section ===============================================================
-
-  struct AffHeader {
-    uint32 affix_group_offset;
-    uint32 affix_rule_offset;
-    uint32 rep_offset;  // Replacements table.
-    uint32 other_offset;
-  };
-
-  // DIC section ===============================================================
-
-  // Leaf ----------------------------------------------------------------------
-
-  // Leaf nodes have the high bit set to 0.
-  enum { LEAF_NODE_TYPE_MASK = 0x80 };  // 10000000
-  enum { LEAF_NODE_TYPE_VALUE = 0 };    // 00000000
-
-  // Leaf nodes with additional strings have the next-to-high bit set to 1.
-  // This mask/value pair also includes the high bit set to 0 which is the leaf
-  // indicator.
-  enum { LEAF_NODE_ADDITIONAL_MASK = 0xC0 };   // 11000000
-  enum { LEAF_NODE_ADDITIONAL_VALUE = 0x40 };  // 01000000
-
-  // Leaf nodes with an additional array of affix rules following it.
-  enum { LEAF_NODE_FOLLOWING_MASK = 0xA0 };  // 10100000
-  enum { LEAF_NODE_FOLLOWING_VALUE = 0x20 }; // 00100000
-
-  // The low 5 bits of the leaf node ID byte are the first 5 bits of the affix
-  // ID. The following byte is used for the low bits of the affix ID (we don't
-  // specify as mask for that).
-  enum { LEAF_NODE_FIRST_BYTE_AFFIX_MASK = 0x1F };  // 00011111
-
-  // The maximum affix value that can be stored in the first entry (not in the
-  // following list). We reserve all 1's to be a magic value (see next entry)
-  // so we can store large numbers somewhere else.
-  enum { LEAF_NODE_MAX_FIRST_AFFIX_ID = 0x1FFE };  // 00011111 11111110
-
-  // When the affix built-in to the leaf node (the first one) has too many bits
-  // for the space reserved for it (13 bits), then we fill it with this value.
-  // This means that the affix doesn't count. The affix will instead be stored
-  // in the "following list" which allows up to 16 bits per entry.
-  enum { FIRST_AFFIX_IS_UNUSED = 0x1FFF };  // 00011111 11111111
-
-  // The maximum number of leaf nodes we'll read that have the same word and
-  // follow each other (the FOLLOWING bit is set).
-  enum { MAX_AFFIXES_PER_WORD = 32 };
-
-  // The terminator for the list of following affix group IDs.
-  enum { LEAF_NODE_FOLLOWING_LIST_TERMINATOR = 0xFFFF };
-
-  // Lookup --------------------------------------------------------------------
-
-  // Lookup nodes have the first 6 bits set to 110000.
-  enum { LOOKUP_NODE_TYPE_MASK = 0xFC };   // 11111100
-  enum { LOOKUP_NODE_TYPE_VALUE = 0xC0 };  // 11000000
-
-  // Lookup nodes have the low bit meaning it has a 0th entry, and the
-  // next-to-lowest bit indicating whether the offsets are 32-bits. Included
-  // in these masks are the lookup ID above.
-  enum { LOOKUP_NODE_0TH_MASK = 0xFD };    // 11111110
-  enum { LOOKUP_NODE_0TH_VALUE = 0xC1 };   // 11000010
-  enum { LOOKUP_NODE_32BIT_MASK = 0xFE};   // 11111110
-  enum { LOOKUP_NODE_32BIT_VALUE = 0xC2};  // 11000001
-
-  // List ----------------------------------------------------------------------
-
-  // List nodes have the first 3 bits set to 1.
-  enum { LIST_NODE_TYPE_MASK = 0xE0 };   // 11100000
-  enum { LIST_NODE_TYPE_VALUE = 0xE0 };  // 11100000
-
-  // The 4th from highest bit indicates a 16 bit (as opposed to 8 bit) list.
-  // This mask/value also includes the list ID in the high 3 bits.
-  enum { LIST_NODE_16BIT_MASK = 0xF0 };   // 11110000
-  enum { LIST_NODE_16BIT_VALUE = 0xF0 };  // 11110000
-
-  // The low 4 bits of the list ID byte are the count.
-  enum { LIST_NODE_COUNT_MASK = 0xF };  // 00001111
-
-  // Verifies the specified BDICT is sane. This function checks the BDICT header
-  // and compares the MD5 digest of the data with the one in the header.
-  static bool Verify(const char* bdict_data, size_t bdict_length);
-};
-
-#pragma pack(pop)
-
-}  // namespace hunspell
-
-#endif  // CHROME_THIRD_PARTY_HUNSPELL_GOOGLE_BDICT_H__
diff --git a/google/bdict_reader.cc b/google/bdict_reader.cc
deleted file mode 100644
index ddd3c88..0000000
--- a/google/bdict_reader.cc
+++ /dev/null
@@ -1,793 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "third_party/hunspell/google/bdict_reader.h"
-
-#include "base/logging.h"
-
-namespace hunspell {
-
-// Like the "Visitor" design pattern, this lightweight object provides an
-// interface around a serialized trie node at the given address in the memory.
-class NodeReader {
- public:
-  // Return values for GetChildAt.
-  enum FindResult {
-    // A node is found.
-    FIND_NODE,
-
-    // There are no more children for this node, no child node is returned.
-    FIND_DONE,
-
-    // There is no node at this location, but there are more if you continue
-    // iterating. This happens when there is a lookup node with empty entries.
-    FIND_NOTHING
-  };
-
-  // The default constructor makes an invalid reader.
-  NodeReader();
-  NodeReader(const unsigned char* bdict_data, size_t bdict_length,
-             size_t node_offset, int node_depth);
-
-  // Returns true if the reader is valid. False means you shouldn't use it.
-  bool is_valid() const { return is_valid_; }
-
-  // Recursively finds the given NULL terminated word.
-  // See BDictReader::FindWord.
-  int FindWord(const unsigned char* word,
-               int affix_indices[BDict::MAX_AFFIXES_PER_WORD]) const;
-
-  // Allows iterating over the children of this node. When it returns
-  // FIND_NODE, |*result| will be populated with the reader for the found node.
-  // The first index is 0. The single character for this node will be placed
-  // into |*found_char|.
-  FindResult GetChildAt(int index, char* found_char, NodeReader* result) const;
-
-  // Leaf ----------------------------------------------------------------------
-
-  inline bool is_leaf() const {
-    // If id_byte() sets is_valid_ to false, we need an extra check to avoid
-    // returning true for this type.
-    return (id_byte() & BDict::LEAF_NODE_TYPE_MASK) ==
-        BDict::LEAF_NODE_TYPE_VALUE && is_valid_;
-  }
-
-  // If this is a leaf node with an additional string, this function will return
-  // a pointer to the beginning of the additional string. It will be NULL
-  // terminated. If it is not a leaf or has no additional string, it will return
-  // NULL.
-  inline const unsigned char* additional_string_for_leaf() const {
-    // Leaf nodes with additional strings start with bits "01" in the ID byte.
-    if ((id_byte() & BDict::LEAF_NODE_ADDITIONAL_MASK) ==
-      BDict::LEAF_NODE_ADDITIONAL_VALUE) {
-      if (node_offset_ < (bdict_length_ - 2))
-        return &bdict_data_[node_offset_ + 2];  // Starts after the 2 byte ID.
-      // Otherwise the dictionary is corrupt.
-      is_valid_ = false;
-    }
-    return NULL;
-  }
-
-  // Returns the first affix ID corresponding to the given leaf node. The
-  // current node must be a leaf or this will do the wrong thing. There may be
-  // additional affix IDs following the node when leaf_has_following is set,
-  // but this will not handle those.
-  inline int affix_id_for_leaf() const {
-    if (node_offset_ >= bdict_length_ - 2) {
-      is_valid_ = false;
-      return 0;
-    }
-    // Take the lowest 6 bits of the first byte, and all 8 bits of the second.
-    return ((bdict_data_[node_offset_ + 0] &
-             BDict::LEAF_NODE_FIRST_BYTE_AFFIX_MASK) << 8) +
-           bdict_data_[node_offset_ + 1];
-  }
-
-  // Returns true if there is a list of additional affix matches following this
-  // leaf node.
-  inline bool leaf_has_following() const {
-    return ((id_byte() & BDict::LEAF_NODE_FOLLOWING_MASK) ==
-        BDict::LEAF_NODE_FOLLOWING_VALUE);
-  }
-
-  // Fills the affix indices into the output array given a matching leaf node.
-  // |additional_bytes| is the number of bytes of the additional string,
-  // including the NULL terminator, following this leaf node. This will be 0 if
-  // there is no additional string.
-  int FillAffixesForLeafMatch(
-      size_t additional_bytes,
-      int affix_indices[BDict::MAX_AFFIXES_PER_WORD]) const;
-
-  // Lookup --------------------------------------------------------------------
-
-  inline bool is_lookup() const {
-    return (id_byte() & BDict::LOOKUP_NODE_TYPE_MASK) ==
-        BDict::LOOKUP_NODE_TYPE_VALUE;
-  }
-
-  inline bool is_lookup_32() const {
-    return (id_byte() & BDict::LOOKUP_NODE_32BIT_MASK) ==
-        BDict::LOOKUP_NODE_32BIT_VALUE;
-  }
-
-  inline bool lookup_has_0th() const {
-    return (id_byte() & BDict::LOOKUP_NODE_0TH_MASK) ==
-        BDict::LOOKUP_NODE_0TH_VALUE;
-  }
-
-  // Returns the first entry after the lookup table header. When there is a
-  // magic 0th entry, it will be that address.
-  // The caller checks that the result is in-bounds.
-  inline size_t zeroth_entry_offset() const {
-    return node_offset_ + 3;
-  }
-
-  // Returns the index of the first element in the lookup table. This skips any
-  // magic 0th entry.
-  // The caller checks that the result is in-bounds.
-  size_t lookup_table_offset() const {
-    size_t table_offset = zeroth_entry_offset();
-    if (lookup_has_0th())
-      return table_offset + (is_lookup_32() ? 4 : 2);
-    return table_offset;
-  }
-
-  inline int lookup_first_char() const {
-    if (node_offset_ >= bdict_length_ - 1) {
-      is_valid_ = false;
-      return 0;
-    }
-    return bdict_data_[node_offset_ + 1];
-  }
-
-  inline int lookup_num_chars() const {
-    if (node_offset_ >= bdict_length_ - 2) {
-      is_valid_ = false;
-      return 0;
-    }
-    return bdict_data_[node_offset_ + 2];
-  }
-
-  // Computes a node reader for the magic 0th entry of the table. This assumes
-  // it has a 0th entry. This will always return FOUND_NODE (for compatilibility
-  // with GetChildAt).
-  FindResult ReaderForLookup0th(NodeReader* result) const;
-
-  // Gets a node reader for the |offset|th element in the table, not counting
-  // the magic 0th element, if any (so passing 0 here will give you the first
-  // element in the regular lookup table). The offset is assumed to be valid.
-  //
-  // |child_node_char| is the character value that the child node will
-  // represent. The single character for this node will be placed into
-  // |*found_char|.
-  FindResult ReaderForLookupAt(size_t index, char* found_char,
-                               NodeReader* result) const;
-
-  // List ----------------------------------------------------------------------
-
-  inline bool is_list() const {
-    return (id_byte() & BDict::LIST_NODE_TYPE_MASK) ==
-        BDict::LIST_NODE_TYPE_VALUE;
-  }
-
-  inline int is_list_16() const {
-    // 16 bit lst nodes have the high 4 bits of 1.
-    return (id_byte() & BDict::LIST_NODE_16BIT_MASK) ==
-        BDict::LIST_NODE_16BIT_VALUE;
-  }
-
-  inline size_t list_item_count() const {
-    // The list count is stored in the low 4 bits of the ID.
-    return id_byte() & BDict::LIST_NODE_COUNT_MASK;
-  }
-
-  // Returns a NodeReader for the list item with the given index. The single
-  // character for this node will be placed into |*found_char|.
-  FindResult ReaderForListAt(size_t index, char* found_char,
-                             NodeReader* result) const;
-
- private:
-  inline unsigned char id_byte() const {
-    if (!is_valid_)
-      return 0;  // Don't continue with a corrupt node.
-    if (node_offset_ >= bdict_length_) {
-      // Return zero if out of bounds; we'll check is_valid_ in caller.
-      is_valid_ = false;
-      return 0;
-    }
-    return bdict_data_[node_offset_];
-  }
-
-  // Checks the given leaf node to see if it's a match for the given word.
-  // The parameters and return values are the same as BDictReader::FindWord.
-  int CompareLeafNode(const unsigned char* word,
-                      int affix_indices[BDict::MAX_AFFIXES_PER_WORD]) const;
-
-  // Recursive calls used by FindWord to look up child nodes of different types.
-  int FindInLookup(const unsigned char* word,
-                   int affix_indices[BDict::MAX_AFFIXES_PER_WORD]) const;
-  int FindInList(const unsigned char* word,
-                 int affix_indices[BDict::MAX_AFFIXES_PER_WORD]) const;
-
-  // The entire bdict file. This will be NULL if it is invalid.
-  const unsigned char* bdict_data_;
-  size_t bdict_length_;
-  // Points to the end of the file (for length checking convenience).
-  const unsigned char* bdict_end_;
-
-  // Absolute offset within |bdict_data_| of the beginning of this node.
-  size_t node_offset_;
-
-  // The character index into the word that this node represents.
-  int node_depth_;
-
-  // Signals that dictionary corruption was found during node traversal.
-  mutable bool is_valid_;
-};
-
-NodeReader::NodeReader()
-    : bdict_data_(NULL),
-      bdict_length_(0),
-      bdict_end_(NULL),
-      node_offset_(0),
-      node_depth_(0),
-      is_valid_(false) {
-}
-
-NodeReader::NodeReader(const unsigned char* bdict_data, size_t bdict_length,
-                       size_t node_offset, int node_depth)
-    : bdict_data_(bdict_data),
-      bdict_length_(bdict_length),
-      bdict_end_(bdict_data + bdict_length),
-      node_offset_(node_offset),
-      node_depth_(node_depth),
-      is_valid_(bdict_data != NULL && node_offset < bdict_length) {
-}
-
-int NodeReader::FindWord(const unsigned char* word,
-                         int affix_indices[BDict::MAX_AFFIXES_PER_WORD]) const {
-  // Return 0 if the dictionary is corrupt as BDictReader::FindWord() does.
-  if (!bdict_data_ || node_offset_ > bdict_length_)
-    return 0;
-
-  if (is_leaf())
-    return CompareLeafNode(word, affix_indices);
-
-  if (is_lookup())
-    return FindInLookup(word, affix_indices);
-  if (is_list())
-    return FindInList(word, affix_indices);
-  return 0;  // Corrupt file.
-}
-
-NodeReader::FindResult NodeReader::GetChildAt(int index, char* found_char,
-                                              NodeReader* result) const {
-  if (is_lookup()) {
-    if (lookup_has_0th()) {
-      if (index == 0) {
-        *found_char = 0;
-        return ReaderForLookup0th(result);
-      }
-      index--;  // Make index relative to the non-0th-element table.
-    }
-    return ReaderForLookupAt(index, found_char, result);
-  }
-  if (is_list()) {
-    return ReaderForListAt(index, found_char, result);
-  }
-  return FIND_DONE;
-}
-
-int NodeReader::CompareLeafNode(
-    const unsigned char* word,
-    int affix_indices[BDict::MAX_AFFIXES_PER_WORD]) const {
-  // See if there is an additional string.
-  const unsigned char* additional = additional_string_for_leaf();
-  if (!additional) {
-    // No additional string. This means we should have reached the end of the
-    // word to get a match.
-    if (word[node_depth_] != 0)
-      return 0;
-    return FillAffixesForLeafMatch(0, affix_indices);
-  }
-
-  // Check the additional string.
-  int cur = 0;
-  while (&additional[cur] < bdict_end_ && additional[cur]) {
-    if (word[node_depth_ + cur] != additional[cur])
-      return 0;  // Not a match.
-    cur++;
-  }
-
-  if (&additional[cur] == bdict_end_) {
-    is_valid_ = false;
-    return 0;
-  }
-
-  // Got to the end of the additional string, the word should also be over for
-  // a match (the same as above).
-  if (word[node_depth_ + cur] != 0)
-    return 0;
-  return FillAffixesForLeafMatch(cur + 1, affix_indices);
-}
-
-int NodeReader::FillAffixesForLeafMatch(
-    size_t additional_bytes,
-    int affix_indices[BDict::MAX_AFFIXES_PER_WORD]) const {
-  // The first match is easy, it always comes from the affix_id included in the
-  // leaf node.
-  affix_indices[0] = affix_id_for_leaf();
-
-  if (!leaf_has_following() && affix_indices[0] != BDict::FIRST_AFFIX_IS_UNUSED)
-    return 1;  // Common case: no additional affix group IDs.
-
-  // We may or may not need to ignore that first value we just read, since it
-  // could be a dummy placeholder value. The |list_offset| is the starting
-  // position in the output list to write the rest of the values, which may
-  // overwrite the first value.
-  int list_offset = 1;
-  if (affix_indices[0] == BDict::FIRST_AFFIX_IS_UNUSED)
-    list_offset = 0;
-
-  // Save the end pointer (accounting for an odd number of bytes).
-  size_t array_start = node_offset_ + additional_bytes + 2;
-  const uint16* const bdict_short_end = reinterpret_cast<const uint16*>(
-      &bdict_data_[((bdict_length_ - array_start) & -2) + array_start]);
-  // Process all remaining matches.
-  const uint16* following_array = reinterpret_cast<const uint16*>(
-      &bdict_data_[array_start]);
-  for (int i = 0; i < BDict::MAX_AFFIXES_PER_WORD - list_offset; i++) {
-    if (&following_array[i] >= bdict_short_end) {
-      is_valid_ = false;
-      return 0;
-    }
-    if (following_array[i] == BDict::LEAF_NODE_FOLLOWING_LIST_TERMINATOR)
-      return i + list_offset;  // Found the end of the list.
-    affix_indices[i + list_offset] = following_array[i];
-  }
-  return BDict::MAX_AFFIXES_PER_WORD;
-}
-
-int NodeReader::FindInLookup(
-    const unsigned char* word,
-    int affix_indices[BDict::MAX_AFFIXES_PER_WORD]) const {
-  unsigned char next_char = word[node_depth_];
-
-  NodeReader child_reader;
-  if (next_char == 0 && lookup_has_0th()) {
-    if (ReaderForLookup0th(&child_reader) != FIND_NODE)
-      return 0;
-  } else {
-    // Look up in the regular part of the table.
-    int offset_in_table = static_cast<int>(next_char) - lookup_first_char();
-    if (offset_in_table < 0 || offset_in_table > lookup_num_chars())
-      return 0;  // Table can not include this value.
-
-    char dummy_char;
-    if (ReaderForLookupAt(offset_in_table, &dummy_char, &child_reader) !=
-        FIND_NODE)
-      return 0;
-    DCHECK(dummy_char == static_cast<char>(next_char));
-  }
-
-  if (!child_reader.is_valid())
-    return 0;  // Something is messed up.
-
-  // Now recurse into that child node.
-  return child_reader.FindWord(word, affix_indices);
-}
-
-NodeReader::FindResult NodeReader::ReaderForLookup0th(
-    NodeReader* result) const {
-  size_t child_offset;
-  if (is_lookup_32()) {
-    child_offset = *reinterpret_cast<const unsigned int*>(
-        &bdict_data_[zeroth_entry_offset()]);
-  } else {
-    child_offset = *reinterpret_cast<const unsigned short*>(
-        &bdict_data_[zeroth_entry_offset()]);
-    child_offset += node_offset_;
-  }
-
-  // Range check the offset;
-  if (child_offset >= bdict_length_) {
-    is_valid_ = false;
-    return FIND_DONE;
-  }
-
-  // Now recurse into that child node. We don't advance to the next character
-  // here since the 0th element will be a leaf (see ReaderForLookupAt).
-  *result = NodeReader(bdict_data_, bdict_length_, child_offset, node_depth_);
-  return FIND_NODE;
-}
-
-NodeReader::FindResult NodeReader::ReaderForLookupAt(
-    size_t index,
-    char* found_char,
-    NodeReader* result) const {
-  const unsigned char* table_begin = &bdict_data_[lookup_table_offset()];
-
-  if (index >= static_cast<size_t>(lookup_num_chars()) || !is_valid_)
-    return FIND_DONE;
-
-  size_t child_offset;
-  if (is_lookup_32()) {
-    // Table contains 32-bit absolute offsets.
-    child_offset =
-        reinterpret_cast<const unsigned int*>(table_begin)[index];
-    if (!child_offset)
-      return FIND_NOTHING;  // This entry in the table is empty.
-  } else {
-    // Table contains 16-bit offsets relative to the current node.
-    child_offset =
-        reinterpret_cast<const unsigned short*>(table_begin)[index];
-    if (!child_offset)
-      return FIND_NOTHING;  // This entry in the table is empty.
-    child_offset += node_offset_;
-  }
-
-  // Range check the offset;
-  if (child_offset >= bdict_length_) {
-    is_valid_ = false;
-    return FIND_DONE;  // Error.
-  }
-
-  // This is a bit tricky. When we've just reached the end of a word, the word
-  // itself will be stored in a leaf "node" off of this node. That node, of
-  // course, will want to know that it's the end of the word and so we have to
-  // have it use the same index into the word as we're using at this level.
-  //
-  // This happens when there is a word in the dictionary that is a strict
-  // prefix of other words in the dictionary, and so we'll have a non-leaf
-  // node representing the entire word before the ending leaf node.
-  //
-  // In all other cases, we want to advance to the next character. Even if the
-  // child node is a leaf, it will have an additional character that it will
-  // want to check.
-  *found_char = static_cast<char>(index + lookup_first_char());
-  if (!is_valid_)
-    return FIND_DONE;
-  int char_advance = *found_char == 0 ? 0 : 1;
-
-  *result = NodeReader(bdict_data_, bdict_length_,
-                       child_offset, node_depth_ + char_advance);
-  return FIND_NODE;
-}
-
-int NodeReader::FindInList(
-    const unsigned char* word,
-    int affix_indices[BDict::MAX_AFFIXES_PER_WORD]) const {
-  unsigned char next_char = word[node_depth_];
-
-  // TODO(brettw) replace with binary search.
-  size_t list_count = list_item_count();
-  const unsigned char* list_begin = &bdict_data_[node_offset_ + 1];
-
-  int bytes_per_index = (is_list_16() ? 3 : 2);
-
-  for (size_t i = 0; i < list_count; i++) {
-    const unsigned char* list_current = &list_begin[i * bytes_per_index];
-    if (list_current >= bdict_end_) {
-      is_valid_ = false;
-      return 0;
-    }
-    if (*list_current == next_char) {
-      // Found a match.
-      char dummy_char;
-      NodeReader child_reader;
-      if (ReaderForListAt(i, &dummy_char, &child_reader) != FIND_NODE)
-        return 0;
-      DCHECK(dummy_char == static_cast<char>(next_char));
-      return child_reader.FindWord(word, affix_indices);
-    }
-  }
-  return 0;
-}
-
-NodeReader::FindResult NodeReader::ReaderForListAt(
-    size_t index,
-    char* found_char,
-    NodeReader* result) const {
-  size_t list_begin = node_offset_ + 1;
-
-  if (index >= list_item_count())
-    return FIND_DONE;
-
-  size_t offset;
-  if (is_list_16()) {
-    const unsigned char* list_item_begin = bdict_data_ + list_begin + index * 3;
-    *found_char = static_cast<char>(list_item_begin[0]);
-
-    // The children begin right after the list.
-    size_t children_begin = list_begin + list_item_count() * 3;
-    offset = children_begin + *reinterpret_cast<const unsigned short*>(
-        &list_item_begin[1]);
-  } else {
-    const unsigned char* list_item_begin = bdict_data_ + list_begin + index * 2;
-    *found_char = list_item_begin[0];
-
-    size_t children_begin = list_begin + list_item_count() * 2;
-    offset = children_begin + list_item_begin[1];
-  }
-
-  if (offset == 0 || node_offset_ >= bdict_length_) {
-    is_valid_ = false;
-    return FIND_DONE;  // Error, should not happen except for corruption.
-  }
-
-  int char_advance = *found_char == 0 ? 0 : 1;  // See ReaderForLookupAt.
-  *result = NodeReader(bdict_data_, bdict_length_,
-                       offset, node_depth_ + char_advance);
-  return FIND_NODE;
-}
-
-// WordIterator ----------------------------------------------------------------
-
-struct WordIterator::NodeInfo {
-  // The current offset is set to -1 so we start iterating at 0 when Advance
-  // is called.
-  NodeInfo(const NodeReader& rdr, char add)
-      : reader(rdr),
-        addition(add),
-        cur_offset(-1) {
-  }
-
-  // The reader for this node level.
-  NodeReader reader;
-
-  // The character that this level represents. For the 0th level, this will
-  // be 0 (since it is the root that represents no characters).
-  char addition;
-
-  // The current index into the reader that we're reading. Combined with the
-  // |stack_|, this allows us to iterate over the tree in depth-first order.
-  int cur_offset;
-};
-
-WordIterator::WordIterator(const NodeReader& reader) {
-  NodeInfo info(reader, 0);
-  stack_.push_back(info);
-}
-
-WordIterator::WordIterator(const WordIterator& other) {
-  operator=(other);
-}
-
-WordIterator::~WordIterator() {
-  // Can't be in the header for the NodeReader destructor.
-}
-
-WordIterator& WordIterator::operator=(const WordIterator& other) {
-  stack_ = other.stack_;
-  return *this;
-}
-
-int WordIterator::Advance(char* output_buffer, size_t output_len,
-                          int affix_ids[BDict::MAX_AFFIXES_PER_WORD]) {
-  // In-order tree walker. This uses a loop for fake tail recursion.
-  while (!stack_.empty()) {
-    NodeInfo& cur = stack_.back();
-    cur.cur_offset++;
-    char cur_char;
-    NodeReader child_reader;
-
-    /*if (cur.reader.is_leaf()) {
-      child_reader = cur.reader;
-      cur_char = cur.addition;
-      stack_.pop_back();
-      return FoundLeaf(child_reader, cur_char, output_buffer, output_len,
-                       affix_ids);
-    }*/
-
-    switch (cur.reader.GetChildAt(cur.cur_offset, &cur_char, &child_reader)) {
-      case NodeReader::FIND_NODE:
-        // Got a valid child node.
-        if (child_reader.is_leaf()) {
-          return FoundLeaf(child_reader, cur_char, output_buffer, output_len,
-                           affix_ids);
-        }
-
-        // Not a leaf. Add the new node to our stack and try again.
-        stack_.push_back(NodeInfo(child_reader, cur_char));
-        break;
-
-      case NodeReader::FIND_NOTHING:
-        // This one is empty, but we're not done. Continue on.
-        break;
-
-      case NodeReader::FIND_DONE:
-        // No more children at this level, pop the stack and go back one.
-        stack_.pop_back();
-    }
-  }
-
-  return false;
-}
-
-int WordIterator::FoundLeaf(const NodeReader& reader, char cur_char,
-                            char* output_buffer, size_t output_len,
-                            int affix_ids[BDict::MAX_AFFIXES_PER_WORD]) {
-  // Remember that the first item in the stack is the root and so doesn't count.
-  int i;
-  for (i = 0; i < static_cast<int>(stack_.size()) - 1 && i < static_cast<int>(output_len) - 1; i++)
-    output_buffer[i] = stack_[i + 1].addition;
-  output_buffer[i++] = cur_char;  // The one we just found.
-
-  // Possibly add any extra parts.
-  size_t additional_string_length = 0;
-  const char* additional = reinterpret_cast<const char*>(
-      reader.additional_string_for_leaf());
-  for (; i < static_cast<int>(output_len) - 1 && additional &&
-           additional[additional_string_length] != 0;
-       i++, additional_string_length++)
-    output_buffer[i] = additional[additional_string_length];
-  if (additional_string_length)
-    additional_string_length++;  // Account for the null terminator.
-  output_buffer[i] = 0;
-
-  return reader.FillAffixesForLeafMatch(additional_string_length,
-                                        affix_ids);
-}
-
-// LineIterator ----------------------------------------------------------------
-
-LineIterator::LineIterator(
-    const unsigned char* bdict_data,
-    size_t bdict_length,
-    size_t first_offset)
-    : bdict_data_(bdict_data),
-      bdict_length_(bdict_length),
-      cur_offset_(first_offset) {
-}
-
-// Returns true when all data has been read. We're done when we reach a
-// double-NULL or a the end of the input (shouldn't happen).
-bool LineIterator::IsDone() const {
-  return cur_offset_ >= bdict_length_ || bdict_data_[cur_offset_] == 0;
-}
-
-const char* LineIterator::Advance() {
-  if (IsDone())
-    return NULL;
-
-  const char* begin = reinterpret_cast<const char*>(&bdict_data_[cur_offset_]);
-
-  // Advance over this word to find the end.
-  while (cur_offset_ < bdict_length_ && bdict_data_[cur_offset_])
-    cur_offset_++;
-  cur_offset_++;  // Advance over the NULL terminator.
-
-  return begin;
-}
-
-bool LineIterator::AdvanceAndCopy(char* buf, size_t buf_len) {
-  if (IsDone())
-    return false;
-
-  const char* begin = reinterpret_cast<const char*>(&bdict_data_[cur_offset_]);
-
-  // Advance over this word to find the end.
-  size_t i;
-  for (i = 0;
-       i < buf_len && cur_offset_ < bdict_length_ && bdict_data_[cur_offset_];
-       i++, cur_offset_++) {
-    buf[i] = bdict_data_[cur_offset_];
-  }
-  // Handle the NULL terminator.
-  cur_offset_++;  // Consume in the input
-  if (i < buf_len)
-    buf[i] = 0;  // Save in the output.
-  else
-    buf[buf_len - 1] = 0;  // Overflow, make sure it's terminated.
-
-  return !!buf[0];
-}
-
-// ReplacementIterator ---------------------------------------------------------
-
-// Fills pointers to NULL terminated strings into the given output params.
-// Returns false if there are no more pairs and nothing was filled in.
-bool ReplacementIterator::GetNext(const char** first, const char** second) {
-  if (IsDone())
-    return false;
-  *first = Advance();
-  *second = Advance();
-  return *first && *second;
-}
-
-// BDictReader -----------------------------------------------------------------
-
-BDictReader::BDictReader()
-    : bdict_data_(NULL),
-      bdict_length_(0),
-      header_(NULL) {
-}
-
-bool BDictReader::Init(const unsigned char* bdict_data, size_t bdict_length) {
-  if (bdict_length < sizeof(BDict::Header))
-    return false;
-
-  // Check header.
-  header_ = reinterpret_cast<const BDict::Header*>(bdict_data);
-  if (header_->signature != BDict::SIGNATURE ||
-      header_->major_version > BDict::MAJOR_VERSION ||
-      header_->dic_offset > bdict_length)
-    return false;
-
-  // Get the affix header, make sure there is enough room for it.
-  if (header_->aff_offset + sizeof(BDict::AffHeader) > bdict_length)
-    return false;
-  aff_header_ = reinterpret_cast<const BDict::AffHeader*>(
-      &bdict_data[header_->aff_offset]);
-
-  // Make sure there is enough room for the affix group count dword.
-  if (aff_header_->affix_group_offset > bdict_length - sizeof(uint32))
-    return false;
-
-  // This function is called from SpellCheck::SpellCheckWord(), which blocks
-  // WebKit. To avoid blocking WebKit for a long time, we do not check the MD5
-  // digest here. Instead we check the MD5 digest when Chrome finishes
-  // downloading a dictionary.
-
-  // Don't set these until the end. This way, NULL bdict_data_ will indicate
-  // failure.
-  bdict_data_ = bdict_data;
-  bdict_length_ = bdict_length;
-  return true;
-}
-
-int BDictReader::FindWord(
-    const char* word,
-    int affix_indices[BDict::MAX_AFFIXES_PER_WORD]) const {
-  if (!bdict_data_ ||
-      header_->dic_offset >= bdict_length_) {
-    // When the dictionary is corrupt, we return 0 which means the word is valid
-    // and has no rules. This means when there is some problem, we'll default
-    // to no spellchecking rather than marking everything as misspelled.
-    return 0;
-  }
-  NodeReader reader(bdict_data_, bdict_length_, header_->dic_offset, 0);
-  return reader.FindWord(reinterpret_cast<const unsigned char*>(word),
-                         affix_indices);
-}
-
-LineIterator BDictReader::GetAfLineIterator() const {
-  if (!bdict_data_ ||
-      aff_header_->affix_group_offset == 0 ||
-      aff_header_->affix_group_offset >= bdict_length_)
-    return LineIterator(bdict_data_, 0, 0);  // Item is empty or invalid.
-  return LineIterator(bdict_data_, bdict_length_,
-                      aff_header_->affix_group_offset);
-}
-
-LineIterator BDictReader::GetAffixLineIterator() const {
-  if (!bdict_data_ ||
-      aff_header_->affix_rule_offset == 0 ||
-      aff_header_->affix_rule_offset >= bdict_length_)
-    return LineIterator(bdict_data_, 0, 0);  // Item is empty or invalid.
-  return LineIterator(bdict_data_, bdict_length_,
-                      aff_header_->affix_rule_offset);
-}
-
-LineIterator BDictReader::GetOtherLineIterator() const {
-  if (!bdict_data_ ||
-      aff_header_->other_offset == 0 ||
-      aff_header_->other_offset >= bdict_length_)
-    return LineIterator(bdict_data_, 0, 0);  // Item is empty or invalid.
-  return LineIterator(bdict_data_, bdict_length_,
-                      aff_header_->other_offset);
-}
-
-ReplacementIterator BDictReader::GetReplacementIterator() const {
-  return ReplacementIterator(bdict_data_, bdict_length_,
-                             aff_header_->rep_offset);
-}
-
-
-WordIterator BDictReader::GetAllWordIterator() const {
-  NodeReader reader(bdict_data_, bdict_length_, header_->dic_offset, 0);
-  return WordIterator(reader);
-}
-
-}  // namespace hunspell
diff --git a/google/bdict_reader.h b/google/bdict_reader.h
deleted file mode 100644
index 997e600..0000000
--- a/google/bdict_reader.h
+++ /dev/null
@@ -1,153 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_THIRD_PARTY_HUNSPELL_GOOGLE_DIC_READER_H__
-#define CHROME_THIRD_PARTY_HUNSPELL_GOOGLE_DIC_READER_H__
-
-#include <string>
-#include <vector>
-
-#include "base/basictypes.h"
-#include "third_party/hunspell/google/bdict.h"
-
-namespace hunspell {
-
-class BDictReader;
-class NodeReader;
-
-// Iterators -------------------------------------------------------------------
-
-// Iterates through all words in the dictionary. It will fill the word into
-// a caller-specified buffer.
-class WordIterator {
- public:
-  WordIterator(const WordIterator& other);
-  ~WordIterator();
-
-  // This must be explicitly declared and implemneted in the .cc file so it will
-  // compile without knowing the size of NodeInfo.
-  WordIterator& operator=(const WordIterator&);
-
-  // Fills the buffer with the next word and the affixes for it into the given
-  // array. Returns the number of affixes. A return value of 0 means there are
-  // no more words.
-  int Advance(char* output_buffer, size_t output_len,
-              int affix_ids[BDict::MAX_AFFIXES_PER_WORD]);
-
- private:
-  friend class BDictReader;
-  struct NodeInfo;
-
-  WordIterator(const NodeReader& reader);
-
-  // Called by Advance when a leaf is found to generate the word, affix list,
-  // and return value.
-  int FoundLeaf(const NodeReader& node, char cur_char,
-                char* output_buffer, size_t output_len,
-                int affix_ids[BDict::MAX_AFFIXES_PER_WORD]);
-
-  std::vector<NodeInfo> stack_;
-};
-
-// Will iterate over a list of lines separated by NULLs.
-class LineIterator {
- public:
-  // Returns the next word in the sequence or NULL if there are no mode.
-  const char* Advance();
-
-  // Advances to the next word in the sequence and copies it into the given
-  // buffer, of the given length. If it doesn't fit, it will be truncated.
-  // Returns true on success.
-  bool AdvanceAndCopy(char* buf, size_t buf_len);
-
-  // Returns true when all data has been read. We're done when we reach a
-  // double-NULL or a the end of the input (shouldn't happen).
-  bool IsDone() const;
-
- protected:
-  friend class BDictReader;
-
-  LineIterator(const unsigned char* bdict_data, size_t bdict_length,
-               size_t first_offset);
-
-  const unsigned char* bdict_data_;
-  size_t bdict_length_;
-
-  // Current offset within bdict_data of the next string to read.
-  size_t cur_offset_;
-};
-
-// Created by GetReplacementIterator to iterate over all replacement pairs.
-class ReplacementIterator : public LineIterator {
- public:
-  // Fills pointers to NULL terminated strings into the given output params.
-  // Returns false if there are no more pairs and nothing was filled in.
-  bool GetNext(const char** first, const char** second);
-
- private:
-  friend class BDictReader;
-
-  ReplacementIterator(const unsigned char* bdict_data, size_t bdict_length,
-                      size_t first_offset)
-      : LineIterator(bdict_data, bdict_length, first_offset) {
-  }
-};
-
-// Reads a BDict file mapped into memory.
-class BDictReader {
- public:
-  // You must call Init and it must succeed before calling any other functions.
-  BDictReader();
-
-  // Initializes the reader with the given data. The data does not transfer
-  // ownership, and the caller must keep it valid until the reader is destroyed.
-  // Returns true on success.
-  bool Init(const unsigned char* bdic_data, size_t bdic_length);
-
-  // Returns true if Init() succeeded and other functions can be called.
-  bool IsValid() const { return !!bdict_data_; }
-
-  // Locates the given word in the dictionary. There may be multiple matches if
-  // the word is listed multiple times in the dictionary with different affix
-  // rules.
-  //
-  // The number of matches is returned, and that number of corresponding affix
-  // group IDs are filled into |*affix_indices|. These IDs may be 0 to indicate
-  // there is no affix for that particular match. A return valuf of 0 means that
-  // there are no matches.
-  int FindWord(const char* word,
-               int affix_indices[BDict::MAX_AFFIXES_PER_WORD]) const;
-
-  // Returns an iterator that will go over all AF lines ("affix groups").
-  LineIterator GetAfLineIterator() const;
-
-  // Returns an iterator that will go over all SFX/PFX lines ("affix rules").
-  LineIterator GetAffixLineIterator() const;
-
-  // Returns an iterator that will go over all "other" lines.
-  LineIterator GetOtherLineIterator() const;
-
-  // Returns an iterator that can be used to iterate all replacements.
-  ReplacementIterator GetReplacementIterator() const;
-
-  // Used for testing, returns an iterator for all words in the dictionary.
-  WordIterator GetAllWordIterator() const;
-
- private:
-  // Non-NULL indicates Init succeeded.
-  const unsigned char* bdict_data_;
-  size_t bdict_length_;
-
-  // Pointer not owned by this class. It will point into the data. It will be
-  // NULL if the data is invalid.
-  const BDict::Header* header_;
-
-  const BDict::AffHeader* aff_header_;
-
-  DISALLOW_EVIL_CONSTRUCTORS(BDictReader);
-};
-
-}  // namespace hunspell
-
-#endif  // CHROME_THIRD_PARTY_HUNSPELL_GOOGLE_DIC_READER_H__
diff --git a/google/bdict_writer.cc b/google/bdict_writer.cc
deleted file mode 100644
index cd39f10..0000000
--- a/google/bdict_writer.cc
+++ /dev/null
@@ -1,512 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "third_party/hunspell/google/bdict_writer.h"
-
-#include "base/logging.h"
-#include "base/strings/stringprintf.h"
-#include "third_party/hunspell/google/bdict.h"
-
-namespace hunspell {
-
-// Represents one node the word trie in memory. This does not have to be very
-// efficient since it is only used when building.
-class DicNode {
- public:
-  enum StorageType {
-    UNDEFINED,  // Uninitialized storage type.
-    LEAF,       // Word with no additional string data.
-    LEAFMORE,   // Word with additional suffix following.
-    LIST16,     // List of sub-nodes with 16-bit relative offsets.
-    LIST8,      // List of sub-nodes with 8-bit relative offsets.
-    LOOKUP32,   // Lookup table with 32-bit absolute offsets.
-    LOOKUP16,   // LOokup table with 16-bit relative offsets.
-  };
-
-  DicNode() : addition(0), storage(UNDEFINED) {
-  }
-
-  ~DicNode() {
-    for (size_t i = 0; i < children.size(); i++)
-      delete children[i];
-  }
-
-  bool is_leaf() const { return children.empty(); }
-
-  // When non-zero, this character is the additional level that this
-  // node represents. This will be 0 for some leaf nodes when there is no
-  // addition and for the root node.
-  char addition;
-
-  std::vector<DicNode*> children;
-
-  // When there are no children, this is a leaf node and this "addition string"
-  // is appended to the result. When there are children, this will be empty.
-  std::string leaf_addition;
-
-  // For leaf nodes, this are the indices into the affix table.
-  std::vector<int> affix_indices;
-
-  // Initially uninitialized, ComputeStorage() will fill this in with the
-  // desired serialization method.
-  StorageType storage;
-};
-
-namespace {
-
-void SerializeTrie(const DicNode* node, std::string* output);
-
-// Returns true if the nth character in the given word is |ch|. Will return
-// false when there is no nth character. Note that this will also match an
-// implicit NULL at the end of the string.
-bool NthCharacterIs(const std::string& word, size_t n, char ch) {
-  if (word.length() < n)  // Want to allow n == length() to catch the NULL.
-    return false;
-  return word.c_str()[n] == ch;  // Use c_str() to get NULL terminator.
-}
-
-// Recursively build the trie data structure for the range in the |words| list
-// in [begin, end). It is assumed that all words in that range will have the
-// same |node_depth - 2| characters at the beginning. This node will key off of
-// the |node_depth - 1| character, with a special case for the root.
-//
-// |prefix_chars| is how deep this node is in the trie (and corresponds to how
-// many letters of the word we will skip). The root level will have
-// |prefix_chars| of 0.
-//
-// The given |node| will be filled with the data. The return value is the
-// index into the |words| vector of the next word to process. It will be
-// equal to |end| when all words have been consumed.
-size_t BuildTrie(const BDictWriter::WordList& words,
-                 size_t begin, size_t end,
-                 size_t node_depth, DicNode* node) {
-  // Find the prefix that this node represents.
-  const std::string& begin_str = words[begin].first;
-  if (begin_str.length() < node_depth) {
-    // Singleton.
-    node->addition = 0;
-    node->affix_indices = words[begin].second;
-    return begin + 1;
-  }
-
-  // Now find the range of words sharing this prefix.
-  size_t match_count;
-  if (node_depth == 0 && begin == 0) {
-    // Special case the root node.
-    match_count = end - begin;
-    node->addition = 0;
-  } else {
-    match_count = 0;
-    node->addition = begin_str[node_depth - 1];
-    // We know the strings should have [0, node_depth-1) characters at the
-    // beginning already matching, so we only need to check the new one.
-    while (begin + match_count < end &&
-           NthCharacterIs(words[begin + match_count].first,
-                          node_depth - 1, node->addition))
-      match_count++;
-  }
-
-  if (match_count == 1) {
-    // Just found a leaf node with no other words sharing its prefix. Save any
-    // remaining characters and we're done.
-    node->affix_indices = words[begin].second;
-    node->leaf_addition = begin_str.substr(node_depth);
-    return begin + 1;
-  }
-
-  // We have a range of words, add them as children of this node.
-  size_t i = begin;
-  while (i < begin + match_count) {
-    DicNode* cur = new DicNode;
-    i = BuildTrie(words, i, begin + match_count, node_depth + 1, cur);
-    node->children.push_back(cur);
-  }
-
-  return begin + match_count;
-}
-
-// Lookup tables are complicated. They can have a magic 0th entry not counted
-// in the table dimensions, and also have indices only for the used sub-range.
-// This function will compute the starting point and size of a lookup table,
-// in addition to whether it should have the magic 0th entry for the given
-// list of child nodes.
-void ComputeLookupStrategyDetails(const std::vector<DicNode*>& children,
-                                  bool* has_0th_entry,
-                                  int* first_item,
-                                  int* list_size) {
-  *has_0th_entry = false;
-  *first_item = 0;
-  *list_size = 0;
-  if (children.empty())
-    return;
-
-  size_t first_offset = 0;
-  if (children[0]->addition == 0) {
-    *has_0th_entry = true;
-    first_offset++;
-  }
-
-  if (children.size() == first_offset)
-    return;
-
-  *first_item = static_cast<unsigned char>(children[first_offset]->addition);
-  unsigned char last_item = children[children.size() - 1]->addition;
-  *list_size = last_item - *first_item + 1;
-}
-
-// Recursively fills in the storage strategy for this node and each of its
-// children. This must be done before actually serializing because the storage
-// mode will depend on the size of the children.
-size_t ComputeTrieStorage(DicNode* node) {
-  if (node->is_leaf()) {
-    // The additional affix list holds affixes when there is more than one. Each
-    // entry is two bytes, plus an additional FFFF terminator.
-    size_t supplimentary_size = 0;
-    if (node->affix_indices[0] > BDict::LEAF_NODE_MAX_FIRST_AFFIX_ID) {
-      // We cannot store the first affix ID of the affix list into a leaf node.
-      // In this case, we have to store all the affix IDs and a terminator
-      // into a supplimentary list.
-      supplimentary_size = node->affix_indices.size() * 2 + 2;
-    } else if (node->affix_indices.size() > 1) {
-      // We can store the first affix ID of the affix list into a leaf node.
-      // In this case, we need to store the remaining affix IDs and a
-      // terminator into a supplimentary list.
-      supplimentary_size = node->affix_indices.size() * 2;
-    }
-
-    if (node->leaf_addition.empty()) {
-      node->storage = DicNode::LEAF;
-      return 2 + supplimentary_size;
-    }
-    node->storage = DicNode::LEAFMORE;
-    // Signature & affix (2) + null for leaf_addition (1) = 3
-    return 3 + node->leaf_addition.size() + supplimentary_size;
-  }
-
-  // Recursively compute the size of the children for non-leaf nodes.
-  size_t child_size = 0;
-  for (size_t i = 0; i < node->children.size(); i++)
-    child_size += ComputeTrieStorage(node->children[i]);
-
-  // Fixed size is only 1 byte which is the ID byte and the count combined.
-  static const int kListHeaderSize = 1;
-
-  // Lists can only store up to 16 items.
-  static const size_t kListThreshold = 16;
-  if (node->children.size() < kListThreshold && child_size <= 0xFF) {
-    node->storage = DicNode::LIST8;
-    return kListHeaderSize + node->children.size() * 2 + child_size;
-  }
-
-  if (node->children.size() < kListThreshold && child_size <= 0xFFFF) {
-    node->storage = DicNode::LIST16;
-    // Fixed size is one byte plus 3 for each table entry.
-    return kListHeaderSize + node->children.size() * 3 + child_size;
-  }
-
-  static const int kTableHeaderSize = 2;  // Type + table size.
-
-  bool has_0th_item;
-  int first_table_item, table_item_count;
-  ComputeLookupStrategyDetails(node->children, &has_0th_item,
-                               &first_table_item, &table_item_count);
-  if (child_size + kTableHeaderSize + (has_0th_item ? 2 : 0) +
-      table_item_count * 2 < 0xFFFF) {
-    // Use 16-bit addressing since the children will fit.
-    node->storage = DicNode::LOOKUP16;
-    return kTableHeaderSize + (has_0th_item ? 2 : 0) + table_item_count * 2 +
-        child_size;
-  }
-
-  // Use 32-bit addressing as a last resort.
-  node->storage = DicNode::LOOKUP32;
-  return kTableHeaderSize + (has_0th_item ? 4 : 0) + table_item_count * 4 +
-      child_size;
-}
-
-// Serializes the given node when it is DicNode::LEAF* to the output.
-void SerializeLeaf(const DicNode* node, std::string* output) {
-  // The low 6 bits of the ID byte are the high 6 bits of the first affix ID.
-  int first_affix = node->affix_indices.size() ? node->affix_indices[0] : 0;
-
-  // We may store the first value with the node or in the supplimentary list.
-  size_t first_affix_in_supplimentary_list = 1;
-  if (first_affix > BDict::LEAF_NODE_MAX_FIRST_AFFIX_ID) {
-    // There are not enough bits for this value, move it to the supplimentary
-    // list where there are more bits per value.
-    first_affix_in_supplimentary_list = 0;
-    first_affix = BDict::FIRST_AFFIX_IS_UNUSED;
-  }
-
-  unsigned char id_byte = (first_affix >> 8) &
-      BDict::LEAF_NODE_FIRST_BYTE_AFFIX_MASK;
-
-  // The next two bits indicates an additional string and more affixes.
-  if (node->storage == DicNode::LEAFMORE)
-    id_byte |= BDict::LEAF_NODE_ADDITIONAL_VALUE;
-  if (node->affix_indices.size() > 1 || first_affix_in_supplimentary_list == 0)
-    id_byte |= BDict::LEAF_NODE_FOLLOWING_VALUE;
-  output->push_back(id_byte);
-
-  // Following is the low 8 bits of the affix index.
-  output->push_back(first_affix & 0xff);
-
-  // Handle the optional addition with NULL terminator.
-  if (node->storage == DicNode::LEAFMORE) {
-    for (size_t i = 0; i < node->leaf_addition.size() + 1; i++)
-      output->push_back(node->leaf_addition.c_str()[i]);
-  }
-
-  // Handle any following affixes. We already wrote the 0th one.
-  if (node->affix_indices.size() > first_affix_in_supplimentary_list) {
-    for (size_t i = first_affix_in_supplimentary_list;
-         i < node->affix_indices.size() && i < BDict::MAX_AFFIXES_PER_WORD;
-         i++) {
-      output->push_back(static_cast<char>(node->affix_indices[i] & 0xFF));
-      output->push_back(
-          static_cast<char>((node->affix_indices[i] >> 8) & 0xFF));
-    }
-
-    // Terminator for affix list. We use 0xFFFF.
-    output->push_back(static_cast<unsigned char>(0xFF));
-    output->push_back(static_cast<unsigned char>(0xFF));
-  }
-}
-
-// Serializes the given node when it is DicNode::LIST* to the output.
-void SerializeList(const DicNode* node, std::string* output) {
-  bool is_8_bit = node->storage == DicNode::LIST8;
-  unsigned char id_byte = BDict::LIST_NODE_TYPE_VALUE |
-      (is_8_bit ? 0 : BDict::LIST_NODE_16BIT_VALUE);
-  id_byte |= node->children.size();  // We assume the size is < 4 bits.
-  output->push_back(id_byte);
-
-  // Reserve enough room for the lookup table (either 2 or 3 bytes per entry).
-  int bytes_per_entry = (is_8_bit ? 2 : 3);
-  size_t table_begin = output->size();
-  output->resize(output->size() + node->children.size() * bytes_per_entry);
-  size_t children_begin = output->size();
-
-  for (size_t i = 0; i < node->children.size(); i++) {
-    // First is the character this entry represents.
-    (*output)[table_begin + i * bytes_per_entry] = node->children[i]->addition;
-
-    // Next is the 8- or 16-bit offset.
-    size_t offset = output->size() - children_begin;
-    if (is_8_bit) {
-      DCHECK(offset <= 0xFF);
-      (*output)[table_begin + i * bytes_per_entry + 1] =
-          static_cast<char>(offset & 0xFF);
-    } else {
-      unsigned short* output16 = reinterpret_cast<unsigned short*>(
-          &(*output)[table_begin + i * bytes_per_entry + 1]);
-      *output16 = static_cast<unsigned short>(offset);
-    }
-
-    // Now append the children's data.
-    SerializeTrie(node->children[i], output);
-  }
-}
-
-// Serializes the given node when it is DicNode::LOOKUP* to the output.
-void SerializeLookup(const DicNode* node, std::string* output) {
-  unsigned char id_byte = BDict::LOOKUP_NODE_TYPE_VALUE;
-
-  bool has_0th_item;
-  int first_table_item, table_item_count;
-  ComputeLookupStrategyDetails(node->children, &has_0th_item,
-                               &first_table_item, &table_item_count);
-
-  // Set the extra bits in the ID byte.
-  bool is_32_bit = (node->storage == DicNode::LOOKUP32);
-  if (is_32_bit)
-    id_byte |= BDict::LOOKUP_NODE_32BIT_VALUE;
-  if (has_0th_item)
-    id_byte |= BDict::LOOKUP_NODE_0TH_VALUE;
-
-  size_t begin_offset = output->size();
-
-  output->push_back(id_byte);
-  output->push_back(static_cast<char>(first_table_item));
-  output->push_back(static_cast<char>(table_item_count));
-
-  // Save room for the lookup table and the optional 0th item.
-  int bytes_per_entry = (is_32_bit ? 4 : 2);
-  size_t zeroth_item_offset = output->size();
-  if (has_0th_item)
-    output->resize(output->size() + bytes_per_entry);
-  size_t table_begin = output->size();
-  output->resize(output->size() + table_item_count * bytes_per_entry);
-
-  // Append the children.
-  for (size_t i = 0; i < node->children.size(); i++) {
-    size_t offset = output->size();
-
-    // Compute the location at which we'll store the offset of the child data.
-    // We may be writing the magic 0th item.
-    size_t offset_offset;
-    if (i == 0 && has_0th_item) {
-      offset_offset = zeroth_item_offset;
-    } else {
-      int table_index = static_cast<unsigned char>(node->children[i]->addition) - first_table_item;
-      offset_offset = table_begin + table_index * bytes_per_entry;
-    }
-
-    // Write the offset.
-    if (is_32_bit) {
-      // Use 32-bit absolute offsets.
-      // FIXME(brettw) use bit cast.
-      unsigned* offset32 = reinterpret_cast<unsigned*>(&(*output)[offset_offset]);
-      *offset32 = static_cast<unsigned>(output->size());
-    } else {
-      // Use 16-bit relative offsets.
-      unsigned short* offset16 = reinterpret_cast<unsigned short*>(&(*output)[offset_offset]);
-      *offset16 = static_cast<unsigned short>(output->size() - begin_offset);
-    }
-
-    SerializeTrie(node->children[i], output);
-  }
-}
-
-// Recursively serializes this node and all of its children to the output.
-void SerializeTrie(const DicNode* node, std::string* output) {
-  if (node->storage == DicNode::LEAF ||
-      node->storage == DicNode::LEAFMORE) {
-    SerializeLeaf(node, output);
-  } else if (node->storage == DicNode::LIST8 ||
-             node->storage == DicNode::LIST16) {
-    SerializeList(node, output);
-  } else if (node->storage == DicNode::LOOKUP16 ||
-             node->storage == DicNode::LOOKUP32) {
-    SerializeLookup(node, output);
-  }
-}
-/*
-void SerializeStringList(const std::vector<std::string>& list,
-                         std::string* output) {
-  for (size_t i = 0; i < list.size(); i++) {
-    if (i != 0)
-      output->push_back('\n');
-    output->append(list[i]);
-  }
-  output->push_back(0);
-}
-*/
-
-// Appends the given uint32 to the given string.
-void AppendUint32(uint32 a, std::string* output) {
-  size_t offset = output->size();
-  output->resize(offset + 4);
-  memcpy(&(*output)[offset], &a, sizeof(uint32));
-}
-
-// Serializes the given list of strings with 0 bytes separating them. The end
-// will be marked by a double-0.
-void SerializeStringListNullTerm(const std::vector<std::string>& strings,
-                                 std::string* output) {
-  for (size_t i = 0; i < strings.size(); i++) {
-    // Can't tolerate empty strings since the'll mark the end.
-    if (strings[i].empty())
-      output->push_back(' ');
-    else
-      output->append(strings[i]);
-    output->push_back(0);
-  }
-  output->push_back(0);
-}
-
-void SerializeReplacements(
-    const std::vector< std::pair<std::string, std::string> >& repl,
-    std::string* output) {
-  for (size_t i = 0; i < repl.size(); i++) {
-    output->append(repl[i].first);
-    output->push_back(0);
-    output->append(repl[i].second);
-    output->push_back(0);
-  }
-  output->push_back(0);
-}
-
-}  // namespace
-
-BDictWriter::BDictWriter() : trie_root_(NULL) {
-}
-
-BDictWriter::~BDictWriter() {
-  delete trie_root_;
-}
-
-void BDictWriter::SetWords(const WordList& words) {
-  trie_root_ = new DicNode;
-  BuildTrie(words, 0, words.size(), 0, trie_root_);
-}
-
-std::string BDictWriter::GetBDict() const {
-  std::string ret;
-
-  // Save room for the header. This will be populated at the end.
-  ret.resize(sizeof(hunspell::BDict::Header));
-
-  // Serialize the affix portion.
-  size_t aff_offset = ret.size();
-  SerializeAff(&ret);
-
-  // Serialize the dictionary words.
-  size_t dic_offset = ret.size();
-  ret.reserve(ret.size() + ComputeTrieStorage(trie_root_));
-  SerializeTrie(trie_root_, &ret);
-
-  // Fill the header last, now that we have the data.
-  hunspell::BDict::Header* header =
-      reinterpret_cast<hunspell::BDict::Header*>(&ret[0]);
-  header->signature = hunspell::BDict::SIGNATURE;
-  header->major_version = hunspell::BDict::MAJOR_VERSION;
-  header->minor_version = hunspell::BDict::MINOR_VERSION;
-  header->aff_offset = static_cast<uint32>(aff_offset);
-  header->dic_offset = static_cast<uint32>(dic_offset);
-
-  // Write the MD5 digest of the affix information and the dictionary words at
-  // the end of the BDic header.
-  if (header->major_version >= 2)
-    base::MD5Sum(&ret[aff_offset], ret.size() - aff_offset, &header->digest);
-
-  return ret;
-}
-
-void BDictWriter::SerializeAff(std::string* output) const {
-  // Reserve enough room for the header.
-  size_t header_offset = output->size();
-  output->resize(output->size() + sizeof(hunspell::BDict::AffHeader));
-
-  // Write the comment.
-  output->push_back('\n');
-  output->append(comment_);
-  output->push_back('\n');
-
-  // We need a magic first AF line that lists the number of following ones.
-  size_t affix_group_offset = output->size();
-  output->append(base::StringPrintf("AF %d",
-                                    static_cast<int>(affix_groups_.size())));
-  output->push_back(0);
-  SerializeStringListNullTerm(affix_groups_, output);
-
-  size_t affix_rule_offset = output->size();
-  SerializeStringListNullTerm(affix_rules_, output);
-
-  size_t rep_offset = output->size();
-  SerializeReplacements(replacements_, output);
-
-  size_t other_offset = output->size();
-  SerializeStringListNullTerm(other_commands_, output);
-
-  // Add the header now that we know the offsets.
-  hunspell::BDict::AffHeader* header =
-      reinterpret_cast<hunspell::BDict::AffHeader*>(&(*output)[header_offset]);
-  header->affix_group_offset = static_cast<uint32>(affix_group_offset);
-  header->affix_rule_offset = static_cast<uint32>(affix_rule_offset);
-  header->rep_offset = static_cast<uint32>(rep_offset);
-  header->other_offset = static_cast<uint32>(other_offset);
-}
-
-}  // namespace hunspell
diff --git a/google/bdict_writer.h b/google/bdict_writer.h
deleted file mode 100644
index c341708..0000000
--- a/google/bdict_writer.h
+++ /dev/null
@@ -1,70 +0,0 @@
-// Copyright (c) 2011 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CHROME_THIRD_PARTY_HUNSPELL_GOOGLE_BDICT_WRITER_H__
-#define CHROME_THIRD_PARTY_HUNSPELL_GOOGLE_BDICT_WRITER_H__
-
-#include <string>
-#include <vector>
-
-#include "base/basictypes.h"
-
-namespace hunspell {
-
-class DicNode;
-
-// Class for creating a binary dictionary file from data read from Hunspell
-// spellchecker files.
-class BDictWriter {
- public:
-  typedef std::vector< std::pair<std::string, std::vector<int> > > WordList;
-
-  BDictWriter();
-  ~BDictWriter();
-
-  // Affix setters.
-  void SetComment(const std::string& comment) {
-    comment_ = comment;
-  }
-  void SetAffixRules(const std::vector<std::string>& rules) {
-    affix_rules_ = rules;
-  }
-  void SetAffixGroups(const std::vector<std::string>& groups) {
-    affix_groups_ = groups;
-  }
-  void SetReplacements(
-      const std::vector< std::pair<std::string, std::string> >& replacements) {
-    replacements_ = replacements;
-  }
-  void SetOtherCommands(const std::vector<std::string>& commands) {
-    other_commands_ = commands;
-  }
-
-  // The words must be sorted already.
-  void SetWords(const WordList& words);
-
-  // Returns the serialized data for the entire file. You must call all the
-  // setters above before this.
-  std::string GetBDict() const;
-
- private:
-  // Converts the affix members to a string.
-  void SerializeAff(std::string* output) const;
-
-  // Affix members.
-  std::string comment_;
-  std::vector<std::string> affix_rules_;
-  std::vector<std::string> affix_groups_;
-  std::vector< std::pair<std::string, std::string> > replacements_;
-  std::vector<std::string> other_commands_;
-
-  // Root of the generated trie. Filled by SetWords.
-  DicNode* trie_root_;
-
-  DISALLOW_EVIL_CONSTRUCTORS(BDictWriter);
-};
-
-}  // namespace hunspell
-
-#endif  // CHROME_THIRD_PARTY_HUNSPELL_GOOGLE_BDICT_WRITER_H__
diff --git a/hunspell.gyp b/hunspell.gyp
deleted file mode 100644
index cc09799..0000000
--- a/hunspell.gyp
+++ /dev/null
@@ -1,95 +0,0 @@
-# Copyright (c) 2009 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-{
-  'targets': [
-    {
-      'target_name': 'hunspell',
-      'type': 'static_library',
-      'msvs_guid': 'D5E8DCB2-9C61-446F-8BEE-B18CA0E0936E',
-      'dependencies': [
-        '../../base/base.gyp:base',
-        '../icu/icu.gyp:icuuc',
-      ],
-      'defines': [
-        'HUNSPELL_STATIC',
-        'HUNSPELL_CHROME_CLIENT',
-        'OPENOFFICEORG',
-      ],
-      'sources': [
-        'google/bdict.cc',
-        'google/bdict.h',
-        'google/bdict_reader.cc',
-        'google/bdict_reader.h',
-        'google/bdict_writer.cc',
-        'google/bdict_writer.h',
-        'src/hunspell/affentry.cxx',
-        'src/hunspell/affentry.hxx',
-        'src/hunspell/affixmgr.cxx',
-        'src/hunspell/affixmgr.hxx',
-        'src/hunspell/atypes.hxx',
-        'src/hunspell/baseaffix.hxx',
-        'src/hunspell/csutil.cxx',
-        'src/hunspell/csutil.hxx',
-        'src/hunspell/dictmgr.cxx',
-        'src/hunspell/dictmgr.hxx',
-        'src/hunspell/filemgr.cxx',
-        'src/hunspell/filemgr.hxx',
-        'src/hunspell/hashmgr.cxx',
-        'src/hunspell/hashmgr.hxx',
-        'src/hunspell/htypes.hxx',
-        'src/hunspell/hunspell.cxx',
-        'src/hunspell/hunspell.h',
-        'src/hunspell/hunspell.hxx',
-        'src/hunspell/hunzip.cxx',
-        'src/hunspell/hunzip.hxx',
-        'src/hunspell/langnum.hxx',
-        'src/hunspell/phonet.cxx',
-        'src/hunspell/phonet.hxx',
-        'src/hunspell/replist.cxx',
-        'src/hunspell/replist.hxx',
-        'src/hunspell/suggestmgr.cxx',
-        'src/hunspell/suggestmgr.hxx',
-        'src/hunspell/utf_info.hxx',
-        'src/hunspell/w_char.hxx',
-        'src/parsers/textparser.cxx',
-        'src/parsers/textparser.hxx',
-      ],
-      'direct_dependent_settings': {
-        'defines': [
-          'HUNSPELL_STATIC',
-          'HUNSPELL_CHROME_CLIENT',
-          'USE_HUNSPELL',
-        ],
-      },
-      'variables': {
-        'clang_warning_flags': [
-          # affentry.cxx has one `while ((p = nextchar(p)));` parsing loop.
-          '-Wno-empty-body',
-          # affentry.hxx has NULL as default parameter for a FLAG in two
-          # places.
-          '-Wno-null-conversion',
-        ],
-      },
-      # TODO(jschuh): http://crbug.com/167187 size_t -> int
-      'msvs_disabled_warnings': [ 4267 ],
-      'conditions': [
-        ['os_posix == 1 and OS != "mac"', {
-          'cflags': [
-            '-Wno-unused-value',
-            '-Wno-unused-variable',
-            '-Wno-write-strings',
-          ],
-        }],
-        ['gcc_version >= 48', {
-          'cflags': [
-            # affentry.hxx has NULL as default parameter for a FLAG in two
-            # places.
-            '-Wno-conversion-null',
-          ],
-        }],
-      ],
-    },
-  ],
-}
diff --git a/hunspell.vsprops b/hunspell.vsprops
deleted file mode 100644
index 0cda214..0000000
--- a/hunspell.vsprops
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="Windows-1252"?>
-<VisualStudioPropertySheet
-	ProjectType="Visual C++"
-	Version="8.00"
-	Name="hunspell"
-	>
-	<Tool
-		Name="VCCLCompilerTool"
-		AdditionalIncludeDirectories="&quot;$(SolutionDir)..\third_party\icu38\public\common&quot;"
-		PreprocessorDefinitions="W32;OPENOFFICEORG;CHROME_SPELL"
-	/>
-</VisualStudioPropertySheet>
diff --git a/src/hunspell/Makefile.am b/src/hunspell/Makefile.am
deleted file mode 100644
index 642218b..0000000
--- a/src/hunspell/Makefile.am
+++ /dev/null
@@ -1,19 +0,0 @@
-lib_LTLIBRARIES = libhunspell-1.3.la
-libhunspell_1_3_includedir = $(includedir)/hunspell
-libhunspell_1_3_la_SOURCES=affentry.cxx affixmgr.cxx csutil.cxx \
-		     dictmgr.cxx hashmgr.cxx hunspell.cxx \
-	             suggestmgr.cxx license.myspell license.hunspell \
-	             phonet.cxx filemgr.cxx hunzip.cxx replist.cxx
-
-libhunspell_1_3_include_HEADERS=affentry.hxx htypes.hxx affixmgr.hxx \
-	        csutil.hxx hunspell.hxx atypes.hxx dictmgr.hxx hunspell.h \
-		suggestmgr.hxx baseaffix.hxx hashmgr.hxx langnum.hxx \
-		phonet.hxx filemgr.hxx hunzip.hxx w_char.hxx replist.hxx \
-		hunvisapi.h
-
-libhunspell_1_3_la_DEPENDENCIES=utf_info.cxx
-libhunspell_1_3_la_LDFLAGS=-no-undefined
-
-AM_CXXFLAGS=$(CFLAG_VISIBILITY) -DBUILDING_LIBHUNSPELL
-
-EXTRA_DIST=hunspell.dsp makefile.mk README utf_info.cxx
diff --git a/src/hunspell/Makefile.in b/src/hunspell/Makefile.in
deleted file mode 100644
index 23371ef..0000000
--- a/src/hunspell/Makefile.in
+++ /dev/null
@@ -1,652 +0,0 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation,
-# Inc.
-# 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.
-
-@SET_MAKE@
-
-
-VPATH = @srcdir@
-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 = :
-build_triplet = @build@
-host_triplet = @host@
-target_triplet = @target@
-subdir = src/hunspell
-DIST_COMMON = README $(libhunspell_1_3_include_HEADERS) \
-	$(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-	$(srcdir)/hunvisapi.h.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/m4/codeset.m4 \
-	$(top_srcdir)/m4/gettext.m4 $(top_srcdir)/m4/glibc2.m4 \
-	$(top_srcdir)/m4/glibc21.m4 $(top_srcdir)/m4/iconv.m4 \
-	$(top_srcdir)/m4/intdiv0.m4 $(top_srcdir)/m4/intl.m4 \
-	$(top_srcdir)/m4/intlmacosx.m4 $(top_srcdir)/m4/intmax.m4 \
-	$(top_srcdir)/m4/inttypes-pri.m4 \
-	$(top_srcdir)/m4/inttypes_h.m4 $(top_srcdir)/m4/lcmessage.m4 \
-	$(top_srcdir)/m4/lib-ld.m4 $(top_srcdir)/m4/lib-link.m4 \
-	$(top_srcdir)/m4/lib-prefix.m4 $(top_srcdir)/m4/libtool.m4 \
-	$(top_srcdir)/m4/lock.m4 $(top_srcdir)/m4/longlong.m4 \
-	$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
-	$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
-	$(top_srcdir)/m4/nls.m4 $(top_srcdir)/m4/po.m4 \
-	$(top_srcdir)/m4/printf-posix.m4 $(top_srcdir)/m4/progtest.m4 \
-	$(top_srcdir)/m4/size_max.m4 $(top_srcdir)/m4/stdint_h.m4 \
-	$(top_srcdir)/m4/uintmax_t.m4 $(top_srcdir)/m4/visibility.m4 \
-	$(top_srcdir)/m4/wchar_t.m4 $(top_srcdir)/m4/wint_t.m4 \
-	$(top_srcdir)/m4/xsize.m4 $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
-	$(ACLOCAL_M4)
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES = hunvisapi.h
-CONFIG_CLEAN_VPATH_FILES =
-am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
-am__vpath_adj = case $$p in \
-    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
-    *) f=$$p;; \
-  esac;
-am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
-am__install_max = 40
-am__nobase_strip_setup = \
-  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
-am__nobase_strip = \
-  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
-am__nobase_list = $(am__nobase_strip_setup); \
-  for p in $$list; do echo "$$p $$p"; done | \
-  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
-  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
-    if (++n[$$2] == $(am__install_max)) \
-      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
-    END { for (dir in files) print dir, files[dir] }'
-am__base_list = \
-  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
-  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
-am__installdirs = "$(DESTDIR)$(libdir)" \
-	"$(DESTDIR)$(libhunspell_1_3_includedir)"
-LTLIBRARIES = $(lib_LTLIBRARIES)
-libhunspell_1_3_la_LIBADD =
-am_libhunspell_1_3_la_OBJECTS = affentry.lo affixmgr.lo csutil.lo \
-	dictmgr.lo hashmgr.lo hunspell.lo suggestmgr.lo phonet.lo \
-	filemgr.lo hunzip.lo replist.lo
-libhunspell_1_3_la_OBJECTS = $(am_libhunspell_1_3_la_OBJECTS)
-libhunspell_1_3_la_LINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) \
-	$(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
-	$(CXXFLAGS) $(libhunspell_1_3_la_LDFLAGS) $(LDFLAGS) -o $@
-DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-am__mv = mv -f
-CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-LTCXXCOMPILE = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
-	$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
-CXXLD = $(CXX)
-CXXLINK = $(LIBTOOL) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
-	--mode=link $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \
-	$(LDFLAGS) -o $@
-SOURCES = $(libhunspell_1_3_la_SOURCES)
-DIST_SOURCES = $(libhunspell_1_3_la_SOURCES)
-HEADERS = $(libhunspell_1_3_include_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-ALLOCA = @ALLOCA@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
-CATOBJEXT = @CATOBJEXT@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CFLAG_VISIBILITY = @CFLAG_VISIBILITY@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CURSESLIB = @CURSESLIB@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DATADIRNAME = @DATADIRNAME@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-DUMPBIN = @DUMPBIN@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-FGREP = @FGREP@
-GENCAT = @GENCAT@
-GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
-GLIBC2 = @GLIBC2@
-GLIBC21 = @GLIBC21@
-GMSGFMT = @GMSGFMT@
-GMSGFMT_015 = @GMSGFMT_015@
-GREP = @GREP@
-HAVE_ASPRINTF = @HAVE_ASPRINTF@
-HAVE_POSIX_PRINTF = @HAVE_POSIX_PRINTF@
-HAVE_SNPRINTF = @HAVE_SNPRINTF@
-HAVE_VISIBILITY = @HAVE_VISIBILITY@
-HAVE_WPRINTF = @HAVE_WPRINTF@
-HUNSPELL_VERSION_MAJOR = @HUNSPELL_VERSION_MAJOR@
-HUNSPELL_VERSION_MINOR = @HUNSPELL_VERSION_MINOR@
-INSTALL = @INSTALL@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-INSTOBJEXT = @INSTOBJEXT@
-INTLBISON = @INTLBISON@
-INTLLIBS = @INTLLIBS@
-INTLOBJS = @INTLOBJS@
-INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
-INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
-LD = @LD@
-LDFLAGS = @LDFLAGS@
-LIBICONV = @LIBICONV@
-LIBINTL = @LIBINTL@
-LIBMULTITHREAD = @LIBMULTITHREAD@
-LIBOBJS = @LIBOBJS@
-LIBPTH = @LIBPTH@
-LIBPTH_PREFIX = @LIBPTH_PREFIX@
-LIBS = @LIBS@
-LIBTHREAD = @LIBTHREAD@
-LIBTOOL = @LIBTOOL@
-LIPO = @LIPO@
-LN_S = @LN_S@
-LTLIBC = @LTLIBC@
-LTLIBICONV = @LTLIBICONV@
-LTLIBINTL = @LTLIBINTL@
-LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
-LTLIBOBJS = @LTLIBOBJS@
-LTLIBPTH = @LTLIBPTH@
-LTLIBTHREAD = @LTLIBTHREAD@
-MAKEINFO = @MAKEINFO@
-MKDIR_P = @MKDIR_P@
-MSGFMT = @MSGFMT@
-MSGFMT_015 = @MSGFMT_015@
-MSGMERGE = @MSGMERGE@
-NM = @NM@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OTOOL = @OTOOL@
-OTOOL64 = @OTOOL64@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_URL = @PACKAGE_URL@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-POSUB = @POSUB@
-PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
-RANLIB = @RANLIB@
-READLINELIB = @READLINELIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-STRIP = @STRIP@
-USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
-USE_NLS = @USE_NLS@
-VERSION = @VERSION@
-WINDRES = @WINDRES@
-WOE32 = @WOE32@
-WOE32DLL = @WOE32DLL@
-XFAILED = @XFAILED@
-XGETTEXT = @XGETTEXT@
-XGETTEXT_015 = @XGETTEXT_015@
-XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
-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@
-ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
-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 = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-builddir = @builddir@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-lt_ECHO = @lt_ECHO@
-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 = @target@
-target_alias = @target_alias@
-target_cpu = @target_cpu@
-target_os = @target_os@
-target_vendor = @target_vendor@
-top_build_prefix = @top_build_prefix@
-top_builddir = @top_builddir@
-top_srcdir = @top_srcdir@
-lib_LTLIBRARIES = libhunspell-1.3.la
-libhunspell_1_3_includedir = $(includedir)/hunspell
-libhunspell_1_3_la_SOURCES = affentry.cxx affixmgr.cxx csutil.cxx \
-		     dictmgr.cxx hashmgr.cxx hunspell.cxx \
-	             suggestmgr.cxx license.myspell license.hunspell \
-	             phonet.cxx filemgr.cxx hunzip.cxx replist.cxx
-
-libhunspell_1_3_include_HEADERS = affentry.hxx htypes.hxx affixmgr.hxx \
-	        csutil.hxx hunspell.hxx atypes.hxx dictmgr.hxx hunspell.h \
-		suggestmgr.hxx baseaffix.hxx hashmgr.hxx langnum.hxx \
-		phonet.hxx filemgr.hxx hunzip.hxx w_char.hxx replist.hxx \
-		hunvisapi.h
-
-libhunspell_1_3_la_DEPENDENCIES = utf_info.cxx
-libhunspell_1_3_la_LDFLAGS = -no-undefined
-AM_CXXFLAGS = $(CFLAG_VISIBILITY) -DBUILDING_LIBHUNSPELL
-EXTRA_DIST = hunspell.dsp makefile.mk README utf_info.cxx
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .cxx .lo .o .obj
-$(srcdir)/Makefile.in:  $(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/hunspell/Makefile'; \
-	$(am__cd) $(top_srcdir) && \
-	  $(AUTOMAKE) --gnu src/hunspell/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:  $(am__configure_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4):  $(am__aclocal_m4_deps)
-	cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(am__aclocal_m4_deps):
-hunvisapi.h: $(top_builddir)/config.status $(srcdir)/hunvisapi.h.in
-	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
-	@$(NORMAL_INSTALL)
-	test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
-	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
-	list2=; for p in $$list; do \
-	  if test -f $$p; then \
-	    list2="$$list2 $$p"; \
-	  else :; fi; \
-	done; \
-	test -z "$$list2" || { \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
-	}
-
-uninstall-libLTLIBRARIES:
-	@$(NORMAL_UNINSTALL)
-	@list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
-	for p in $$list; do \
-	  $(am__strip_dir) \
-	  echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
-	  $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
-	done
-
-clean-libLTLIBRARIES:
-	-test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
-	@list='$(lib_LTLIBRARIES)'; for p in $$list; do \
-	  dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
-	  test "$$dir" != "$$p" || dir=.; \
-	  echo "rm -f \"$${dir}/so_locations\""; \
-	  rm -f "$${dir}/so_locations"; \
-	done
-libhunspell-1.3.la: $(libhunspell_1_3_la_OBJECTS) $(libhunspell_1_3_la_DEPENDENCIES) 
-	$(libhunspell_1_3_la_LINK) -rpath $(libdir) $(libhunspell_1_3_la_OBJECTS) $(libhunspell_1_3_la_LIBADD) $(LIBS)
-
-mostlyclean-compile:
-	-rm -f *.$(OBJEXT)
-
-distclean-compile:
-	-rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/affentry.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/affixmgr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/csutil.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dictmgr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filemgr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hashmgr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hunspell.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hunzip.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/phonet.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/replist.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/suggestmgr.Plo@am__quote@
-
-.cxx.o:
-@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ $<
-
-.cxx.obj:
-@am__fastdepCXX_TRUE@	$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
-@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
-
-.cxx.lo:
-@am__fastdepCXX_TRUE@	$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
-@am__fastdepCXX_TRUE@	$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCXX_FALSE@	DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCXX_FALSE@	$(LTCXXCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
-	-rm -f *.lo
-
-clean-libtool:
-	-rm -rf .libs _libs
-install-libhunspell_1_3_includeHEADERS: $(libhunspell_1_3_include_HEADERS)
-	@$(NORMAL_INSTALL)
-	test -z "$(libhunspell_1_3_includedir)" || $(MKDIR_P) "$(DESTDIR)$(libhunspell_1_3_includedir)"
-	@list='$(libhunspell_1_3_include_HEADERS)'; test -n "$(libhunspell_1_3_includedir)" || list=; \
-	for p in $$list; do \
-	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
-	  echo "$$d$$p"; \
-	done | $(am__base_list) | \
-	while read files; do \
-	  echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(libhunspell_1_3_includedir)'"; \
-	  $(INSTALL_HEADER) $$files "$(DESTDIR)$(libhunspell_1_3_includedir)" || exit $$?; \
-	done
-
-uninstall-libhunspell_1_3_includeHEADERS:
-	@$(NORMAL_UNINSTALL)
-	@list='$(libhunspell_1_3_include_HEADERS)'; test -n "$(libhunspell_1_3_includedir)" || list=; \
-	files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
-	test -n "$$files" || exit 0; \
-	echo " ( cd '$(DESTDIR)$(libhunspell_1_3_includedir)' && rm -f" $$files ")"; \
-	cd "$(DESTDIR)$(libhunspell_1_3_includedir)" && rm -f $$files
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
-	list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	mkid -fID $$unique
-tags: TAGS
-
-TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	set x; \
-	here=`pwd`; \
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	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
-CTAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
-		$(TAGS_FILES) $(LISP)
-	list='$(SOURCES) $(HEADERS)  $(LISP) $(TAGS_FILES)'; \
-	unique=`for i in $$list; do \
-	    if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
-	  done | \
-	  $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
-	      END { if (nonempty) { for (i in files) print i; }; }'`; \
-	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"
-
-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 $(LTLIBRARIES) $(HEADERS)
-installdirs:
-	for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(libhunspell_1_3_includedir)"; 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:
-	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
-	  install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
-	  `test -z '$(STRIP)' || \
-	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-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-generic clean-libLTLIBRARIES clean-libtool \
-	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-libhunspell_1_3_includeHEADERS
-
-install-dvi: install-dvi-am
-
-install-dvi-am:
-
-install-exec-am: install-libLTLIBRARIES
-
-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 \
-	mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-libLTLIBRARIES \
-	uninstall-libhunspell_1_3_includeHEADERS
-
-.MAKE: install-am install-strip
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
-	clean-libLTLIBRARIES clean-libtool ctags distclean \
-	distclean-compile distclean-generic distclean-libtool \
-	distclean-tags distdir dvi dvi-am html html-am info info-am \
-	install install-am install-data install-data-am install-dvi \
-	install-dvi-am install-exec install-exec-am install-html \
-	install-html-am install-info install-info-am \
-	install-libLTLIBRARIES install-libhunspell_1_3_includeHEADERS \
-	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 \
-	mostlyclean-libtool pdf pdf-am ps ps-am tags uninstall \
-	uninstall-am uninstall-libLTLIBRARIES \
-	uninstall-libhunspell_1_3_includeHEADERS
-
-
-# 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/hunspell/README b/src/hunspell/README
deleted file mode 100644
index b452096..0000000
--- a/src/hunspell/README
+++ /dev/null
@@ -1,21 +0,0 @@
-Hunspell spell checker and morphological analyser library
-
-Documentation, tests, examples: http://hunspell.sourceforge.net
-
-Author of Hunspell:
-László Németh (nemethl (at) gyorsposta.hu)
-
-Hunspell based on OpenOffice.org's Myspell. MySpell's author:
-Kevin Hendricks (kevin.hendricks (at) sympatico.ca)
-
-License: GPL 2.0/LGPL 2.1/MPL 1.1 tri-license
-
-The contents of this library may be used under the terms of
-the GNU General Public License Version 2 or later (the "GPL"), or
-the GNU Lesser General Public License Version 2.1 or later (the "LGPL",
-see http://gnu.org/copyleft/lesser.html) or the Mozilla Public License
-Version 1.1 or later (the "MPL", see http://mozilla.org/MPL/MPL-1.1.html).
-
-Software distributed under these licenses is distributed on an "AS IS" basis,
-WITHOUT WARRANTY OF ANY KIND, either express or implied. See the licences
-for the specific language governing rights and limitations under the licenses.
diff --git a/src/hunspell/affentry.cxx b/src/hunspell/affentry.cxx
deleted file mode 100644
index 0ff8b5d..0000000
--- a/src/hunspell/affentry.cxx
+++ /dev/null
@@ -1,964 +0,0 @@
-#include "license.hunspell"
-#include "license.myspell"
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <ctype.h>
-
-#include "affentry.hxx"
-#include "csutil.hxx"
-
-PfxEntry::PfxEntry(AffixMgr* pmgr, affentry* dp)
-{
-  // register affix manager
-  pmyMgr = pmgr;
-
-  // set up its initial values
-
-  aflag = dp->aflag;         // flag
-  strip = dp->strip;         // string to strip
-  appnd = dp->appnd;         // string to append
-  stripl = dp->stripl;       // length of strip string
-  appndl = dp->appndl;       // length of append string
-  numconds = dp->numconds;   // length of the condition
-  opts = dp->opts;           // cross product flag
-  // then copy over all of the conditions
-  if (opts & aeLONGCOND) {
-    memcpy(c.conds, dp->c.l.conds1, MAXCONDLEN_1);
-    c.l.conds2 = dp->c.l.conds2;
-  } else memcpy(c.conds, dp->c.conds, MAXCONDLEN);
-  next = NULL;
-  nextne = NULL;
-  nexteq = NULL;
-  morphcode = dp->morphcode;
-  contclass = dp->contclass;
-  contclasslen = dp->contclasslen;
-}
-
-
-PfxEntry::~PfxEntry()
-{
-    aflag = 0;
-    if (appnd) free(appnd);
-    if (strip) free(strip);
-    pmyMgr = NULL;
-    appnd = NULL;
-    strip = NULL;
-    if (opts & aeLONGCOND) free(c.l.conds2);
-    if (morphcode && !(opts & aeALIASM)) free(morphcode);
-    if (contclass && !(opts & aeALIASF)) free(contclass);
-}
-
-// add prefix to this word assuming conditions hold
-char * PfxEntry::add(const char * word, int len)
-{
-    char tword[MAXWORDUTF8LEN + 4];
-
-    if ((len > stripl || (len == 0 && pmyMgr->get_fullstrip())) && 
-       (len >= numconds) && test_condition(word) &&
-       (!stripl || (strncmp(word, strip, stripl) == 0)) &&
-       ((MAXWORDUTF8LEN + 4) > (len + appndl - stripl))) {
-    /* we have a match so add prefix */
-              char * pp = tword;
-              if (appndl) {
-                  strcpy(tword,appnd);
-                  pp += appndl;
-               }
-               strcpy(pp, (word + stripl));
-               return mystrdup(tword);
-     }
-     return NULL;
-}
-
-inline char * PfxEntry::nextchar(char * p) {
-    if (p) {
-        p++;
-        if (opts & aeLONGCOND) {
-            // jump to the 2nd part of the condition
-            if (p == c.conds + MAXCONDLEN_1) return c.l.conds2;
-        // end of the MAXCONDLEN length condition
-        } else if (p == c.conds + MAXCONDLEN) return NULL;
-	return *p ? p : NULL;
-    }
-    return NULL;
-}
-
-inline int PfxEntry::test_condition(const char * st)
-{
-    const char * pos = NULL; // group with pos input position
-    bool neg = false;        // complementer
-    bool ingroup = false;    // character in the group
-    if (numconds == 0) return 1;
-    char * p = c.conds;
-    while (1) {
-      switch (*p) {
-        case '\0': return 1;
-        case '[': { 
-                neg = false;
-                ingroup = false;
-                p = nextchar(p);
-                pos = st; break;
-            }
-        case '^': { p = nextchar(p); neg = true; break; }
-        case ']': { 
-                if ((neg && ingroup) || (!neg && !ingroup)) return 0;
-                pos = NULL;
-                p = nextchar(p);
-                // skip the next character
-                if (!ingroup && *st) for (st++; (opts & aeUTF8) && (*st & 0xc0) == 0x80; st++);
-                if (*st == '\0' && p) return 0; // word <= condition
-                break;
-            }
-         case '.': if (!pos) { // dots are not metacharacters in groups: [.]
-                p = nextchar(p);
-                // skip the next character
-                for (st++; (opts & aeUTF8) && (*st & 0xc0) == 0x80; st++);
-                if (*st == '\0' && p) return 0; // word <= condition
-                break;
-            }
-    default: {
-                if (*st == *p) {
-                    st++;
-                    p = nextchar(p);
-                    if ((opts & aeUTF8) && (*(st - 1) & 0x80)) { // multibyte
-                        while (p && (*p & 0xc0) == 0x80) {       // character
-                            if (*p != *st) {
-                                if (!pos) return 0;
-                                st = pos;
-                                break;
-                            }
-                            p = nextchar(p);
-                            st++;
-                        }
-                        if (pos && st != pos) {
-                            ingroup = true;
-                            while (p && *p != ']' && ((p = nextchar(p)) != NULL));
-                        }
-                    } else if (pos) {
-                        ingroup = true;
-                        while (p && *p != ']' && ((p = nextchar(p)) != NULL));
-                    }
-                } else if (pos) { // group
-                    p = nextchar(p);
-                } else return 0;
-            }
-      }
-      if (!p) return 1;
-    }
-}
-
-// check if this prefix entry matches
-struct hentry * PfxEntry::checkword(const char * word, int len, char in_compound, const FLAG needflag)
-{
-    int                 tmpl;   // length of tmpword
-    struct hentry *     he;     // hash entry of root word or NULL
-    char                tmpword[MAXWORDUTF8LEN + 4];
-
-    // on entry prefix is 0 length or already matches the beginning of the word.
-    // So if the remaining root word has positive length
-    // and if there are enough chars in root word and added back strip chars
-    // to meet the number of characters conditions, then test it
-
-     tmpl = len - appndl;
-
-     if (tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) {
-
-            // generate new root word by removing prefix and adding
-            // back any characters that would have been stripped
-
-            if (stripl) strcpy (tmpword, strip);
-            strcpy ((tmpword + stripl), (word + appndl));
-
-            // now make sure all of the conditions on characters
-            // are met.  Please see the appendix at the end of
-            // this file for more info on exactly what is being
-            // tested
-
-            // if all conditions are met then check if resulting
-            // root word in the dictionary
-
-            if (test_condition(tmpword)) {
-                tmpl += stripl;
-                if ((he = pmyMgr->lookup(tmpword)) != NULL) {
-                   do {
-                      if (TESTAFF(he->astr, aflag, he->alen) &&
-                        // forbid single prefixes with needaffix flag
-                        ! TESTAFF(contclass, pmyMgr->get_needaffix(), contclasslen) &&
-                        // needflag
-                        ((!needflag) || TESTAFF(he->astr, needflag, he->alen) ||
-                         (contclass && TESTAFF(contclass, needflag, contclasslen))))
-                            return he;
-                      he = he->next_homonym; // check homonyms
-                   } while (he);
-                }
-
-                // prefix matched but no root word was found
-                // if aeXPRODUCT is allowed, try again but now
-                // ross checked combined with a suffix
-
-                //if ((opts & aeXPRODUCT) && in_compound) {
-                if ((opts & aeXPRODUCT)) {
-                   he = pmyMgr->suffix_check(tmpword, tmpl, aeXPRODUCT, this, NULL,
-                        0, NULL, FLAG_NULL, needflag, in_compound);
-                   if (he) return he;
-                }
-            }
-     }
-    return NULL;
-}
-
-// check if this prefix entry matches
-struct hentry * PfxEntry::check_twosfx(const char * word, int len,
-    char in_compound, const FLAG needflag)
-{
-    int                 tmpl;   // length of tmpword
-    struct hentry *     he;     // hash entry of root word or NULL
-    char                tmpword[MAXWORDUTF8LEN + 4];
-
-    // on entry prefix is 0 length or already matches the beginning of the word.
-    // So if the remaining root word has positive length
-    // and if there are enough chars in root word and added back strip chars
-    // to meet the number of characters conditions, then test it
-
-     tmpl = len - appndl;
-
-     if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) &&
-        (tmpl + stripl >= numconds)) {
-
-            // generate new root word by removing prefix and adding
-            // back any characters that would have been stripped
-
-            if (stripl) strcpy (tmpword, strip);
-            strcpy ((tmpword + stripl), (word + appndl));
-
-            // now make sure all of the conditions on characters
-            // are met.  Please see the appendix at the end of
-            // this file for more info on exactly what is being
-            // tested
-
-            // if all conditions are met then check if resulting
-            // root word in the dictionary
-
-            if (test_condition(tmpword)) {
-                tmpl += stripl;
-
-                // prefix matched but no root word was found
-                // if aeXPRODUCT is allowed, try again but now
-                // cross checked combined with a suffix
-
-                if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) {
-                   he = pmyMgr->suffix_check_twosfx(tmpword, tmpl, aeXPRODUCT, this, needflag);
-                   if (he) return he;
-                }
-            }
-     }
-    return NULL;
-}
-
-// check if this prefix entry matches
-char * PfxEntry::check_twosfx_morph(const char * word, int len,
-         char in_compound, const FLAG needflag)
-{
-    int                 tmpl;   // length of tmpword
-    char                tmpword[MAXWORDUTF8LEN + 4];
-
-    // on entry prefix is 0 length or already matches the beginning of the word.
-    // So if the remaining root word has positive length
-    // and if there are enough chars in root word and added back strip chars
-    // to meet the number of characters conditions, then test it
-
-     tmpl = len - appndl;
-
-     if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) &&
-        (tmpl + stripl >= numconds)) {
-
-            // generate new root word by removing prefix and adding
-            // back any characters that would have been stripped
-
-            if (stripl) strcpy (tmpword, strip);
-            strcpy ((tmpword + stripl), (word + appndl));
-
-            // now make sure all of the conditions on characters
-            // are met.  Please see the appendix at the end of
-            // this file for more info on exactly what is being
-            // tested
-
-            // if all conditions are met then check if resulting
-            // root word in the dictionary
-
-            if (test_condition(tmpword)) {
-                tmpl += stripl;
-
-                // prefix matched but no root word was found
-                // if aeXPRODUCT is allowed, try again but now
-                // ross checked combined with a suffix
-
-                if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) {
-                    return pmyMgr->suffix_check_twosfx_morph(tmpword, tmpl,
-                             aeXPRODUCT, this, needflag);
-                }
-            }
-     }
-    return NULL;
-}
-
-// check if this prefix entry matches
-char * PfxEntry::check_morph(const char * word, int len, char in_compound, const FLAG needflag)
-{
-    int                 tmpl;   // length of tmpword
-    struct hentry *     he;     // hash entry of root word or NULL
-    char                tmpword[MAXWORDUTF8LEN + 4];
-    char                result[MAXLNLEN];
-    char * st;
-
-    *result = '\0';
-
-    // on entry prefix is 0 length or already matches the beginning of the word.
-    // So if the remaining root word has positive length
-    // and if there are enough chars in root word and added back strip chars
-    // to meet the number of characters conditions, then test it
-
-     tmpl = len - appndl;
-
-     if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) &&
-        (tmpl + stripl >= numconds)) {
-
-            // generate new root word by removing prefix and adding
-            // back any characters that would have been stripped
-
-            if (stripl) strcpy (tmpword, strip);
-            strcpy ((tmpword + stripl), (word + appndl));
-
-            // now make sure all of the conditions on characters
-            // are met.  Please see the appendix at the end of
-            // this file for more info on exactly what is being
-            // tested
-
-            // if all conditions are met then check if resulting
-            // root word in the dictionary
-
-            if (test_condition(tmpword)) {
-                tmpl += stripl;
-                if ((he = pmyMgr->lookup(tmpword)) != NULL) {
-                    do {
-                      if (TESTAFF(he->astr, aflag, he->alen) &&
-                        // forbid single prefixes with needaffix flag
-                        ! TESTAFF(contclass, pmyMgr->get_needaffix(), contclasslen) &&
-                        // needflag
-                        ((!needflag) || TESTAFF(he->astr, needflag, he->alen) ||
-                         (contclass && TESTAFF(contclass, needflag, contclasslen)))) {
-                            if (morphcode) {
-                                mystrcat(result, " ", MAXLNLEN);
-                                mystrcat(result, morphcode, MAXLNLEN);
-                            } else mystrcat(result,getKey(), MAXLNLEN);
-                            if (!HENTRY_FIND(he, MORPH_STEM)) {
-                                mystrcat(result, " ", MAXLNLEN);
-                                mystrcat(result, MORPH_STEM, MAXLNLEN);
-                                mystrcat(result, HENTRY_WORD(he), MAXLNLEN);
-                            }
-                            // store the pointer of the hash entry
-                            if (HENTRY_DATA(he)) {
-                                mystrcat(result, " ", MAXLNLEN);
-                                mystrcat(result, HENTRY_DATA2(he), MAXLNLEN);
-                            } else {
-                                // return with debug information
-                                char * flag = pmyMgr->encode_flag(getFlag());
-                                mystrcat(result, " ", MAXLNLEN);
-                                mystrcat(result, MORPH_FLAG, MAXLNLEN);
-                                mystrcat(result, flag, MAXLNLEN);
-                                free(flag);
-                            }
-                            mystrcat(result, "\n", MAXLNLEN);
-                      }
-                      he = he->next_homonym;
-                    } while (he);
-                }
-
-                // prefix matched but no root word was found
-                // if aeXPRODUCT is allowed, try again but now
-                // ross checked combined with a suffix
-
-                if ((opts & aeXPRODUCT) && (in_compound != IN_CPD_BEGIN)) {
-                   st = pmyMgr->suffix_check_morph(tmpword, tmpl, aeXPRODUCT, this,
-                     FLAG_NULL, needflag);
-                   if (st) {
-                        mystrcat(result, st, MAXLNLEN);
-                        free(st);
-                   }
-                }
-            }
-     }
-    
-    if (*result) return mystrdup(result);
-    return NULL;
-}
-
-SfxEntry::SfxEntry(AffixMgr * pmgr, affentry* dp)
-{
-  // register affix manager
-  pmyMgr = pmgr;
-
-  // set up its initial values
-  aflag = dp->aflag;         // char flag
-  strip = dp->strip;         // string to strip
-  appnd = dp->appnd;         // string to append
-  stripl = dp->stripl;       // length of strip string
-  appndl = dp->appndl;       // length of append string
-  numconds = dp->numconds;   // length of the condition
-  opts = dp->opts;           // cross product flag
-
-  // then copy over all of the conditions
-  if (opts & aeLONGCOND) {
-    memcpy(c.l.conds1, dp->c.l.conds1, MAXCONDLEN_1);
-    c.l.conds2 = dp->c.l.conds2;
-  } else memcpy(c.conds, dp->c.conds, MAXCONDLEN);
-  next = NULL;
-  nextne = NULL;
-  nexteq = NULL;
-  rappnd = myrevstrdup(appnd);
-  morphcode = dp->morphcode;
-  contclass = dp->contclass;
-  contclasslen = dp->contclasslen;
-}
-
-
-SfxEntry::~SfxEntry()
-{
-    aflag = 0;
-    if (appnd) free(appnd);
-    if (rappnd) free(rappnd);
-    if (strip) free(strip);
-    pmyMgr = NULL;
-    appnd = NULL;
-    strip = NULL;
-    if (opts & aeLONGCOND) free(c.l.conds2);
-    if (morphcode && !(opts & aeALIASM)) free(morphcode);
-    if (contclass && !(opts & aeALIASF)) free(contclass);
-}
-
-// add suffix to this word assuming conditions hold
-char * SfxEntry::add(const char * word, int len)
-{
-    char                tword[MAXWORDUTF8LEN + 4];
-
-     /* make sure all conditions match */
-     if ((len > stripl || (len == 0 && pmyMgr->get_fullstrip())) &&
-        (len >= numconds) && test_condition(word + len, word) &&
-        (!stripl || (strcmp(word + len - stripl, strip) == 0)) &&
-        ((MAXWORDUTF8LEN + 4) > (len + appndl - stripl))) {
-              /* we have a match so add suffix */
-              strcpy(tword,word);
-              if (appndl) {
-                  strcpy(tword + len - stripl, appnd);
-              } else {
-                  *(tword + len - stripl) = '\0';
-              }
-              return mystrdup(tword);
-     }
-     return NULL;
-}
-
-inline char * SfxEntry::nextchar(char * p) {
-    if (p) {
-	p++;
-	if (opts & aeLONGCOND) {
-    	    // jump to the 2nd part of the condition
-    	    if (p == c.l.conds1 + MAXCONDLEN_1) return c.l.conds2;
-	// end of the MAXCONDLEN length condition
-	} else if (p == c.conds + MAXCONDLEN) return NULL;
-	return *p ? p : NULL;
-    }
-    return NULL;
-}
-
-inline int SfxEntry::test_condition(const char * st, const char * beg)
-{
-    const char * pos = NULL;    // group with pos input position
-    bool neg = false;           // complementer
-    bool ingroup = false;       // character in the group
-    if (numconds == 0) return 1;
-    char * p = c.conds;
-    st--;
-    int i = 1;
-    while (1) {
-      switch (*p) {
-        case '\0': return 1;
-        case '[': { p = nextchar(p); pos = st; break; }
-        case '^': { p = nextchar(p); neg = true; break; }
-        case ']': { if (!neg && !ingroup) return 0;
-                i++;
-                // skip the next character
-                if (!ingroup) {
-                    for (; (opts & aeUTF8) && (st >= beg) && (*st & 0xc0) == 0x80; st--);
-                    st--;
-                }                    
-                pos = NULL;
-                neg = false;
-                ingroup = false;
-                p = nextchar(p);
-                if (st < beg && p) return 0; // word <= condition
-                break;
-            }
-        case '.': if (!pos) { // dots are not metacharacters in groups: [.]
-                p = nextchar(p);
-                // skip the next character
-                for (st--; (opts & aeUTF8) && (st >= beg) && (*st & 0xc0) == 0x80; st--);
-                if (st < beg) { // word <= condition
-		    if (p) return 0; else return 1;
-		}
-                if ((opts & aeUTF8) && (*st & 0x80)) { // head of the UTF-8 character
-                    st--;
-                    if (st < beg) { // word <= condition
-			if (p) return 0; else return 1;
-		    }
-                }
-                break;
-            }
-    default: {
-                if (*st == *p) {
-                    p = nextchar(p);
-                    if ((opts & aeUTF8) && (*st & 0x80)) {
-                        st--;
-                        while (p && (st >= beg)) {
-                            if (*p != *st) {
-                                if (!pos) return 0;
-                                st = pos;
-                                break;
-                            }
-                            // first byte of the UTF-8 multibyte character
-                            if ((*p & 0xc0) != 0x80) break;
-                            p = nextchar(p);
-                            st--;
-                        }
-                        if (pos && st != pos) {
-                            if (neg) return 0;
-                            else if (i == numconds) return 1;
-                            ingroup = true;
-                            while (p && *p != ']' && ((p = nextchar(p)) != NULL));
-			    st--;
-                        }
-                        if (p && *p != ']') p = nextchar(p);
-                    } else if (pos) {
-                        if (neg) return 0;
-                        else if (i == numconds) return 1;
-                        ingroup = true;
-			while (p && *p != ']' && ((p = nextchar(p)) != NULL));
-//			if (p && *p != ']') p = nextchar(p);
-                        st--;
-                    }
-                    if (!pos) {
-                        i++;
-                        st--;
-                    }
-                    if (st < beg && p && *p != ']') return 0; // word <= condition
-                } else if (pos) { // group
-                    p = nextchar(p);
-                } else return 0;
-            }
-      }
-      if (!p) return 1;
-    }
-}
-
-// see if this suffix is present in the word
-struct hentry * SfxEntry::checkword(const char * word, int len, int optflags,
-    PfxEntry* ppfx, char ** wlst, int maxSug, int * ns, const FLAG cclass, const FLAG needflag,
-    const FLAG badflag)
-{
-    int                 tmpl;            // length of tmpword
-    struct hentry *     he;              // hash entry pointer
-    unsigned char *     cp;
-    char                tmpword[MAXWORDUTF8LEN + 4];
-    PfxEntry* ep = ppfx;
-
-    // if this suffix is being cross checked with a prefix
-    // but it does not support cross products skip it
-
-    if (((optflags & aeXPRODUCT) != 0) && ((opts & aeXPRODUCT) == 0))
-        return NULL;
-
-    // upon entry suffix is 0 length or already matches the end of the word.
-    // So if the remaining root word has positive length
-    // and if there are enough chars in root word and added back strip chars
-    // to meet the number of characters conditions, then test it
-
-    tmpl = len - appndl;
-    // the second condition is not enough for UTF-8 strings
-    // it checked in test_condition()
-
-    if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) &&
-        (tmpl + stripl >= numconds)) {
-
-            // generate new root word by removing suffix and adding
-            // back any characters that would have been stripped or
-            // or null terminating the shorter string
-
-            strcpy (tmpword, word);
-            cp = (unsigned char *)(tmpword + tmpl);
-            if (stripl) {
-                strcpy ((char *)cp, strip);
-                tmpl += stripl;
-                cp = (unsigned char *)(tmpword + tmpl);
-            } else *cp = '\0';
-
-            // now make sure all of the conditions on characters
-            // are met.  Please see the appendix at the end of
-            // this file for more info on exactly what is being
-            // tested
-
-            // if all conditions are met then check if resulting
-            // root word in the dictionary
-
-            if (test_condition((char *) cp, (char *) tmpword)) {
-
-#ifdef SZOSZABLYA_POSSIBLE_ROOTS
-                fprintf(stdout,"%s %s %c\n", word, tmpword, aflag);
-#endif
-                if ((he = pmyMgr->lookup(tmpword)) != NULL) {
-                    do {
-                        // check conditional suffix (enabled by prefix)
-                        if ((TESTAFF(he->astr, aflag, he->alen) || (ep && ep->getCont() &&
-                                    TESTAFF(ep->getCont(), aflag, ep->getContLen()))) &&
-                            (((optflags & aeXPRODUCT) == 0) ||
-                            (ep && TESTAFF(he->astr, ep->getFlag(), he->alen)) ||
-                             // enabled by prefix
-                            ((contclass) && (ep && TESTAFF(contclass, ep->getFlag(), contclasslen)))
-                            ) &&
-                            // handle cont. class
-                            ((!cclass) ||
-                                ((contclass) && TESTAFF(contclass, cclass, contclasslen))
-                            ) &&
-                            // check only in compound homonyms (bad flags)
-                            (!badflag || !TESTAFF(he->astr, badflag, he->alen)
-                            ) &&
-                            // handle required flag
-                            ((!needflag) ||
-                              (TESTAFF(he->astr, needflag, he->alen) ||
-                              ((contclass) && TESTAFF(contclass, needflag, contclasslen)))
-                            )
-                        ) return he;
-                        he = he->next_homonym; // check homonyms
-                    } while (he);
-
-                // obsolote stemming code (used only by the
-                // experimental SuffixMgr:suggest_pos_stems)
-                // store resulting root in wlst
-                } else if (wlst && (*ns < maxSug)) {
-                    int cwrd = 1;
-                    for (int k=0; k < *ns; k++)
-                        if (strcmp(tmpword, wlst[k]) == 0) cwrd = 0;
-                    if (cwrd) {
-                        wlst[*ns] = mystrdup(tmpword);
-                        if (wlst[*ns] == NULL) {
-                            for (int j=0; j<*ns; j++) free(wlst[j]);
-                            *ns = -1;
-                            return NULL;
-                        }
-                        (*ns)++;
-                    }
-                }
-            }
-    }
-    return NULL;
-}
-
-// see if two-level suffix is present in the word
-struct hentry * SfxEntry::check_twosfx(const char * word, int len, int optflags,
-    PfxEntry* ppfx, const FLAG needflag)
-{
-    int                 tmpl;            // length of tmpword
-    struct hentry *     he;              // hash entry pointer
-    unsigned char *     cp;
-    char                tmpword[MAXWORDUTF8LEN + 4];
-    PfxEntry* ep = ppfx;
-
-
-    // if this suffix is being cross checked with a prefix
-    // but it does not support cross products skip it
-
-    if ((optflags & aeXPRODUCT) != 0 &&  (opts & aeXPRODUCT) == 0)
-        return NULL;
-
-    // upon entry suffix is 0 length or already matches the end of the word.
-    // So if the remaining root word has positive length
-    // and if there are enough chars in root word and added back strip chars
-    // to meet the number of characters conditions, then test it
-
-    tmpl = len - appndl;
-
-    if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) &&
-       (tmpl + stripl >= numconds)) {
-
-            // generate new root word by removing suffix and adding
-            // back any characters that would have been stripped or
-            // or null terminating the shorter string
-
-            strcpy (tmpword, word);
-            cp = (unsigned char *)(tmpword + tmpl);
-            if (stripl) {
-                strcpy ((char *)cp, strip);
-                tmpl += stripl;
-                cp = (unsigned char *)(tmpword + tmpl);
-            } else *cp = '\0';
-
-            // now make sure all of the conditions on characters
-            // are met.  Please see the appendix at the end of
-            // this file for more info on exactly what is being
-            // tested
-
-            // if all conditions are met then recall suffix_check
-
-            if (test_condition((char *) cp, (char *) tmpword)) {
-                if (ppfx) {
-                    // handle conditional suffix
-                    if ((contclass) && TESTAFF(contclass, ep->getFlag(), contclasslen))
-                        he = pmyMgr->suffix_check(tmpword, tmpl, 0, NULL, NULL, 0, NULL, (FLAG) aflag, needflag);
-                    else
-                        he = pmyMgr->suffix_check(tmpword, tmpl, optflags, ppfx, NULL, 0, NULL, (FLAG) aflag, needflag);
-                } else {
-                    he = pmyMgr->suffix_check(tmpword, tmpl, 0, NULL, NULL, 0, NULL, (FLAG) aflag, needflag);
-                }
-                if (he) return he;
-            }
-    }
-    return NULL;
-}
-
-// see if two-level suffix is present in the word
-char * SfxEntry::check_twosfx_morph(const char * word, int len, int optflags,
-    PfxEntry* ppfx, const FLAG needflag)
-{
-    int                 tmpl;            // length of tmpword
-    unsigned char *     cp;
-    char                tmpword[MAXWORDUTF8LEN + 4];
-    PfxEntry* ep = ppfx;
-    char * st;
-
-    char result[MAXLNLEN];
-
-    *result = '\0';
-
-    // if this suffix is being cross checked with a prefix
-    // but it does not support cross products skip it
-
-    if ((optflags & aeXPRODUCT) != 0 &&  (opts & aeXPRODUCT) == 0)
-        return NULL;
-
-    // upon entry suffix is 0 length or already matches the end of the word.
-    // So if the remaining root word has positive length
-    // and if there are enough chars in root word and added back strip chars
-    // to meet the number of characters conditions, then test it
-
-    tmpl = len - appndl;
-
-    if ((tmpl > 0 || (tmpl == 0 && pmyMgr->get_fullstrip())) &&
-       (tmpl + stripl >= numconds)) {
-
-            // generate new root word by removing suffix and adding
-            // back any characters that would have been stripped or
-            // or null terminating the shorter string
-
-            strcpy (tmpword, word);
-            cp = (unsigned char *)(tmpword + tmpl);
-            if (stripl) {
-                strcpy ((char *)cp, strip);
-                tmpl += stripl;
-                cp = (unsigned char *)(tmpword + tmpl);
-            } else *cp = '\0';
-
-            // now make sure all of the conditions on characters
-            // are met.  Please see the appendix at the end of
-            // this file for more info on exactly what is being
-            // tested
-
-            // if all conditions are met then recall suffix_check
-
-            if (test_condition((char *) cp, (char *) tmpword)) {
-                if (ppfx) {
-                    // handle conditional suffix
-                    if ((contclass) && TESTAFF(contclass, ep->getFlag(), contclasslen)) {
-                        st = pmyMgr->suffix_check_morph(tmpword, tmpl, 0, NULL, aflag, needflag);
-                        if (st) {
-                            if (ppfx->getMorph()) {
-                                mystrcat(result, ppfx->getMorph(), MAXLNLEN);
-                                mystrcat(result, " ", MAXLNLEN);
-                            }
-                            mystrcat(result,st, MAXLNLEN);
-                            free(st);
-                            mychomp(result);
-                        }
-                    } else {
-                        st = pmyMgr->suffix_check_morph(tmpword, tmpl, optflags, ppfx, aflag, needflag);
-                        if (st) {
-                            mystrcat(result, st, MAXLNLEN);
-                            free(st);
-                            mychomp(result);
-                        }
-                    }
-                } else {
-                        st = pmyMgr->suffix_check_morph(tmpword, tmpl, 0, NULL, aflag, needflag);
-                        if (st) {
-                            mystrcat(result, st, MAXLNLEN);
-                            free(st);
-                            mychomp(result);
-                        }
-                }
-                if (*result) return mystrdup(result);
-            }
-    }
-    return NULL;
-}
-
-// get next homonym with same affix
-struct hentry * SfxEntry::get_next_homonym(struct hentry * he, int optflags, PfxEntry* ppfx,
-    const FLAG cclass, const FLAG needflag)
-{
-    PfxEntry* ep = ppfx;
-    FLAG eFlag = ep ? ep->getFlag() : FLAG_NULL;
-
-    while (he->next_homonym) {
-        he = he->next_homonym;
-        if ((TESTAFF(he->astr, aflag, he->alen) || (ep && ep->getCont() && TESTAFF(ep->getCont(), aflag, ep->getContLen()))) &&
-                            ((optflags & aeXPRODUCT) == 0 ||
-                            TESTAFF(he->astr, eFlag, he->alen) ||
-                             // handle conditional suffix
-                            ((contclass) && TESTAFF(contclass, eFlag, contclasslen))
-                            ) &&
-                            // handle cont. class
-                            ((!cclass) ||
-                                ((contclass) && TESTAFF(contclass, cclass, contclasslen))
-                            ) &&
-                            // handle required flag
-                            ((!needflag) ||
-                              (TESTAFF(he->astr, needflag, he->alen) ||
-                              ((contclass) && TESTAFF(contclass, needflag, contclasslen)))
-                            )
-                        ) return he;
-    }
-    return NULL;
-}
-
-
-#if 0
-
-Appendix:  Understanding Affix Code
-
-
-An affix is either a  prefix or a suffix attached to root words to make 
-other words.
-
-Basically a Prefix or a Suffix is set of AffEntry objects
-which store information about the prefix or suffix along 
-with supporting routines to check if a word has a particular 
-prefix or suffix or a combination.
-
-The structure affentry is defined as follows:
-
-struct affentry
-{
-   unsigned short aflag;    // ID used to represent the affix
-   char * strip;            // string to strip before adding affix
-   char * appnd;            // the affix string to add
-   unsigned char stripl;    // length of the strip string
-   unsigned char appndl;    // length of the affix string
-   char numconds;           // the number of conditions that must be met
-   char opts;               // flag: aeXPRODUCT- combine both prefix and suffix 
-   char   conds[SETSIZE];   // array which encodes the conditions to be met
-};
-
-
-Here is a suffix borrowed from the en_US.aff file.  This file 
-is whitespace delimited.
-
-SFX D Y 4 
-SFX D   0     e          d
-SFX D   y     ied        [^aeiou]y
-SFX D   0     ed         [^ey]
-SFX D   0     ed         [aeiou]y
-
-This information can be interpreted as follows:
-
-In the first line has 4 fields
-
-Field
------
-1     SFX - indicates this is a suffix
-2     D   - is the name of the character flag which represents this suffix
-3     Y   - indicates it can be combined with prefixes (cross product)
-4     4   - indicates that sequence of 4 affentry structures are needed to
-               properly store the affix information
-
-The remaining lines describe the unique information for the 4 SfxEntry 
-objects that make up this affix.  Each line can be interpreted
-as follows: (note fields 1 and 2 are as a check against line 1 info)
-
-Field
------
-1     SFX         - indicates this is a suffix
-2     D           - is the name of the character flag for this affix
-3     y           - the string of chars to strip off before adding affix
-                         (a 0 here indicates the NULL string)
-4     ied         - the string of affix characters to add
-5     [^aeiou]y   - the conditions which must be met before the affix
-                    can be applied
-
-Field 5 is interesting.  Since this is a suffix, field 5 tells us that
-there are 2 conditions that must be met.  The first condition is that 
-the next to the last character in the word must *NOT* be any of the 
-following "a", "e", "i", "o" or "u".  The second condition is that
-the last character of the word must end in "y".
-
-So how can we encode this information concisely and be able to 
-test for both conditions in a fast manner?  The answer is found
-but studying the wonderful ispell code of Geoff Kuenning, et.al. 
-(now available under a normal BSD license).
-
-If we set up a conds array of 256 bytes indexed (0 to 255) and access it
-using a character (cast to an unsigned char) of a string, we have 8 bits
-of information we can store about that character.  Specifically we
-could use each bit to say if that character is allowed in any of the 
-last (or first for prefixes) 8 characters of the word.
-
-Basically, each character at one end of the word (up to the number 
-of conditions) is used to index into the conds array and the resulting 
-value found there says whether the that character is valid for a 
-specific character position in the word.  
-
-For prefixes, it does this by setting bit 0 if that char is valid 
-in the first position, bit 1 if valid in the second position, and so on. 
-
-If a bit is not set, then that char is not valid for that postion in the
-word.
-
-If working with suffixes bit 0 is used for the character closest 
-to the front, bit 1 for the next character towards the end, ..., 
-with bit numconds-1 representing the last char at the end of the string. 
-
-Note: since entries in the conds[] are 8 bits, only 8 conditions 
-(read that only 8 character positions) can be examined at one
-end of a word (the beginning for prefixes and the end for suffixes.
-
-So to make this clearer, lets encode the conds array values for the 
-first two affentries for the suffix D described earlier.
-
-
-  For the first affentry:    
-     numconds = 1             (only examine the last character)
-
-     conds['e'] =  (1 << 0)   (the word must end in an E)
-     all others are all 0
-
-  For the second affentry:
-     numconds = 2             (only examine the last two characters)     
-
-     conds[X] = conds[X] | (1 << 0)     (aeiou are not allowed)
-         where X is all characters *but* a, e, i, o, or u
-         
-
-     conds['y'] = (1 << 1)     (the last char must be a y)
-     all other bits for all other entries in the conds array are zero
-
-
-#endif
-
diff --git a/src/hunspell/affentry.hxx b/src/hunspell/affentry.hxx
deleted file mode 100644
index eaf361f..0000000
--- a/src/hunspell/affentry.hxx
+++ /dev/null
@@ -1,136 +0,0 @@
-#ifndef _AFFIX_HXX_
-#define _AFFIX_HXX_
-
-#include "hunvisapi.h"
-
-#include "atypes.hxx"
-#include "baseaffix.hxx"
-#include "affixmgr.hxx"
-
-/* A Prefix Entry  */
-
-class LIBHUNSPELL_DLL_EXPORTED PfxEntry : protected AffEntry
-{
-       AffixMgr*    pmyMgr;
-
-       PfxEntry * next;
-       PfxEntry * nexteq;
-       PfxEntry * nextne;
-       PfxEntry * flgnxt;
-
-public:
-
-  PfxEntry(AffixMgr* pmgr, affentry* dp );
-  ~PfxEntry();
-
-  inline bool          allowCross() { return ((opts & aeXPRODUCT) != 0); }
-  struct hentry *      checkword(const char * word, int len, char in_compound, 
-                            const FLAG needflag = FLAG_NULL);
-
-  struct hentry *      check_twosfx(const char * word, int len, char in_compound, const FLAG needflag = NULL);
-
-  char *      check_morph(const char * word, int len, char in_compound,
-                            const FLAG needflag = FLAG_NULL);
-
-  char *      check_twosfx_morph(const char * word, int len,
-                  char in_compound, const FLAG needflag = FLAG_NULL);
-
-  inline FLAG getFlag()   { return aflag;   }
-  inline const char *  getKey()    { return appnd;  } 
-  char *               add(const char * word, int len);
-
-  inline short getKeyLen() { return appndl; } 
-
-  inline const char *  getMorph()    { return morphcode;  } 
-
-  inline const unsigned short * getCont()    { return contclass;  } 
-  inline short           getContLen()    { return contclasslen;  } 
-
-  inline PfxEntry *    getNext()   { return next;   }
-  inline PfxEntry *    getNextNE() { return nextne; }
-  inline PfxEntry *    getNextEQ() { return nexteq; }
-  inline PfxEntry *    getFlgNxt() { return flgnxt; }
-
-  inline void   setNext(PfxEntry * ptr)   { next = ptr;   }
-  inline void   setNextNE(PfxEntry * ptr) { nextne = ptr; }
-  inline void   setNextEQ(PfxEntry * ptr) { nexteq = ptr; }
-  inline void   setFlgNxt(PfxEntry * ptr) { flgnxt = ptr; }
-  
-  inline char * nextchar(char * p);
-  inline int    test_condition(const char * st);
-};
-
-
-
-
-/* A Suffix Entry */
-
-class LIBHUNSPELL_DLL_EXPORTED SfxEntry : protected AffEntry
-{
-       AffixMgr*    pmyMgr;
-       char *       rappnd;
-
-       SfxEntry *   next;
-       SfxEntry *   nexteq;
-       SfxEntry *   nextne;
-       SfxEntry *   flgnxt;
-           
-       SfxEntry *   l_morph;
-       SfxEntry *   r_morph;
-       SfxEntry *   eq_morph;
-
-public:
-
-  SfxEntry(AffixMgr* pmgr, affentry* dp );
-  ~SfxEntry();
-
-  inline bool          allowCross() { return ((opts & aeXPRODUCT) != 0); }
-  struct hentry *   checkword(const char * word, int len, int optflags, 
-                    PfxEntry* ppfx, char ** wlst, int maxSug, int * ns,
-//                    const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, char in_compound=IN_CPD_NOT);
-                    const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL, const FLAG badflag = 0);
-
-  struct hentry *   check_twosfx(const char * word, int len, int optflags, PfxEntry* ppfx, const FLAG needflag = NULL);
-
-  char *      check_twosfx_morph(const char * word, int len, int optflags,
-                 PfxEntry* ppfx, const FLAG needflag = FLAG_NULL);
-  struct hentry * get_next_homonym(struct hentry * he);
-  struct hentry * get_next_homonym(struct hentry * word, int optflags, PfxEntry* ppfx, 
-    const FLAG cclass, const FLAG needflag);
-
-
-  inline FLAG getFlag()   { return aflag;   }
-  inline const char *  getKey()    { return rappnd; } 
-  char *               add(const char * word, int len);
-
-
-  inline const char *  getMorph()    { return morphcode;  } 
-
-  inline const unsigned short * getCont()    { return contclass;  } 
-  inline short           getContLen()    { return contclasslen;  } 
-  inline const char *  getAffix()    { return appnd; } 
-
-  inline short getKeyLen() { return appndl; } 
-
-  inline SfxEntry *    getNext()   { return next;   }
-  inline SfxEntry *    getNextNE() { return nextne; }
-  inline SfxEntry *    getNextEQ() { return nexteq; }
-
-  inline SfxEntry *    getLM() { return l_morph; }
-  inline SfxEntry *    getRM() { return r_morph; }
-  inline SfxEntry *    getEQM() { return eq_morph; }
-  inline SfxEntry *    getFlgNxt() { return flgnxt; }
-
-  inline void   setNext(SfxEntry * ptr)   { next = ptr;   }
-  inline void   setNextNE(SfxEntry * ptr) { nextne = ptr; }
-  inline void   setNextEQ(SfxEntry * ptr) { nexteq = ptr; }
-  inline void   setFlgNxt(SfxEntry * ptr) { flgnxt = ptr; }
-
-  inline char * nextchar(char * p);
-  inline int    test_condition(const char * st, const char * begin);
-
-};
-
-#endif
-
-
diff --git a/src/hunspell/affixmgr.cxx b/src/hunspell/affixmgr.cxx
deleted file mode 100644
index 776cab1..0000000
--- a/src/hunspell/affixmgr.cxx
+++ /dev/null
@@ -1,4616 +0,0 @@
-#include "license.hunspell"
-#include "license.myspell"
-
-#include <stdlib.h>
-#include <string.h>
-#include <stdio.h>
-#include <ctype.h>
-
-#include <vector>
-
-#include "affixmgr.hxx"
-#include "affentry.hxx"
-#include "langnum.hxx"
-
-#include "csutil.hxx"
-
-#ifdef HUNSPELL_CHROME_CLIENT
-AffixMgr::AffixMgr(hunspell::BDictReader* reader, HashMgr** ptr, int * md)
-{
-  bdict_reader = reader;
-#else
-AffixMgr::AffixMgr(const char * affpath, HashMgr** ptr, int * md, const char * key) 
-{
-#endif
-  // register hash manager and load affix data from aff file
-  pHMgr = ptr[0];
-  alldic = ptr;
-  maxdic = md;
-  keystring = NULL;
-  trystring = NULL;
-  encoding=NULL;
-  csconv=NULL;
-  utf8 = 0;
-  complexprefixes = 0;
-  maptable = NULL;
-  nummap = 0;
-  breaktable = NULL;
-  numbreak = -1;
-  reptable = NULL;
-  numrep = 0;
-  iconvtable = NULL;
-  oconvtable = NULL;
-  checkcpdtable = NULL;
-  // allow simplified compound forms (see 3rd field of CHECKCOMPOUNDPATTERN)
-  simplifiedcpd = 0;
-  numcheckcpd = 0;
-  defcpdtable = NULL;
-  numdefcpd = 0;
-  phone = NULL;
-  compoundflag = FLAG_NULL; // permits word in compound forms
-  compoundbegin = FLAG_NULL; // may be first word in compound forms
-  compoundmiddle = FLAG_NULL; // may be middle word in compound forms
-  compoundend = FLAG_NULL; // may be last word in compound forms
-  compoundroot = FLAG_NULL; // compound word signing flag
-  compoundpermitflag = FLAG_NULL; // compound permitting flag for suffixed word
-  compoundforbidflag = FLAG_NULL; // compound fordidden flag for suffixed word
-  compoundmoresuffixes = 0; // allow more suffixes within compound words
-  checkcompounddup = 0; // forbid double words in compounds
-  checkcompoundrep = 0; // forbid bad compounds (may be non compound word with a REP substitution)
-  checkcompoundcase = 0; // forbid upper and lowercase combinations at word bounds
-  checkcompoundtriple = 0; // forbid compounds with triple letters
-  simplifiedtriple = 0; // allow simplified triple letters in compounds (Schiff+fahrt -> Schiffahrt)
-  forbiddenword = FORBIDDENWORD; // forbidden word signing flag
-  nosuggest = FLAG_NULL; // don't suggest words signed with NOSUGGEST flag
-  nongramsuggest = FLAG_NULL;
-  lang = NULL; // language
-  langnum = 0; // language code (see http://l10n.openoffice.org/languages.html)
-  needaffix = FLAG_NULL; // forbidden root, allowed only with suffixes
-  cpdwordmax = -1; // default: unlimited wordcount in compound words
-  cpdmin = -1;  // undefined
-  cpdmaxsyllable = 0; // default: unlimited syllablecount in compound words
-  cpdvowels=NULL; // vowels (for calculating of Hungarian compounding limit, O(n) search! XXX)
-  cpdvowels_utf16=NULL; // vowels for UTF-8 encoding (bsearch instead of O(n) search)
-  cpdvowels_utf16_len=0; // vowels
-  pfxappnd=NULL; // previous prefix for counting the syllables of prefix BUG
-  sfxappnd=NULL; // previous suffix for counting a special syllables BUG
-  cpdsyllablenum=NULL; // syllable count incrementing flag
-  checknum=0; // checking numbers, and word with numbers
-  wordchars=NULL; // letters + spec. word characters
-  wordchars_utf16=NULL; // letters + spec. word characters
-  wordchars_utf16_len=0; // letters + spec. word characters
-  ignorechars=NULL; // letters + spec. word characters
-  ignorechars_utf16=NULL; // letters + spec. word characters
-  ignorechars_utf16_len=0; // letters + spec. word characters
-  version=NULL; // affix and dictionary file version string
-  havecontclass=0; // flags of possible continuing classes (double affix)
-  // LEMMA_PRESENT: not put root into the morphological output. Lemma presents
-  // in morhological description in dictionary file. It's often combined with PSEUDOROOT.
-  lemma_present = FLAG_NULL; 
-  circumfix = FLAG_NULL; 
-  onlyincompound = FLAG_NULL; 
-  maxngramsugs = -1; // undefined
-  maxdiff = -1; // undefined
-  onlymaxdiff = 0;
-  maxcpdsugs = -1; // undefined
-  nosplitsugs = 0;
-  sugswithdots = 0;
-  keepcase = 0;
-  forceucase = 0;
-  warn = 0;
-  forbidwarn = 0;
-  checksharps = 0;
-  substandard = FLAG_NULL;
-  fullstrip = 0;
-
-  sfx = NULL;
-  pfx = NULL;
-
-  for (int i=0; i < SETSIZE; i++) {
-     pStart[i] = NULL;
-     sStart[i] = NULL;
-     pFlag[i] = NULL;
-     sFlag[i] = NULL;
-  }
-
-#ifdef HUNSPELL_CHROME_CLIENT
-  // Define dummy parameters for parse_file() to avoid changing the parameters
-  // of parse_file(). This may make it easier to merge the changes of the
-  // original hunspell.
-  const char* affpath = NULL;
-  const char* key = NULL;
-#else
-  for (int j=0; j < CONTSIZE; j++) {
-    contclasses[j] = 0;
-  }
-#endif
-
-  if (parse_file(affpath, key)) {
-     HUNSPELL_WARNING(stderr, "Failure loading aff file %s\n",affpath);
-  }
-  
-  if (cpdmin == -1) cpdmin = MINCPDLEN;
-
-}
-
-
-AffixMgr::~AffixMgr() 
-{
-  // pass through linked prefix entries and clean up
-  for (int i=0; i < SETSIZE ;i++) {
-       pFlag[i] = NULL;
-       PfxEntry * ptr = pStart[i];
-       PfxEntry * nptr = NULL;
-       while (ptr) {
-            nptr = ptr->getNext();
-            delete(ptr);
-            ptr = nptr;
-            nptr = NULL;
-       }  
-  }
-
-  // pass through linked suffix entries and clean up
-  for (int j=0; j < SETSIZE ; j++) {
-       sFlag[j] = NULL;
-       SfxEntry * ptr = sStart[j];
-       SfxEntry * nptr = NULL;
-       while (ptr) {
-            nptr = ptr->getNext();
-            delete(ptr);
-            ptr = nptr;
-            nptr = NULL;
-       }
-       sStart[j] = NULL;
-  }
-
-  if (keystring) free(keystring);
-  keystring=NULL;
-  if (trystring) free(trystring);
-  trystring=NULL;
-  if (encoding) free(encoding);
-  encoding=NULL;
-  if (maptable) {  
-     for (int j=0; j < nummap; j++) {
-        for (int k=0; k < maptable[j].len; k++) {
-           if (maptable[j].set[k]) free(maptable[j].set[k]);
-        }
-        free(maptable[j].set);
-        maptable[j].set = NULL;
-        maptable[j].len = 0;
-     }
-     free(maptable);  
-     maptable = NULL;
-  }
-  nummap = 0;
-  if (breaktable) {
-     for (int j=0; j < numbreak; j++) {
-        if (breaktable[j]) free(breaktable[j]);
-        breaktable[j] = NULL;
-     }
-     free(breaktable);  
-     breaktable = NULL;
-  }
-  numbreak = 0;
-  if (reptable) {
-     for (int j=0; j < numrep; j++) {
-        free(reptable[j].pattern);
-        free(reptable[j].pattern2);
-     }
-     free(reptable);  
-     reptable = NULL;
-  }
-  if (iconvtable) delete iconvtable;
-  if (oconvtable) delete oconvtable;
-  if (phone && phone->rules) {
-     for (int j=0; j < phone->num + 1; j++) {
-        free(phone->rules[j * 2]);
-        free(phone->rules[j * 2 + 1]);
-     }
-     free(phone->rules);
-     free(phone);  
-     phone = NULL;
-  }
-
-  if (defcpdtable) {  
-     for (int j=0; j < numdefcpd; j++) {
-        free(defcpdtable[j].def);
-        defcpdtable[j].def = NULL;
-     }
-     free(defcpdtable);  
-     defcpdtable = NULL;
-  }
-  numrep = 0;
-  if (checkcpdtable) {  
-     for (int j=0; j < numcheckcpd; j++) {
-        free(checkcpdtable[j].pattern);
-        free(checkcpdtable[j].pattern2);
-        free(checkcpdtable[j].pattern3);
-        checkcpdtable[j].pattern = NULL;
-        checkcpdtable[j].pattern2 = NULL;
-        checkcpdtable[j].pattern3 = NULL;
-     }
-     free(checkcpdtable);  
-     checkcpdtable = NULL;
-  }
-  numcheckcpd = 0;
-  FREE_FLAG(compoundflag);
-  FREE_FLAG(compoundbegin);
-  FREE_FLAG(compoundmiddle);
-  FREE_FLAG(compoundend);
-  FREE_FLAG(compoundpermitflag);
-  FREE_FLAG(compoundforbidflag);
-  FREE_FLAG(compoundroot);
-  FREE_FLAG(forbiddenword);
-  FREE_FLAG(nosuggest);
-  FREE_FLAG(nongramsuggest);
-  FREE_FLAG(needaffix);
-  FREE_FLAG(lemma_present);
-  FREE_FLAG(circumfix);
-  FREE_FLAG(onlyincompound);
-  
-  cpdwordmax = 0;
-  pHMgr = NULL;
-  cpdmin = 0;
-  cpdmaxsyllable = 0;
-  if (cpdvowels) free(cpdvowels);
-  if (cpdvowels_utf16) free(cpdvowels_utf16);
-  if (cpdsyllablenum) free(cpdsyllablenum);
-  free_utf_tbl();
-  if (lang) free(lang);
-  if (wordchars) free(wordchars);
-  if (wordchars_utf16) free(wordchars_utf16);
-  if (ignorechars) free(ignorechars);
-  if (ignorechars_utf16) free(ignorechars_utf16);
-  if (version) free(version);
-  checknum=0;
-#ifdef MOZILLA_CLIENT
-  delete [] csconv;
-#endif
-}
-
-void AffixMgr::finishFileMgr(FileMgr *afflst)
-{
-    delete afflst;
-
-    // convert affix trees to sorted list
-    process_pfx_tree_to_list();
-    process_sfx_tree_to_list();
-}
-
-// read in aff file and build up prefix and suffix entry objects 
-int  AffixMgr::parse_file(const char * affpath, const char * key)
-{
-  char * line; // io buffers
-  char ft;     // affix type
-  
-#ifdef HUNSPELL_CHROME_CLIENT
-  // open the affix file
-  // We're always UTF-8
-  utf8 = 1;
-
-  // A BDICT file stores PFX and SFX lines in a special section and it provides
-  // a special line iterator for reading PFX and SFX lines.
-  // We create a FileMgr object from this iterator and parse PFX and SFX lines
-  // before parsing other lines.
-  hunspell::LineIterator affix_iterator = bdict_reader->GetAffixLineIterator();
-  FileMgr* iterator = new FileMgr(&affix_iterator);
-  if (!iterator) {
-    HUNSPELL_WARNING(stderr,
-        "error: could not create a FileMgr from an affix line iterator.\n");
-    return 1;
-  }
-
-  while ((line = iterator->getline())) {
-    ft = ' ';
-    if (strncmp(line,"PFX",3) == 0) ft = complexprefixes ? 'S' : 'P';
-    if (strncmp(line,"SFX",3) == 0) ft = complexprefixes ? 'P' : 'S';
-    if (ft != ' ')
-      parse_affix(line, ft, iterator, NULL);
-  }
-  delete iterator;
-
-  // Create a FileMgr object for reading lines except PFX and SFX lines.
-  // We don't need to change the loop below since our FileMgr emulates the
-  // original one.
-  hunspell::LineIterator other_iterator = bdict_reader->GetOtherLineIterator();
-  FileMgr * afflst = new FileMgr(&other_iterator);
-  if (!afflst) {
-    HUNSPELL_WARNING(stderr,
-        "error: could not create a FileMgr from an other line iterator.\n");
-    return 1;
-  }
-#else
-  // checking flag duplication
-  char dupflags[CONTSIZE];
-  char dupflags_ini = 1;
-
-  // first line indicator for removing byte order mark
-  int firstline = 1;
-  
-  // open the affix file
-  FileMgr * afflst = new FileMgr(affpath, key);
-  if (!afflst) {
-    HUNSPELL_WARNING(stderr, "error: could not open affix description file %s\n",affpath);
-    return 1;
-  }
-#endif
-
-  // step one is to parse the affix file building up the internal
-  // affix data structures
-
-    // read in each line ignoring any that do not
-    // start with a known line type indicator
-    while ((line = afflst->getline()) != NULL) {
-       mychomp(line);
-
-#ifndef HUNSPELL_CHROME_CLIENT
-       /* remove byte order mark */
-       if (firstline) {
-         firstline = 0;
-         // Affix file begins with byte order mark: possible incompatibility with old Hunspell versions
-         if (strncmp(line,"\xEF\xBB\xBF",3) == 0) {
-            memmove(line, line+3, strlen(line+3)+1);
-         }
-       }
-#endif
-
-       /* parse in the keyboard string */
-       if (strncmp(line,"KEY",3) == 0) {
-          if (parse_string(line, &keystring, afflst->getlinenum())) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the try string */
-       if (strncmp(line,"TRY",3) == 0) {
-          if (parse_string(line, &trystring, afflst->getlinenum())) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the name of the character set used by the .dict and .aff */
-       if (strncmp(line,"SET",3) == 0) {
-          if (parse_string(line, &encoding, afflst->getlinenum())) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-          if (strcmp(encoding, "UTF-8") == 0) {
-             utf8 = 1;
-#ifndef OPENOFFICEORG
-#ifndef MOZILLA_CLIENT
-             if (initialize_utf_tbl()) return 1;
-#endif
-#endif
-          }
-       }
-
-       /* parse COMPLEXPREFIXES for agglutinative languages with right-to-left writing system */
-       if (strncmp(line,"COMPLEXPREFIXES",15) == 0)
-                   complexprefixes = 1;
-
-       /* parse in the flag used by the controlled compound words */
-       if (strncmp(line,"COMPOUNDFLAG",12) == 0) {
-          if (parse_flag(line, &compoundflag, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the flag used by compound words */
-       if (strncmp(line,"COMPOUNDBEGIN",13) == 0) {
-          if (complexprefixes) {
-            if (parse_flag(line, &compoundend, afflst)) {
-              finishFileMgr(afflst);
-              return 1;
-            }
-          } else {
-            if (parse_flag(line, &compoundbegin, afflst)) {
-              finishFileMgr(afflst);
-              return 1;
-            }
-          }
-       }
-
-       /* parse in the flag used by compound words */
-       if (strncmp(line,"COMPOUNDMIDDLE",14) == 0) {
-          if (parse_flag(line, &compoundmiddle, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-       /* parse in the flag used by compound words */
-       if (strncmp(line,"COMPOUNDEND",11) == 0) {
-          if (complexprefixes) {
-            if (parse_flag(line, &compoundbegin, afflst)) {
-              finishFileMgr(afflst);
-              return 1;
-            }
-          } else {
-            if (parse_flag(line, &compoundend, afflst)) {
-              finishFileMgr(afflst);
-              return 1;
-            }
-          }
-       }
-
-       /* parse in the data used by compound_check() method */
-       if (strncmp(line,"COMPOUNDWORDMAX",15) == 0) {
-          if (parse_num(line, &cpdwordmax, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the flag sign compounds in dictionary */
-       if (strncmp(line,"COMPOUNDROOT",12) == 0) {
-          if (parse_flag(line, &compoundroot, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the flag used by compound_check() method */
-       if (strncmp(line,"COMPOUNDPERMITFLAG",18) == 0) {
-          if (parse_flag(line, &compoundpermitflag, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the flag used by compound_check() method */
-       if (strncmp(line,"COMPOUNDFORBIDFLAG",18) == 0) {
-          if (parse_flag(line, &compoundforbidflag, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       if (strncmp(line,"COMPOUNDMORESUFFIXES",20) == 0) {
-                   compoundmoresuffixes = 1;
-       }
-
-       if (strncmp(line,"CHECKCOMPOUNDDUP",16) == 0) {
-                   checkcompounddup = 1;
-       }
-
-       if (strncmp(line,"CHECKCOMPOUNDREP",16) == 0) {
-                   checkcompoundrep = 1;
-       }
-
-       if (strncmp(line,"CHECKCOMPOUNDTRIPLE",19) == 0) {
-                   checkcompoundtriple = 1;
-       }
-
-       if (strncmp(line,"SIMPLIFIEDTRIPLE",16) == 0) {
-                   simplifiedtriple = 1;
-       }
-
-       if (strncmp(line,"CHECKCOMPOUNDCASE",17) == 0) {
-                   checkcompoundcase = 1;
-       }
-
-       if (strncmp(line,"NOSUGGEST",9) == 0) {
-          if (parse_flag(line, &nosuggest, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       if (strncmp(line,"NONGRAMSUGGEST",14) == 0) {
-          if (parse_flag(line, &nongramsuggest, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the flag used by forbidden words */
-       if (strncmp(line,"FORBIDDENWORD",13) == 0) {
-          if (parse_flag(line, &forbiddenword, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the flag used by forbidden words */
-       if (strncmp(line,"LEMMA_PRESENT",13) == 0) {
-          if (parse_flag(line, &lemma_present, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the flag used by circumfixes */
-       if (strncmp(line,"CIRCUMFIX",9) == 0) {
-          if (parse_flag(line, &circumfix, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the flag used by fogemorphemes */
-       if (strncmp(line,"ONLYINCOMPOUND",14) == 0) {
-          if (parse_flag(line, &onlyincompound, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the flag used by `needaffixs' */
-       if (strncmp(line,"PSEUDOROOT",10) == 0) {
-          if (parse_flag(line, &needaffix, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the flag used by `needaffixs' */
-       if (strncmp(line,"NEEDAFFIX",9) == 0) {
-          if (parse_flag(line, &needaffix, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the minimal length for words in compounds */
-       if (strncmp(line,"COMPOUNDMIN",11) == 0) {
-          if (parse_num(line, &cpdmin, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-          if (cpdmin < 1) cpdmin = 1;
-       }
-
-       /* parse in the max. words and syllables in compounds */
-       if (strncmp(line,"COMPOUNDSYLLABLE",16) == 0) {
-          if (parse_cpdsyllable(line, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the flag used by compound_check() method */
-       if (strncmp(line,"SYLLABLENUM",11) == 0) {
-          if (parse_string(line, &cpdsyllablenum, afflst->getlinenum())) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the flag used by the controlled compound words */
-       if (strncmp(line,"CHECKNUM",8) == 0) {
-           checknum=1;
-       }
-
-       /* parse in the extra word characters */
-       if (strncmp(line,"WORDCHARS",9) == 0) {
-          if (parse_array(line, &wordchars, &wordchars_utf16, &wordchars_utf16_len, utf8, afflst->getlinenum())) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the ignored characters (for example, Arabic optional diacretics charachters */
-       if (strncmp(line,"IGNORE",6) == 0) {
-          if (parse_array(line, &ignorechars, &ignorechars_utf16, &ignorechars_utf16_len, utf8, afflst->getlinenum())) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-#ifndef HUNSPELL_CHROME_CLIENT
-       /* parse in the typical fault correcting table */
-       if (strncmp(line,"REP",3) == 0) {
-          if (parse_reptable(line, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-#endif
-
-       /* parse in the input conversion table */
-       if (strncmp(line,"ICONV",5) == 0) {
-          if (parse_convtable(line, afflst, &iconvtable, "ICONV")) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the input conversion table */
-       if (strncmp(line,"OCONV",5) == 0) {
-          if (parse_convtable(line, afflst, &oconvtable, "OCONV")) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the phonetic translation table */
-       if (strncmp(line,"PHONE",5) == 0) {
-          if (parse_phonetable(line, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the checkcompoundpattern table */
-       if (strncmp(line,"CHECKCOMPOUNDPATTERN",20) == 0) {
-          if (parse_checkcpdtable(line, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the defcompound table */
-       if (strncmp(line,"COMPOUNDRULE",12) == 0) {
-          if (parse_defcpdtable(line, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the related character map table */
-       if (strncmp(line,"MAP",3) == 0) {
-          if (parse_maptable(line, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the word breakpoints table */
-       if (strncmp(line,"BREAK",5) == 0) {
-          if (parse_breaktable(line, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the language for language specific codes */
-       if (strncmp(line,"LANG",4) == 0) {
-          if (parse_string(line, &lang, afflst->getlinenum())) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-          langnum = get_lang_num(lang);
-       }
-
-       if (strncmp(line,"VERSION",7) == 0) {
-          for(line = line + 7; *line == ' ' || *line == '\t'; line++);
-          version = mystrdup(line);
-       }
-
-       if (strncmp(line,"MAXNGRAMSUGS",12) == 0) {
-          if (parse_num(line, &maxngramsugs, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       if (strncmp(line,"ONLYMAXDIFF", 11) == 0)
-                   onlymaxdiff = 1;
-
-       if (strncmp(line,"MAXDIFF",7) == 0) {
-          if (parse_num(line, &maxdiff, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       if (strncmp(line,"MAXCPDSUGS",10) == 0) {
-          if (parse_num(line, &maxcpdsugs, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       if (strncmp(line,"NOSPLITSUGS",11) == 0) {
-                   nosplitsugs=1;
-       }
-
-       if (strncmp(line,"FULLSTRIP",9) == 0) {
-                   fullstrip=1;
-       }
-
-       if (strncmp(line,"SUGSWITHDOTS",12) == 0) {
-                   sugswithdots=1;
-       }
-
-       /* parse in the flag used by forbidden words */
-       if (strncmp(line,"KEEPCASE",8) == 0) {
-          if (parse_flag(line, &keepcase, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the flag used by `forceucase' */
-       if (strncmp(line,"FORCEUCASE",10) == 0) {
-          if (parse_flag(line, &forceucase, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       /* parse in the flag used by `warn' */
-       if (strncmp(line,"WARN",4) == 0) {
-          if (parse_flag(line, &warn, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       if (strncmp(line,"FORBIDWARN",10) == 0) {
-                   forbidwarn=1;
-       }
-
-       /* parse in the flag used by the affix generator */
-       if (strncmp(line,"SUBSTANDARD",11) == 0) {
-          if (parse_flag(line, &substandard, afflst)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-
-       if (strncmp(line,"CHECKSHARPS",11) == 0) {
-                   checksharps=1;
-       }
-
-#ifndef HUNSPELL_CHROME_CLIENT
-       /* parse this affix: P - prefix, S - suffix */
-       ft = ' ';
-       if (strncmp(line,"PFX",3) == 0) ft = complexprefixes ? 'S' : 'P';
-       if (strncmp(line,"SFX",3) == 0) ft = complexprefixes ? 'P' : 'S';
-       if (ft != ' ') {
-          if (dupflags_ini) {
-            memset(dupflags, 0, sizeof(dupflags));
-            dupflags_ini = 0;
-          }
-          if (parse_affix(line, ft, afflst, dupflags)) {
-             finishFileMgr(afflst);
-             return 1;
-          }
-       }
-#endif
-    }
-
-    finishFileMgr(afflst);
-    // affix trees are sorted now
-
-    // now we can speed up performance greatly taking advantage of the 
-    // relationship between the affixes and the idea of "subsets".
-
-    // View each prefix as a potential leading subset of another and view
-    // each suffix (reversed) as a potential trailing subset of another.
-
-    // To illustrate this relationship if we know the prefix "ab" is found in the
-    // word to examine, only prefixes that "ab" is a leading subset of need be examined.
-    // Furthermore is "ab" is not present then none of the prefixes that "ab" is
-    // is a subset need be examined.
-    // The same argument goes for suffix string that are reversed.
-
-    // Then to top this off why not examine the first char of the word to quickly
-    // limit the set of prefixes to examine (i.e. the prefixes to examine must 
-    // be leading supersets of the first character of the word (if they exist)
- 
-    // To take advantage of this "subset" relationship, we need to add two links
-    // from entry.  One to take next if the current prefix is found (call it nexteq)
-    // and one to take next if the current prefix is not found (call it nextne).
-
-    // Since we have built ordered lists, all that remains is to properly initialize 
-    // the nextne and nexteq pointers that relate them
-
-    process_pfx_order();
-    process_sfx_order();
-
-    /* get encoding for CHECKCOMPOUNDCASE */
-    if (!utf8) {
-    char * enc = get_encoding();
-    csconv = get_current_cs(enc);
-    free(enc);
-    enc = NULL;
-
-    char expw[MAXLNLEN];
-    if (wordchars) {
-        strcpy(expw, wordchars);
-        free(wordchars);
-    } else *expw = '\0';
-
-    for (int i = 0; i <= 255; i++) {
-        if ( (csconv[i].cupper != csconv[i].clower) &&
-            (! strchr(expw, (char) i))) {
-                *(expw + strlen(expw) + 1) = '\0';
-                *(expw + strlen(expw)) = (char) i;
-        }
-    }
-
-    wordchars = mystrdup(expw);
-    }
-
-    // default BREAK definition
-    if (numbreak == -1) {
-        breaktable = (char **) malloc(sizeof(char *) * 3);
-        if (!breaktable) return 1;
-        breaktable[0] = mystrdup("-");
-        breaktable[1] = mystrdup("^-");
-        breaktable[2] = mystrdup("-$");
-        if (breaktable[0] && breaktable[1] && breaktable[2]) numbreak = 3;
-    }
-    return 0;
-}
-
-
-// we want to be able to quickly access prefix information
-// both by prefix flag, and sorted by prefix string itself 
-// so we need to set up two indexes
-
-int AffixMgr::build_pfxtree(PfxEntry* pfxptr)
-{
-  PfxEntry * ptr;
-  PfxEntry * pptr;
-  PfxEntry * ep = pfxptr;
-
-  // get the right starting points
-  const char * key = ep->getKey();
-  const unsigned char flg = (unsigned char) (ep->getFlag() & 0x00FF);
-
-  // first index by flag which must exist
-  ptr = pFlag[flg];
-  ep->setFlgNxt(ptr);
-  pFlag[flg] = ep;
-
-
-  // handle the special case of null affix string
-  if (strlen(key) == 0) {
-    // always inset them at head of list at element 0
-     ptr = pStart[0];
-     ep->setNext(ptr);
-     pStart[0] = ep;
-     return 0;
-  }
-
-  // now handle the normal case
-  ep->setNextEQ(NULL);
-  ep->setNextNE(NULL);
-
-  unsigned char sp = *((const unsigned char *)key);
-  ptr = pStart[sp];
-  
-  // handle the first insert 
-  if (!ptr) {
-     pStart[sp] = ep;
-     return 0;
-  }
-
-
-  // otherwise use binary tree insertion so that a sorted
-  // list can easily be generated later
-  pptr = NULL;
-  for (;;) {
-    pptr = ptr;
-    if (strcmp(ep->getKey(), ptr->getKey() ) <= 0) {
-       ptr = ptr->getNextEQ();
-       if (!ptr) {
-          pptr->setNextEQ(ep);
-          break;
-       }
-    } else {
-       ptr = ptr->getNextNE();
-       if (!ptr) {
-          pptr->setNextNE(ep);
-          break;
-       }
-    }
-  }
-  return 0;
-}
-
-// we want to be able to quickly access suffix information
-// both by suffix flag, and sorted by the reverse of the
-// suffix string itself; so we need to set up two indexes
-int AffixMgr::build_sfxtree(SfxEntry* sfxptr)
-{
-  SfxEntry * ptr;
-  SfxEntry * pptr;
-  SfxEntry * ep = sfxptr;
-
-  /* get the right starting point */
-  const char * key = ep->getKey();
-  const unsigned char flg = (unsigned char) (ep->getFlag() & 0x00FF);
-
-  // first index by flag which must exist
-  ptr = sFlag[flg];
-  ep->setFlgNxt(ptr);
-  sFlag[flg] = ep;
-
-  // next index by affix string
-
-  // handle the special case of null affix string
-  if (strlen(key) == 0) {
-    // always inset them at head of list at element 0
-     ptr = sStart[0];
-     ep->setNext(ptr);
-     sStart[0] = ep;
-     return 0;
-  }
-
-  // now handle the normal case
-  ep->setNextEQ(NULL);
-  ep->setNextNE(NULL);
-
-  unsigned char sp = *((const unsigned char *)key);
-  ptr = sStart[sp];
-  
-  // handle the first insert 
-  if (!ptr) {
-     sStart[sp] = ep;
-     return 0;
-  }
-
-  // otherwise use binary tree insertion so that a sorted
-  // list can easily be generated later
-  pptr = NULL;
-  for (;;) {
-    pptr = ptr;
-    if (strcmp(ep->getKey(), ptr->getKey() ) <= 0) {
-       ptr = ptr->getNextEQ();
-       if (!ptr) {
-          pptr->setNextEQ(ep);
-          break;
-       }
-    } else {
-       ptr = ptr->getNextNE();
-       if (!ptr) {
-          pptr->setNextNE(ep);
-          break;
-       }
-    }
-  }
-  return 0;
-}
-
-// convert from binary tree to sorted list
-int AffixMgr::process_pfx_tree_to_list()
-{
-  for (int i=1; i< SETSIZE; i++) {
-    pStart[i] = process_pfx_in_order(pStart[i],NULL);
-  }
-  return 0;
-}
-
-
-PfxEntry* AffixMgr::process_pfx_in_order(PfxEntry* ptr, PfxEntry* nptr)
-{
-  if (ptr) {
-    nptr = process_pfx_in_order(ptr->getNextNE(), nptr);
-    ptr->setNext(nptr);
-    nptr = process_pfx_in_order(ptr->getNextEQ(), ptr);
-  }
-  return nptr;
-}
-
-
-// convert from binary tree to sorted list
-int AffixMgr:: process_sfx_tree_to_list()
-{
-  for (int i=1; i< SETSIZE; i++) {
-    sStart[i] = process_sfx_in_order(sStart[i],NULL);
-  }
-  return 0;
-}
-
-SfxEntry* AffixMgr::process_sfx_in_order(SfxEntry* ptr, SfxEntry* nptr)
-{
-  if (ptr) {
-    nptr = process_sfx_in_order(ptr->getNextNE(), nptr);
-    ptr->setNext(nptr);
-    nptr = process_sfx_in_order(ptr->getNextEQ(), ptr);
-  }
-  return nptr;
-}
-
-
-// reinitialize the PfxEntry links NextEQ and NextNE to speed searching
-// using the idea of leading subsets this time
-int AffixMgr::process_pfx_order()
-{
-    PfxEntry* ptr;
-
-    // loop through each prefix list starting point
-    for (int i=1; i < SETSIZE; i++) {
-
-         ptr = pStart[i];
-
-         // look through the remainder of the list
-         //  and find next entry with affix that 
-         // the current one is not a subset of
-         // mark that as destination for NextNE
-         // use next in list that you are a subset
-         // of as NextEQ
-
-         for (; ptr != NULL; ptr = ptr->getNext()) {
-
-             PfxEntry * nptr = ptr->getNext();
-             for (; nptr != NULL; nptr = nptr->getNext()) {
-                 if (! isSubset( ptr->getKey() , nptr->getKey() )) break;
-             }
-             ptr->setNextNE(nptr);
-             ptr->setNextEQ(NULL);
-             if ((ptr->getNext()) && isSubset(ptr->getKey() , (ptr->getNext())->getKey())) 
-                 ptr->setNextEQ(ptr->getNext());
-         }
-
-         // now clean up by adding smart search termination strings:
-         // if you are already a superset of the previous prefix
-         // but not a subset of the next, search can end here
-         // so set NextNE properly
-
-         ptr = pStart[i];
-         for (; ptr != NULL; ptr = ptr->getNext()) {
-             PfxEntry * nptr = ptr->getNext();
-             PfxEntry * mptr = NULL;
-             for (; nptr != NULL; nptr = nptr->getNext()) {
-                 if (! isSubset(ptr->getKey(),nptr->getKey())) break;
-                 mptr = nptr;
-             }
-             if (mptr) mptr->setNextNE(NULL);
-         }
-    }
-    return 0;
-}
-
-// initialize the SfxEntry links NextEQ and NextNE to speed searching
-// using the idea of leading subsets this time
-int AffixMgr::process_sfx_order()
-{
-    SfxEntry* ptr;
-
-    // loop through each prefix list starting point
-    for (int i=1; i < SETSIZE; i++) {
-
-         ptr = sStart[i];
-
-         // look through the remainder of the list
-         //  and find next entry with affix that 
-         // the current one is not a subset of
-         // mark that as destination for NextNE
-         // use next in list that you are a subset
-         // of as NextEQ
-
-         for (; ptr != NULL; ptr = ptr->getNext()) {
-             SfxEntry * nptr = ptr->getNext();
-             for (; nptr != NULL; nptr = nptr->getNext()) {
-                 if (! isSubset(ptr->getKey(),nptr->getKey())) break;
-             }
-             ptr->setNextNE(nptr);
-             ptr->setNextEQ(NULL);
-             if ((ptr->getNext()) && isSubset(ptr->getKey(),(ptr->getNext())->getKey())) 
-                 ptr->setNextEQ(ptr->getNext());
-         }
-
-
-         // now clean up by adding smart search termination strings:
-         // if you are already a superset of the previous suffix
-         // but not a subset of the next, search can end here
-         // so set NextNE properly
-
-         ptr = sStart[i];
-         for (; ptr != NULL; ptr = ptr->getNext()) {
-             SfxEntry * nptr = ptr->getNext();
-             SfxEntry * mptr = NULL;
-             for (; nptr != NULL; nptr = nptr->getNext()) {
-                 if (! isSubset(ptr->getKey(),nptr->getKey())) break;
-                 mptr = nptr;
-             }
-             if (mptr) mptr->setNextNE(NULL);
-         }
-    }
-    return 0;
-}
-
-// add flags to the result for dictionary debugging
-void AffixMgr::debugflag(char * result, unsigned short flag) {
-    char * st = encode_flag(flag);
-    mystrcat(result, " ", MAXLNLEN);
-    mystrcat(result, MORPH_FLAG, MAXLNLEN);
-    if (st) {
-        mystrcat(result, st, MAXLNLEN);
-        free(st);
-    }
-}
-
-// calculate the character length of the condition
-int AffixMgr::condlen(char * st)
-{
-  int l = 0;
-  bool group = false;
-  for(; *st; st++) {
-    if (*st == '[') {
-        group = true;
-        l++;
-    } else if (*st == ']') group = false;
-    else if (!group && (!utf8 ||
-        (!(*st & 0x80) || ((*st & 0xc0) == 0x80)))) l++;
-  }
-  return l;
-}
-
-int AffixMgr::encodeit(affentry &entry, char * cs)
-{
-  if (strcmp(cs,".") != 0) {
-    entry.numconds = (char) condlen(cs);
-    strncpy(entry.c.conds, cs, MAXCONDLEN);
-    // long condition (end of conds padded by strncpy)
-    if (entry.c.conds[MAXCONDLEN - 1] && cs[MAXCONDLEN]) {
-      entry.opts += aeLONGCOND;
-      entry.c.l.conds2 = mystrdup(cs + MAXCONDLEN_1);
-      if (!entry.c.l.conds2) return 1;
-    }
-  } else {
-    entry.numconds = 0;
-    entry.c.conds[0] = '\0';
-  }
-  return 0;
-}
-
-// return 1 if s1 is a leading subset of s2 (dots are for infixes)
-inline int AffixMgr::isSubset(const char * s1, const char * s2)
- {
-    while (((*s1 == *s2) || (*s1 == '.')) && (*s1 != '\0')) {
-        s1++;
-        s2++;
-    }
-    return (*s1 == '\0');
- }
-
-
-// check word for prefixes
-struct hentry * AffixMgr::prefix_check(const char * word, int len, char in_compound,
-    const FLAG needflag)
-{
-    struct hentry * rv= NULL;
-
-    pfx = NULL;
-    pfxappnd = NULL;
-    sfxappnd = NULL;
-    
-    // first handle the special case of 0 length prefixes
-    PfxEntry * pe = pStart[0];
-    while (pe) {
-        if (
-            // fogemorpheme
-              ((in_compound != IN_CPD_NOT) || !(pe->getCont() &&
-                  (TESTAFF(pe->getCont(), onlyincompound, pe->getContLen())))) &&
-            // permit prefixes in compounds
-              ((in_compound != IN_CPD_END) || (pe->getCont() &&
-                  (TESTAFF(pe->getCont(), compoundpermitflag, pe->getContLen()))))
-              ) {
-                    // check prefix
-                    rv = pe->checkword(word, len, in_compound, needflag);
-                    if (rv) {
-                        pfx=pe; // BUG: pfx not stateless
-                        return rv;
-                    }
-             }
-       pe = pe->getNext();
-    }
-  
-    // now handle the general case
-    unsigned char sp = *((const unsigned char *)word);
-    PfxEntry * pptr = pStart[sp];
-
-    while (pptr) {
-        if (isSubset(pptr->getKey(),word)) {
-             if (
-            // fogemorpheme
-              ((in_compound != IN_CPD_NOT) || !(pptr->getCont() &&
-                  (TESTAFF(pptr->getCont(), onlyincompound, pptr->getContLen())))) &&
-            // permit prefixes in compounds
-              ((in_compound != IN_CPD_END) || (pptr->getCont() &&
-                  (TESTAFF(pptr->getCont(), compoundpermitflag, pptr->getContLen()))))
-              ) {
-            // check prefix
-                  rv = pptr->checkword(word, len, in_compound, needflag);
-                  if (rv) {
-                    pfx=pptr; // BUG: pfx not stateless
-                    return rv;
-                  }
-             }
-             pptr = pptr->getNextEQ();
-        } else {
-             pptr = pptr->getNextNE();
-        }
-    }
-    
-    return NULL;
-}
-
-// check word for prefixes
-struct hentry * AffixMgr::prefix_check_twosfx(const char * word, int len,
-    char in_compound, const FLAG needflag)
-{
-    struct hentry * rv= NULL;
-
-    pfx = NULL;
-    sfxappnd = NULL;
-    
-    // first handle the special case of 0 length prefixes
-    PfxEntry * pe = pStart[0];
-    
-    while (pe) {
-        rv = pe->check_twosfx(word, len, in_compound, needflag);
-        if (rv) return rv;
-        pe = pe->getNext();
-    }
-  
-    // now handle the general case
-    unsigned char sp = *((const unsigned char *)word);
-    PfxEntry * pptr = pStart[sp];
-
-    while (pptr) {
-        if (isSubset(pptr->getKey(),word)) {
-            rv = pptr->check_twosfx(word, len, in_compound, needflag);
-            if (rv) {
-                pfx = pptr;
-                return rv;
-            }
-            pptr = pptr->getNextEQ();
-        } else {
-             pptr = pptr->getNextNE();
-        }
-    }
-    
-    return NULL;
-}
-
-// check word for prefixes
-char * AffixMgr::prefix_check_morph(const char * word, int len, char in_compound,
-    const FLAG needflag)
-{
-    char * st;
-
-    char result[MAXLNLEN];
-    result[0] = '\0';
-
-    pfx = NULL;
-    sfxappnd = NULL;
-    
-    // first handle the special case of 0 length prefixes
-    PfxEntry * pe = pStart[0];
-    while (pe) {
-       st = pe->check_morph(word,len,in_compound, needflag);
-       if (st) {
-            mystrcat(result, st, MAXLNLEN);
-            free(st);
-       }
-       // if (rv) return rv;
-       pe = pe->getNext();
-    }
-  
-    // now handle the general case
-    unsigned char sp = *((const unsigned char *)word);
-    PfxEntry * pptr = pStart[sp];
-
-    while (pptr) {
-        if (isSubset(pptr->getKey(),word)) {
-            st = pptr->check_morph(word,len,in_compound, needflag);
-            if (st) {
-              // fogemorpheme
-              if ((in_compound != IN_CPD_NOT) || !((pptr->getCont() && 
-                        (TESTAFF(pptr->getCont(), onlyincompound, pptr->getContLen()))))) {
-                    mystrcat(result, st, MAXLNLEN);
-                    pfx = pptr;
-                }
-                free(st);
-            }
-            pptr = pptr->getNextEQ();
-        } else {
-            pptr = pptr->getNextNE();
-        }
-    }
-    
-    if (*result) return mystrdup(result);
-    return NULL;
-}
-
-
-// check word for prefixes
-char * AffixMgr::prefix_check_twosfx_morph(const char * word, int len,
-    char in_compound, const FLAG needflag)
-{
-    char * st;
-
-    char result[MAXLNLEN];
-    result[0] = '\0';
-
-    pfx = NULL;
-    sfxappnd = NULL;
-    
-    // first handle the special case of 0 length prefixes
-    PfxEntry * pe = pStart[0];
-    while (pe) {
-        st = pe->check_twosfx_morph(word,len,in_compound, needflag);
-        if (st) {
-            mystrcat(result, st, MAXLNLEN);
-            free(st);
-        }
-        pe = pe->getNext();
-    }
-  
-    // now handle the general case
-    unsigned char sp = *((const unsigned char *)word);
-    PfxEntry * pptr = pStart[sp];
-
-    while (pptr) {
-        if (isSubset(pptr->getKey(),word)) {
-            st = pptr->check_twosfx_morph(word, len, in_compound, needflag);
-            if (st) {
-                mystrcat(result, st, MAXLNLEN);
-                free(st);
-                pfx = pptr;
-            }
-            pptr = pptr->getNextEQ();
-        } else {
-            pptr = pptr->getNextNE();
-        }
-    }
-    
-    if (*result) return mystrdup(result);
-    return NULL;
-}
-
-// Is word a non compound with a REP substitution (see checkcompoundrep)?
-int AffixMgr::cpdrep_check(const char * word, int wl)
-{
-  char candidate[MAXLNLEN];
-  const char * r;
-  int lenr, lenp;
-
-#ifdef HUNSPELL_CHROME_CLIENT
-  const char *pattern, *pattern2;
-  hunspell::ReplacementIterator iterator = bdict_reader->GetReplacementIterator();
-  while (iterator.GetNext(&pattern, &pattern2)) {
-    r = word;
-    lenr = strlen(pattern2);
-    lenp = strlen(pattern);
-
-    // search every occurence of the pattern in the word
-    while ((r=strstr(r, pattern)) != NULL) {
-      strcpy(candidate, word);
-      if (r-word + lenr + strlen(r+lenp) >= MAXLNLEN) break;
-      strcpy(candidate+(r-word), pattern2);
-      strcpy(candidate+(r-word)+lenr, r+lenp);
-      if (candidate_check(candidate,strlen(candidate))) return 1;
-      r++; // search for the next letter
-    }
-  }
-
-#else
-  if ((wl < 2) || !numrep) return 0;
-
-  for (int i=0; i < numrep; i++ ) {
-      r = word;
-      lenr = strlen(reptable[i].pattern2);
-      lenp = strlen(reptable[i].pattern);
-      // search every occurence of the pattern in the word
-      while ((r=strstr(r, reptable[i].pattern)) != NULL) {
-          strcpy(candidate, word);
-          if (r-word + lenr + strlen(r+lenp) >= MAXLNLEN) break;
-          strcpy(candidate+(r-word),reptable[i].pattern2);
-          strcpy(candidate+(r-word)+lenr, r+lenp);
-          if (candidate_check(candidate,strlen(candidate))) return 1;
-          r++; // search for the next letter
-      }
-   }
-#endif
-   return 0;
-}
-
-// forbid compoundings when there are special patterns at word bound
-int AffixMgr::cpdpat_check(const char * word, int pos, hentry * r1, hentry * r2, const char /*affixed*/)
-{
-  int len;
-  for (int i = 0; i < numcheckcpd; i++) {
-      if (isSubset(checkcpdtable[i].pattern2, word + pos) &&
-        (!r1 || !checkcpdtable[i].cond ||
-          (r1->astr && TESTAFF(r1->astr, checkcpdtable[i].cond, r1->alen))) &&
-        (!r2 || !checkcpdtable[i].cond2 ||
-          (r2->astr && TESTAFF(r2->astr, checkcpdtable[i].cond2, r2->alen))) &&
-        // zero length pattern => only TESTAFF
-        // zero pattern (0/flag) => unmodified stem (zero affixes allowed)
-        (!*(checkcpdtable[i].pattern) || (
-            (*(checkcpdtable[i].pattern)=='0' && r1->blen <= pos && strncmp(word + pos - r1->blen, r1->word, r1->blen) == 0) ||
-            (*(checkcpdtable[i].pattern)!='0' && ((len = strlen(checkcpdtable[i].pattern)) != 0) &&
-                strncmp(word + pos - len, checkcpdtable[i].pattern, len) == 0)))) {
-            return 1;
-        }
-  }
-  return 0;
-}
-
-// forbid compounding with neighbouring upper and lower case characters at word bounds
-int AffixMgr::cpdcase_check(const char * word, int pos)
-{
-  if (utf8) {
-      w_char u, w;
-      const char * p;
-      u8_u16(&u, 1, word + pos);
-      for (p = word + pos - 1; (*p & 0xc0) == 0x80; p--);
-      u8_u16(&w, 1, p);
-      unsigned short a = (u.h << 8) + u.l;
-      unsigned short b = (w.h << 8) + w.l;
-      if (((unicodetoupper(a, langnum) == a) || (unicodetoupper(b, langnum) == b)) &&
-          (a != '-') && (b != '-')) return 1;
-  } else {
-      unsigned char a = *(word + pos - 1);
-      unsigned char b = *(word + pos);
-      if ((csconv[a].ccase || csconv[b].ccase) && (a != '-') && (b != '-')) return 1;
-  }
-  return 0;
-}
-
-// check compound patterns
-int AffixMgr::defcpd_check(hentry *** words, short wnum, hentry * rv, hentry ** def, char all)
-{
-  signed short btpp[MAXWORDLEN]; // metacharacter (*, ?) positions for backtracking
-  signed short btwp[MAXWORDLEN]; // word positions for metacharacters
-  int btnum[MAXWORDLEN]; // number of matched characters in metacharacter positions
-  short bt = 0;  
-  int i, j;
-  int ok;
-  int w = 0;
-
-  if (!*words) {
-    w = 1;
-    *words = def;
-  }
-
-  if (!*words) {
-    return 0;
-  }
-
-  (*words)[wnum] = rv;
-
-  // has the last word COMPOUNDRULE flag?
-  if (rv->alen == 0) {
-    (*words)[wnum] = NULL;
-    if (w) *words = NULL;
-    return 0;
-  }
-  ok = 0;
-  for (i = 0; i < numdefcpd; i++) {
-    for (j = 0; j < defcpdtable[i].len; j++) {
-       if (defcpdtable[i].def[j] != '*' && defcpdtable[i].def[j] != '?' &&
-          TESTAFF(rv->astr, defcpdtable[i].def[j], rv->alen)) ok = 1;
-    }
-  }
-  if (ok == 0) {
-    (*words)[wnum] = NULL;
-    if (w) *words = NULL;
-    return 0;
-  }
-
-  for (i = 0; i < numdefcpd; i++) {
-    signed short pp = 0; // pattern position
-    signed short wp = 0; // "words" position
-    int ok2;
-    ok = 1;
-    ok2 = 1;
-    do {
-      while ((pp < defcpdtable[i].len) && (wp <= wnum)) {
-        if (((pp+1) < defcpdtable[i].len) &&
-          ((defcpdtable[i].def[pp+1] == '*') || (defcpdtable[i].def[pp+1] == '?'))) {
-            int wend = (defcpdtable[i].def[pp+1] == '?') ? wp : wnum;
-            ok2 = 1;
-            pp+=2;
-            btpp[bt] = pp;
-            btwp[bt] = wp;
-            while (wp <= wend) {
-                if (!(*words)[wp]->alen || 
-                  !TESTAFF((*words)[wp]->astr, defcpdtable[i].def[pp-2], (*words)[wp]->alen)) {
-                    ok2 = 0;
-                    break;
-                }
-                wp++;
-            }
-            if (wp <= wnum) ok2 = 0;
-            btnum[bt] = wp - btwp[bt];
-            if (btnum[bt] > 0) bt++;
-            if (ok2) break;
-        } else {
-            ok2 = 1;
-            if (!(*words)[wp] || !(*words)[wp]->alen || 
-              !TESTAFF((*words)[wp]->astr, defcpdtable[i].def[pp], (*words)[wp]->alen)) {
-                ok = 0;
-                break;
-            }
-            pp++;
-            wp++;
-            if ((defcpdtable[i].len == pp) && !(wp > wnum)) ok = 0;
-        }
-      }
-    if (ok && ok2) { 
-        int r = pp;
-        while ((defcpdtable[i].len > r) && ((r+1) < defcpdtable[i].len) &&
-            ((defcpdtable[i].def[r+1] == '*') || (defcpdtable[i].def[r+1] == '?'))) r+=2;
-        if (defcpdtable[i].len <= r) return 1;
-    }
-    // backtrack
-    if (bt) do {
-        ok = 1;
-        btnum[bt - 1]--;
-        pp = btpp[bt - 1];
-        wp = btwp[bt - 1] + (signed short) btnum[bt - 1];
-    } while ((btnum[bt - 1] < 0) && --bt);
-  } while (bt);
-
-  if (ok && ok2 && (!all || (defcpdtable[i].len <= pp))) return 1;
-
-  // check zero ending
-  while (ok && ok2 && (defcpdtable[i].len > pp) && ((pp+1) < defcpdtable[i].len) &&
-    ((defcpdtable[i].def[pp+1] == '*') || (defcpdtable[i].def[pp+1] == '?'))) pp+=2;
-  if (ok && ok2 && (defcpdtable[i].len <= pp)) return 1;
-  }
-  (*words)[wnum] = NULL;
-  if (w) *words = NULL;
-  return 0;
-}
-
-inline int AffixMgr::candidate_check(const char * word, int len)
-{
-  struct hentry * rv=NULL;
-  
-  rv = lookup(word);
-  if (rv) return 1;
-
-//  rv = prefix_check(word,len,1);
-//  if (rv) return 1;
-  
-  rv = affix_check(word,len);
-  if (rv) return 1;
-  return 0;
-}
-
-// calculate number of syllable for compound-checking
-short AffixMgr::get_syllable(const char * word, int wlen)
-{
-    if (cpdmaxsyllable==0) return 0;
-    
-    short num=0;
-
-    if (!utf8) {
-        for (int i=0; i<wlen; i++) {
-            if (strchr(cpdvowels, word[i])) num++;
-        }
-    } else if (cpdvowels_utf16) {
-        w_char w[MAXWORDUTF8LEN];
-        int i = u8_u16(w, MAXWORDUTF8LEN, word);
-        for (; i > 0; i--) {
-            if (flag_bsearch((unsigned short *) cpdvowels_utf16,
-                ((unsigned short *) w)[i - 1], cpdvowels_utf16_len)) num++;
-        }
-    }
-    return num;
-}
-
-void AffixMgr::setcminmax(int * cmin, int * cmax, const char * word, int len) {
-    if (utf8) {
-        int i;
-        for (*cmin = 0, i = 0; (i < cpdmin) && word[*cmin]; i++) {
-          for ((*cmin)++; (word[*cmin] & 0xc0) == 0x80; (*cmin)++);
-        }
-        for (*cmax = len, i = 0; (i < (cpdmin - 1)) && *cmax; i++) {
-          for ((*cmax)--; (word[*cmax] & 0xc0) == 0x80; (*cmax)--);
-        }
-    } else {
-        *cmin = cpdmin;
-        *cmax = len - cpdmin + 1;
-    }
-}
-
-
-// check if compound word is correctly spelled
-// hu_mov_rule = spec. Hungarian rule (XXX)
-struct hentry * AffixMgr::compound_check(const char * word, int len, 
-    short wordnum, short numsyllable, short maxwordnum, short wnum, hentry ** words = NULL,
-    char hu_mov_rule = 0, char is_sug = 0, int * info = NULL)
-{
-    int i; 
-    short oldnumsyllable, oldnumsyllable2, oldwordnum, oldwordnum2;
-    struct hentry * rv = NULL;
-    struct hentry * rv_first;
-    struct hentry * rwords[MAXWORDLEN]; // buffer for COMPOUND pattern checking
-    char st [MAXWORDUTF8LEN + 4];
-    char ch = '\0';
-    int cmin;
-    int cmax;
-    int striple = 0;
-    int scpd = 0;
-    int soldi = 0;
-    int oldcmin = 0;
-    int oldcmax = 0;
-    int oldlen = 0;
-    int checkedstriple = 0;
-    int onlycpdrule;
-    char affixed = 0;
-    hentry ** oldwords = words;
-
-    int checked_prefix;
-
-    setcminmax(&cmin, &cmax, word, len);
-
-    strcpy(st, word);
-
-    for (i = cmin; i < cmax; i++) {
-        // go to end of the UTF-8 character
-        if (utf8) {
-            for (; (st[i] & 0xc0) == 0x80; i++);
-            if (i >= cmax) return NULL;
-        }
-
-        words = oldwords;
-        onlycpdrule = (words) ? 1 : 0;
-
-        do { // onlycpdrule loop
-
-        oldnumsyllable = numsyllable;
-        oldwordnum = wordnum;
-        checked_prefix = 0;
-
-
-        do { // simplified checkcompoundpattern loop
-
-        if (scpd > 0) {
-          for (; scpd <= numcheckcpd && (!checkcpdtable[scpd-1].pattern3 ||
-            strncmp(word + i, checkcpdtable[scpd-1].pattern3, strlen(checkcpdtable[scpd-1].pattern3)) != 0); scpd++);
-
-          if (scpd > numcheckcpd) break; // break simplified checkcompoundpattern loop
-          strcpy(st + i, checkcpdtable[scpd-1].pattern);
-          soldi = i;
-          i += strlen(checkcpdtable[scpd-1].pattern);
-          strcpy(st + i, checkcpdtable[scpd-1].pattern2);
-          strcpy(st + i + strlen(checkcpdtable[scpd-1].pattern2), word + soldi + strlen(checkcpdtable[scpd-1].pattern3));
-
-          oldlen = len;
-          len += strlen(checkcpdtable[scpd-1].pattern) + strlen(checkcpdtable[scpd-1].pattern2) - strlen(checkcpdtable[scpd-1].pattern3);
-          oldcmin = cmin;
-          oldcmax = cmax;
-          setcminmax(&cmin, &cmax, st, len);
-
-          cmax = len - cpdmin + 1;
-        }
-
-        ch = st[i];
-        st[i] = '\0';
-
-        sfx = NULL;
-        pfx = NULL;
-
-        // FIRST WORD
-
-        affixed = 1;
-        rv = lookup(st); // perhaps without prefix
-
-        // search homonym with compound flag
-        while ((rv) && !hu_mov_rule &&
-            ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) ||
-                !((compoundflag && !words && !onlycpdrule && TESTAFF(rv->astr, compoundflag, rv->alen)) ||
-                  (compoundbegin && !wordnum && !onlycpdrule && 
-                        TESTAFF(rv->astr, compoundbegin, rv->alen)) ||
-                  (compoundmiddle && wordnum && !words && !onlycpdrule &&
-                    TESTAFF(rv->astr, compoundmiddle, rv->alen)) ||
-                  (numdefcpd && onlycpdrule &&
-                    ((!words && !wordnum && defcpd_check(&words, wnum, rv, (hentry **) &rwords, 0)) ||
-                    (words && defcpd_check(&words, wnum, rv, (hentry **) &rwords, 0))))) ||
-                  (scpd != 0 && checkcpdtable[scpd-1].cond != FLAG_NULL &&
-                    !TESTAFF(rv->astr, checkcpdtable[scpd-1].cond, rv->alen)))
-                  ) {
-            rv = rv->next_homonym;
-        }
-
-        if (rv) affixed = 0;
-
-        if (!rv) {
-            if (onlycpdrule) break;
-            if (compoundflag && 
-             !(rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundflag))) {
-                if (((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL,
-                        FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) || 
-                        (compoundmoresuffixes && (rv = suffix_check_twosfx(st, i, 0, NULL, compoundflag)))) && !hu_mov_rule &&
-                    sfx->getCont() &&
-                        ((compoundforbidflag && TESTAFF(sfx->getCont(), compoundforbidflag, 
-                            sfx->getContLen())) || (compoundend &&
-                        TESTAFF(sfx->getCont(), compoundend, 
-                            sfx->getContLen())))) {
-                        rv = NULL;
-                }
-            }
-
-            if (rv ||
-              (((wordnum == 0) && compoundbegin &&
-                ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundbegin, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
-                (compoundmoresuffixes && (rv = suffix_check_twosfx(st, i, 0, NULL, compoundbegin))) || // twofold suffixes + compound
-                (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundbegin)))) ||
-              ((wordnum > 0) && compoundmiddle &&
-                ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundmiddle, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
-                (compoundmoresuffixes && (rv = suffix_check_twosfx(st, i, 0, NULL, compoundmiddle))) || // twofold suffixes + compound
-                (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundmiddle)))))
-              ) checked_prefix = 1;
-        // else check forbiddenwords and needaffix
-        } else if (rv->astr && (TESTAFF(rv->astr, forbiddenword, rv->alen) ||
-            TESTAFF(rv->astr, needaffix, rv->alen) ||
-            TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) ||
-            (is_sug && nosuggest && TESTAFF(rv->astr, nosuggest, rv->alen))
-             )) {
-                st[i] = ch;
-                //continue;
-                break;
-        }
-
-            // check non_compound flag in suffix and prefix
-            if ((rv) && !hu_mov_rule &&
-                ((pfx && pfx->getCont() &&
-                    TESTAFF(pfx->getCont(), compoundforbidflag, 
-                        pfx->getContLen())) ||
-                (sfx && sfx->getCont() &&
-                    TESTAFF(sfx->getCont(), compoundforbidflag, 
-                        sfx->getContLen())))) {
-                    rv = NULL;
-            }
-
-            // check compoundend flag in suffix and prefix
-            if ((rv) && !checked_prefix && compoundend && !hu_mov_rule &&
-                ((pfx && pfx->getCont() &&
-                    TESTAFF(pfx->getCont(), compoundend, 
-                        pfx->getContLen())) ||
-                (sfx && sfx->getCont() &&
-                    TESTAFF(sfx->getCont(), compoundend, 
-                        sfx->getContLen())))) {
-                    rv = NULL;
-            }
-
-            // check compoundmiddle flag in suffix and prefix
-            if ((rv) && !checked_prefix && (wordnum==0) && compoundmiddle && !hu_mov_rule &&
-                ((pfx && pfx->getCont() &&
-                    TESTAFF(pfx->getCont(), compoundmiddle, 
-                        pfx->getContLen())) ||
-                (sfx && sfx->getCont() &&
-                    TESTAFF(sfx->getCont(), compoundmiddle, 
-                        sfx->getContLen())))) {
-                    rv = NULL;
-            }
-
-        // check forbiddenwords
-        if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen) ||
-            TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) ||
-            (is_sug && nosuggest && TESTAFF(rv->astr, nosuggest, rv->alen)))) {
-                return NULL;
-            }
-
-        // increment word number, if the second root has a compoundroot flag
-        if ((rv) && compoundroot && 
-            (TESTAFF(rv->astr, compoundroot, rv->alen))) {
-                wordnum++;
-        }
-
-        // first word is acceptable in compound words?
-        if (((rv) && 
-          ( checked_prefix || (words && words[wnum]) ||
-            (compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) ||
-            ((oldwordnum == 0) && compoundbegin && TESTAFF(rv->astr, compoundbegin, rv->alen)) ||
-            ((oldwordnum > 0) && compoundmiddle && TESTAFF(rv->astr, compoundmiddle, rv->alen))// ||
-//            (numdefcpd && )
-
-// LANG_hu section: spec. Hungarian rule
-            || ((langnum == LANG_hu) && hu_mov_rule && (
-                    TESTAFF(rv->astr, 'F', rv->alen) || // XXX hardwired Hungarian dictionary codes
-                    TESTAFF(rv->astr, 'G', rv->alen) ||
-                    TESTAFF(rv->astr, 'H', rv->alen)
-                )
-              )
-// END of LANG_hu section
-          ) &&
-          (
-             // test CHECKCOMPOUNDPATTERN conditions
-             scpd == 0 || checkcpdtable[scpd-1].cond == FLAG_NULL || 
-                TESTAFF(rv->astr, checkcpdtable[scpd-1].cond, rv->alen)
-          )
-          && ! (( checkcompoundtriple && scpd == 0 && !words && // test triple letters
-                   (word[i-1]==word[i]) && (
-                      ((i>1) && (word[i-1]==word[i-2])) ||
-                      ((word[i-1]==word[i+1])) // may be word[i+1] == '\0'
-                   )
-               ) ||
-               (
-                 checkcompoundcase && scpd == 0 && !words && cpdcase_check(word, i)
-               ))
-         )
-// LANG_hu section: spec. Hungarian rule
-         || ((!rv) && (langnum == LANG_hu) && hu_mov_rule && (rv = affix_check(st,i)) &&
-              (sfx && sfx->getCont() && ( // XXX hardwired Hungarian dic. codes
-                        TESTAFF(sfx->getCont(), (unsigned short) 'x', sfx->getContLen()) ||
-                        TESTAFF(sfx->getCont(), (unsigned short) '%', sfx->getContLen())
-                    )
-               )
-             )
-         ) { // first word is ok condition
-
-// LANG_hu section: spec. Hungarian rule
-            if (langnum == LANG_hu) {
-                // calculate syllable number of the word
-                numsyllable += get_syllable(st, i);
-                // + 1 word, if syllable number of the prefix > 1 (hungarian convention)
-                if (pfx && (get_syllable(pfx->getKey(),strlen(pfx->getKey())) > 1)) wordnum++;
-            }
-// END of LANG_hu section
-
-            // NEXT WORD(S)
-            rv_first = rv;
-            st[i] = ch;
-
-        do { // striple loop
-
-            // check simplifiedtriple
-            if (simplifiedtriple) { 
-              if (striple) { 
-                checkedstriple = 1;
-                i--; // check "fahrt" instead of "ahrt" in "Schiffahrt"
-              } else if (i > 2 && *(word+i - 1) == *(word + i - 2)) striple = 1;
-            }
-
-            rv = lookup((st+i)); // perhaps without prefix
-
-        // search homonym with compound flag
-        while ((rv) && ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) ||
-                        !((compoundflag && !words && TESTAFF(rv->astr, compoundflag, rv->alen)) ||
-                          (compoundend && !words && TESTAFF(rv->astr, compoundend, rv->alen)) ||
-                           (numdefcpd && words && defcpd_check(&words, wnum + 1, rv, NULL,1))) ||
-                             (scpd != 0 && checkcpdtable[scpd-1].cond2 != FLAG_NULL &&
-                                !TESTAFF(rv->astr, checkcpdtable[scpd-1].cond2, rv->alen))
-                           )) {
-            rv = rv->next_homonym;
-        }
-
-            // check FORCEUCASE
-            if (rv && forceucase && (rv) &&
-                (TESTAFF(rv->astr, forceucase, rv->alen)) && !(info && *info & SPELL_ORIGCAP)) rv = NULL;
-
-            if (rv && words && words[wnum + 1]) return rv_first;
-
-            oldnumsyllable2 = numsyllable;
-            oldwordnum2 = wordnum;
-
-
-// LANG_hu section: spec. Hungarian rule, XXX hardwired dictionary code
-            if ((rv) && (langnum == LANG_hu) && (TESTAFF(rv->astr, 'I', rv->alen)) && !(TESTAFF(rv->astr, 'J', rv->alen))) {
-                numsyllable--;
-            }
-// END of LANG_hu section
-
-            // increment word number, if the second root has a compoundroot flag
-            if ((rv) && (compoundroot) && 
-                (TESTAFF(rv->astr, compoundroot, rv->alen))) {
-                    wordnum++;
-            }
-
-            // check forbiddenwords
-            if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen) ||
-                TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) ||
-               (is_sug && nosuggest && TESTAFF(rv->astr, nosuggest, rv->alen)))) return NULL;
-
-            // second word is acceptable, as a root?
-            // hungarian conventions: compounding is acceptable,
-            // when compound forms consist of 2 words, or if more,
-            // then the syllable number of root words must be 6, or lesser.
-
-            if ((rv) && (
-                      (compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) ||
-                      (compoundend && TESTAFF(rv->astr, compoundend, rv->alen))
-                    )
-                && (
-                      ((cpdwordmax==-1) || (wordnum+1<cpdwordmax)) || 
-                      ((cpdmaxsyllable!=0) && 
-                          (numsyllable + get_syllable(HENTRY_WORD(rv), rv->clen)<=cpdmaxsyllable))
-                    ) &&
-               (
-                 // test CHECKCOMPOUNDPATTERN
-                 !numcheckcpd || scpd != 0 || !cpdpat_check(word, i, rv_first, rv, 0)
-               ) &&
-                (
-                     (!checkcompounddup || (rv != rv_first))
-                   )
-            // test CHECKCOMPOUNDPATTERN conditions
-                && (scpd == 0 || checkcpdtable[scpd-1].cond2 == FLAG_NULL ||
-                      TESTAFF(rv->astr, checkcpdtable[scpd-1].cond2, rv->alen))
-                )
-                 {
-                      // forbid compound word, if it is a non compound word with typical fault
-                      if (checkcompoundrep && cpdrep_check(word,len)) return NULL;
-                      return rv_first;
-            }
-
-            numsyllable = oldnumsyllable2;
-            wordnum = oldwordnum2;
-
-            // perhaps second word has prefix or/and suffix
-            sfx = NULL;
-            sfxflag = FLAG_NULL;
-            rv = (compoundflag && !onlycpdrule) ? affix_check((word+i),strlen(word+i), compoundflag, IN_CPD_END) : NULL;
-            if (!rv && compoundend && !onlycpdrule) {
-                sfx = NULL;
-                pfx = NULL;
-                rv = affix_check((word+i),strlen(word+i), compoundend, IN_CPD_END);
-            }
-
-            if (!rv && numdefcpd && words) {
-                rv = affix_check((word+i),strlen(word+i), 0, IN_CPD_END);
-                if (rv && defcpd_check(&words, wnum + 1, rv, NULL, 1)) return rv_first;
-                rv = NULL;
-            }
-
-            // test CHECKCOMPOUNDPATTERN conditions (allowed forms)
-            if (rv && !(scpd == 0 || checkcpdtable[scpd-1].cond2 == FLAG_NULL || 
-                TESTAFF(rv->astr, checkcpdtable[scpd-1].cond2, rv->alen))) rv = NULL;
-
-            // test CHECKCOMPOUNDPATTERN conditions (forbidden compounds)
-            if (rv && numcheckcpd && scpd == 0 && cpdpat_check(word, i, rv_first, rv, affixed)) rv = NULL;
-
-            // check non_compound flag in suffix and prefix
-            if ((rv) && 
-                ((pfx && pfx->getCont() &&
-                    TESTAFF(pfx->getCont(), compoundforbidflag, 
-                        pfx->getContLen())) ||
-                (sfx && sfx->getCont() &&
-                    TESTAFF(sfx->getCont(), compoundforbidflag, 
-                        sfx->getContLen())))) {
-                    rv = NULL;
-            }
-
-            // check FORCEUCASE
-            if (rv && forceucase && (rv) &&
-                (TESTAFF(rv->astr, forceucase, rv->alen)) && !(info && *info & SPELL_ORIGCAP)) rv = NULL;
-
-            // check forbiddenwords
-            if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen) ||
-                TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) ||
-               (is_sug && nosuggest && TESTAFF(rv->astr, nosuggest, rv->alen)))) return NULL;
-
-            // pfxappnd = prefix of word+i, or NULL
-            // calculate syllable number of prefix.
-            // hungarian convention: when syllable number of prefix is more,
-            // than 1, the prefix+word counts as two words.
-
-            if (langnum == LANG_hu) {
-                // calculate syllable number of the word
-                numsyllable += get_syllable(word + i, strlen(word + i));
-
-                // - affix syllable num.
-                // XXX only second suffix (inflections, not derivations)
-                if (sfxappnd) {
-                    char * tmp = myrevstrdup(sfxappnd);
-                    numsyllable -= get_syllable(tmp, strlen(tmp));
-                    free(tmp);
-                }
-
-                // + 1 word, if syllable number of the prefix > 1 (hungarian convention)
-                if (pfx && (get_syllable(pfx->getKey(),strlen(pfx->getKey())) > 1)) wordnum++;
-
-                // increment syllable num, if last word has a SYLLABLENUM flag
-                // and the suffix is beginning `s'
-
-                if (cpdsyllablenum) {
-                    switch (sfxflag) {
-                        case 'c': { numsyllable+=2; break; }
-                        case 'J': { numsyllable += 1; break; }
-                        case 'I': { if (rv && TESTAFF(rv->astr, 'J', rv->alen)) numsyllable += 1; break; }
-                    }
-                }
-            }
-
-            // increment word number, if the second word has a compoundroot flag
-            if ((rv) && (compoundroot) && 
-                (TESTAFF(rv->astr, compoundroot, rv->alen))) {
-                    wordnum++;
-            }
-
-            // second word is acceptable, as a word with prefix or/and suffix?
-            // hungarian conventions: compounding is acceptable,
-            // when compound forms consist 2 word, otherwise
-            // the syllable number of root words is 6, or lesser.
-            if ((rv) && 
-                    (
-                      ((cpdwordmax == -1) || (wordnum + 1 < cpdwordmax)) || 
-                      ((cpdmaxsyllable != 0) && 
-                          (numsyllable <= cpdmaxsyllable))
-                    )
-                && (
-                   (!checkcompounddup || (rv != rv_first))
-                   )) {
-                    // forbid compound word, if it is a non compound word with typical fault
-                    if (checkcompoundrep && cpdrep_check(word, len)) return NULL;
-                    return rv_first;
-            }
-
-            numsyllable = oldnumsyllable2;
-            wordnum = oldwordnum2;
-
-            // perhaps second word is a compound word (recursive call)
-            if (wordnum < maxwordnum) {
-                rv = compound_check((st+i),strlen(st+i), wordnum+1,
-                     numsyllable, maxwordnum, wnum + 1, words, 0, is_sug, info);
-                
-                if (rv && numcheckcpd && ((scpd == 0 && cpdpat_check(word, i, rv_first, rv, affixed)) ||
-                   (scpd != 0 && !cpdpat_check(word, i, rv_first, rv, affixed)))) rv = NULL;
-            } else {
-                rv=NULL;
-            }
-            if (rv) {
-                // forbid compound word, if it is a non compound word with typical fault
-                if (checkcompoundrep || forbiddenword) {
-                    struct hentry * rv2 = NULL;
-
-                    if (checkcompoundrep && cpdrep_check(word, len)) return NULL;
-                    
-                    // check first part
-                    if (strncmp(rv->word, word + i, rv->blen) == 0) {
-                        char r = *(st + i + rv->blen);
-                        *(st + i + rv->blen) = '\0';
-                        
-                        if (checkcompoundrep && cpdrep_check(st, i + rv->blen)) {
-                            *(st + i + rv->blen) = r;
-                            continue;
-                        }
-
-                        if (forbiddenword) {
-                            rv2 = lookup(word);
-                            if (!rv2) rv2 = affix_check(word, len);
-                            if (rv2 && rv2->astr && TESTAFF(rv2->astr, forbiddenword, rv2->alen) && 
-                                (strncmp(rv2->word, st, i + rv->blen) == 0)) {
-                                    return NULL;
-                            }
-                        }
-                        *(st + i + rv->blen) = r;
-                    }
-                }
-                return rv_first;
-            }
-          } while (striple && !checkedstriple); // end of striple loop
-
-          if (checkedstriple) {
-            i++;
-            checkedstriple = 0;
-            striple = 0;
-          }
-
-        } // first word is ok condition
-
-        if (soldi != 0) {
-          i = soldi;
-          soldi = 0;
-          len = oldlen;
-          cmin = oldcmin;
-          cmax = oldcmax;
-        }
-        scpd++;
-
-
-        } while (!onlycpdrule && simplifiedcpd && scpd <= numcheckcpd); // end of simplifiedcpd loop
-
-        scpd = 0;
-        wordnum = oldwordnum;
-        numsyllable = oldnumsyllable;
-
-        if (soldi != 0) {
-          i = soldi;
-          strcpy(st, word); // XXX add more optim.
-          soldi = 0;
-        } else st[i] = ch;
-
-        } while (numdefcpd && oldwordnum == 0 && !onlycpdrule && (onlycpdrule = 1)); // end of onlycpd loop
-
-    }
-
-    return NULL;
-}
-
-// check if compound word is correctly spelled
-// hu_mov_rule = spec. Hungarian rule (XXX)
-int AffixMgr::compound_check_morph(const char * word, int len, 
-    short wordnum, short numsyllable, short maxwordnum, short wnum, hentry ** words,
-    char hu_mov_rule = 0, char ** result = NULL, char * partresult = NULL)
-{
-    int i;
-    short oldnumsyllable, oldnumsyllable2, oldwordnum, oldwordnum2;
-    int ok = 0;
-
-    struct hentry * rv = NULL;
-    struct hentry * rv_first;
-    struct hentry * rwords[MAXWORDLEN]; // buffer for COMPOUND pattern checking
-    char st [MAXWORDUTF8LEN + 4];
-    char ch;
-
-    int checked_prefix;
-    char presult[MAXLNLEN];
-
-    int cmin;
-    int cmax;
-
-    int onlycpdrule;
-    char affixed = 0;
-    hentry ** oldwords = words;
-
-    setcminmax(&cmin, &cmax, word, len);
-
-    strcpy(st, word);
-
-    for (i = cmin; i < cmax; i++) {
-        oldnumsyllable = numsyllable;
-        oldwordnum = wordnum;
-        checked_prefix = 0;
-
-        // go to end of the UTF-8 character
-        if (utf8) {
-            for (; (st[i] & 0xc0) == 0x80; i++);
-            if (i >= cmax) return 0;
-        }
-
-        words = oldwords;
-        onlycpdrule = (words) ? 1 : 0;
-
-        do { // onlycpdrule loop
-
-        oldnumsyllable = numsyllable;
-        oldwordnum = wordnum;
-        checked_prefix = 0;
-
-        ch = st[i];
-        st[i] = '\0';
-        sfx = NULL;
-
-        // FIRST WORD
-
-        affixed = 1;
-
-        *presult = '\0';
-        if (partresult) mystrcat(presult, partresult, MAXLNLEN);
-
-        rv = lookup(st); // perhaps without prefix
-
-        // search homonym with compound flag
-        while ((rv) && !hu_mov_rule && 
-            ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) ||
-                !((compoundflag && !words && !onlycpdrule && TESTAFF(rv->astr, compoundflag, rv->alen)) ||
-                (compoundbegin && !wordnum && !onlycpdrule &&
-                        TESTAFF(rv->astr, compoundbegin, rv->alen)) ||
-                (compoundmiddle && wordnum && !words && !onlycpdrule &&
-                    TESTAFF(rv->astr, compoundmiddle, rv->alen)) ||
-                  (numdefcpd && onlycpdrule &&
-                    ((!words && !wordnum && defcpd_check(&words, wnum, rv, (hentry **) &rwords, 0)) ||
-                    (words && defcpd_check(&words, wnum, rv, (hentry **) &rwords, 0))))
-                  ))) {
-            rv = rv->next_homonym;
-        }
-
-        if (rv) affixed = 0;
-
-        if (rv)  {
-            sprintf(presult + strlen(presult), "%c%s%s", MSEP_FLD, MORPH_PART, st);
-            if (!HENTRY_FIND(rv, MORPH_STEM)) {
-                sprintf(presult + strlen(presult), "%c%s%s", MSEP_FLD, MORPH_STEM, st);
-            }
-            // store the pointer of the hash entry
-//            sprintf(presult + strlen(presult), "%c%s%p", MSEP_FLD, MORPH_HENTRY, rv);
-            if (HENTRY_DATA(rv)) {
-                sprintf(presult + strlen(presult), "%c%s", MSEP_FLD, HENTRY_DATA2(rv));
-            }
-        }        
-
-        if (!rv) {
-            if (onlycpdrule) break;
-            if (compoundflag &&
-             !(rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundflag))) {
-                if (((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL,
-                        FLAG_NULL, compoundflag, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
-                        (compoundmoresuffixes && (rv = suffix_check_twosfx(st, i, 0, NULL, compoundflag)))) && !hu_mov_rule &&
-                    sfx->getCont() &&
-                        ((compoundforbidflag && TESTAFF(sfx->getCont(), compoundforbidflag, 
-                            sfx->getContLen())) || (compoundend &&
-                        TESTAFF(sfx->getCont(), compoundend, 
-                            sfx->getContLen())))) {
-                        rv = NULL;
-                }
-            }
-
-            if (rv ||
-              (((wordnum == 0) && compoundbegin &&
-                ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundbegin, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
-                (compoundmoresuffixes && (rv = suffix_check_twosfx(st, i, 0, NULL, compoundbegin))) ||  // twofold suffix+compound
-                (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundbegin)))) ||
-              ((wordnum > 0) && compoundmiddle &&
-                ((rv = suffix_check(st, i, 0, NULL, NULL, 0, NULL, FLAG_NULL, compoundmiddle, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN)) ||
-                (compoundmoresuffixes && (rv = suffix_check_twosfx(st, i, 0, NULL, compoundmiddle))) ||  // twofold suffix+compound
-                (rv = prefix_check(st, i, hu_mov_rule ? IN_CPD_OTHER : IN_CPD_BEGIN, compoundmiddle)))))
-              ) {
-                // char * p = prefix_check_morph(st, i, 0, compound);
-                char * p = NULL;
-                if (compoundflag) p = affix_check_morph(st, i, compoundflag);
-                if (!p || (*p == '\0')) {
-                   if (p) free(p);
-                   p = NULL;
-                   if ((wordnum == 0) && compoundbegin) {
-                     p = affix_check_morph(st, i, compoundbegin);
-                   } else if ((wordnum > 0) && compoundmiddle) {
-                     p = affix_check_morph(st, i, compoundmiddle);                   
-                   }
-                }
-                if (p && (*p != '\0')) {
-                    sprintf(presult + strlen(presult), "%c%s%s%s", MSEP_FLD,
-                        MORPH_PART, st, line_uniq_app(&p, MSEP_REC));
-                }
-                if (p) free(p);
-                checked_prefix = 1;
-            }
-        // else check forbiddenwords
-        } else if (rv->astr && (TESTAFF(rv->astr, forbiddenword, rv->alen) ||
-            TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen) ||
-            TESTAFF(rv->astr, needaffix, rv->alen))) {
-                st[i] = ch;
-                continue;
-        }
-
-            // check non_compound flag in suffix and prefix
-            if ((rv) && !hu_mov_rule &&
-                ((pfx && pfx->getCont() &&
-                    TESTAFF(pfx->getCont(), compoundforbidflag, 
-                        pfx->getContLen())) ||
-                (sfx && sfx->getCont() &&
-                    TESTAFF(sfx->getCont(), compoundforbidflag, 
-                        sfx->getContLen())))) {
-                    continue;
-            }
-
-            // check compoundend flag in suffix and prefix
-            if ((rv) && !checked_prefix && compoundend && !hu_mov_rule &&
-                ((pfx && pfx->getCont() &&
-                    TESTAFF(pfx->getCont(), compoundend, 
-                        pfx->getContLen())) ||
-                (sfx && sfx->getCont() &&
-                    TESTAFF(sfx->getCont(), compoundend, 
-                        sfx->getContLen())))) {
-                    continue;
-            }
-
-            // check compoundmiddle flag in suffix and prefix
-            if ((rv) && !checked_prefix && (wordnum==0) && compoundmiddle && !hu_mov_rule &&
-                ((pfx && pfx->getCont() &&
-                    TESTAFF(pfx->getCont(), compoundmiddle, 
-                        pfx->getContLen())) ||
-                (sfx && sfx->getCont() &&
-                    TESTAFF(sfx->getCont(), compoundmiddle, 
-                        sfx->getContLen())))) {
-                    rv = NULL;
-            }       
-
-        // check forbiddenwords
-        if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen)
-            || TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen))) continue;
-
-        // increment word number, if the second root has a compoundroot flag
-        if ((rv) && (compoundroot) && 
-            (TESTAFF(rv->astr, compoundroot, rv->alen))) {
-                wordnum++;
-        }
-
-        // first word is acceptable in compound words?
-        if (((rv) && 
-          ( checked_prefix || (words && words[wnum]) ||
-            (compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) ||
-            ((oldwordnum == 0) && compoundbegin && TESTAFF(rv->astr, compoundbegin, rv->alen)) ||
-            ((oldwordnum > 0) && compoundmiddle && TESTAFF(rv->astr, compoundmiddle, rv->alen)) 
-// LANG_hu section: spec. Hungarian rule
-            || ((langnum == LANG_hu) && // hu_mov_rule
-                hu_mov_rule && (
-                    TESTAFF(rv->astr, 'F', rv->alen) ||
-                    TESTAFF(rv->astr, 'G', rv->alen) ||
-                    TESTAFF(rv->astr, 'H', rv->alen)
-                )
-              )
-// END of LANG_hu section
-          )
-          && ! (( checkcompoundtriple && !words && // test triple letters
-                   (word[i-1]==word[i]) && (
-                      ((i>1) && (word[i-1]==word[i-2])) || 
-                      ((word[i-1]==word[i+1])) // may be word[i+1] == '\0'
-                   )
-               ) ||
-               (
-                   // test CHECKCOMPOUNDPATTERN
-                   numcheckcpd && !words && cpdpat_check(word, i, rv, NULL, affixed)
-               ) ||
-               ( 
-                 checkcompoundcase && !words && cpdcase_check(word, i)
-               ))
-         )
-// LANG_hu section: spec. Hungarian rule
-         || ((!rv) && (langnum == LANG_hu) && hu_mov_rule && (rv = affix_check(st,i)) &&
-              (sfx && sfx->getCont() && (
-                        TESTAFF(sfx->getCont(), (unsigned short) 'x', sfx->getContLen()) ||
-                        TESTAFF(sfx->getCont(), (unsigned short) '%', sfx->getContLen())
-                    )                
-               )
-             )
-// END of LANG_hu section
-         ) {
-
-// LANG_hu section: spec. Hungarian rule
-            if (langnum == LANG_hu) {
-                // calculate syllable number of the word
-                numsyllable += get_syllable(st, i);
-
-                // + 1 word, if syllable number of the prefix > 1 (hungarian convention)
-                if (pfx && (get_syllable(pfx->getKey(),strlen(pfx->getKey())) > 1)) wordnum++;
-            }
-// END of LANG_hu section
-
-            // NEXT WORD(S)
-            rv_first = rv;
-            rv = lookup((word+i)); // perhaps without prefix
-
-        // search homonym with compound flag
-        while ((rv) && ((needaffix && TESTAFF(rv->astr, needaffix, rv->alen)) ||
-                        !((compoundflag && !words && TESTAFF(rv->astr, compoundflag, rv->alen)) ||
-                          (compoundend && !words && TESTAFF(rv->astr, compoundend, rv->alen)) ||
-                           (numdefcpd && words && defcpd_check(&words, wnum + 1, rv, NULL,1))))) {
-            rv = rv->next_homonym;
-        }
-
-            if (rv && words && words[wnum + 1]) {
-                  mystrcat(*result, presult, MAXLNLEN);
-                  mystrcat(*result, " ", MAXLNLEN);
-                  mystrcat(*result, MORPH_PART, MAXLNLEN);
-                  mystrcat(*result, word+i, MAXLNLEN);
-                  if (complexprefixes && HENTRY_DATA(rv)) mystrcat(*result, HENTRY_DATA2(rv), MAXLNLEN);
-                  if (!HENTRY_FIND(rv, MORPH_STEM)) {
-                    mystrcat(*result, " ", MAXLNLEN);
-                    mystrcat(*result, MORPH_STEM, MAXLNLEN);
-                    mystrcat(*result, HENTRY_WORD(rv), MAXLNLEN);
-                  }
-                  // store the pointer of the hash entry
-//                  sprintf(*result + strlen(*result), " %s%p", MORPH_HENTRY, rv);
-                  if (!complexprefixes && HENTRY_DATA(rv)) {
-                    mystrcat(*result, " ", MAXLNLEN);
-                    mystrcat(*result, HENTRY_DATA2(rv), MAXLNLEN);
-                  }
-                  mystrcat(*result, "\n", MAXLNLEN);
-                  ok = 1;
-                  return 0;
-            }
-
-            oldnumsyllable2 = numsyllable;
-            oldwordnum2 = wordnum;
-
-// LANG_hu section: spec. Hungarian rule
-            if ((rv) && (langnum == LANG_hu) && (TESTAFF(rv->astr, 'I', rv->alen)) && !(TESTAFF(rv->astr, 'J', rv->alen))) {
-                numsyllable--;
-            }
-// END of LANG_hu section
-            // increment word number, if the second root has a compoundroot flag
-            if ((rv) && (compoundroot) && 
-                (TESTAFF(rv->astr, compoundroot, rv->alen))) {
-                    wordnum++;
-            }
-
-            // check forbiddenwords
-            if ((rv) && (rv->astr) && (TESTAFF(rv->astr, forbiddenword, rv->alen) ||
-                TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen))) {
-                st[i] = ch;
-                continue;
-            }
-
-            // second word is acceptable, as a root?
-            // hungarian conventions: compounding is acceptable,
-            // when compound forms consist of 2 words, or if more,
-            // then the syllable number of root words must be 6, or lesser.
-            if ((rv) && (
-                      (compoundflag && TESTAFF(rv->astr, compoundflag, rv->alen)) ||
-                      (compoundend && TESTAFF(rv->astr, compoundend, rv->alen))
-                    )
-                && (
-                      ((cpdwordmax==-1) || (wordnum+1<cpdwordmax)) || 
-                      ((cpdmaxsyllable!=0) &&
-                          (numsyllable+get_syllable(HENTRY_WORD(rv),rv->blen)<=cpdmaxsyllable))
-                    )
-                && (
-                     (!checkcompounddup || (rv != rv_first))
-                   )
-                )
-                 {
-                      // bad compound word
-                      mystrcat(*result, presult, MAXLNLEN);
-                      mystrcat(*result, " ", MAXLNLEN);
-                      mystrcat(*result, MORPH_PART, MAXLNLEN);
-                      mystrcat(*result, word+i, MAXLNLEN);
-
-                      if (HENTRY_DATA(rv)) {
-                        if (complexprefixes) mystrcat(*result, HENTRY_DATA2(rv), MAXLNLEN);
-                        if (! HENTRY_FIND(rv, MORPH_STEM)) {
-                           mystrcat(*result, " ", MAXLNLEN);
-                           mystrcat(*result, MORPH_STEM, MAXLNLEN);
-                           mystrcat(*result, HENTRY_WORD(rv), MAXLNLEN);
-                        }
-                        // store the pointer of the hash entry
-//                        sprintf(*result + strlen(*result), " %s%p", MORPH_HENTRY, rv);
-                        if (!complexprefixes) {
-                            mystrcat(*result, " ", MAXLNLEN);
-                            mystrcat(*result, HENTRY_DATA2(rv), MAXLNLEN);
-                        }
-                      }
-                      mystrcat(*result, "\n", MAXLNLEN);
-                              ok = 1;
-            }
-
-            numsyllable = oldnumsyllable2 ;
-            wordnum = oldwordnum2;
-
-            // perhaps second word has prefix or/and suffix
-            sfx = NULL;
-            sfxflag = FLAG_NULL;
-
-            if (compoundflag && !onlycpdrule) rv = affix_check((word+i),strlen(word+i), compoundflag); else rv = NULL;
-
-            if (!rv && compoundend && !onlycpdrule) {
-                sfx = NULL;
-                pfx = NULL;
-                rv = affix_check((word+i),strlen(word+i), compoundend);
-            }
-
-            if (!rv && numdefcpd && words) {
-                rv = affix_check((word+i),strlen(word+i), 0, IN_CPD_END);
-                if (rv && words && defcpd_check(&words, wnum + 1, rv, NULL, 1)) {
-                      char * m = NULL;
-                      if (compoundflag) m = affix_check_morph((word+i),strlen(word+i), compoundflag);
-                      if ((!m || *m == '\0') && compoundend) {
-                            if (m) free(m);
-                            m = affix_check_morph((word+i),strlen(word+i), compoundend);
-                      }
-                      mystrcat(*result, presult, MAXLNLEN);
-                      if (m || (*m != '\0')) {
-                        sprintf(*result + strlen(*result), "%c%s%s%s", MSEP_FLD,
-                            MORPH_PART, word + i, line_uniq_app(&m, MSEP_REC));
-                      }
-                      if (m) free(m);
-                      mystrcat(*result, "\n", MAXLNLEN);
-                      ok = 1;
-                }
-            }
-
-            // check non_compound flag in suffix and prefix
-            if ((rv) && 
-                ((pfx && pfx->getCont() &&
-                    TESTAFF(pfx->getCont(), compoundforbidflag, 
-                        pfx->getContLen())) ||
-                (sfx && sfx->getCont() &&
-                    TESTAFF(sfx->getCont(), compoundforbidflag, 
-                        sfx->getContLen())))) {
-                    rv = NULL;
-            }
-
-            // check forbiddenwords
-            if ((rv) && (rv->astr) && (TESTAFF(rv->astr,forbiddenword,rv->alen) ||
-                    TESTAFF(rv->astr, ONLYUPCASEFLAG, rv->alen))
-                    && (! TESTAFF(rv->astr, needaffix, rv->alen))) {
-                        st[i] = ch;
-                        continue;
-                    }
-
-            if (langnum == LANG_hu) {
-                // calculate syllable number of the word
-                numsyllable += get_syllable(word + i, strlen(word + i));
-
-                // - affix syllable num.
-                // XXX only second suffix (inflections, not derivations)
-                if (sfxappnd) {
-                    char * tmp = myrevstrdup(sfxappnd);
-                    numsyllable -= get_syllable(tmp, strlen(tmp));
-                    free(tmp);
-                }
-
-                // + 1 word, if syllable number of the prefix > 1 (hungarian convention)
-                if (pfx && (get_syllable(pfx->getKey(),strlen(pfx->getKey())) > 1)) wordnum++;
-
-                // increment syllable num, if last word has a SYLLABLENUM flag
-                // and the suffix is beginning `s'
-
-                if (cpdsyllablenum) {
-                    switch (sfxflag) {
-                        case 'c': { numsyllable+=2; break; }
-                        case 'J': { numsyllable += 1; break; }
-                        case 'I': { if (rv && TESTAFF(rv->astr, 'J', rv->alen)) numsyllable += 1; break; }
-                    }
-                }
-            }
-
-            // increment word number, if the second word has a compoundroot flag
-            if ((rv) && (compoundroot) && 
-                (TESTAFF(rv->astr, compoundroot, rv->alen))) {
-                    wordnum++;
-            }
-            // second word is acceptable, as a word with prefix or/and suffix?
-            // hungarian conventions: compounding is acceptable,
-            // when compound forms consist 2 word, otherwise
-            // the syllable number of root words is 6, or lesser.
-            if ((rv) && 
-                    (
-                      ((cpdwordmax==-1) || (wordnum+1<cpdwordmax)) || 
-                      ((cpdmaxsyllable!=0) &&
-                          (numsyllable <= cpdmaxsyllable))
-                    )
-                && (
-                   (!checkcompounddup || (rv != rv_first))
-                   )) {
-                      char * m = NULL;
-                      if (compoundflag) m = affix_check_morph((word+i),strlen(word+i), compoundflag);
-                      if ((!m || *m == '\0') && compoundend) {
-                            if (m) free(m);
-                            m = affix_check_morph((word+i),strlen(word+i), compoundend);
-                      }
-                      mystrcat(*result, presult, MAXLNLEN);
-                      if (m && (*m != '\0')) {
-                        sprintf(*result + strlen(*result), "%c%s%s%s", MSEP_FLD,
-                            MORPH_PART, word + i, line_uniq_app(&m, MSEP_REC));
-                      }
-                      if (m) free(m);
-                      sprintf(*result + strlen(*result), "%c", MSEP_REC);
-                      ok = 1;
-            }
-
-            numsyllable = oldnumsyllable2;
-            wordnum = oldwordnum2;
-
-            // perhaps second word is a compound word (recursive call)
-            if ((wordnum < maxwordnum) && (ok == 0)) {
-                        compound_check_morph((word+i),strlen(word+i), wordnum+1, 
-                             numsyllable, maxwordnum, wnum + 1, words, 0, result, presult);
-            } else {
-                rv=NULL;
-            }
-        }
-        st[i] = ch;
-        wordnum = oldwordnum;
-        numsyllable = oldnumsyllable;
-
-        } while (numdefcpd && oldwordnum == 0 && !onlycpdrule && (onlycpdrule = 1)); // end of onlycpd loop
-
-    }
-    return 0;
-}    
-
- // return 1 if s1 (reversed) is a leading subset of end of s2
-/* inline int AffixMgr::isRevSubset(const char * s1, const char * end_of_s2, int len)
- {
-    while ((len > 0) && *s1 && (*s1 == *end_of_s2)) {
-        s1++;
-        end_of_s2--;
-        len--;
-    }
-    return (*s1 == '\0');
- }
- */
-
-inline int AffixMgr::isRevSubset(const char * s1, const char * end_of_s2, int len)
- {
-    while ((len > 0) && (*s1 != '\0') && ((*s1 == *end_of_s2) || (*s1 == '.'))) {
-        s1++;
-        end_of_s2--;
-        len--;
-    }
-    return (*s1 == '\0');
- }
-
-// check word for suffixes
-
-struct hentry * AffixMgr::suffix_check (const char * word, int len, 
-       int sfxopts, PfxEntry * ppfx, char ** wlst, int maxSug, int * ns, 
-       const FLAG cclass, const FLAG needflag, char in_compound)
-{
-    struct hentry * rv = NULL;
-    PfxEntry* ep = ppfx;
-
-    // first handle the special case of 0 length suffixes
-    SfxEntry * se = sStart[0];
-
-    while (se) {
-        if (!cclass || se->getCont()) {
-            // suffixes are not allowed in beginning of compounds
-            if ((((in_compound != IN_CPD_BEGIN)) || // && !cclass
-             // except when signed with compoundpermitflag flag
-             (se->getCont() && compoundpermitflag &&
-                TESTAFF(se->getCont(),compoundpermitflag,se->getContLen()))) && (!circumfix ||
-              // no circumfix flag in prefix and suffix
-              ((!ppfx || !(ep->getCont()) || !TESTAFF(ep->getCont(),
-                   circumfix, ep->getContLen())) &&
-               (!se->getCont() || !(TESTAFF(se->getCont(),circumfix,se->getContLen())))) ||
-              // circumfix flag in prefix AND suffix
-              ((ppfx && (ep->getCont()) && TESTAFF(ep->getCont(),
-                   circumfix, ep->getContLen())) &&
-               (se->getCont() && (TESTAFF(se->getCont(),circumfix,se->getContLen())))))  &&
-            // fogemorpheme
-              (in_compound || 
-                 !(se->getCont() && (TESTAFF(se->getCont(), onlyincompound, se->getContLen())))) &&
-            // needaffix on prefix or first suffix
-              (cclass || 
-                   !(se->getCont() && TESTAFF(se->getCont(), needaffix, se->getContLen())) ||
-                   (ppfx && !((ep->getCont()) &&
-                     TESTAFF(ep->getCont(), needaffix,
-                       ep->getContLen())))
-              )) {
-                rv = se->checkword(word,len, sfxopts, ppfx, wlst, maxSug, ns, (FLAG) cclass, 
-                    needflag, (in_compound ? 0 : onlyincompound));
-                if (rv) {
-                    sfx=se; // BUG: sfx not stateless
-                    return rv;
-                }
-            }
-        }
-       se = se->getNext();
-    }
-
-    // now handle the general case
-    if (len == 0) return NULL; // FULLSTRIP
-    unsigned char sp= *((const unsigned char *)(word + len - 1));
-    SfxEntry * sptr = sStart[sp];
-
-    while (sptr) {
-        if (isRevSubset(sptr->getKey(), word + len - 1, len)
-        ) {
-            // suffixes are not allowed in beginning of compounds
-            if ((((in_compound != IN_CPD_BEGIN)) || // && !cclass
-             // except when signed with compoundpermitflag flag
-             (sptr->getCont() && compoundpermitflag &&
-                TESTAFF(sptr->getCont(),compoundpermitflag,sptr->getContLen()))) && (!circumfix ||
-              // no circumfix flag in prefix and suffix
-              ((!ppfx || !(ep->getCont()) || !TESTAFF(ep->getCont(),
-                   circumfix, ep->getContLen())) &&
-               (!sptr->getCont() || !(TESTAFF(sptr->getCont(),circumfix,sptr->getContLen())))) ||
-              // circumfix flag in prefix AND suffix
-              ((ppfx && (ep->getCont()) && TESTAFF(ep->getCont(),
-                   circumfix, ep->getContLen())) &&
-               (sptr->getCont() && (TESTAFF(sptr->getCont(),circumfix,sptr->getContLen())))))  &&
-            // fogemorpheme
-              (in_compound || 
-                 !((sptr->getCont() && (TESTAFF(sptr->getCont(), onlyincompound, sptr->getContLen()))))) &&
-            // needaffix on prefix or first suffix
-              (cclass || 
-                  !(sptr->getCont() && TESTAFF(sptr->getCont(), needaffix, sptr->getContLen())) ||
-                  (ppfx && !((ep->getCont()) &&
-                     TESTAFF(ep->getCont(), needaffix,
-                       ep->getContLen())))
-              )
-            ) if (in_compound != IN_CPD_END || ppfx || !(sptr->getCont() && TESTAFF(sptr->getCont(), onlyincompound, sptr->getContLen()))) {
-                rv = sptr->checkword(word,len, sfxopts, ppfx, wlst,
-                    maxSug, ns, cclass, needflag, (in_compound ? 0 : onlyincompound));
-                if (rv) {
-                    sfx=sptr; // BUG: sfx not stateless
-                    sfxflag = sptr->getFlag(); // BUG: sfxflag not stateless
-                    if (!sptr->getCont()) sfxappnd=sptr->getKey(); // BUG: sfxappnd not stateless
-                    return rv;
-                }
-             }
-             sptr = sptr->getNextEQ();
-        } else {
-             sptr = sptr->getNextNE();
-        }
-    }
-
-    return NULL;
-}
-
-// check word for two-level suffixes
-
-struct hentry * AffixMgr::suffix_check_twosfx(const char * word, int len, 
-       int sfxopts, PfxEntry * ppfx, const FLAG needflag)
-{
-    struct hentry * rv = NULL;
-
-    // first handle the special case of 0 length suffixes
-    SfxEntry * se = sStart[0];
-    while (se) {
-        if (contclasses[se->getFlag()])
-        {
-            rv = se->check_twosfx(word,len, sfxopts, ppfx, needflag);
-            if (rv) return rv;
-        }
-        se = se->getNext();
-    }
-
-    // now handle the general case
-    if (len == 0) return NULL; // FULLSTRIP
-    unsigned char sp = *((const unsigned char *)(word + len - 1));
-    SfxEntry * sptr = sStart[sp];
-
-    while (sptr) {
-        if (isRevSubset(sptr->getKey(), word + len - 1, len)) {
-            if (contclasses[sptr->getFlag()])
-            {
-                rv = sptr->check_twosfx(word,len, sfxopts, ppfx, needflag);
-                if (rv) {
-                    sfxflag = sptr->getFlag(); // BUG: sfxflag not stateless
-                    if (!sptr->getCont()) sfxappnd=sptr->getKey(); // BUG: sfxappnd not stateless
-                    return rv;
-                }
-            }
-            sptr = sptr->getNextEQ();
-        } else {
-             sptr = sptr->getNextNE();
-        }
-    }
-
-    return NULL;
-}
-
-char * AffixMgr::suffix_check_twosfx_morph(const char * word, int len, 
-       int sfxopts, PfxEntry * ppfx, const FLAG needflag)
-{
-    char result[MAXLNLEN];
-    char result2[MAXLNLEN];
-    char result3[MAXLNLEN];
-    
-    char * st;
-
-    result[0] = '\0';
-    result2[0] = '\0';
-    result3[0] = '\0';
-
-    // first handle the special case of 0 length suffixes
-    SfxEntry * se = sStart[0];
-    while (se) {
-        if (contclasses[se->getFlag()])
-        {
-            st = se->check_twosfx_morph(word,len, sfxopts, ppfx, needflag);
-            if (st) {
-                if (ppfx) {
-                    if (ppfx->getMorph()) {
-                        mystrcat(result, ppfx->getMorph(), MAXLNLEN);
-                        mystrcat(result, " ", MAXLNLEN);
-                    } else debugflag(result, ppfx->getFlag());
-                }
-                mystrcat(result, st, MAXLNLEN);
-                free(st);
-                if (se->getMorph()) {
-                    mystrcat(result, " ", MAXLNLEN);
-                    mystrcat(result, se->getMorph(), MAXLNLEN);
-                } else debugflag(result, se->getFlag());
-                mystrcat(result, "\n", MAXLNLEN);
-            }
-        }
-        se = se->getNext();
-    }
-
-    // now handle the general case
-    if (len == 0) return NULL; // FULLSTRIP
-    unsigned char sp = *((const unsigned char *)(word + len - 1));
-    SfxEntry * sptr = sStart[sp];
-
-    while (sptr) {
-        if (isRevSubset(sptr->getKey(), word + len - 1, len)) {
-            if (contclasses[sptr->getFlag()]) 
-            {
-                st = sptr->check_twosfx_morph(word,len, sfxopts, ppfx, needflag);
-                if (st) {
-                    sfxflag = sptr->getFlag(); // BUG: sfxflag not stateless
-                    if (!sptr->getCont()) sfxappnd=sptr->getKey(); // BUG: sfxappnd not stateless
-                    strcpy(result2, st);
-                    free(st);
-
-                result3[0] = '\0';
-
-                if (sptr->getMorph()) {
-                    mystrcat(result3, " ", MAXLNLEN);
-                    mystrcat(result3, sptr->getMorph(), MAXLNLEN);
-                } else debugflag(result3, sptr->getFlag());
-                strlinecat(result2, result3);
-                mystrcat(result2, "\n", MAXLNLEN);
-                mystrcat(result,  result2, MAXLNLEN);
-                }
-            }
-            sptr = sptr->getNextEQ();
-        } else {
-             sptr = sptr->getNextNE();
-        }
-    }
-    if (*result) return mystrdup(result);
-    return NULL;
-}
-
-char * AffixMgr::suffix_check_morph(const char * word, int len, 
-       int sfxopts, PfxEntry * ppfx, const FLAG cclass, const FLAG needflag, char in_compound)
-{
-    char result[MAXLNLEN];
-    
-    struct hentry * rv = NULL;
-
-    result[0] = '\0';
-
-    PfxEntry* ep = ppfx;
-
-    // first handle the special case of 0 length suffixes
-    SfxEntry * se = sStart[0];
-    while (se) {
-        if (!cclass || se->getCont()) {
-            // suffixes are not allowed in beginning of compounds
-            if (((((in_compound != IN_CPD_BEGIN)) || // && !cclass
-             // except when signed with compoundpermitflag flag
-             (se->getCont() && compoundpermitflag &&
-                TESTAFF(se->getCont(),compoundpermitflag,se->getContLen()))) && (!circumfix ||
-              // no circumfix flag in prefix and suffix
-              ((!ppfx || !(ep->getCont()) || !TESTAFF(ep->getCont(),
-                   circumfix, ep->getContLen())) &&
-               (!se->getCont() || !(TESTAFF(se->getCont(),circumfix,se->getContLen())))) ||
-              // circumfix flag in prefix AND suffix
-              ((ppfx && (ep->getCont()) && TESTAFF(ep->getCont(),
-                   circumfix, ep->getContLen())) &&
-               (se->getCont() && (TESTAFF(se->getCont(),circumfix,se->getContLen())))))  &&
-            // fogemorpheme
-              (in_compound || 
-                 !((se->getCont() && (TESTAFF(se->getCont(), onlyincompound, se->getContLen()))))) &&
-            // needaffix on prefix or first suffix
-              (cclass || 
-                   !(se->getCont() && TESTAFF(se->getCont(), needaffix, se->getContLen())) ||
-                   (ppfx && !((ep->getCont()) &&
-                     TESTAFF(ep->getCont(), needaffix,
-                       ep->getContLen())))
-              )
-            ))
-            rv = se->checkword(word, len, sfxopts, ppfx, NULL, 0, 0, cclass, needflag);
-         while (rv) {
-           if (ppfx) {
-                if (ppfx->getMorph()) {
-                    mystrcat(result, ppfx->getMorph(), MAXLNLEN);
-                    mystrcat(result, " ", MAXLNLEN);
-                } else debugflag(result, ppfx->getFlag());
-            }
-            if (complexprefixes && HENTRY_DATA(rv)) mystrcat(result, HENTRY_DATA2(rv), MAXLNLEN);
-            if (! HENTRY_FIND(rv, MORPH_STEM)) {
-                mystrcat(result, " ", MAXLNLEN);                                
-                mystrcat(result, MORPH_STEM, MAXLNLEN);
-                mystrcat(result, HENTRY_WORD(rv), MAXLNLEN);
-            }
-            // store the pointer of the hash entry
-//            sprintf(result + strlen(result), " %s%p", MORPH_HENTRY, rv);
-            
-            if (!complexprefixes && HENTRY_DATA(rv)) {
-                    mystrcat(result, " ", MAXLNLEN);                                
-                    mystrcat(result, HENTRY_DATA2(rv), MAXLNLEN);
-            }
-            if (se->getMorph()) {
-                mystrcat(result, " ", MAXLNLEN);                                
-                mystrcat(result, se->getMorph(), MAXLNLEN);
-            } else debugflag(result, se->getFlag());
-            mystrcat(result, "\n", MAXLNLEN);
-            rv = se->get_next_homonym(rv, sfxopts, ppfx, cclass, needflag);
-         }
-       }
-       se = se->getNext();
-    }
-
-    // now handle the general case
-    if (len == 0) return NULL; // FULLSTRIP
-    unsigned char sp = *((const unsigned char *)(word + len - 1));
-    SfxEntry * sptr = sStart[sp];
-
-    while (sptr) {
-        if (isRevSubset(sptr->getKey(), word + len - 1, len)
-        ) {
-            // suffixes are not allowed in beginning of compounds
-            if (((((in_compound != IN_CPD_BEGIN)) || // && !cclass
-             // except when signed with compoundpermitflag flag
-             (sptr->getCont() && compoundpermitflag &&
-                TESTAFF(sptr->getCont(),compoundpermitflag,sptr->getContLen()))) && (!circumfix ||
-              // no circumfix flag in prefix and suffix
-              ((!ppfx || !(ep->getCont()) || !TESTAFF(ep->getCont(),
-                   circumfix, ep->getContLen())) &&
-               (!sptr->getCont() || !(TESTAFF(sptr->getCont(),circumfix,sptr->getContLen())))) ||
-              // circumfix flag in prefix AND suffix
-              ((ppfx && (ep->getCont()) && TESTAFF(ep->getCont(),
-                   circumfix, ep->getContLen())) &&
-               (sptr->getCont() && (TESTAFF(sptr->getCont(),circumfix,sptr->getContLen())))))  &&
-            // fogemorpheme
-              (in_compound || 
-                 !((sptr->getCont() && (TESTAFF(sptr->getCont(), onlyincompound, sptr->getContLen()))))) &&
-            // needaffix on first suffix
-              (cclass || !(sptr->getCont() && 
-                   TESTAFF(sptr->getCont(), needaffix, sptr->getContLen())))
-            )) rv = sptr->checkword(word,len, sfxopts, ppfx, NULL, 0, 0, cclass, needflag);
-            while (rv) {
-                    if (ppfx) {
-                        if (ppfx->getMorph()) {
-                            mystrcat(result, ppfx->getMorph(), MAXLNLEN);
-                            mystrcat(result, " ", MAXLNLEN);
-                        } else debugflag(result, ppfx->getFlag());
-                    }    
-                    if (complexprefixes && HENTRY_DATA(rv)) mystrcat(result, HENTRY_DATA2(rv), MAXLNLEN);
-                    if (! HENTRY_FIND(rv, MORPH_STEM)) {
-                            mystrcat(result, " ", MAXLNLEN);                                
-                            mystrcat(result, MORPH_STEM, MAXLNLEN);
-                            mystrcat(result, HENTRY_WORD(rv), MAXLNLEN);
-                    }
-                    // store the pointer of the hash entry
-//                    sprintf(result + strlen(result), " %s%p", MORPH_HENTRY, rv);
-
-                    if (!complexprefixes && HENTRY_DATA(rv)) {
-                        mystrcat(result, " ", MAXLNLEN);                                
-                        mystrcat(result, HENTRY_DATA2(rv), MAXLNLEN);
-                    }
-
-                if (sptr->getMorph()) {
-                    mystrcat(result, " ", MAXLNLEN);
-                    mystrcat(result, sptr->getMorph(), MAXLNLEN);
-                } else debugflag(result, sptr->getFlag());
-                mystrcat(result, "\n", MAXLNLEN);
-                rv = sptr->get_next_homonym(rv, sfxopts, ppfx, cclass, needflag);
-            }
-             sptr = sptr->getNextEQ();
-        } else {
-             sptr = sptr->getNextNE();
-        }
-    }
-
-    if (*result) return mystrdup(result);
-    return NULL;
-}
-
-// check if word with affixes is correctly spelled
-struct hentry * AffixMgr::affix_check (const char * word, int len, const FLAG needflag, char in_compound)
-{
-    struct hentry * rv= NULL;
-
-    // check all prefixes (also crossed with suffixes if allowed) 
-    rv = prefix_check(word, len, in_compound, needflag);
-    if (rv) return rv;
-
-    // if still not found check all suffixes
-    rv = suffix_check(word, len, 0, NULL, NULL, 0, NULL, FLAG_NULL, needflag, in_compound);
-
-    if (havecontclass) {
-        sfx = NULL;
-        pfx = NULL;
-
-        if (rv) return rv;
-        // if still not found check all two-level suffixes
-        rv = suffix_check_twosfx(word, len, 0, NULL, needflag);
-
-        if (rv) return rv;
-        // if still not found check all two-level suffixes
-        rv = prefix_check_twosfx(word, len, IN_CPD_NOT, needflag);
-    }
-
-    return rv;
-}
-
-// check if word with affixes is correctly spelled
-char * AffixMgr::affix_check_morph(const char * word, int len, const FLAG needflag, char in_compound)
-{
-    char result[MAXLNLEN];
-    char * st = NULL;
-
-    *result = '\0';
-    
-    // check all prefixes (also crossed with suffixes if allowed) 
-    st = prefix_check_morph(word, len, in_compound);
-    if (st) {
-        mystrcat(result, st, MAXLNLEN);
-        free(st);
-    }
-
-    // if still not found check all suffixes    
-    st = suffix_check_morph(word, len, 0, NULL, '\0', needflag, in_compound);
-    if (st) {
-        mystrcat(result, st, MAXLNLEN);
-        free(st);
-    }
-
-    if (havecontclass) {
-        sfx = NULL;
-        pfx = NULL;
-        // if still not found check all two-level suffixes
-        st = suffix_check_twosfx_morph(word, len, 0, NULL, needflag);
-        if (st) {
-            mystrcat(result, st, MAXLNLEN);
-            free(st);
-        }
-
-        // if still not found check all two-level suffixes
-        st = prefix_check_twosfx_morph(word, len, IN_CPD_NOT, needflag);
-        if (st) {
-            mystrcat(result, st, MAXLNLEN);
-            free(st);
-        }
-    }
-
-    return mystrdup(result);
-}
-
-char * AffixMgr::morphgen(char * ts, int wl, const unsigned short * ap,
-    unsigned short al, char * morph, char * targetmorph, int level)
-{
-    // handle suffixes
-    char * stemmorph;
-    char * stemmorphcatpos;
-    char mymorph[MAXLNLEN];
-
-    if (!morph) return NULL;
-
-    // check substandard flag
-    if (TESTAFF(ap, substandard, al)) return NULL;
-
-    if (morphcmp(morph, targetmorph) == 0) return mystrdup(ts);
-
-//    int targetcount = get_sfxcount(targetmorph);
-
-    // use input suffix fields, if exist
-    if (strstr(morph, MORPH_INFL_SFX) || strstr(morph, MORPH_DERI_SFX)) {
-        stemmorph = mymorph;
-        strcpy(stemmorph, morph);
-        mystrcat(stemmorph, " ", MAXLNLEN);
-        stemmorphcatpos = stemmorph + strlen(stemmorph);
-    } else {
-        stemmorph = morph;
-        stemmorphcatpos = NULL;
-    }
-
-    for (int i = 0; i < al; i++) {
-        const unsigned char c = (unsigned char) (ap[i] & 0x00FF);
-        SfxEntry * sptr = sFlag[c];
-        while (sptr) {
-            if (sptr->getFlag() == ap[i] && sptr->getMorph() && ((sptr->getContLen() == 0) || 
-                // don't generate forms with substandard affixes
-                !TESTAFF(sptr->getCont(), substandard, sptr->getContLen()))) {
-
-                if (stemmorphcatpos) strcpy(stemmorphcatpos, sptr->getMorph());
-                else stemmorph = (char *) sptr->getMorph();
-
-                int cmp = morphcmp(stemmorph, targetmorph);
-
-                if (cmp == 0) {
-                    char * newword = sptr->add(ts, wl);
-                    if (newword) {
-                        hentry * check = pHMgr->lookup(newword); // XXX extra dic
-                        if (!check || !check->astr || 
-                            !(TESTAFF(check->astr, forbiddenword, check->alen) || 
-                              TESTAFF(check->astr, ONLYUPCASEFLAG, check->alen))) {
-                                return newword;
-                        }
-                        free(newword);
-                    }
-                }
-                
-                // recursive call for secondary suffixes
-                if ((level == 0) && (cmp == 1) && (sptr->getContLen() > 0) &&
-//                    (get_sfxcount(stemmorph) < targetcount) &&
-                    !TESTAFF(sptr->getCont(), substandard, sptr->getContLen())) {
-                    char * newword = sptr->add(ts, wl);
-                    if (newword) {
-                        char * newword2 = morphgen(newword, strlen(newword), sptr->getCont(),
-                            sptr->getContLen(), stemmorph, targetmorph, 1);
-
-                        if (newword2) {
-                            free(newword);
-                            return newword2;
-                        }
-                        free(newword);
-                        newword = NULL;
-                    }
-                }
-            }
-            sptr = sptr->getFlgNxt();
-        }
-    }
-   return NULL;
-}
-
-
-int AffixMgr::expand_rootword(struct guessword * wlst, int maxn, const char * ts,
-    int wl, const unsigned short * ap, unsigned short al, char * bad, int badl,
-    char * phon)
-{
-    int nh=0;
-    // first add root word to list
-    if ((nh < maxn) && !(al && ((needaffix && TESTAFF(ap, needaffix, al)) ||
-         (onlyincompound && TESTAFF(ap, onlyincompound, al))))) {
-       wlst[nh].word = mystrdup(ts);
-       if (!wlst[nh].word) return 0;
-       wlst[nh].allow = (1 == 0);
-       wlst[nh].orig = NULL;
-       nh++;
-       // add special phonetic version
-       if (phon && (nh < maxn)) {
-    	    wlst[nh].word = mystrdup(phon);
-            if (!wlst[nh].word) return nh - 1;
-    	    wlst[nh].allow = (1 == 0);
-    	    wlst[nh].orig = mystrdup(ts);
-            if (!wlst[nh].orig) return nh - 1;
-    	    nh++;
-       }
-    }
-
-    // handle suffixes
-    for (int i = 0; i < al; i++) {
-       const unsigned char c = (unsigned char) (ap[i] & 0x00FF);
-       SfxEntry * sptr = sFlag[c];
-       while (sptr) {
-         if ((sptr->getFlag() == ap[i]) && (!sptr->getKeyLen() || ((badl > sptr->getKeyLen()) &&
-                (strcmp(sptr->getAffix(), bad + badl - sptr->getKeyLen()) == 0))) &&
-                // check needaffix flag
-                !(sptr->getCont() && ((needaffix && 
-                      TESTAFF(sptr->getCont(), needaffix, sptr->getContLen())) ||
-                  (circumfix && 
-                      TESTAFF(sptr->getCont(), circumfix, sptr->getContLen())) ||
-                  (onlyincompound && 
-                      TESTAFF(sptr->getCont(), onlyincompound, sptr->getContLen()))))
-                ) {
-            char * newword = sptr->add(ts, wl);
-            if (newword) {
-                if (nh < maxn) {
-                    wlst[nh].word = newword;
-                    wlst[nh].allow = sptr->allowCross();
-                    wlst[nh].orig = NULL;
-                    nh++;
-                    // add special phonetic version
-    		    if (phon && (nh < maxn)) {
-    			char st[MAXWORDUTF8LEN];
-    			strcpy(st, phon);
-    			strcat(st, sptr->getKey());
-    			reverseword(st + strlen(phon));
-    			wlst[nh].word = mystrdup(st);
-    			if (!wlst[nh].word) return nh - 1;
-    			wlst[nh].allow = (1 == 0);
-    			wlst[nh].orig = mystrdup(newword);
-                        if (!wlst[nh].orig) return nh - 1;
-    			nh++;
-    		    }
-                } else {
-                    free(newword);
-                }
-            }
-         }
-         sptr = sptr->getFlgNxt();
-       }
-    }
-
-    int n = nh;
-
-    // handle cross products of prefixes and suffixes
-    for (int j=1;j<n ;j++)
-       if (wlst[j].allow) {
-          for (int k = 0; k < al; k++) {
-             const unsigned char c = (unsigned char) (ap[k] & 0x00FF);
-             PfxEntry * cptr = pFlag[c];
-             while (cptr) {
-                if ((cptr->getFlag() == ap[k]) && cptr->allowCross() && (!cptr->getKeyLen() || ((badl > cptr->getKeyLen()) &&
-                        (strncmp(cptr->getKey(), bad, cptr->getKeyLen()) == 0)))) {
-                    int l1 = strlen(wlst[j].word);
-                    char * newword = cptr->add(wlst[j].word, l1);
-                    if (newword) {
-                       if (nh < maxn) {
-                          wlst[nh].word = newword;
-                          wlst[nh].allow = cptr->allowCross();
-                          wlst[nh].orig = NULL;
-                          nh++;
-                       } else {
-                          free(newword);
-                       }
-                    }
-                }
-                cptr = cptr->getFlgNxt();
-             }
-          }
-       }
-
-
-    // now handle pure prefixes
-    for (int m = 0; m < al; m ++) {
-       const unsigned char c = (unsigned char) (ap[m] & 0x00FF);
-       PfxEntry * ptr = pFlag[c];
-       while (ptr) {
-         if ((ptr->getFlag() == ap[m]) && (!ptr->getKeyLen() || ((badl > ptr->getKeyLen()) &&
-                (strncmp(ptr->getKey(), bad, ptr->getKeyLen()) == 0))) &&
-                // check needaffix flag
-                !(ptr->getCont() && ((needaffix && 
-                      TESTAFF(ptr->getCont(), needaffix, ptr->getContLen())) ||
-                     (circumfix && 
-                      TESTAFF(ptr->getCont(), circumfix, ptr->getContLen())) ||                      
-                  (onlyincompound && 
-                      TESTAFF(ptr->getCont(), onlyincompound, ptr->getContLen()))))
-                ) {
-            char * newword = ptr->add(ts, wl);
-            if (newword) {
-                if (nh < maxn) {
-                    wlst[nh].word = newword;
-                    wlst[nh].allow = ptr->allowCross();
-                    wlst[nh].orig = NULL;
-                    nh++;
-                } else {
-                    free(newword);
-                } 
-            }
-         }
-         ptr = ptr->getFlgNxt();
-       }
-    }
-
-    return nh;
-}
-
-// return length of replacing table
-int AffixMgr::get_numrep() const
-{
-  return numrep;
-}
-
-// return replacing table
-struct replentry * AffixMgr::get_reptable() const
-{
-  if (! reptable ) return NULL;
-  return reptable;
-}
-
-// return iconv table
-RepList * AffixMgr::get_iconvtable() const
-{
-  if (! iconvtable ) return NULL;
-  return iconvtable;
-}
-
-// return oconv table
-RepList * AffixMgr::get_oconvtable() const
-{
-  if (! oconvtable ) return NULL;
-  return oconvtable;
-}
-
-// return replacing table
-struct phonetable * AffixMgr::get_phonetable() const
-{
-  if (! phone ) return NULL;
-  return phone;
-}
-
-// return length of character map table
-int AffixMgr::get_nummap() const
-{
-  return nummap;
-}
-
-// return character map table
-struct mapentry * AffixMgr::get_maptable() const
-{
-  if (! maptable ) return NULL;
-  return maptable;
-}
-
-// return length of word break table
-int AffixMgr::get_numbreak() const
-{
-  return numbreak;
-}
-
-// return character map table
-char ** AffixMgr::get_breaktable() const
-{
-  if (! breaktable ) return NULL;
-  return breaktable;
-}
-
-// return text encoding of dictionary
-char * AffixMgr::get_encoding()
-{
-  if (! encoding ) encoding = mystrdup(SPELL_ENCODING);
-  return mystrdup(encoding);
-}
-
-// return text encoding of dictionary
-int AffixMgr::get_langnum() const
-{
-  return langnum;
-}
-
-// return double prefix option
-int AffixMgr::get_complexprefixes() const
-{
-  return complexprefixes;
-}
-
-// return FULLSTRIP option
-int AffixMgr::get_fullstrip() const
-{
-  return fullstrip;
-}
-
-FLAG AffixMgr::get_keepcase() const
-{
-  return keepcase;
-}
-
-FLAG AffixMgr::get_forceucase() const
-{
-  return forceucase;
-}
-
-FLAG AffixMgr::get_warn() const
-{
-  return warn;
-}
-
-int AffixMgr::get_forbidwarn() const
-{
-  return forbidwarn;
-}
-
-int AffixMgr::get_checksharps() const
-{
-  return checksharps;
-}
-
-char * AffixMgr::encode_flag(unsigned short aflag) const
-{
-  return pHMgr->encode_flag(aflag);
-}
-
-
-// return the preferred ignore string for suggestions
-char * AffixMgr::get_ignore() const
-{
-  if (!ignorechars) return NULL;
-  return ignorechars;
-}
-
-// return the preferred ignore string for suggestions
-unsigned short * AffixMgr::get_ignore_utf16(int * len) const
-{
-  *len = ignorechars_utf16_len;
-  return ignorechars_utf16;
-}
-
-// return the keyboard string for suggestions
-char * AffixMgr::get_key_string()
-{
-  if (! keystring ) keystring = mystrdup(SPELL_KEYSTRING);
-  return mystrdup(keystring);
-}
-
-// return the preferred try string for suggestions
-char * AffixMgr::get_try_string() const
-{
-  if (! trystring ) return NULL;
-  return mystrdup(trystring);
-}
-
-// return the preferred try string for suggestions
-const char * AffixMgr::get_wordchars() const
-{
-  return wordchars;
-}
-
-unsigned short * AffixMgr::get_wordchars_utf16(int * len) const
-{
-  *len = wordchars_utf16_len;
-  return wordchars_utf16;
-}
-
-// is there compounding?
-int AffixMgr::get_compound() const
-{
-  return compoundflag || compoundbegin || numdefcpd;
-}
-
-// return the compound words control flag
-FLAG AffixMgr::get_compoundflag() const
-{
-  return compoundflag;
-}
-
-// return the forbidden words control flag
-FLAG AffixMgr::get_forbiddenword() const
-{
-  return forbiddenword;
-}
-
-// return the forbidden words control flag
-FLAG AffixMgr::get_nosuggest() const
-{
-  return nosuggest;
-}
-
-// return the forbidden words control flag
-FLAG AffixMgr::get_nongramsuggest() const
-{
-  return nongramsuggest;
-}
-
-// return the forbidden words flag modify flag
-FLAG AffixMgr::get_needaffix() const
-{
-  return needaffix;
-}
-
-// return the onlyincompound flag
-FLAG AffixMgr::get_onlyincompound() const
-{
-  return onlyincompound;
-}
-
-// return the compound word signal flag
-FLAG AffixMgr::get_compoundroot() const
-{
-  return compoundroot;
-}
-
-// return the compound begin signal flag
-FLAG AffixMgr::get_compoundbegin() const
-{
-  return compoundbegin;
-}
-
-// return the value of checknum
-int AffixMgr::get_checknum() const
-{
-  return checknum;
-}
-
-// return the value of prefix
-const char * AffixMgr::get_prefix() const
-{
-  if (pfx) return pfx->getKey();
-  return NULL;
-}
-
-// return the value of suffix
-const char * AffixMgr::get_suffix() const
-{
-  return sfxappnd;
-}
-
-// return the value of suffix
-const char * AffixMgr::get_version() const
-{
-  return version;
-}
-
-// return lemma_present flag
-FLAG AffixMgr::get_lemma_present() const
-{
-  return lemma_present;
-}
-
-// utility method to look up root words in hash table
-struct hentry * AffixMgr::lookup(const char * word)
-{
-  int i;
-  struct hentry * he = NULL;
-  for (i = 0; i < *maxdic && !he; i++) {
-    he = (alldic[i])->lookup(word);
-  }
-  return he;
-}
-
-// return the value of suffix
-int AffixMgr::have_contclass() const
-{
-  return havecontclass;
-}
-
-// return utf8
-int AffixMgr::get_utf8() const
-{
-  return utf8;
-}
-
-int AffixMgr::get_maxngramsugs(void) const
-{
-  return maxngramsugs;
-}
-
-int AffixMgr::get_maxcpdsugs(void) const
-{
-  return maxcpdsugs;
-}
-
-int AffixMgr::get_maxdiff(void) const
-{
-  return maxdiff;
-}
-
-int AffixMgr::get_onlymaxdiff(void) const
-{
-  return onlymaxdiff;
-}
-
-// return nosplitsugs
-int AffixMgr::get_nosplitsugs(void) const
-{
-  return nosplitsugs;
-}
-
-// return sugswithdots
-int AffixMgr::get_sugswithdots(void) const
-{
-  return sugswithdots;
-}
-
-/* parse flag */
-int AffixMgr::parse_flag(char * line, unsigned short * out, FileMgr * af) {
-   char * s = NULL;
-   if (*out != FLAG_NULL && !(*out >= DEFAULTFLAGS)) {
-      HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions of an affix file parameter\n", af->getlinenum());
-      return 1;
-   }
-   if (parse_string(line, &s, af->getlinenum())) return 1;
-   *out = pHMgr->decode_flag(s);
-   free(s);
-   return 0;
-}
-
-/* parse num */
-int AffixMgr::parse_num(char * line, int * out, FileMgr * af) {
-   char * s = NULL;
-   if (*out != -1) {
-      HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions of an affix file parameter\n", af->getlinenum());
-      return 1;
-   }
-   if (parse_string(line, &s, af->getlinenum())) return 1;
-   *out = atoi(s);
-   free(s);
-   return 0;
-}
-
-/* parse in the max syllablecount of compound words and  */
-int  AffixMgr::parse_cpdsyllable(char * line, FileMgr * af)
-{
-   char * tp = line;
-   char * piece;
-   int i = 0;
-   int np = 0;
-   w_char w[MAXWORDLEN];
-   piece = mystrsep(&tp, 0);
-   while (piece) {
-      if (*piece != '\0') {
-          switch(i) {
-             case 0: { np++; break; }
-             case 1: { cpdmaxsyllable = atoi(piece); np++; break; }
-             case 2: {
-                if (!utf8) {
-                    cpdvowels = mystrdup(piece);
-                } else {
-                    int n = u8_u16(w, MAXWORDLEN, piece);
-                    if (n > 0) {
-                        flag_qsort((unsigned short *) w, 0, n);
-                        cpdvowels_utf16 = (w_char *) malloc(n * sizeof(w_char));
-                        if (!cpdvowels_utf16) return 1;
-                        memcpy(cpdvowels_utf16, w, n * sizeof(w_char));
-                    }
-                    cpdvowels_utf16_len = n;
-                }
-                np++;
-                break;
-             }
-             default: break;
-          }
-          i++;
-      }
-      piece = mystrsep(&tp, 0);
-   }
-   if (np < 2) {
-      HUNSPELL_WARNING(stderr, "error: line %d: missing compoundsyllable information\n", af->getlinenum());
-      return 1;
-   }
-   if (np == 2) cpdvowels = mystrdup("aeiouAEIOU");
-   return 0;
-}
-
-/* parse in the typical fault correcting table */
-int  AffixMgr::parse_reptable(char * line, FileMgr * af)
-{
-   if (numrep != 0) {
-      HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum());
-      return 1;
-   }
-   char * tp = line;
-   char * piece;
-   int i = 0;
-   int np = 0;
-   piece = mystrsep(&tp, 0);
-   while (piece) {
-       if (*piece != '\0') {
-          switch(i) {
-             case 0: { np++; break; }
-             case 1: { 
-                       numrep = atoi(piece);
-                       if (numrep < 1) {
-                          HUNSPELL_WARNING(stderr, "error: line %d: incorrect entry number\n", af->getlinenum());
-                          return 1;
-                       }
-                       reptable = (replentry *) malloc(numrep * sizeof(struct replentry));
-                       if (!reptable) return 1;
-                       np++;
-                       break;
-                     }
-             default: break;
-          }
-          i++;
-       }
-       piece = mystrsep(&tp, 0);
-   }
-   if (np != 2) {
-      HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum());
-      return 1;
-   } 
- 
-   /* now parse the numrep lines to read in the remainder of the table */
-   char * nl;
-   for (int j=0; j < numrep; j++) {
-        if ((nl = af->getline()) == NULL) return 1;
-        mychomp(nl);
-        tp = nl;
-        i = 0;
-        reptable[j].pattern = NULL;
-        reptable[j].pattern2 = NULL;
-        piece = mystrsep(&tp, 0);
-        while (piece) {
-           if (*piece != '\0') {
-               switch(i) {
-                  case 0: {
-                             if (strncmp(piece,"REP",3) != 0) {
-                                 HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum());
-                                 numrep = 0;
-                                 return 1;
-                             }
-                             break;
-                          }
-                  case 1: {
-                            if (*piece == '^') reptable[j].start = true; else reptable[j].start = false;
-                            reptable[j].pattern = mystrrep(mystrdup(piece + int(reptable[j].start)),"_"," ");
-                            int lr = strlen(reptable[j].pattern) - 1;
-                            if (reptable[j].pattern[lr] == '$') {
-                                reptable[j].end = true;
-                                reptable[j].pattern[lr] = '\0';
-                            } else reptable[j].end = false;
-                            break;
-                          }
-                  case 2: { reptable[j].pattern2 = mystrrep(mystrdup(piece),"_"," "); break; }
-                  default: break;
-               }
-               i++;
-           }
-           piece = mystrsep(&tp, 0);
-        }
-        if ((!(reptable[j].pattern)) || (!(reptable[j].pattern2))) {
-             HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum());
-             numrep = 0;
-             return 1;
-        }
-   }
-   return 0;
-}
-
-/* parse in the typical fault correcting table */
-int  AffixMgr::parse_convtable(char * line, FileMgr * af, RepList ** rl, const char * keyword)
-{
-   if (*rl) {
-      HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum());
-      return 1;
-   }
-   char * tp = line;
-   char * piece;
-   int i = 0;
-   int np = 0;
-   int numrl = 0;
-   piece = mystrsep(&tp, 0);
-   while (piece) {
-       if (*piece != '\0') {
-          switch(i) {
-             case 0: { np++; break; }
-             case 1: { 
-                       numrl = atoi(piece);
-                       if (numrl < 1) {
-                          HUNSPELL_WARNING(stderr, "error: line %d: incorrect entry number\n", af->getlinenum());
-                          return 1;
-                       }
-                       *rl = new RepList(numrl);
-                       if (!*rl) return 1;
-                       np++;
-                       break;
-                     }
-             default: break;
-          }
-          i++;
-       }
-       piece = mystrsep(&tp, 0);
-   }
-   if (np != 2) {
-      HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum());
-      return 1;
-   } 
- 
-   /* now parse the num lines to read in the remainder of the table */
-   char * nl;
-   for (int j=0; j < numrl; j++) {
-        if (!(nl = af->getline())) return 1;
-        mychomp(nl);
-        tp = nl;
-        i = 0;
-        char * pattern = NULL;
-        char * pattern2 = NULL;
-        piece = mystrsep(&tp, 0);
-        while (piece) {
-           if (*piece != '\0') {
-               switch(i) {
-                  case 0: {
-                             if (strncmp(piece, keyword, strlen(keyword)) != 0) {
-                                 HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum());
-                                 delete *rl;
-                                 *rl = NULL;
-                                 return 1;
-                             }
-                             break;
-                          }
-                  case 1: { pattern = mystrrep(mystrdup(piece),"_"," "); break; }
-                  case 2: { 
-                    pattern2 = mystrrep(mystrdup(piece),"_"," ");
-                    break; 
-                  }
-                  default: break;
-               }
-               i++;
-           }
-           piece = mystrsep(&tp, 0);
-        }
-        if (!pattern || !pattern2) {
-            if (pattern)
-                free(pattern);
-            if (pattern2)
-                free(pattern2);
-            HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum());
-            return 1;
-        }
-        (*rl)->add(pattern, pattern2);
-   }
-   return 0;
-}
-
-
-/* parse in the typical fault correcting table */
-int  AffixMgr::parse_phonetable(char * line, FileMgr * af)
-{
-   if (phone) {
-      HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum());
-      return 1;
-   }
-   char * tp = line;
-   char * piece;
-   int i = 0;
-   int np = 0;
-   piece = mystrsep(&tp, 0);
-   while (piece) {
-       if (*piece != '\0') {
-          switch(i) {
-             case 0: { np++; break; }
-             case 1: { 
-                       phone = (phonetable *) malloc(sizeof(struct phonetable));
-                       if (!phone) return 1;
-                       phone->num = atoi(piece);
-                       phone->rules = NULL;
-                       phone->utf8 = (char) utf8;
-                       if (phone->num < 1) {
-                          HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum());
-                          return 1;
-                       }
-                       phone->rules = (char * *) malloc(2 * (phone->num + 1) * sizeof(char *));
-                       if (!phone->rules) {
-                          free(phone);
-                          phone = NULL;
-                          return 1;
-                       }
-                       np++;
-                       break;
-                     }
-             default: break;
-          }
-          i++;
-       }
-       piece = mystrsep(&tp, 0);
-   }
-   if (np != 2) {
-      HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum());
-      return 1;
-   } 
- 
-   /* now parse the phone->num lines to read in the remainder of the table */
-   char * nl;
-   for (int j=0; j < phone->num; j++) {
-        if (!(nl = af->getline())) return 1;
-        mychomp(nl);
-        tp = nl;
-        i = 0;
-        phone->rules[j * 2] = NULL;
-        phone->rules[j * 2 + 1] = NULL;
-        piece = mystrsep(&tp, 0);
-        while (piece) {
-           if (*piece != '\0') {
-               switch(i) {
-                  case 0: {
-                             if (strncmp(piece,"PHONE",5) != 0) {
-                                 HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum());
-                                 phone->num = 0;
-                                 return 1;
-                             }
-                             break;
-                          }
-                  case 1: { phone->rules[j * 2] = mystrrep(mystrdup(piece),"_",""); break; }
-                  case 2: { phone->rules[j * 2 + 1] = mystrrep(mystrdup(piece),"_",""); break; }
-                  default: break;
-               }
-               i++;
-           }
-           piece = mystrsep(&tp, 0);
-        }
-        if ((!(phone->rules[j * 2])) || (!(phone->rules[j * 2 + 1]))) {
-             HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum());
-             phone->num = 0;
-             return 1;
-        }
-   }
-   phone->rules[phone->num * 2] = mystrdup("");
-   phone->rules[phone->num * 2 + 1] = mystrdup("");
-   init_phonet_hash(*phone);
-   return 0;
-}
-
-/* parse in the checkcompoundpattern table */
-int  AffixMgr::parse_checkcpdtable(char * line, FileMgr * af)
-{
-   if (numcheckcpd != 0) {
-      HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum());
-      return 1;
-   }
-   char * tp = line;
-   char * piece;
-   int i = 0;
-   int np = 0;
-   piece = mystrsep(&tp, 0);
-   while (piece) {
-       if (*piece != '\0') {
-          switch(i) {
-             case 0: { np++; break; }
-             case 1: { 
-                       numcheckcpd = atoi(piece);
-                       if (numcheckcpd < 1) {
-                          HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum());
-                          return 1;
-                       }
-                       checkcpdtable = (patentry *) malloc(numcheckcpd * sizeof(struct patentry));
-                       if (!checkcpdtable) return 1;
-                       np++;
-                       break;
-                     }
-             default: break;
-          }
-          i++;
-       }
-       piece = mystrsep(&tp, 0);
-   }
-   if (np != 2) {
-      HUNSPELL_WARNING(stderr, "error: line %d: missing data\n",  af->getlinenum());
-      return 1;
-   }
-
-   /* now parse the numcheckcpd lines to read in the remainder of the table */
-   char * nl;
-   for (int j=0; j < numcheckcpd; j++) {
-        if (!(nl = af->getline())) return 1;
-        mychomp(nl);
-        tp = nl;
-        i = 0;
-        checkcpdtable[j].pattern = NULL;
-        checkcpdtable[j].pattern2 = NULL;
-        checkcpdtable[j].pattern3 = NULL;
-        checkcpdtable[j].cond = FLAG_NULL;
-        checkcpdtable[j].cond2 = FLAG_NULL;
-        piece = mystrsep(&tp, 0);
-        while (piece) {
-           if (*piece != '\0') {
-               switch(i) {
-                  case 0: {
-                             if (strncmp(piece,"CHECKCOMPOUNDPATTERN",20) != 0) {
-                                 HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum());
-                                 numcheckcpd = 0;
-                                 return 1;
-                             }
-                             break;
-                          }
-                  case 1: { 
-                    checkcpdtable[j].pattern = mystrdup(piece); 
-                    char * p = strchr(checkcpdtable[j].pattern, '/');
-                    if (p) {
-                      *p = '\0';
-                    checkcpdtable[j].cond = pHMgr->decode_flag(p + 1);
-                    }
-                    break; }
-                  case 2: { 
-                    checkcpdtable[j].pattern2 = mystrdup(piece);
-                    char * p = strchr(checkcpdtable[j].pattern2, '/');
-                    if (p) {
-                      *p = '\0';
-                      checkcpdtable[j].cond2 = pHMgr->decode_flag(p + 1);
-                    }
-                    break;
-                    }
-                  case 3: { checkcpdtable[j].pattern3 = mystrdup(piece); simplifiedcpd = 1; break; }
-                  default: break;
-               }
-               i++;
-           }
-           piece = mystrsep(&tp, 0);
-        }
-        if ((!(checkcpdtable[j].pattern)) || (!(checkcpdtable[j].pattern2))) {
-             HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum());
-             numcheckcpd = 0;
-             return 1;
-        }
-   }
-   return 0;
-}
-
-/* parse in the compound rule table */
-int  AffixMgr::parse_defcpdtable(char * line, FileMgr * af)
-{
-   if (numdefcpd != 0) {
-      HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum());
-      return 1;
-   }
-   char * tp = line;
-   char * piece;
-   int i = 0;
-   int np = 0;
-   piece = mystrsep(&tp, 0);
-   while (piece) {
-       if (*piece != '\0') {
-          switch(i) {
-             case 0: { np++; break; }
-             case 1: { 
-                       numdefcpd = atoi(piece);
-                       if (numdefcpd < 1) {
-                          HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum());
-                          return 1;
-                       }
-                       defcpdtable = (flagentry *) malloc(numdefcpd * sizeof(flagentry));
-                       if (!defcpdtable) return 1;
-                       np++;
-                       break;
-                     }
-             default: break;
-          }
-          i++;
-       }
-       piece = mystrsep(&tp, 0);
-   }
-   if (np != 2) {
-      HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum());
-      return 1;
-   } 
- 
-   /* now parse the numdefcpd lines to read in the remainder of the table */
-   char * nl;
-   for (int j=0; j < numdefcpd; j++) {
-        if (!(nl = af->getline())) return 1;
-        mychomp(nl);
-        tp = nl;
-        i = 0;
-        defcpdtable[j].def = NULL;
-        piece = mystrsep(&tp, 0);
-        while (piece) {
-           if (*piece != '\0') {
-               switch(i) {
-                  case 0: {
-                             if (strncmp(piece, "COMPOUNDRULE", 12) != 0) {
-                                 HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum());
-                                 numdefcpd = 0;
-                                 return 1;
-                             }
-                             break;
-                          }
-                  case 1: { // handle parenthesized flags
-                            if (strchr(piece, '(')) {
-                                defcpdtable[j].def = (FLAG *) malloc(strlen(piece) * sizeof(FLAG));
-                                defcpdtable[j].len = 0;
-                                int end = 0;
-                                FLAG * conv;
-                                while (!end) {
-                                    char * par = piece + 1;
-                                    while (*par != '(' && *par != ')' && *par != '\0') par++;
-                                    if (*par == '\0') end = 1; else *par = '\0';
-                                    if (*piece == '(') piece++;
-                                    if (*piece == '*' || *piece == '?') {
-                                        defcpdtable[j].def[defcpdtable[j].len++] = (FLAG) *piece;
-                                    } else if (*piece != '\0') {
-                                        int l = pHMgr->decode_flags(&conv, piece, af);
-                                        for (int k = 0; k < l; k++) defcpdtable[j].def[defcpdtable[j].len++] = conv[k];
-                                        free(conv);
-                                    }
-                                    piece = par + 1;
-                                }
-                            } else {
-                                defcpdtable[j].len = pHMgr->decode_flags(&(defcpdtable[j].def), piece, af);
-                            }
-                            break; 
-                           }
-                  default: break;
-               }
-               i++;
-           }
-           piece = mystrsep(&tp, 0);
-        }
-        if (!defcpdtable[j].len) {
-             HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum());
-             numdefcpd = 0;
-             return 1;
-        }
-   }
-   return 0;
-}
-
-
-/* parse in the character map table */
-int  AffixMgr::parse_maptable(char * line, FileMgr * af)
-{
-   if (nummap != 0) {
-      HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum());
-      return 1;
-   }
-   char * tp = line;
-   char * piece;
-   int i = 0;
-   int np = 0;
-   piece = mystrsep(&tp, 0);
-   while (piece) {
-       if (*piece != '\0') {
-          switch(i) {
-             case 0: { np++; break; }
-             case 1: { 
-                       nummap = atoi(piece);
-                       if (nummap < 1) {
-                          HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum());
-                          return 1;
-                       }
-                       maptable = (mapentry *) malloc(nummap * sizeof(struct mapentry));
-                       if (!maptable) return 1;
-                       np++;
-                       break;
-                     }
-             default: break;
-          }
-          i++;
-       }
-       piece = mystrsep(&tp, 0);
-   }
-   if (np != 2) {
-      HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum());
-      return 1;
-   } 
- 
-   /* now parse the nummap lines to read in the remainder of the table */
-   char * nl;
-   for (int j=0; j < nummap; j++) {
-        if (!(nl = af->getline())) return 1;
-        mychomp(nl);
-        tp = nl;
-        i = 0;
-        maptable[j].set = NULL;
-        maptable[j].len = 0;
-        piece = mystrsep(&tp, 0);
-        while (piece) {
-           if (*piece != '\0') {
-               switch(i) {
-                  case 0: {
-                             if (strncmp(piece,"MAP",3) != 0) {
-                                 HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum());
-                                 nummap = 0;
-                                 return 1;
-                             }
-                             break;
-                          }
-                  case 1: {
-			    int setn = 0;
-                            maptable[j].len = strlen(piece);
-                            maptable[j].set = (char **) malloc(maptable[j].len * sizeof(char*));
-                            if (!maptable[j].set) return 1;
-			    for (int k = 0; k < maptable[j].len; k++) {
-				int chl = 1;
-				int chb = k;
-			        if (piece[k] == '(') {
-				    char * parpos = strchr(piece + k, ')');
-				    if (parpos != NULL) {
-					chb = k + 1;
-					chl = (int)(parpos - piece) - k - 1;
-					k = k + chl + 1;
-				    }
-				} else {
-				    if (utf8 && (piece[k] & 0xc0) == 0xc0) {
-					for (k++; utf8 && (piece[k] & 0xc0) == 0x80; k++);
-					chl = k - chb;
-					k--;
-				    }
-				}
-				maptable[j].set[setn] = (char *) malloc(chl + 1);
-				if (!maptable[j].set[setn]) return 1;
-				strncpy(maptable[j].set[setn], piece + chb, chl);
-				maptable[j].set[setn][chl] = '\0';
-				setn++;
-			    }
-                            maptable[j].len = setn;
-                            break; }
-                  default: break;
-               }
-               i++;
-           }
-           piece = mystrsep(&tp, 0);
-        }
-        if (!maptable[j].set || !maptable[j].len) {
-             HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum());
-             nummap = 0;
-             return 1;
-        }
-   }
-   return 0;
-}
-
-/* parse in the word breakpoint table */
-int  AffixMgr::parse_breaktable(char * line, FileMgr * af)
-{
-   if (numbreak > -1) {
-      HUNSPELL_WARNING(stderr, "error: line %d: multiple table definitions\n", af->getlinenum());
-      return 1;
-   }
-   char * tp = line;
-   char * piece;
-   int i = 0;
-   int np = 0;
-   piece = mystrsep(&tp, 0);
-   while (piece) {
-       if (*piece != '\0') {
-          switch(i) {
-             case 0: { np++; break; }
-             case 1: { 
-                       numbreak = atoi(piece);
-                       if (numbreak < 0) {
-                          HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n", af->getlinenum());
-                          return 1;
-                       }
-                       if (numbreak == 0) return 0;
-                       breaktable = (char **) malloc(numbreak * sizeof(char *));
-                       if (!breaktable) return 1;
-                       np++;
-                       break;
-                     }
-             default: break;
-          }
-          i++;
-       }
-       piece = mystrsep(&tp, 0);
-   }
-   if (np != 2) {
-      HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum());
-      return 1;
-   } 
- 
-   /* now parse the numbreak lines to read in the remainder of the table */
-   char * nl;
-   for (int j=0; j < numbreak; j++) {
-        if (!(nl = af->getline())) return 1;
-        mychomp(nl);
-        tp = nl;
-        i = 0;
-        piece = mystrsep(&tp, 0);
-        while (piece) {
-           if (*piece != '\0') {
-               switch(i) {
-                  case 0: {
-                             if (strncmp(piece,"BREAK",5) != 0) {
-                                 HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum());
-                                 numbreak = 0;
-                                 return 1;
-                             }
-                             break;
-                          }
-                  case 1: {
-                            breaktable[j] = mystrdup(piece);
-                            break;
-                          }
-                  default: break;
-               }
-               i++;
-           }
-           piece = mystrsep(&tp, 0);
-        }
-        if (!breaktable) {
-             HUNSPELL_WARNING(stderr, "error: line %d: table is corrupt\n", af->getlinenum());
-             numbreak = 0;
-             return 1;
-        }
-   }
-   return 0;
-}
-
-void AffixMgr::reverse_condition(char * piece) {
-    int neg = 0;
-    for (char * k = piece + strlen(piece) - 1; k >= piece; k--) {
-        switch(*k) {
-          case '[': {
-                if (neg) *(k+1) = '['; else *k = ']';
-                    break;
-            }
-          case ']': {
-                *k = '[';
-                if (neg) *(k+1) = '^';
-                neg = 0;
-                break;
-            }
-          case '^': {
-               if (*(k+1) == ']') neg = 1; else *(k+1) = *k;
-               break;
-                }
-          default: {
-            if (neg) *(k+1) = *k;
-          }
-       }
-    }
-}
-
-int  AffixMgr::parse_affix(char * line, const char at, FileMgr * af, char * dupflags)
-{
-   int numents = 0;      // number of affentry structures to parse
-
-   unsigned short aflag = 0;      // affix char identifier
-
-   char ff=0;
-   std::vector<affentry> affentries;
-
-   char * tp = line;
-   char * nl = line;
-   char * piece;
-   int i = 0;
-
-   // checking lines with bad syntax
-#ifdef DEBUG
-   int basefieldnum = 0;
-#endif
-
-   // split affix header line into pieces
-
-   int np = 0;
-
-   piece = mystrsep(&tp, 0);
-   while (piece) {
-      if (*piece != '\0') {
-          switch(i) {
-             // piece 1 - is type of affix
-             case 0: { np++; break; }
-          
-             // piece 2 - is affix char
-             case 1: { 
-                    np++;
-                    aflag = pHMgr->decode_flag(piece);
-#ifndef HUNSPELL_CHROME_CLIENT // We don't check for duplicates.
-                    if (((at == 'S') && (dupflags[aflag] & dupSFX)) ||
-                        ((at == 'P') && (dupflags[aflag] & dupPFX))) {
-                        HUNSPELL_WARNING(stderr, "error: line %d: multiple definitions of an affix flag\n",
-                            af->getlinenum());
-                        // return 1; XXX permissive mode for bad dictionaries
-                    }
-                    dupflags[aflag] += (char) ((at == 'S') ? dupSFX : dupPFX);
-#endif
-                    break; 
-                    }
-             // piece 3 - is cross product indicator 
-             case 2: { np++; if (*piece == 'Y') ff = aeXPRODUCT; break; }
-
-             // piece 4 - is number of affentries
-             case 3: { 
-                       np++;
-                       numents = atoi(piece); 
-                       if (numents == 0) {
-                           char * err = pHMgr->encode_flag(aflag);
-                           if (err) {
-                                HUNSPELL_WARNING(stderr, "error: line %d: bad entry number\n",
-                                   af->getlinenum());
-                                free(err);
-                           }
-                           return 1;
-                       }
-                       affentries.resize(numents);
-                       affentries[0].opts = ff;
-                       if (utf8) affentries[0].opts += aeUTF8;
-                       if (pHMgr->is_aliasf()) affentries[0].opts += aeALIASF;
-                       if (pHMgr->is_aliasm()) affentries[0].opts += aeALIASM;
-                       affentries[0].aflag = aflag;
-                     }
-
-             default: break;
-          }
-          i++;
-      }
-      piece = mystrsep(&tp, 0);
-   }
-   // check to make sure we parsed enough pieces
-   if (np != 4) {
-       char * err = pHMgr->encode_flag(aflag);
-       if (err) {
-            HUNSPELL_WARNING(stderr, "error: line %d: missing data\n", af->getlinenum());
-            free(err);
-       }
-       return 1;
-   }
- 
-   // now parse numents affentries for this affix
-   std::vector<affentry>::iterator start = affentries.begin();
-   std::vector<affentry>::iterator end = affentries.end();
-   for (std::vector<affentry>::iterator entry = start; entry != end; ++entry) {
-      if ((nl = af->getline()) == NULL) return 1;
-      mychomp(nl);
-      tp = nl;
-      i = 0;
-      np = 0;
-
-      // split line into pieces
-      piece = mystrsep(&tp, 0);
-      while (piece) {
-         if (*piece != '\0') {
-             switch(i) {
-                // piece 1 - is type
-                case 0: { 
-                          np++;
-                          if (entry != start) entry->opts = start->opts &
-                             (char) (aeXPRODUCT + aeUTF8 + aeALIASF + aeALIASM);
-                          break;
-                        }
-
-                // piece 2 - is affix char
-                case 1: { 
-                          np++;
-                          if (pHMgr->decode_flag(piece) != aflag) {
-                              char * err = pHMgr->encode_flag(aflag);
-                              if (err) {
-                                HUNSPELL_WARNING(stderr, "error: line %d: affix %s is corrupt\n",
-                                    af->getlinenum(), err);
-                                free(err);
-                              }
-                              return 1;
-                          }
-
-                          if (entry != start) entry->aflag = start->aflag;
-                          break;
-                        }
-
-                // piece 3 - is string to strip or 0 for null 
-                case 2: { 
-                          np++;
-                          if (complexprefixes) {
-                            if (utf8) reverseword_utf(piece); else reverseword(piece);
-                          }
-                          entry->strip = mystrdup(piece);
-                          entry->stripl = (unsigned char) strlen(entry->strip);
-                          if (strcmp(entry->strip,"0") == 0) {
-                              free(entry->strip);
-                              entry->strip=mystrdup("");
-                              entry->stripl = 0;
-                          }   
-                          break; 
-                        }
-
-                // piece 4 - is affix string or 0 for null
-                case 3: { 
-                          char * dash;  
-                          entry->morphcode = NULL;
-                          entry->contclass = NULL;
-                          entry->contclasslen = 0;
-                          np++;
-                          dash = strchr(piece, '/');
-                          if (dash) {
-                            *dash = '\0';
-
-                            if (ignorechars) {
-                              if (utf8) {
-                                remove_ignored_chars_utf(piece, ignorechars_utf16, ignorechars_utf16_len);
-                              } else {
-                                remove_ignored_chars(piece,ignorechars);
-                              }
-                            }
-
-                            if (complexprefixes) {
-                                if (utf8) reverseword_utf(piece); else reverseword(piece);
-                            }
-                            entry->appnd = mystrdup(piece);
-
-                            if (pHMgr->is_aliasf()) {
-                                int index = atoi(dash + 1);
-                                entry->contclasslen = (unsigned short) pHMgr->get_aliasf(index, &(entry->contclass), af);
-                                if (!entry->contclasslen) HUNSPELL_WARNING(stderr, "error: bad affix flag alias: \"%s\"\n", dash+1);
-                            } else {
-                                entry->contclasslen = (unsigned short) pHMgr->decode_flags(&(entry->contclass), dash + 1, af);
-                                flag_qsort(entry->contclass, 0, entry->contclasslen);
-                            }
-                            *dash = '/';
-
-                            havecontclass = 1;
-                            for (unsigned short _i = 0; _i < entry->contclasslen; _i++) {
-                              contclasses[(entry->contclass)[_i]] = 1;
-                            }
-                          } else {
-                            if (ignorechars) {
-                              if (utf8) {
-                                remove_ignored_chars_utf(piece, ignorechars_utf16, ignorechars_utf16_len);
-                              } else {
-                                remove_ignored_chars(piece,ignorechars);
-                              }
-                            }
-
-                            if (complexprefixes) {
-                                if (utf8) reverseword_utf(piece); else reverseword(piece);
-                            }
-                            entry->appnd = mystrdup(piece);
-                          }
-
-                          entry->appndl = (unsigned char) strlen(entry->appnd);
-                          if (strcmp(entry->appnd,"0") == 0) {
-                              free(entry->appnd);
-                              entry->appnd=mystrdup("");
-                              entry->appndl = 0;
-                          }   
-                          break; 
-                        }
-
-                // piece 5 - is the conditions descriptions
-                case 4: { 
-                          np++;
-                          if (complexprefixes) {
-                            if (utf8) reverseword_utf(piece); else reverseword(piece);
-                            reverse_condition(piece);
-                          }
-                          if (entry->stripl && (strcmp(piece, ".") != 0) &&
-                            redundant_condition(at, entry->strip, entry->stripl, piece, af->getlinenum()))
-                                strcpy(piece, ".");
-                          if (at == 'S') {
-                            reverseword(piece);
-                            reverse_condition(piece);
-                          }
-                          if (encodeit(*entry, piece)) return 1;
-                         break;
-                }
-
-                case 5: {
-                          np++;
-                          if (pHMgr->is_aliasm()) {
-                            int index = atoi(piece);
-                            entry->morphcode = pHMgr->get_aliasm(index);
-                          } else {
-                            if (complexprefixes) { // XXX - fix me for morph. gen.
-                                if (utf8) reverseword_utf(piece); else reverseword(piece);
-                            }
-                            // add the remaining of the line
-                            if (*tp) {
-                                *(tp - 1) = ' ';
-                                tp = tp + strlen(tp);
-                            }
-                            entry->morphcode = mystrdup(piece);
-                            if (!entry->morphcode) return 1;
-                          }
-                          break; 
-                }
-                default: break;
-             }
-             i++;
-         }
-         piece = mystrsep(&tp, 0);
-      }
-      // check to make sure we parsed enough pieces
-      if (np < 4) {
-          char * err = pHMgr->encode_flag(aflag);
-          if (err) {
-            HUNSPELL_WARNING(stderr, "error: line %d: affix %s is corrupt\n",
-                af->getlinenum(), err);
-            free(err);
-          }
-          return 1;
-      }
-
-#ifdef DEBUG
-      // detect unnecessary fields, excepting comments
-      if (basefieldnum) {
-        int fieldnum = !(entry->morphcode) ? 5 : ((*(entry->morphcode)=='#') ? 5 : 6);
-          if (fieldnum != basefieldnum) 
-            HUNSPELL_WARNING(stderr, "warning: line %d: bad field number\n", af->getlinenum());
-      } else {
-        basefieldnum = !(entry->morphcode) ? 5 : ((*(entry->morphcode)=='#') ? 5 : 6);
-      }
-#endif
-   }
- 
-   // now create SfxEntry or PfxEntry objects and use links to
-   // build an ordered (sorted by affix string) list
-   for (std::vector<affentry>::iterator entry = start; entry != end; ++entry) {
-      if (at == 'P') {
-          PfxEntry * pfxptr = new PfxEntry(this,&(*entry));
-          build_pfxtree(pfxptr);
-      } else {
-          SfxEntry * sfxptr = new SfxEntry(this,&(*entry));
-          build_sfxtree(sfxptr); 
-      }
-   }
-   return 0;
-}
-
-int AffixMgr::redundant_condition(char ft, char * strip, int stripl, const char * cond, int linenum) {
-  int condl = strlen(cond);
-  int i;
-  int j;
-  int neg;
-  int in;
-  if (ft == 'P') { // prefix
-    if (strncmp(strip, cond, condl) == 0) return 1;
-    if (utf8) {
-    } else {
-      for (i = 0, j = 0; (i < stripl) && (j < condl); i++, j++) {
-        if (cond[j] != '[') {
-          if (cond[j] != strip[i]) {
-            HUNSPELL_WARNING(stderr, "warning: line %d: incompatible stripping characters and condition\n", linenum);
-            return 0;
-          }
-        } else {
-          neg = (cond[j+1] == '^') ? 1 : 0;
-          in = 0;
-          do {
-            j++;
-            if (strip[i] == cond[j]) in = 1;
-          } while ((j < (condl - 1)) && (cond[j] != ']'));
-          if (j == (condl - 1) && (cond[j] != ']')) {
-            HUNSPELL_WARNING(stderr, "error: line %d: missing ] in condition:\n%s\n", linenum, cond);
-            return 0;
-          }
-          if ((!neg && !in) || (neg && in)) {
-            HUNSPELL_WARNING(stderr, "warning: line %d: incompatible stripping characters and condition\n", linenum);
-            return 0;
-          }
-        }
-      }
-      if (j >= condl) return 1;
-    }
-  } else { // suffix
-    if ((stripl >= condl) && strcmp(strip + stripl - condl, cond) == 0) return 1;
-    if (utf8) {
-    } else {
-      for (i = stripl - 1, j = condl - 1; (i >= 0) && (j >= 0); i--, j--) {
-        if (cond[j] != ']') {
-          if (cond[j] != strip[i]) {
-            HUNSPELL_WARNING(stderr, "warning: line %d: incompatible stripping characters and condition\n", linenum);
-            return 0;
-          }
-        } else {
-          in = 0;
-          do {
-            j--;
-            if (strip[i] == cond[j]) in = 1;
-          } while ((j > 0) && (cond[j] != '['));
-          if ((j == 0) && (cond[j] != '[')) {
-            HUNSPELL_WARNING(stderr, "error: line: %d: missing ] in condition:\n%s\n", linenum, cond);
-            return 0;
-          }
-          neg = (cond[j+1] == '^') ? 1 : 0;
-          if ((!neg && !in) || (neg && in)) {
-            HUNSPELL_WARNING(stderr, "warning: line %d: incompatible stripping characters and condition\n", linenum);
-            return 0;
-          }
-        }
-      }
-      if (j < 0) return 1;
-    }
-  }
-  return 0;
-}
diff --git a/src/hunspell/affixmgr.hxx b/src/hunspell/affixmgr.hxx
deleted file mode 100644
index 79345df..0000000
--- a/src/hunspell/affixmgr.hxx
+++ /dev/null
@@ -1,297 +0,0 @@
-#ifndef _AFFIXMGR_HXX_
-#define _AFFIXMGR_HXX_
-
-#include "hunvisapi.h"
-
-#include <stdio.h>
-
-#include "atypes.hxx"
-#include "baseaffix.hxx"
-#include "hashmgr.hxx"
-#include "phonet.hxx"
-#include "replist.hxx"
-
-// check flag duplication
-#define dupSFX        (1 << 0)
-#define dupPFX        (1 << 1)
-
-class PfxEntry;
-class SfxEntry;
-
-#ifdef HUNSPELL_CHROME_CLIENT
-
-#include <vector>
-
-// This class provides an implementation of the contclasses array in AffixMgr
-// that is normally a large static array. We should almost never need more than
-// 256 elements, so this class only allocates that much to start off with. If
-// elements higher than that are actually used, we'll automatically expand.
-class ContClasses {
- public:
-  ContClasses() {
-    // Pre-allocate a buffer so that typically, we'll never have to resize.
-    EnsureSizeIs(256);
-  }
-
-  char& operator[](size_t index) {
-    EnsureSizeIs(index + 1);
-    return data[index];
-  }
-
-  void EnsureSizeIs(size_t new_size) {
-    if (data.size() >= new_size)
-      return;  // Nothing to do.
-
-    size_t old_size = data.size();
-    data.resize(new_size);
-    memset(&data[old_size], 0, new_size - old_size);
-  }
-
-  std::vector<char> data;
-};
-
-#endif  // HUNSPELL_CHROME_CLIENT
-
-class LIBHUNSPELL_DLL_EXPORTED AffixMgr
-{
-
-  PfxEntry *          pStart[SETSIZE];
-  SfxEntry *          sStart[SETSIZE];
-  PfxEntry *          pFlag[SETSIZE];
-  SfxEntry *          sFlag[SETSIZE];
-  HashMgr *           pHMgr;
-  HashMgr **          alldic;
-  int *               maxdic;
-  char *              keystring;
-  char *              trystring;
-  char *              encoding;
-  struct cs_info *    csconv;
-  int                 utf8;
-  int                 complexprefixes;
-  FLAG                compoundflag;
-  FLAG                compoundbegin;
-  FLAG                compoundmiddle;
-  FLAG                compoundend;
-  FLAG                compoundroot;
-  FLAG                compoundforbidflag;
-  FLAG                compoundpermitflag;
-  int                 compoundmoresuffixes;
-  int                 checkcompounddup;
-  int                 checkcompoundrep;
-  int                 checkcompoundcase;
-  int                 checkcompoundtriple;
-  int                 simplifiedtriple;
-  FLAG                forbiddenword;
-  FLAG                nosuggest;
-  FLAG                nongramsuggest;
-  FLAG                needaffix;
-  int                 cpdmin;
-  int                 numrep;
-  replentry *         reptable;
-  RepList *           iconvtable;
-  RepList *           oconvtable;
-  int                 nummap;
-  mapentry *          maptable;
-  int                 numbreak;
-  char **             breaktable;
-  int                 numcheckcpd;
-  patentry *          checkcpdtable;
-  int                 simplifiedcpd;
-  int                 numdefcpd;
-  flagentry *         defcpdtable;
-  phonetable *        phone;
-  int                 maxngramsugs;
-  int                 maxcpdsugs;
-  int                 maxdiff;
-  int                 onlymaxdiff;
-  int                 nosplitsugs;
-  int                 sugswithdots;
-  int                 cpdwordmax;
-  int                 cpdmaxsyllable;
-  char *              cpdvowels;
-  w_char *            cpdvowels_utf16;
-  int                 cpdvowels_utf16_len;
-  char *              cpdsyllablenum;
-  const char *        pfxappnd; // BUG: not stateless
-  const char *        sfxappnd; // BUG: not stateless
-  FLAG                sfxflag;  // BUG: not stateless
-  char *              derived;  // BUG: not stateless
-  SfxEntry *          sfx;      // BUG: not stateless
-  PfxEntry *          pfx;      // BUG: not stateless
-  int                 checknum;
-  char *              wordchars;
-  unsigned short *    wordchars_utf16;
-  int                 wordchars_utf16_len;
-  char *              ignorechars;
-  unsigned short *    ignorechars_utf16;
-  int                 ignorechars_utf16_len;
-  char *              version;
-  char *              lang;
-  int                 langnum;
-  FLAG                lemma_present;
-  FLAG                circumfix;
-  FLAG                onlyincompound;
-  FLAG                keepcase;
-  FLAG                forceucase;
-  FLAG                warn;
-  int                 forbidwarn;
-  FLAG                substandard;
-  int                 checksharps;
-  int                 fullstrip;
-
-  int                 havecontclass; // boolean variable
-#ifdef HUNSPELL_CHROME_CLIENT
-  ContClasses         contclasses;
-#else
-  char                contclasses[CONTSIZE]; // flags of possible continuing classes (twofold affix)
-#endif
-
-public:
-
-#ifdef HUNSPELL_CHROME_CLIENT
-  AffixMgr(hunspell::BDictReader* reader, HashMgr** ptr, int * md);
-#else
-  AffixMgr(const char * affpath, HashMgr** ptr, int * md,
-    const char * key = NULL);
-#endif
-  ~AffixMgr();
-  struct hentry *     affix_check(const char * word, int len,
-            const unsigned short needflag = (unsigned short) 0,
-            char in_compound = IN_CPD_NOT);
-  struct hentry *     prefix_check(const char * word, int len,
-            char in_compound, const FLAG needflag = FLAG_NULL);
-  inline int isSubset(const char * s1, const char * s2);
-  struct hentry *     prefix_check_twosfx(const char * word, int len,
-            char in_compound, const FLAG needflag = FLAG_NULL);
-  inline int isRevSubset(const char * s1, const char * end_of_s2, int len);
-  struct hentry *     suffix_check(const char * word, int len, int sfxopts,
-            PfxEntry* ppfx, char ** wlst, int maxSug, int * ns,
-            const FLAG cclass = FLAG_NULL, const FLAG needflag = FLAG_NULL,
-            char in_compound = IN_CPD_NOT);
-  struct hentry *     suffix_check_twosfx(const char * word, int len,
-            int sfxopts, PfxEntry* ppfx, const FLAG needflag = FLAG_NULL);
-
-  char * affix_check_morph(const char * word, int len,
-            const FLAG needflag = FLAG_NULL, char in_compound = IN_CPD_NOT);
-  char * prefix_check_morph(const char * word, int len,
-            char in_compound, const FLAG needflag = FLAG_NULL);
-  char * suffix_check_morph (const char * word, int len, int sfxopts,
-            PfxEntry * ppfx, const FLAG cclass = FLAG_NULL,
-            const FLAG needflag = FLAG_NULL, char in_compound = IN_CPD_NOT);
-
-  char * prefix_check_twosfx_morph(const char * word, int len,
-            char in_compound, const FLAG needflag = FLAG_NULL);
-  char * suffix_check_twosfx_morph(const char * word, int len,
-            int sfxopts, PfxEntry * ppfx, const FLAG needflag = FLAG_NULL);
-
-  char * morphgen(char * ts, int wl, const unsigned short * ap,
-            unsigned short al, char * morph, char * targetmorph, int level);
-
-  int    expand_rootword(struct guessword * wlst, int maxn, const char * ts,
-            int wl, const unsigned short * ap, unsigned short al, char * bad,
-            int, char *);
-
-  short       get_syllable (const char * word, int wlen);
-  int         cpdrep_check(const char * word, int len);
-  int         cpdpat_check(const char * word, int len, hentry * r1, hentry * r2,
-                    const char affixed);
-  int         defcpd_check(hentry *** words, short wnum, hentry * rv,
-                    hentry ** rwords, char all);
-  int         cpdcase_check(const char * word, int len);
-  inline int  candidate_check(const char * word, int len);
-  void        setcminmax(int * cmin, int * cmax, const char * word, int len);
-  struct hentry * compound_check(const char * word, int len, short wordnum,
-            short numsyllable, short maxwordnum, short wnum, hentry ** words,
-            char hu_mov_rule, char is_sug, int * info);
-
-  int compound_check_morph(const char * word, int len, short wordnum,
-            short numsyllable, short maxwordnum, short wnum, hentry ** words,
-            char hu_mov_rule, char ** result, char * partresult);
-
-  struct hentry * lookup(const char * word);
-  int                 get_numrep() const;
-  struct replentry *  get_reptable() const;
-  RepList *           get_iconvtable() const;
-  RepList *           get_oconvtable() const;
-  struct phonetable * get_phonetable() const;
-  int                 get_nummap() const;
-  struct mapentry *   get_maptable() const;
-  int                 get_numbreak() const;
-  char **             get_breaktable() const;
-  char *              get_encoding();
-  int                 get_langnum() const;
-  char *              get_key_string();
-  char *              get_try_string() const;
-  const char *        get_wordchars() const;
-  unsigned short *    get_wordchars_utf16(int * len) const;
-  char *              get_ignore() const;
-  unsigned short *    get_ignore_utf16(int * len) const;
-  int                 get_compound() const;
-  FLAG                get_compoundflag() const;
-  FLAG                get_compoundbegin() const;
-  FLAG                get_forbiddenword() const;
-  FLAG                get_nosuggest() const;
-  FLAG                get_nongramsuggest() const;
-  FLAG                get_needaffix() const;
-  FLAG                get_onlyincompound() const;
-  FLAG                get_compoundroot() const;
-  FLAG                get_lemma_present() const;
-  int                 get_checknum() const;
-  const char *        get_prefix() const;
-  const char *        get_suffix() const;
-  const char *        get_derived() const;
-  const char *        get_version() const;
-  int                 have_contclass() const;
-  int                 get_utf8() const;
-  int                 get_complexprefixes() const;
-  char *              get_suffixed(char ) const;
-  int                 get_maxngramsugs() const;
-  int                 get_maxcpdsugs() const;
-  int                 get_maxdiff() const;
-  int                 get_onlymaxdiff() const;
-  int                 get_nosplitsugs() const;
-  int                 get_sugswithdots(void) const;
-  FLAG                get_keepcase(void) const;
-  FLAG                get_forceucase(void) const;
-  FLAG                get_warn(void) const;
-  int                 get_forbidwarn(void) const;
-  int                 get_checksharps(void) const;
-  char *              encode_flag(unsigned short aflag) const;
-  int                 get_fullstrip() const;
-
-private:
-#ifdef HUNSPELL_CHROME_CLIENT
-  // Not owned by us, owned by the Hunspell object.
-  hunspell::BDictReader* bdict_reader;
-#endif
-  int  parse_file(const char * affpath, const char * key);
-  int  parse_flag(char * line, unsigned short * out, FileMgr * af);
-  int  parse_num(char * line, int * out, FileMgr * af);
-  int  parse_cpdsyllable(char * line, FileMgr * af);
-  int  parse_reptable(char * line, FileMgr * af);
-  int  parse_convtable(char * line, FileMgr * af, RepList ** rl, const char * keyword);
-  int  parse_phonetable(char * line, FileMgr * af);
-  int  parse_maptable(char * line, FileMgr * af);
-  int  parse_breaktable(char * line, FileMgr * af);
-  int  parse_checkcpdtable(char * line, FileMgr * af);
-  int  parse_defcpdtable(char * line, FileMgr * af);
-  int  parse_affix(char * line, const char at, FileMgr * af, char * dupflags);
-
-  void reverse_condition(char *);
-  void debugflag(char * result, unsigned short flag);
-  int condlen(char *);
-  int encodeit(affentry &entry, char * cs);
-  int build_pfxtree(PfxEntry* pfxptr);
-  int build_sfxtree(SfxEntry* sfxptr);
-  int process_pfx_order();
-  int process_sfx_order();
-  PfxEntry * process_pfx_in_order(PfxEntry * ptr, PfxEntry * nptr);
-  SfxEntry * process_sfx_in_order(SfxEntry * ptr, SfxEntry * nptr);
-  int process_pfx_tree_to_list();
-  int process_sfx_tree_to_list();
-  int redundant_condition(char, char * strip, int stripl,
-      const char * cond, int);
-  void finishFileMgr(FileMgr *afflst);
-};
-
-#endif
diff --git a/src/hunspell/atypes.hxx b/src/hunspell/atypes.hxx
deleted file mode 100644
index 61c59d5..0000000
--- a/src/hunspell/atypes.hxx
+++ /dev/null
@@ -1,107 +0,0 @@
-#ifndef _ATYPES_HXX_
-#define _ATYPES_HXX_
-
-#ifndef HUNSPELL_WARNING
-#include <stdio.h>
-#ifdef HUNSPELL_WARNING_ON
-#define HUNSPELL_WARNING fprintf
-#else
-// empty inline function to switch off warnings (instead of the C99 standard variadic macros)
-static inline void HUNSPELL_WARNING(FILE *, const char *, ...) {}
-#endif
-#endif
-
-// HUNSTEM def.
-#define HUNSTEM
-
-#include "hashmgr.hxx"
-#include "w_char.hxx"
-
-#define SETSIZE         256
-#define CONTSIZE        65536
-#define MAXWORDLEN      100
-#define MAXWORDUTF8LEN  256
-
-// affentry options
-#define aeXPRODUCT      (1 << 0)
-#define aeUTF8          (1 << 1)
-#define aeALIASF        (1 << 2)
-#define aeALIASM        (1 << 3)
-#define aeLONGCOND      (1 << 4)
-
-// compound options
-#define IN_CPD_NOT   0
-#define IN_CPD_BEGIN 1
-#define IN_CPD_END   2
-#define IN_CPD_OTHER 3
-
-// info options
-#define  SPELL_COMPOUND  (1 << 0)
-#define  SPELL_FORBIDDEN (1 << 1)
-#define  SPELL_ALLCAP    (1 << 2)
-#define  SPELL_NOCAP     (1 << 3)
-#define  SPELL_INITCAP   (1 << 4)
-#define  SPELL_ORIGCAP   (1 << 5)
-#define  SPELL_WARN      (1 << 6)
-
-#define MAXLNLEN        8192
-
-#define MINCPDLEN       3
-#define MAXCOMPOUND     10
-#define MAXCONDLEN      20
-#define MAXCONDLEN_1    (MAXCONDLEN - sizeof(char *))
-
-#define MAXACC          1000
-
-#define FLAG unsigned short
-#define FLAG_NULL 0x00
-#define FREE_FLAG(a) a = 0
-
-#define TESTAFF( a, b , c ) (flag_bsearch((unsigned short *) a, (unsigned short) b, c))
-
-struct affentry
-{
-   char * strip;
-   char * appnd;
-   unsigned char stripl;
-   unsigned char appndl;
-   char  numconds;
-   char  opts;
-   unsigned short aflag;
-   unsigned short * contclass;
-   short        contclasslen;
-   union {
-     char conds[MAXCONDLEN];
-     struct {
-       char conds1[MAXCONDLEN_1];
-       char * conds2;
-     } l;
-   } c;
-   char *       morphcode;
-};
-
-struct guessword {
-  char * word;
-  bool allow;
-  char * orig;
-};
-
-struct mapentry {
-  char ** set;
-  int len;
-};
-
-struct flagentry {
-  FLAG * def;
-  int len;
-};
-
-struct patentry {
-  char * pattern;
-  char * pattern2;
-  char * pattern3;
-  FLAG cond;
-  FLAG cond2;
-};
-
-#endif
diff --git a/src/hunspell/baseaffix.hxx b/src/hunspell/baseaffix.hxx
deleted file mode 100644
index ed64f3d..0000000
--- a/src/hunspell/baseaffix.hxx
+++ /dev/null
@@ -1,28 +0,0 @@
-#ifndef _BASEAFF_HXX_
-#define _BASEAFF_HXX_
-
-#include "hunvisapi.h"
-
-class LIBHUNSPELL_DLL_EXPORTED AffEntry
-{
-protected:
-    char *         appnd;
-    char *         strip;
-    unsigned char  appndl;
-    unsigned char  stripl;
-    char           numconds;
-    char           opts;
-    unsigned short aflag;
-    union {
-        char       conds[MAXCONDLEN];
-        struct {
-            char   conds1[MAXCONDLEN_1];
-            char * conds2;
-        } l;
-    } c;
-    char *           morphcode;
-    unsigned short * contclass;
-    short            contclasslen;
-};
-
-#endif
diff --git a/src/hunspell/csutil.cxx b/src/hunspell/csutil.cxx
deleted file mode 100644
index 2be9027..0000000
--- a/src/hunspell/csutil.cxx
+++ /dev/null
@@ -1,5840 +0,0 @@
-#include "license.hunspell"
-#include "license.myspell"
-
-#include <stdlib.h> 
-#include <string.h>
-#include <stdio.h> 
-#include <ctype.h>
-
-#include "csutil.hxx"
-#include "atypes.hxx"
-#include "langnum.hxx"
-
-// Unicode character encoding information
-struct unicode_info {
-  unsigned short c;
-  unsigned short cupper;
-  unsigned short clower;
-};
-
-#ifdef OPENOFFICEORG
-#  include <unicode/uchar.h>
-#else
-#  ifndef MOZILLA_CLIENT
-#    include "utf_info.cxx"
-#    define UTF_LST_LEN (sizeof(utf_lst) / (sizeof(unicode_info)))
-#  endif
-#endif
-
-#ifdef MOZILLA_CLIENT
-#include "nsCOMPtr.h"
-#include "nsServiceManagerUtils.h"
-#include "nsIUnicodeEncoder.h"
-#include "nsIUnicodeDecoder.h"
-#include "nsUnicharUtils.h"
-#include "nsICharsetConverterManager.h"
-
-static NS_DEFINE_CID(kCharsetConverterManagerCID, NS_ICHARSETCONVERTERMANAGER_CID);
-#endif
-
-struct unicode_info2 {
-  char cletter;
-  unsigned short cupper;
-  unsigned short clower;
-};
-
-static struct unicode_info2 * utf_tbl = NULL;
-static int utf_tbl_count = 0; // utf_tbl can be used by multiple Hunspell instances
-
-/* only UTF-16 (BMP) implementation */
-char * u16_u8(char * dest, int size, const w_char * src, int srclen) {
-    signed char * u8 = (signed char *)dest;
-    signed char * u8_max = (signed char *)(u8 + size);
-    const w_char * u2 = src;
-    const w_char * u2_max = src + srclen;
-    while ((u2 < u2_max) && (u8 < u8_max)) {
-        if (u2->h) { // > 0xFF
-            // XXX 4-byte haven't implemented yet.
-            if (u2->h >= 0x08) {   // >= 0x800 (3-byte UTF-8 character)
-                *u8 = 0xe0 + (u2->h >> 4);
-                u8++;
-                if (u8 < u8_max) {
-                    *u8 = 0x80 + ((u2->h & 0xf) << 2) + (u2->l >> 6);
-                    u8++;
-                    if (u8 < u8_max) {
-                        *u8 = 0x80 + (u2->l & 0x3f);
-                        u8++;
-                    }
-                }
-            } else { // < 0x800 (2-byte UTF-8 character)
-                *u8 = 0xc0 + (u2->h << 2) + (u2->l >> 6);
-                u8++;
-                if (u8 < u8_max) {
-                    *u8 = 0x80 + (u2->l & 0x3f);
-                    u8++;
-                }
-            }
-        } else { // <= 0xFF
-            if (u2->l & 0x80) { // >0x80 (2-byte UTF-8 character)
-                *u8 = 0xc0 + (u2->l >> 6);
-                u8++;
-                if (u8 < u8_max) {
-                    *u8 = 0x80 + (u2->l & 0x3f);
-                    u8++;
-                }
-            } else { // < 0x80 (1-byte UTF-8 character)
-                *u8 = u2->l;
-                u8++;
-            }
-        }
-        u2++;
-    }
-    *u8 = '\0';
-    return dest;
-}
-
-
-/* only UTF-16 (BMP) implementation */
-int u8_u16(w_char * dest, int size, const char * src) {
-    const signed char * u8 = (const signed char *)src;
-    w_char * u2 = dest;
-    w_char * u2_max = u2 + size;
-    
-    while ((u2 < u2_max) && *u8) {
-    switch ((*u8) & 0xf0) {
-        case 0x00:
-        case 0x10:
-        case 0x20:
-        case 0x30:
-        case 0x40:
-        case 0x50:
-        case 0x60:
-        case 0x70: {
-            u2->h = 0;
-            u2->l = *u8;
-            break;
-        }
-        case 0x80:
-        case 0x90:
-        case 0xa0:
-        case 0xb0: {
-            HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Unexpected continuation bytes in %ld. character position\n%s\n", static_cast<long>(u8 - (signed char *)src), src);    
-            u2->h = 0xff;
-            u2->l = 0xfd;
-            break;
-        }
-        case 0xc0:
-        case 0xd0: {    // 2-byte UTF-8 codes
-            if ((*(u8+1) & 0xc0) == 0x80) {
-                u2->h = (*u8 & 0x1f) >> 2;
-                u2->l = (*u8 << 6) + (*(u8+1) & 0x3f);
-                u8++;
-            } else {
-                HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - (signed char *)src), src);
-                u2->h = 0xff;
-                u2->l = 0xfd;
-            }
-            break;
-        }
-        case 0xe0: {    // 3-byte UTF-8 codes
-            if ((*(u8+1) & 0xc0) == 0x80) {
-                u2->h = ((*u8 & 0x0f) << 4) + ((*(u8+1) & 0x3f) >> 2);
-                u8++;
-                if ((*(u8+1) & 0xc0) == 0x80) {
-                    u2->l = (*u8 << 6) + (*(u8+1) & 0x3f);
-                    u8++;
-                } else {
-                    HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - (signed char *)src), src);
-                    u2->h = 0xff;
-                    u2->l = 0xfd;
-                }
-            } else {
-                HUNSPELL_WARNING(stderr, "UTF-8 encoding error. Missing continuation byte in %ld. character position:\n%s\n", static_cast<long>(u8 - (signed char *)src), src);
-                u2->h = 0xff;
-                u2->l = 0xfd;
-            }
-            break;
-        }
-        case 0xf0: {    // 4 or more byte UTF-8 codes
-            HUNSPELL_WARNING(stderr, "This UTF-8 encoding can't convert to UTF-16:\n%s\n", src);
-            u2->h = 0xff;
-            u2->l = 0xfd;
-            return -1;
-        }
-    }
-    u8++;
-    u2++;
-    }
-    return (int)(u2 - dest);
-}
-
-void flag_qsort(unsigned short flags[], int begin, int end) {
-    unsigned short reg;
-    if (end > begin) {
-        unsigned short pivot = flags[begin];
-        int l = begin + 1;
-        int r = end;
-        while(l < r) {
-            if (flags[l] <= pivot) {
-                l++;
-            } else {
-             r--;
-             reg = flags[l];
-             flags[l] = flags[r];
-             flags[r] = reg;
-          }
-       }
-       l--;
-       reg = flags[begin];
-       flags[begin] = flags[l];
-       flags[l] = reg;
-
-       flag_qsort(flags, begin, l);
-       flag_qsort(flags, r, end);
-    }
- }
-
-int flag_bsearch(unsigned short flags[], unsigned short flag, int length) {
-   int mid;
-   int left = 0;
-   int right = length - 1;
-   while (left <= right) {
-      mid = (left + right) / 2;
-      if (flags[mid] == flag) return 1;
-      if (flag < flags[mid]) right = mid - 1;
-      else left = mid + 1;
-   }
-   return 0;
-}
-
- // strip strings into token based on single char delimiter
- // acts like strsep() but only uses a delim char and not
- // a delim string
- // default delimiter: white space characters
- 
- char * mystrsep(char ** stringp, const char delim)
- {
-   char * mp = *stringp;
-   if (*mp != '\0') {
-      char * dp;
-      if (delim) {
-        dp = strchr(mp, delim);
-      } else {
-        // don't use isspace() here, the string can be in some random charset
-        // that's way different than the locale's
-        for (dp = mp; (*dp && *dp != ' ' && *dp != '\t'); dp++);
-        if (!*dp) dp = NULL;
-      }
-      if (dp) {
-         *stringp = dp+1;
-         *dp = '\0';
-      } else {
-         *stringp = mp + strlen(mp);
-      }
-      return mp;
-   }
-   return NULL;
- }
-
- // replaces strdup with ansi version
- char * mystrdup(const char * s)
- {
-   char * d = NULL;
-   if (s) {
-      size_t sl = strlen(s)+1;
-      d = (char *) malloc(sl);
-      if (d) {
-         memcpy(d,s,sl);
-      } else {
-         HUNSPELL_WARNING(stderr, "Can't allocate memory.\n");
-      }
-   }
-   return d;
- }
-
- // strcat for limited length destination string
- char * mystrcat(char * dest, const char * st, int max) {
-   int len;
-   int len2;
-   if (dest == NULL || st == NULL) return dest;
-   len = strlen(dest);
-   len2 = strlen(st);
-   if (len + len2 + 1 > max) return dest;
-   strcpy(dest + len, st);
-   return dest;
- }
-
- // remove cross-platform text line end characters
- void mychomp(char * s)
- {
-   size_t k = strlen(s);
-   if ((k > 0) && ((*(s+k-1)=='\r') || (*(s+k-1)=='\n'))) *(s+k-1) = '\0';
-   if ((k > 1) && (*(s+k-2) == '\r')) *(s+k-2) = '\0';
- }
- 
- 
- //  does an ansi strdup of the reverse of a string
- char * myrevstrdup(const char * s)
- {
-     char * d = NULL;
-     if (s) {
-        size_t sl = strlen(s);
-        d = (char *) malloc(sl+1);
-        if (d) {
-          const char * p = s + sl - 1;
-          char * q = d;
-          while (p >= s) *q++ = *p--;
-          *q = '\0';
-        } else {
-          HUNSPELL_WARNING(stderr, "Can't allocate memory.\n");
-        }
-     }
-     return d;
- }
-
-// break text to lines
-// return number of lines
-int line_tok(const char * text, char *** lines, char breakchar) {
-    int linenum = 0;
-    if (!text) {
-        return linenum;
-    }
-    char * dup = mystrdup(text);
-    char * p = strchr(dup, breakchar);
-    while (p) {
-        linenum++;
-        *p = '\0';
-        p++;
-        p = strchr(p, breakchar);
-    }
-    linenum++;
-    *lines = (char **) malloc(linenum * sizeof(char *));
-    if (!(*lines)) {
-        free(dup);
-        return 0;
-    }
-
-    p = dup;
-    int l = 0;
-    for (int i = 0; i < linenum; i++) {
-        if (*p != '\0') {
-            (*lines)[l] = mystrdup(p);
-            if (!(*lines)[l]) {
-                for (i = 0; i < l; i++) free((*lines)[i]);
-                free(dup);
-                return 0;
-            }
-            l++;
-        }
-        p += strlen(p) + 1;
-    }
-    free(dup);
-    if (!l) free(*lines);
-    return l;
-}
-
-// uniq line in place
-char * line_uniq(char * text, char breakchar) {
-    char ** lines;
-    int linenum = line_tok(text, &lines, breakchar);
-    int i;
-    strcpy(text, lines[0]);
-    for ( i = 1; i < linenum; i++ ) {
-        int dup = 0;
-        for (int j = 0; j < i; j++) {
-            if (strcmp(lines[i], lines[j]) == 0) dup = 1;
-        }
-        if (!dup) {
-            if ((i > 1) || (*(lines[0]) != '\0')) {
-                sprintf(text + strlen(text), "%c", breakchar);
-            }
-            strcat(text, lines[i]);
-        }
-    }
-    for ( i = 0; i < linenum; i++ ) {
-        if (lines[i]) free(lines[i]);
-    }
-    if (lines) free(lines);
-    return text;
-}
-
-// uniq and boundary for compound analysis: "1\n\2\n\1" -> " ( \1 | \2 ) "
-char * line_uniq_app(char ** text, char breakchar) {
-    if (!strchr(*text, breakchar)) {
-        return *text;
-    }
-    
-    char ** lines;
-    int i;
-    int linenum = line_tok(*text, &lines, breakchar);
-    int dup = 0;
-    for (i = 0; i < linenum; i++) {
-        for (int j = 0; j < (i - 1); j++) {
-            if (strcmp(lines[i], lines[j]) == 0) {
-                *(lines[i]) = '\0';
-                dup++;
-                break;
-            }
-        }
-    }
-    if ((linenum - dup) == 1) {
-        strcpy(*text, lines[0]);
-        freelist(&lines, linenum);
-        return *text;
-    }
-    char * newtext = (char *) malloc(strlen(*text) + 2 * linenum + 3 + 1);
-    if (newtext) {
-        free(*text);
-        *text = newtext;
-    } else {
-        freelist(&lines, linenum);
-        return *text;
-    }    
-    strcpy(*text," ( ");
-    for (i = 0; i < linenum; i++) if (*(lines[i])) {
-        sprintf(*text + strlen(*text), "%s%s", lines[i], " | ");
-    }
-    (*text)[strlen(*text) - 2] = ')'; // " ) "
-    freelist(&lines, linenum);
-    return *text;
-}
-
- // append s to ends of every lines in text
- void strlinecat(char * dest, const char * s)
- {
-    char * dup = mystrdup(dest);
-    char * source = dup;
-    int len = strlen(s);
-    if (dup) {
-        while (*source) {
-            if (*source == '\n') {
-                strncpy(dest, s, len);
-                dest += len;
-            }
-            *dest = *source;
-            source++; dest++;
-        }
-        strcpy(dest, s);
-        free(dup);
-    }
- }
-
-// change \n to char c
-char * tr(char * text, char oldc, char newc) {
-    char * p;
-    for (p = text; *p; p++) if (*p == oldc) *p = newc;
-    return text;
-}
-
-// morphcmp(): compare MORPH_DERI_SFX, MORPH_INFL_SFX and MORPH_TERM_SFX fields
-// in the first line of the inputs
-// return 0, if inputs equal
-// return 1, if inputs may equal with a secondary suffix
-// otherwise return -1
-int morphcmp(const char * s, const char * t)
-{
-    int se = 0;
-    int te = 0;
-    const char * sl;
-    const char * tl;    
-    const char * olds;
-    const char * oldt;
-    if (!s || !t) return 1;
-    olds = s;
-    sl = strchr(s, '\n');
-    s = strstr(s, MORPH_DERI_SFX);
-    if (!s || (sl && sl < s)) s = strstr(olds, MORPH_INFL_SFX);
-    if (!s || (sl && sl < s)) {
-        s= strstr(olds, MORPH_TERM_SFX);
-        olds = NULL;
-    }
-    oldt = t;
-    tl = strchr(t, '\n');
-    t = strstr(t, MORPH_DERI_SFX);
-    if (!t || (tl && tl < t)) t = strstr(oldt, MORPH_INFL_SFX);
-    if (!t || (tl && tl < t)) {
-        t = strstr(oldt, MORPH_TERM_SFX);
-        oldt = NULL;
-    }
-    while (s && t && (!sl || sl > s) && (!tl || tl > t)) {
-        s += MORPH_TAG_LEN;
-        t += MORPH_TAG_LEN;
-        se = 0;
-        te = 0;
-        while ((*s == *t) && !se && !te) {
-            s++;
-            t++;
-            switch(*s) {
-                case ' ':
-                case '\n':
-                case '\t':
-                case '\0': se = 1;
-            }
-            switch(*t) {
-                case ' ':
-                case '\n':
-                case '\t':
-                case '\0': te = 1;
-            }
-        }
-        if (!se || !te) {
-            // not terminal suffix difference
-            if (olds) return -1;
-            return 1;
-        }
-        olds = s;
-        s = strstr(s, MORPH_DERI_SFX);
-        if (!s || (sl && sl < s)) s = strstr(olds, MORPH_INFL_SFX);
-        if (!s || (sl && sl < s)) {
-            s = strstr(olds, MORPH_TERM_SFX);
-            olds = NULL;
-        }
-        oldt = t;
-        t = strstr(t, MORPH_DERI_SFX);
-        if (!t || (tl && tl < t)) t = strstr(oldt, MORPH_INFL_SFX);
-        if (!t || (tl && tl < t)) {
-            t = strstr(oldt, MORPH_TERM_SFX);
-            oldt = NULL;
-        }
-    }
-    if (!s && !t && se && te) return 0;
-    return 1;
-}
-
-int get_sfxcount(const char * morph)
-{
-    if (!morph || !*morph) return 0;
-    int n = 0;
-    const char * old = morph;
-    morph = strstr(morph, MORPH_DERI_SFX);
-    if (!morph) morph = strstr(old, MORPH_INFL_SFX);
-    if (!morph) morph = strstr(old, MORPH_TERM_SFX);
-    while (morph) {
-        n++;
-        old = morph;
-        morph = strstr(morph + 1, MORPH_DERI_SFX);
-        if (!morph) morph = strstr(old + 1, MORPH_INFL_SFX);
-        if (!morph) morph = strstr(old + 1, MORPH_TERM_SFX);
-    }
-    return n;
-}
-
-
-int fieldlen(const char * r)
-{
-    int n = 0;
-    while (r && *r != ' ' && *r != '\t' && *r != '\0' && *r != '\n') {
-        r++;
-        n++;
-    }
-    return n;
-}
-
-char * copy_field(char * dest, const char * morph, const char * var)
-{
-    if (!morph) return NULL;
-    const char * beg = strstr(morph, var);
-    if (beg) {
-       char * d = dest;
-       for (beg += MORPH_TAG_LEN; *beg != ' ' && *beg != '\t' &&
-            *beg != '\n' && *beg != '\0'; d++, beg++) {
-         *d = *beg;
-       }
-       *d = '\0';
-       return dest;
-  }
-  return NULL;
-}
-
-char * mystrrep(char * word, const char * pat, const char * rep) {
-    char * pos = strstr(word, pat);
-    if (pos) {
-      int replen = strlen(rep);
-      int patlen = strlen(pat);
-      while (pos) {
-        if (replen < patlen) {
-            char * end = word + strlen(word);
-            char * next = pos + replen;
-            char * prev = pos + strlen(pat);
-            for (; prev < end; *next = *prev, prev++, next++);
-            *next = '\0';
-        } else if (replen > patlen) {
-            char * end = pos + patlen;
-            char * next = word + strlen(word) + replen - patlen;
-            char * prev = next - replen + patlen;
-            for (; prev >= end; *next = *prev, prev--, next--);
-        }
-        strncpy(pos, rep, replen);
-        pos = strstr(word, pat);
-      }
-    }
-    return word;
-}
-
- // reverse word 
- int reverseword(char * word) {
-   char r;
-   for (char * dest = word + strlen(word) - 1; word < dest; word++, dest--) {
-     r=*word;
-     *word = *dest;
-     *dest = r;
-   }
-   return 0;
- }
-
- // reverse word (error: 1)
- int reverseword_utf(char * word) {
-   w_char w[MAXWORDLEN];
-   w_char * p;
-   w_char r;
-   int l = u8_u16(w, MAXWORDLEN, word);
-   if (l == -1) return 1;
-   p = w;
-   for (w_char * dest = w + l - 1; p < dest; p++, dest--) {
-     r=*p;
-     *p = *dest;
-     *dest = r;
-   }
-   u16_u8(word, MAXWORDUTF8LEN, w, l);
-   return 0;
- }
-
- int uniqlist(char ** list, int n) {
-   int i;
-   if (n < 2) return n;
-   for (i = 0; i < n; i++) {
-     for (int j = 0; j < i; j++) {
-        if (list[j] && list[i] && (strcmp(list[j], list[i]) == 0)) {
-            free(list[i]);
-            list[i] = NULL;
-            break;
-        }
-     }
-   } 
-   int m = 1;  
-   for (i = 1; i < n; i++) if (list[i]) {
-        list[m] = list[i];
-        m++;
-    }
-   return m;
- }
- 
- void freelist(char *** list, int n) {
-   if (list && *list && n > 0) {
-     for (int i = 0; i < n; i++) if ((*list)[i]) free((*list)[i]);
-     free(*list);
-     *list = NULL;
-   }
- }
- 
- // convert null terminated string to all caps
- void mkallcap(char * p, const struct cs_info * csconv)
- {
-   while (*p != '\0') {
-     *p = csconv[((unsigned char) *p)].cupper;
-     p++;
-   }
- }
-  
- // convert null terminated string to all little
- void mkallsmall(char * p, const struct cs_info * csconv)
- {
-   while (*p != '\0') {
-     *p = csconv[((unsigned char) *p)].clower;
-     p++;
-   }
- }
-
-void mkallsmall_utf(w_char * u, int nc, int langnum) {
-    for (int i = 0; i < nc; i++) {
-        unsigned short idx = (u[i].h << 8) + u[i].l;
-        if (idx != unicodetolower(idx, langnum)) {
-            u[i].h = (unsigned char) (unicodetolower(idx, langnum) >> 8);
-            u[i].l = (unsigned char) (unicodetolower(idx, langnum) & 0x00FF);
-        }
-    }
-}
-
-void mkallcap_utf(w_char * u, int nc, int langnum) {
-    for (int i = 0; i < nc; i++) {
-        unsigned short idx = (u[i].h << 8) + u[i].l;
-        if (idx != unicodetoupper(idx, langnum)) {
-            u[i].h = (unsigned char) (unicodetoupper(idx, langnum) >> 8);
-            u[i].l = (unsigned char) (unicodetoupper(idx, langnum) & 0x00FF);
-        }
-    }
-}
- 
- // convert null terminated string to have initial capital
- void mkinitcap(char * p, const struct cs_info * csconv)
- {
-   if (*p != '\0') *p = csconv[((unsigned char)*p)].cupper;
- }
-
- // conversion function for protected memory
- void store_pointer(char * dest, char * source)
- {
-    memcpy(dest, &source, sizeof(char *));
- }
-
- // conversion function for protected memory
- char * get_stored_pointer(const char * s)
- {
-    char * p;
-    memcpy(&p, s, sizeof(char *));
-    return p;
- }
-
-#ifndef MOZILLA_CLIENT
- // convert null terminated string to all caps using encoding
- void enmkallcap(char * d, const char * p, const char * encoding)
- 
- {
-   struct cs_info * csconv = get_current_cs(encoding);
-   while (*p != '\0') {
-     *d++ = csconv[((unsigned char) *p)].cupper;
-     p++;
-   }
-   *d = '\0';
- }
-
- // convert null terminated string to all little using encoding
- void enmkallsmall(char * d, const char * p, const char * encoding)
- {
-   struct cs_info * csconv = get_current_cs(encoding);
-   while (*p != '\0') {
-     *d++ = csconv[((unsigned char) *p)].clower;
-     p++;
-   }
-   *d = '\0';
- }
-
- // convert null terminated string to have initial capital using encoding
- void enmkinitcap(char * d, const char * p, const char * encoding)
- {
-   struct cs_info * csconv = get_current_cs(encoding);
-   memcpy(d,p,(strlen(p)+1));
-   if (*p != '\0') *d= csconv[((unsigned char)*p)].cupper;
- }
-
-// these are simple character mappings for the 
-// encodings supported
-// supplying isupper, tolower, and toupper
-
-static struct cs_info iso1_tbl[] = {
-{ 0x00, 0x00, 0x00 },
-{ 0x00, 0x01, 0x01 },
-{ 0x00, 0x02, 0x02 },
-{ 0x00, 0x03, 0x03 },
-{ 0x00, 0x04, 0x04 },
-{ 0x00, 0x05, 0x05 },
-{ 0x00, 0x06, 0x06 },
-{ 0x00, 0x07, 0x07 },
-{ 0x00, 0x08, 0x08 },
-{ 0x00, 0x09, 0x09 },
-{ 0x00, 0x0a, 0x0a },
-{ 0x00, 0x0b, 0x0b },
-{ 0x00, 0x0c, 0x0c },
-{ 0x00, 0x0d, 0x0d },
-{ 0x00, 0x0e, 0x0e },
-{ 0x00, 0x0f, 0x0f },
-{ 0x00, 0x10, 0x10 },
-{ 0x00, 0x11, 0x11 },
-{ 0x00, 0x12, 0x12 },
-{ 0x00, 0x13, 0x13 },
-{ 0x00, 0x14, 0x14 },
-{ 0x00, 0x15, 0x15 },
-{ 0x00, 0x16, 0x16 },
-{ 0x00, 0x17, 0x17 },
-{ 0x00, 0x18, 0x18 },
-{ 0x00, 0x19, 0x19 },
-{ 0x00, 0x1a, 0x1a },
-{ 0x00, 0x1b, 0x1b },
-{ 0x00, 0x1c, 0x1c },
-{ 0x00, 0x1d, 0x1d },
-{ 0x00, 0x1e, 0x1e },
-{ 0x00, 0x1f, 0x1f },
-{ 0x00, 0x20, 0x20 },
-{ 0x00, 0x21, 0x21 },
-{ 0x00, 0x22, 0x22 },
-{ 0x00, 0x23, 0x23 },
-{ 0x00, 0x24, 0x24 },
-{ 0x00, 0x25, 0x25 },
-{ 0x00, 0x26, 0x26 },
-{ 0x00, 0x27, 0x27 },
-{ 0x00, 0x28, 0x28 },
-{ 0x00, 0x29, 0x29 },
-{ 0x00, 0x2a, 0x2a },
-{ 0x00, 0x2b, 0x2b },
-{ 0x00, 0x2c, 0x2c },
-{ 0x00, 0x2d, 0x2d },
-{ 0x00, 0x2e, 0x2e },
-{ 0x00, 0x2f, 0x2f },
-{ 0x00, 0x30, 0x30 },
-{ 0x00, 0x31, 0x31 },
-{ 0x00, 0x32, 0x32 },
-{ 0x00, 0x33, 0x33 },
-{ 0x00, 0x34, 0x34 },
-{ 0x00, 0x35, 0x35 },
-{ 0x00, 0x36, 0x36 },
-{ 0x00, 0x37, 0x37 },
-{ 0x00, 0x38, 0x38 },
-{ 0x00, 0x39, 0x39 },
-{ 0x00, 0x3a, 0x3a },
-{ 0x00, 0x3b, 0x3b },
-{ 0x00, 0x3c, 0x3c },
-{ 0x00, 0x3d, 0x3d },
-{ 0x00, 0x3e, 0x3e },
-{ 0x00, 0x3f, 0x3f },
-{ 0x00, 0x40, 0x40 },
-{ 0x01, 0x61, 0x41 },
-{ 0x01, 0x62, 0x42 },
-{ 0x01, 0x63, 0x43 },
-{ 0x01, 0x64, 0x44 },
-{ 0x01, 0x65, 0x45 },
-{ 0x01, 0x66, 0x46 },
-{ 0x01, 0x67, 0x47 },
-{ 0x01, 0x68, 0x48 },
-{ 0x01, 0x69, 0x49 },
-{ 0x01, 0x6a, 0x4a },
-{ 0x01, 0x6b, 0x4b },
-{ 0x01, 0x6c, 0x4c },
-{ 0x01, 0x6d, 0x4d },
-{ 0x01, 0x6e, 0x4e },
-{ 0x01, 0x6f, 0x4f },
-{ 0x01, 0x70, 0x50 },
-{ 0x01, 0x71, 0x51 },
-{ 0x01, 0x72, 0x52 },
-{ 0x01, 0x73, 0x53 },
-{ 0x01, 0x74, 0x54 },
-{ 0x01, 0x75, 0x55 },
-{ 0x01, 0x76, 0x56 },
-{ 0x01, 0x77, 0x57 },
-{ 0x01, 0x78, 0x58 },
-{ 0x01, 0x79, 0x59 },
-{ 0x01, 0x7a, 0x5a },
-{ 0x00, 0x5b, 0x5b },
-{ 0x00, 0x5c, 0x5c },
-{ 0x00, 0x5d, 0x5d },
-{ 0x00, 0x5e, 0x5e },
-{ 0x00, 0x5f, 0x5f },
-{ 0x00, 0x60, 0x60 },
-{ 0x00, 0x61, 0x41 },
-{ 0x00, 0x62, 0x42 },
-{ 0x00, 0x63, 0x43 },
-{ 0x00, 0x64, 0x44 },
-{ 0x00, 0x65, 0x45 },
-{ 0x00, 0x66, 0x46 },
-{ 0x00, 0x67, 0x47 },
-{ 0x00, 0x68, 0x48 },
-{ 0x00, 0x69, 0x49 },
-{ 0x00, 0x6a, 0x4a },
-{ 0x00, 0x6b, 0x4b },
-{ 0x00, 0x6c, 0x4c },
-{ 0x00, 0x6d, 0x4d },
-{ 0x00, 0x6e, 0x4e },
-{ 0x00, 0x6f, 0x4f },
-{ 0x00, 0x70, 0x50 },
-{ 0x00, 0x71, 0x51 },
-{ 0x00, 0x72, 0x52 },
-{ 0x00, 0x73, 0x53 },
-{ 0x00, 0x74, 0x54 },
-{ 0x00, 0x75, 0x55 },
-{ 0x00, 0x76, 0x56 },
-{ 0x00, 0x77, 0x57 },
-{ 0x00, 0x78, 0x58 },
-{ 0x00, 0x79, 0x59 },
-{ 0x00, 0x7a, 0x5a },
-{ 0x00, 0x7b, 0x7b },
-{ 0x00, 0x7c, 0x7c },
-{ 0x00, 0x7d, 0x7d },
-{ 0x00, 0x7e, 0x7e },
-{ 0x00, 0x7f, 0x7f },
-{ 0x00, 0x80, 0x80 },
-{ 0x00, 0x81, 0x81 },
-{ 0x00, 0x82, 0x82 },
-{ 0x00, 0x83, 0x83 },
-{ 0x00, 0x84, 0x84 },
-{ 0x00, 0x85, 0x85 },
-{ 0x00, 0x86, 0x86 },
-{ 0x00, 0x87, 0x87 },
-{ 0x00, 0x88, 0x88 },
-{ 0x00, 0x89, 0x89 },
-{ 0x00, 0x8a, 0x8a },
-{ 0x00, 0x8b, 0x8b },
-{ 0x00, 0x8c, 0x8c },
-{ 0x00, 0x8d, 0x8d },
-{ 0x00, 0x8e, 0x8e },
-{ 0x00, 0x8f, 0x8f },
-{ 0x00, 0x90, 0x90 },
-{ 0x00, 0x91, 0x91 },
-{ 0x00, 0x92, 0x92 },
-{ 0x00, 0x93, 0x93 },
-{ 0x00, 0x94, 0x94 },
-{ 0x00, 0x95, 0x95 },
-{ 0x00, 0x96, 0x96 },
-{ 0x00, 0x97, 0x97 },
-{ 0x00, 0x98, 0x98 },
-{ 0x00, 0x99, 0x99 },
-{ 0x00, 0x9a, 0x9a },
-{ 0x00, 0x9b, 0x9b },
-{ 0x00, 0x9c, 0x9c },
-{ 0x00, 0x9d, 0x9d },
-{ 0x00, 0x9e, 0x9e },
-{ 0x00, 0x9f, 0x9f },
-{ 0x00, 0xa0, 0xa0 },
-{ 0x00, 0xa1, 0xa1 },
-{ 0x00, 0xa2, 0xa2 },
-{ 0x00, 0xa3, 0xa3 },
-{ 0x00, 0xa4, 0xa4 },
-{ 0x00, 0xa5, 0xa5 },
-{ 0x00, 0xa6, 0xa6 },
-{ 0x00, 0xa7, 0xa7 },
-{ 0x00, 0xa8, 0xa8 },
-{ 0x00, 0xa9, 0xa9 },
-{ 0x00, 0xaa, 0xaa },
-{ 0x00, 0xab, 0xab },
-{ 0x00, 0xac, 0xac },
-{ 0x00, 0xad, 0xad },
-{ 0x00, 0xae, 0xae },
-{ 0x00, 0xaf, 0xaf },
-{ 0x00, 0xb0, 0xb0 },
-{ 0x00, 0xb1, 0xb1 },
-{ 0x00, 0xb2, 0xb2 },
-{ 0x00, 0xb3, 0xb3 },
-{ 0x00, 0xb4, 0xb4 },
-{ 0x00, 0xb5, 0xb5 },
-{ 0x00, 0xb6, 0xb6 },
-{ 0x00, 0xb7, 0xb7 },
-{ 0x00, 0xb8, 0xb8 },
-{ 0x00, 0xb9, 0xb9 },
-{ 0x00, 0xba, 0xba },
-{ 0x00, 0xbb, 0xbb },
-{ 0x00, 0xbc, 0xbc },
-{ 0x00, 0xbd, 0xbd },
-{ 0x00, 0xbe, 0xbe },
-{ 0x00, 0xbf, 0xbf },
-{ 0x01, 0xe0, 0xc0 },
-{ 0x01, 0xe1, 0xc1 },
-{ 0x01, 0xe2, 0xc2 },
-{ 0x01, 0xe3, 0xc3 },
-{ 0x01, 0xe4, 0xc4 },
-{ 0x01, 0xe5, 0xc5 },
-{ 0x01, 0xe6, 0xc6 },
-{ 0x01, 0xe7, 0xc7 },
-{ 0x01, 0xe8, 0xc8 },
-{ 0x01, 0xe9, 0xc9 },
-{ 0x01, 0xea, 0xca },
-{ 0x01, 0xeb, 0xcb },
-{ 0x01, 0xec, 0xcc },
-{ 0x01, 0xed, 0xcd },
-{ 0x01, 0xee, 0xce },
-{ 0x01, 0xef, 0xcf },
-{ 0x01, 0xf0, 0xd0 },
-{ 0x01, 0xf1, 0xd1 },
-{ 0x01, 0xf2, 0xd2 },
-{ 0x01, 0xf3, 0xd3 },
-{ 0x01, 0xf4, 0xd4 },
-{ 0x01, 0xf5, 0xd5 },
-{ 0x01, 0xf6, 0xd6 },
-{ 0x00, 0xd7, 0xd7 },
-{ 0x01, 0xf8, 0xd8 },
-{ 0x01, 0xf9, 0xd9 },
-{ 0x01, 0xfa, 0xda },
-{ 0x01, 0xfb, 0xdb },
-{ 0x01, 0xfc, 0xdc },
-{ 0x01, 0xfd, 0xdd },
-{ 0x01, 0xfe, 0xde },
-{ 0x00, 0xdf, 0xdf },
-{ 0x00, 0xe0, 0xc0 },
-{ 0x00, 0xe1, 0xc1 },
-{ 0x00, 0xe2, 0xc2 },
-{ 0x00, 0xe3, 0xc3 },
-{ 0x00, 0xe4, 0xc4 },
-{ 0x00, 0xe5, 0xc5 },
-{ 0x00, 0xe6, 0xc6 },
-{ 0x00, 0xe7, 0xc7 },
-{ 0x00, 0xe8, 0xc8 },
-{ 0x00, 0xe9, 0xc9 },
-{ 0x00, 0xea, 0xca },
-{ 0x00, 0xeb, 0xcb },
-{ 0x00, 0xec, 0xcc },
-{ 0x00, 0xed, 0xcd },
-{ 0x00, 0xee, 0xce },
-{ 0x00, 0xef, 0xcf },
-{ 0x00, 0xf0, 0xd0 },
-{ 0x00, 0xf1, 0xd1 },
-{ 0x00, 0xf2, 0xd2 },
-{ 0x00, 0xf3, 0xd3 },
-{ 0x00, 0xf4, 0xd4 },
-{ 0x00, 0xf5, 0xd5 },
-{ 0x00, 0xf6, 0xd6 },
-{ 0x00, 0xf7, 0xf7 },
-{ 0x00, 0xf8, 0xd8 },
-{ 0x00, 0xf9, 0xd9 },
-{ 0x00, 0xfa, 0xda },
-{ 0x00, 0xfb, 0xdb },
-{ 0x00, 0xfc, 0xdc },
-{ 0x00, 0xfd, 0xdd },
-{ 0x00, 0xfe, 0xde },
-{ 0x00, 0xff, 0xff }
-};
-
-
-static struct cs_info iso2_tbl[] = {
-{ 0x00, 0x00, 0x00 },
-{ 0x00, 0x01, 0x01 },
-{ 0x00, 0x02, 0x02 },
-{ 0x00, 0x03, 0x03 },
-{ 0x00, 0x04, 0x04 },
-{ 0x00, 0x05, 0x05 },
-{ 0x00, 0x06, 0x06 },
-{ 0x00, 0x07, 0x07 },
-{ 0x00, 0x08, 0x08 },
-{ 0x00, 0x09, 0x09 },
-{ 0x00, 0x0a, 0x0a },
-{ 0x00, 0x0b, 0x0b },
-{ 0x00, 0x0c, 0x0c },
-{ 0x00, 0x0d, 0x0d },
-{ 0x00, 0x0e, 0x0e },
-{ 0x00, 0x0f, 0x0f },
-{ 0x00, 0x10, 0x10 },
-{ 0x00, 0x11, 0x11 },
-{ 0x00, 0x12, 0x12 },
-{ 0x00, 0x13, 0x13 },
-{ 0x00, 0x14, 0x14 },
-{ 0x00, 0x15, 0x15 },
-{ 0x00, 0x16, 0x16 },
-{ 0x00, 0x17, 0x17 },
-{ 0x00, 0x18, 0x18 },
-{ 0x00, 0x19, 0x19 },
-{ 0x00, 0x1a, 0x1a },
-{ 0x00, 0x1b, 0x1b },
-{ 0x00, 0x1c, 0x1c },
-{ 0x00, 0x1d, 0x1d },
-{ 0x00, 0x1e, 0x1e },
-{ 0x00, 0x1f, 0x1f },
-{ 0x00, 0x20, 0x20 },
-{ 0x00, 0x21, 0x21 },
-{ 0x00, 0x22, 0x22 },
-{ 0x00, 0x23, 0x23 },
-{ 0x00, 0x24, 0x24 },
-{ 0x00, 0x25, 0x25 },
-{ 0x00, 0x26, 0x26 },
-{ 0x00, 0x27, 0x27 },
-{ 0x00, 0x28, 0x28 },
-{ 0x00, 0x29, 0x29 },
-{ 0x00, 0x2a, 0x2a },
-{ 0x00, 0x2b, 0x2b },
-{ 0x00, 0x2c, 0x2c },
-{ 0x00, 0x2d, 0x2d },
-{ 0x00, 0x2e, 0x2e },
-{ 0x00, 0x2f, 0x2f },
-{ 0x00, 0x30, 0x30 },
-{ 0x00, 0x31, 0x31 },
-{ 0x00, 0x32, 0x32 },
-{ 0x00, 0x33, 0x33 },
-{ 0x00, 0x34, 0x34 },
-{ 0x00, 0x35, 0x35 },
-{ 0x00, 0x36, 0x36 },
-{ 0x00, 0x37, 0x37 },
-{ 0x00, 0x38, 0x38 },
-{ 0x00, 0x39, 0x39 },
-{ 0x00, 0x3a, 0x3a },
-{ 0x00, 0x3b, 0x3b },
-{ 0x00, 0x3c, 0x3c },
-{ 0x00, 0x3d, 0x3d },
-{ 0x00, 0x3e, 0x3e },
-{ 0x00, 0x3f, 0x3f },
-{ 0x00, 0x40, 0x40 },
-{ 0x01, 0x61, 0x41 },
-{ 0x01, 0x62, 0x42 },
-{ 0x01, 0x63, 0x43 },
-{ 0x01, 0x64, 0x44 },
-{ 0x01, 0x65, 0x45 },
-{ 0x01, 0x66, 0x46 },
-{ 0x01, 0x67, 0x47 },
-{ 0x01, 0x68, 0x48 },
-{ 0x01, 0x69, 0x49 },
-{ 0x01, 0x6a, 0x4a },
-{ 0x01, 0x6b, 0x4b },
-{ 0x01, 0x6c, 0x4c },
-{ 0x01, 0x6d, 0x4d },
-{ 0x01, 0x6e, 0x4e },
-{ 0x01, 0x6f, 0x4f },
-{ 0x01, 0x70, 0x50 },
-{ 0x01, 0x71, 0x51 },
-{ 0x01, 0x72, 0x52 },
-{ 0x01, 0x73, 0x53 },
-{ 0x01, 0x74, 0x54 },
-{ 0x01, 0x75, 0x55 },
-{ 0x01, 0x76, 0x56 },
-{ 0x01, 0x77, 0x57 },
-{ 0x01, 0x78, 0x58 },
-{ 0x01, 0x79, 0x59 },
-{ 0x01, 0x7a, 0x5a },
-{ 0x00, 0x5b, 0x5b },
-{ 0x00, 0x5c, 0x5c },
-{ 0x00, 0x5d, 0x5d },
-{ 0x00, 0x5e, 0x5e },
-{ 0x00, 0x5f, 0x5f },
-{ 0x00, 0x60, 0x60 },
-{ 0x00, 0x61, 0x41 },
-{ 0x00, 0x62, 0x42 },
-{ 0x00, 0x63, 0x43 },
-{ 0x00, 0x64, 0x44 },
-{ 0x00, 0x65, 0x45 },
-{ 0x00, 0x66, 0x46 },
-{ 0x00, 0x67, 0x47 },
-{ 0x00, 0x68, 0x48 },
-{ 0x00, 0x69, 0x49 },
-{ 0x00, 0x6a, 0x4a },
-{ 0x00, 0x6b, 0x4b },
-{ 0x00, 0x6c, 0x4c },
-{ 0x00, 0x6d, 0x4d },
-{ 0x00, 0x6e, 0x4e },
-{ 0x00, 0x6f, 0x4f },
-{ 0x00, 0x70, 0x50 },
-{ 0x00, 0x71, 0x51 },
-{ 0x00, 0x72, 0x52 },
-{ 0x00, 0x73, 0x53 },
-{ 0x00, 0x74, 0x54 },
-{ 0x00, 0x75, 0x55 },
-{ 0x00, 0x76, 0x56 },
-{ 0x00, 0x77, 0x57 },
-{ 0x00, 0x78, 0x58 },
-{ 0x00, 0x79, 0x59 },
-{ 0x00, 0x7a, 0x5a },
-{ 0x00, 0x7b, 0x7b },
-{ 0x00, 0x7c, 0x7c },
-{ 0x00, 0x7d, 0x7d },
-{ 0x00, 0x7e, 0x7e },
-{ 0x00, 0x7f, 0x7f },
-{ 0x00, 0x80, 0x80 },
-{ 0x00, 0x81, 0x81 },
-{ 0x00, 0x82, 0x82 },
-{ 0x00, 0x83, 0x83 },
-{ 0x00, 0x84, 0x84 },
-{ 0x00, 0x85, 0x85 },
-{ 0x00, 0x86, 0x86 },
-{ 0x00, 0x87, 0x87 },
-{ 0x00, 0x88, 0x88 },
-{ 0x00, 0x89, 0x89 },
-{ 0x00, 0x8a, 0x8a },
-{ 0x00, 0x8b, 0x8b },
-{ 0x00, 0x8c, 0x8c },
-{ 0x00, 0x8d, 0x8d },
-{ 0x00, 0x8e, 0x8e },
-{ 0x00, 0x8f, 0x8f },
-{ 0x00, 0x90, 0x90 },
-{ 0x00, 0x91, 0x91 },
-{ 0x00, 0x92, 0x92 },
-{ 0x00, 0x93, 0x93 },
-{ 0x00, 0x94, 0x94 },
-{ 0x00, 0x95, 0x95 },
-{ 0x00, 0x96, 0x96 },
-{ 0x00, 0x97, 0x97 },
-{ 0x00, 0x98, 0x98 },
-{ 0x00, 0x99, 0x99 },
-{ 0x00, 0x9a, 0x9a },
-{ 0x00, 0x9b, 0x9b },
-{ 0x00, 0x9c, 0x9c },
-{ 0x00, 0x9d, 0x9d },
-{ 0x00, 0x9e, 0x9e },
-{ 0x00, 0x9f, 0x9f },
-{ 0x00, 0xa0, 0xa0 },
-{ 0x01, 0xb1, 0xa1 },
-{ 0x00, 0xa2, 0xa2 },
-{ 0x01, 0xb3, 0xa3 },
-{ 0x00, 0xa4, 0xa4 },
-{ 0x01, 0xb5, 0xa5 },
-{ 0x01, 0xb6, 0xa6 },
-{ 0x00, 0xa7, 0xa7 },
-{ 0x00, 0xa8, 0xa8 },
-{ 0x01, 0xb9, 0xa9 },
-{ 0x01, 0xba, 0xaa },
-{ 0x01, 0xbb, 0xab },
-{ 0x01, 0xbc, 0xac },
-{ 0x00, 0xad, 0xad },
-{ 0x01, 0xbe, 0xae },
-{ 0x01, 0xbf, 0xaf },
-{ 0x00, 0xb0, 0xb0 },
-{ 0x00, 0xb1, 0xa1 },
-{ 0x00, 0xb2, 0xb2 },
-{ 0x00, 0xb3, 0xa3 },
-{ 0x00, 0xb4, 0xb4 },
-{ 0x00, 0xb5, 0xa5 },
-{ 0x00, 0xb6, 0xa6 },
-{ 0x00, 0xb7, 0xb7 },
-{ 0x00, 0xb8, 0xb8 },
-{ 0x00, 0xb9, 0xa9 },
-{ 0x00, 0xba, 0xaa },
-{ 0x00, 0xbb, 0xab },
-{ 0x00, 0xbc, 0xac },
-{ 0x00, 0xbd, 0xbd },
-{ 0x00, 0xbe, 0xae },
-{ 0x00, 0xbf, 0xaf },
-{ 0x01, 0xe0, 0xc0 },
-{ 0x01, 0xe1, 0xc1 },
-{ 0x01, 0xe2, 0xc2 },
-{ 0x01, 0xe3, 0xc3 },
-{ 0x01, 0xe4, 0xc4 },
-{ 0x01, 0xe5, 0xc5 },
-{ 0x01, 0xe6, 0xc6 },
-{ 0x01, 0xe7, 0xc7 },
-{ 0x01, 0xe8, 0xc8 },
-{ 0x01, 0xe9, 0xc9 },
-{ 0x01, 0xea, 0xca },
-{ 0x01, 0xeb, 0xcb },
-{ 0x01, 0xec, 0xcc },
-{ 0x01, 0xed, 0xcd },
-{ 0x01, 0xee, 0xce },
-{ 0x01, 0xef, 0xcf },
-{ 0x01, 0xf0, 0xd0 },
-{ 0x01, 0xf1, 0xd1 },
-{ 0x01, 0xf2, 0xd2 },
-{ 0x01, 0xf3, 0xd3 },
-{ 0x01, 0xf4, 0xd4 },
-{ 0x01, 0xf5, 0xd5 },
-{ 0x01, 0xf6, 0xd6 },
-{ 0x00, 0xd7, 0xd7 },
-{ 0x01, 0xf8, 0xd8 },
-{ 0x01, 0xf9, 0xd9 },
-{ 0x01, 0xfa, 0xda },
-{ 0x01, 0xfb, 0xdb },
-{ 0x01, 0xfc, 0xdc },
-{ 0x01, 0xfd, 0xdd },
-{ 0x01, 0xfe, 0xde },
-{ 0x00, 0xdf, 0xdf },
-{ 0x00, 0xe0, 0xc0 },
-{ 0x00, 0xe1, 0xc1 },
-{ 0x00, 0xe2, 0xc2 },
-{ 0x00, 0xe3, 0xc3 },
-{ 0x00, 0xe4, 0xc4 },
-{ 0x00, 0xe5, 0xc5 },
-{ 0x00, 0xe6, 0xc6 },
-{ 0x00, 0xe7, 0xc7 },
-{ 0x00, 0xe8, 0xc8 },
-{ 0x00, 0xe9, 0xc9 },
-{ 0x00, 0xea, 0xca },
-{ 0x00, 0xeb, 0xcb },
-{ 0x00, 0xec, 0xcc },
-{ 0x00, 0xed, 0xcd },
-{ 0x00, 0xee, 0xce },
-{ 0x00, 0xef, 0xcf },
-{ 0x00, 0xf0, 0xd0 },
-{ 0x00, 0xf1, 0xd1 },
-{ 0x00, 0xf2, 0xd2 },
-{ 0x00, 0xf3, 0xd3 },
-{ 0x00, 0xf4, 0xd4 },
-{ 0x00, 0xf5, 0xd5 },
-{ 0x00, 0xf6, 0xd6 },
-{ 0x00, 0xf7, 0xf7 },
-{ 0x00, 0xf8, 0xd8 },
-{ 0x00, 0xf9, 0xd9 },
-{ 0x00, 0xfa, 0xda },
-{ 0x00, 0xfb, 0xdb },
-{ 0x00, 0xfc, 0xdc },
-{ 0x00, 0xfd, 0xdd },
-{ 0x00, 0xfe, 0xde },
-{ 0x00, 0xff, 0xff }
-};
-
-
-static struct cs_info iso3_tbl[] = {
-{ 0x00, 0x00, 0x00 },
-{ 0x00, 0x01, 0x01 },
-{ 0x00, 0x02, 0x02 },
-{ 0x00, 0x03, 0x03 },
-{ 0x00, 0x04, 0x04 },
-{ 0x00, 0x05, 0x05 },
-{ 0x00, 0x06, 0x06 },
-{ 0x00, 0x07, 0x07 },
-{ 0x00, 0x08, 0x08 },
-{ 0x00, 0x09, 0x09 },
-{ 0x00, 0x0a, 0x0a },
-{ 0x00, 0x0b, 0x0b },
-{ 0x00, 0x0c, 0x0c },
-{ 0x00, 0x0d, 0x0d },
-{ 0x00, 0x0e, 0x0e },
-{ 0x00, 0x0f, 0x0f },
-{ 0x00, 0x10, 0x10 },
-{ 0x00, 0x11, 0x11 },
-{ 0x00, 0x12, 0x12 },
-{ 0x00, 0x13, 0x13 },
-{ 0x00, 0x14, 0x14 },
-{ 0x00, 0x15, 0x15 },
-{ 0x00, 0x16, 0x16 },
-{ 0x00, 0x17, 0x17 },
-{ 0x00, 0x18, 0x18 },
-{ 0x00, 0x19, 0x19 },
-{ 0x00, 0x1a, 0x1a },
-{ 0x00, 0x1b, 0x1b },
-{ 0x00, 0x1c, 0x1c },
-{ 0x00, 0x1d, 0x1d },
-{ 0x00, 0x1e, 0x1e },
-{ 0x00, 0x1f, 0x1f },
-{ 0x00, 0x20, 0x20 },
-{ 0x00, 0x21, 0x21 },
-{ 0x00, 0x22, 0x22 },
-{ 0x00, 0x23, 0x23 },
-{ 0x00, 0x24, 0x24 },
-{ 0x00, 0x25, 0x25 },
-{ 0x00, 0x26, 0x26 },
-{ 0x00, 0x27, 0x27 },
-{ 0x00, 0x28, 0x28 },
-{ 0x00, 0x29, 0x29 },
-{ 0x00, 0x2a, 0x2a },
-{ 0x00, 0x2b, 0x2b },
-{ 0x00, 0x2c, 0x2c },
-{ 0x00, 0x2d, 0x2d },
-{ 0x00, 0x2e, 0x2e },
-{ 0x00, 0x2f, 0x2f },
-{ 0x00, 0x30, 0x30 },
-{ 0x00, 0x31, 0x31 },
-{ 0x00, 0x32, 0x32 },
-{ 0x00, 0x33, 0x33 },
-{ 0x00, 0x34, 0x34 },
-{ 0x00, 0x35, 0x35 },
-{ 0x00, 0x36, 0x36 },
-{ 0x00, 0x37, 0x37 },
-{ 0x00, 0x38, 0x38 },
-{ 0x00, 0x39, 0x39 },
-{ 0x00, 0x3a, 0x3a },
-{ 0x00, 0x3b, 0x3b },
-{ 0x00, 0x3c, 0x3c },
-{ 0x00, 0x3d, 0x3d },
-{ 0x00, 0x3e, 0x3e },
-{ 0x00, 0x3f, 0x3f },
-{ 0x00, 0x40, 0x40 },
-{ 0x01, 0x61, 0x41 },
-{ 0x01, 0x62, 0x42 },
-{ 0x01, 0x63, 0x43 },
-{ 0x01, 0x64, 0x44 },
-{ 0x01, 0x65, 0x45 },
-{ 0x01, 0x66, 0x46 },
-{ 0x01, 0x67, 0x47 },
-{ 0x01, 0x68, 0x48 },
-{ 0x01, 0x69, 0x49 },
-{ 0x01, 0x6a, 0x4a },
-{ 0x01, 0x6b, 0x4b },
-{ 0x01, 0x6c, 0x4c },
-{ 0x01, 0x6d, 0x4d },
-{ 0x01, 0x6e, 0x4e },
-{ 0x01, 0x6f, 0x4f },
-{ 0x01, 0x70, 0x50 },
-{ 0x01, 0x71, 0x51 },
-{ 0x01, 0x72, 0x52 },
-{ 0x01, 0x73, 0x53 },
-{ 0x01, 0x74, 0x54 },
-{ 0x01, 0x75, 0x55 },
-{ 0x01, 0x76, 0x56 },
-{ 0x01, 0x77, 0x57 },
-{ 0x01, 0x78, 0x58 },
-{ 0x01, 0x79, 0x59 },
-{ 0x01, 0x7a, 0x5a },
-{ 0x00, 0x5b, 0x5b },
-{ 0x00, 0x5c, 0x5c },
-{ 0x00, 0x5d, 0x5d },
-{ 0x00, 0x5e, 0x5e },
-{ 0x00, 0x5f, 0x5f },
-{ 0x00, 0x60, 0x60 },
-{ 0x00, 0x61, 0x41 },
-{ 0x00, 0x62, 0x42 },
-{ 0x00, 0x63, 0x43 },
-{ 0x00, 0x64, 0x44 },
-{ 0x00, 0x65, 0x45 },
-{ 0x00, 0x66, 0x46 },
-{ 0x00, 0x67, 0x47 },
-{ 0x00, 0x68, 0x48 },
-{ 0x00, 0x69, 0x49 },
-{ 0x00, 0x6a, 0x4a },
-{ 0x00, 0x6b, 0x4b },
-{ 0x00, 0x6c, 0x4c },
-{ 0x00, 0x6d, 0x4d },
-{ 0x00, 0x6e, 0x4e },
-{ 0x00, 0x6f, 0x4f },
-{ 0x00, 0x70, 0x50 },
-{ 0x00, 0x71, 0x51 },
-{ 0x00, 0x72, 0x52 },
-{ 0x00, 0x73, 0x53 },
-{ 0x00, 0x74, 0x54 },
-{ 0x00, 0x75, 0x55 },
-{ 0x00, 0x76, 0x56 },
-{ 0x00, 0x77, 0x57 },
-{ 0x00, 0x78, 0x58 },
-{ 0x00, 0x79, 0x59 },
-{ 0x00, 0x7a, 0x5a },
-{ 0x00, 0x7b, 0x7b },
-{ 0x00, 0x7c, 0x7c },
-{ 0x00, 0x7d, 0x7d },
-{ 0x00, 0x7e, 0x7e },
-{ 0x00, 0x7f, 0x7f },
-{ 0x00, 0x80, 0x80 },
-{ 0x00, 0x81, 0x81 },
-{ 0x00, 0x82, 0x82 },
-{ 0x00, 0x83, 0x83 },
-{ 0x00, 0x84, 0x84 },
-{ 0x00, 0x85, 0x85 },
-{ 0x00, 0x86, 0x86 },
-{ 0x00, 0x87, 0x87 },
-{ 0x00, 0x88, 0x88 },
-{ 0x00, 0x89, 0x89 },
-{ 0x00, 0x8a, 0x8a },
-{ 0x00, 0x8b, 0x8b },
-{ 0x00, 0x8c, 0x8c },
-{ 0x00, 0x8d, 0x8d },
-{ 0x00, 0x8e, 0x8e },
-{ 0x00, 0x8f, 0x8f },
-{ 0x00, 0x90, 0x90 },
-{ 0x00, 0x91, 0x91 },
-{ 0x00, 0x92, 0x92 },
-{ 0x00, 0x93, 0x93 },
-{ 0x00, 0x94, 0x94 },
-{ 0x00, 0x95, 0x95 },
-{ 0x00, 0x96, 0x96 },
-{ 0x00, 0x97, 0x97 },
-{ 0x00, 0x98, 0x98 },
-{ 0x00, 0x99, 0x99 },
-{ 0x00, 0x9a, 0x9a },
-{ 0x00, 0x9b, 0x9b },
-{ 0x00, 0x9c, 0x9c },
-{ 0x00, 0x9d, 0x9d },
-{ 0x00, 0x9e, 0x9e },
-{ 0x00, 0x9f, 0x9f },
-{ 0x00, 0xa0, 0xa0 },
-{ 0x01, 0xb1, 0xa1 },
-{ 0x00, 0xa2, 0xa2 },
-{ 0x00, 0xa3, 0xa3 },
-{ 0x00, 0xa4, 0xa4 },
-{ 0x00, 0xa5, 0xa5 },
-{ 0x01, 0xb6, 0xa6 },
-{ 0x00, 0xa7, 0xa7 },
-{ 0x00, 0xa8, 0xa8 },
-{ 0x01, 0x69, 0xa9 },
-{ 0x01, 0xba, 0xaa },
-{ 0x01, 0xbb, 0xab },
-{ 0x01, 0xbc, 0xac },
-{ 0x00, 0xad, 0xad },
-{ 0x00, 0xae, 0xae },
-{ 0x01, 0xbf, 0xaf },
-{ 0x00, 0xb0, 0xb0 },
-{ 0x00, 0xb1, 0xa1 },
-{ 0x00, 0xb2, 0xb2 },
-{ 0x00, 0xb3, 0xb3 },
-{ 0x00, 0xb4, 0xb4 },
-{ 0x00, 0xb5, 0xb5 },
-{ 0x00, 0xb6, 0xa6 },
-{ 0x00, 0xb7, 0xb7 },
-{ 0x00, 0xb8, 0xb8 },
-{ 0x00, 0xb9, 0x49 },
-{ 0x00, 0xba, 0xaa },
-{ 0x00, 0xbb, 0xab },
-{ 0x00, 0xbc, 0xac },
-{ 0x00, 0xbd, 0xbd },
-{ 0x00, 0xbe, 0xbe },
-{ 0x00, 0xbf, 0xaf },
-{ 0x01, 0xe0, 0xc0 },
-{ 0x01, 0xe1, 0xc1 },
-{ 0x01, 0xe2, 0xc2 },
-{ 0x00, 0xc3, 0xc3 },
-{ 0x01, 0xe4, 0xc4 },
-{ 0x01, 0xe5, 0xc5 },
-{ 0x01, 0xe6, 0xc6 },
-{ 0x01, 0xe7, 0xc7 },
-{ 0x01, 0xe8, 0xc8 },
-{ 0x01, 0xe9, 0xc9 },
-{ 0x01, 0xea, 0xca },
-{ 0x01, 0xeb, 0xcb },
-{ 0x01, 0xec, 0xcc },
-{ 0x01, 0xed, 0xcd },
-{ 0x01, 0xee, 0xce },
-{ 0x01, 0xef, 0xcf },
-{ 0x00, 0xd0, 0xd0 },
-{ 0x01, 0xf1, 0xd1 },
-{ 0x01, 0xf2, 0xd2 },
-{ 0x01, 0xf3, 0xd3 },
-{ 0x01, 0xf4, 0xd4 },
-{ 0x01, 0xf5, 0xd5 },
-{ 0x01, 0xf6, 0xd6 },
-{ 0x00, 0xd7, 0xd7 },
-{ 0x01, 0xf8, 0xd8 },
-{ 0x01, 0xf9, 0xd9 },
-{ 0x01, 0xfa, 0xda },
-{ 0x01, 0xfb, 0xdb },
-{ 0x01, 0xfc, 0xdc },
-{ 0x01, 0xfd, 0xdd },
-{ 0x01, 0xfe, 0xde },
-{ 0x00, 0xdf, 0xdf },
-{ 0x00, 0xe0, 0xc0 },
-{ 0x00, 0xe1, 0xc1 },
-{ 0x00, 0xe2, 0xc2 },
-{ 0x00, 0xe3, 0xe3 },
-{ 0x00, 0xe4, 0xc4 },
-{ 0x00, 0xe5, 0xc5 },
-{ 0x00, 0xe6, 0xc6 },
-{ 0x00, 0xe7, 0xc7 },
-{ 0x00, 0xe8, 0xc8 },
-{ 0x00, 0xe9, 0xc9 },
-{ 0x00, 0xea, 0xca },
-{ 0x00, 0xeb, 0xcb },
-{ 0x00, 0xec, 0xcc },
-{ 0x00, 0xed, 0xcd },
-{ 0x00, 0xee, 0xce },
-{ 0x00, 0xef, 0xcf },
-{ 0x00, 0xf0, 0xf0 },
-{ 0x00, 0xf1, 0xd1 },
-{ 0x00, 0xf2, 0xd2 },
-{ 0x00, 0xf3, 0xd3 },
-{ 0x00, 0xf4, 0xd4 },
-{ 0x00, 0xf5, 0xd5 },
-{ 0x00, 0xf6, 0xd6 },
-{ 0x00, 0xf7, 0xf7 },
-{ 0x00, 0xf8, 0xd8 },
-{ 0x00, 0xf9, 0xd9 },
-{ 0x00, 0xfa, 0xda },
-{ 0x00, 0xfb, 0xdb },
-{ 0x00, 0xfc, 0xdc },
-{ 0x00, 0xfd, 0xdd },
-{ 0x00, 0xfe, 0xde },
-{ 0x00, 0xff, 0xff }
-};
-
-static struct cs_info iso4_tbl[] = {
-{ 0x00, 0x00, 0x00 },
-{ 0x00, 0x01, 0x01 },
-{ 0x00, 0x02, 0x02 },
-{ 0x00, 0x03, 0x03 },
-{ 0x00, 0x04, 0x04 },
-{ 0x00, 0x05, 0x05 },
-{ 0x00, 0x06, 0x06 },
-{ 0x00, 0x07, 0x07 },
-{ 0x00, 0x08, 0x08 },
-{ 0x00, 0x09, 0x09 },
-{ 0x00, 0x0a, 0x0a },
-{ 0x00, 0x0b, 0x0b },
-{ 0x00, 0x0c, 0x0c },
-{ 0x00, 0x0d, 0x0d },
-{ 0x00, 0x0e, 0x0e },
-{ 0x00, 0x0f, 0x0f },
-{ 0x00, 0x10, 0x10 },
-{ 0x00, 0x11, 0x11 },
-{ 0x00, 0x12, 0x12 },
-{ 0x00, 0x13, 0x13 },
-{ 0x00, 0x14, 0x14 },
-{ 0x00, 0x15, 0x15 },
-{ 0x00, 0x16, 0x16 },
-{ 0x00, 0x17, 0x17 },
-{ 0x00, 0x18, 0x18 },
-{ 0x00, 0x19, 0x19 },
-{ 0x00, 0x1a, 0x1a },
-{ 0x00, 0x1b, 0x1b },
-{ 0x00, 0x1c, 0x1c },
-{ 0x00, 0x1d, 0x1d },
-{ 0x00, 0x1e, 0x1e },
-{ 0x00, 0x1f, 0x1f },
-{ 0x00, 0x20, 0x20 },
-{ 0x00, 0x21, 0x21 },
-{ 0x00, 0x22, 0x22 },
-{ 0x00, 0x23, 0x23 },
-{ 0x00, 0x24, 0x24 },
-{ 0x00, 0x25, 0x25 },
-{ 0x00, 0x26, 0x26 },
-{ 0x00, 0x27, 0x27 },
-{ 0x00, 0x28, 0x28 },
-{ 0x00, 0x29, 0x29 },
-{ 0x00, 0x2a, 0x2a },
-{ 0x00, 0x2b, 0x2b },
-{ 0x00, 0x2c, 0x2c },
-{ 0x00, 0x2d, 0x2d },
-{ 0x00, 0x2e, 0x2e },
-{ 0x00, 0x2f, 0x2f },
-{ 0x00, 0x30, 0x30 },
-{ 0x00, 0x31, 0x31 },
-{ 0x00, 0x32, 0x32 },
-{ 0x00, 0x33, 0x33 },
-{ 0x00, 0x34, 0x34 },
-{ 0x00, 0x35, 0x35 },
-{ 0x00, 0x36, 0x36 },
-{ 0x00, 0x37, 0x37 },
-{ 0x00, 0x38, 0x38 },
-{ 0x00, 0x39, 0x39 },
-{ 0x00, 0x3a, 0x3a },
-{ 0x00, 0x3b, 0x3b },
-{ 0x00, 0x3c, 0x3c },
-{ 0x00, 0x3d, 0x3d },
-{ 0x00, 0x3e, 0x3e },
-{ 0x00, 0x3f, 0x3f },
-{ 0x00, 0x40, 0x40 },
-{ 0x01, 0x61, 0x41 },
-{ 0x01, 0x62, 0x42 },
-{ 0x01, 0x63, 0x43 },
-{ 0x01, 0x64, 0x44 },
-{ 0x01, 0x65, 0x45 },
-{ 0x01, 0x66, 0x46 },
-{ 0x01, 0x67, 0x47 },
-{ 0x01, 0x68, 0x48 },
-{ 0x01, 0x69, 0x49 },
-{ 0x01, 0x6a, 0x4a },
-{ 0x01, 0x6b, 0x4b },
-{ 0x01, 0x6c, 0x4c },
-{ 0x01, 0x6d, 0x4d },
-{ 0x01, 0x6e, 0x4e },
-{ 0x01, 0x6f, 0x4f },
-{ 0x01, 0x70, 0x50 },
-{ 0x01, 0x71, 0x51 },
-{ 0x01, 0x72, 0x52 },
-{ 0x01, 0x73, 0x53 },
-{ 0x01, 0x74, 0x54 },
-{ 0x01, 0x75, 0x55 },
-{ 0x01, 0x76, 0x56 },
-{ 0x01, 0x77, 0x57 },
-{ 0x01, 0x78, 0x58 },
-{ 0x01, 0x79, 0x59 },
-{ 0x01, 0x7a, 0x5a },
-{ 0x00, 0x5b, 0x5b },
-{ 0x00, 0x5c, 0x5c },
-{ 0x00, 0x5d, 0x5d },
-{ 0x00, 0x5e, 0x5e },
-{ 0x00, 0x5f, 0x5f },
-{ 0x00, 0x60, 0x60 },
-{ 0x00, 0x61, 0x41 },
-{ 0x00, 0x62, 0x42 },
-{ 0x00, 0x63, 0x43 },
-{ 0x00, 0x64, 0x44 },
-{ 0x00, 0x65, 0x45 },
-{ 0x00, 0x66, 0x46 },
-{ 0x00, 0x67, 0x47 },
-{ 0x00, 0x68, 0x48 },
-{ 0x00, 0x69, 0x49 },
-{ 0x00, 0x6a, 0x4a },
-{ 0x00, 0x6b, 0x4b },
-{ 0x00, 0x6c, 0x4c },
-{ 0x00, 0x6d, 0x4d },
-{ 0x00, 0x6e, 0x4e },
-{ 0x00, 0x6f, 0x4f },
-{ 0x00, 0x70, 0x50 },
-{ 0x00, 0x71, 0x51 },
-{ 0x00, 0x72, 0x52 },
-{ 0x00, 0x73, 0x53 },
-{ 0x00, 0x74, 0x54 },
-{ 0x00, 0x75, 0x55 },
-{ 0x00, 0x76, 0x56 },
-{ 0x00, 0x77, 0x57 },
-{ 0x00, 0x78, 0x58 },
-{ 0x00, 0x79, 0x59 },
-{ 0x00, 0x7a, 0x5a },
-{ 0x00, 0x7b, 0x7b },
-{ 0x00, 0x7c, 0x7c },
-{ 0x00, 0x7d, 0x7d },
-{ 0x00, 0x7e, 0x7e },
-{ 0x00, 0x7f, 0x7f },
-{ 0x00, 0x80, 0x80 },
-{ 0x00, 0x81, 0x81 },
-{ 0x00, 0x82, 0x82 },
-{ 0x00, 0x83, 0x83 },
-{ 0x00, 0x84, 0x84 },
-{ 0x00, 0x85, 0x85 },
-{ 0x00, 0x86, 0x86 },
-{ 0x00, 0x87, 0x87 },
-{ 0x00, 0x88, 0x88 },
-{ 0x00, 0x89, 0x89 },
-{ 0x00, 0x8a, 0x8a },
-{ 0x00, 0x8b, 0x8b },
-{ 0x00, 0x8c, 0x8c },
-{ 0x00, 0x8d, 0x8d },
-{ 0x00, 0x8e, 0x8e },
-{ 0x00, 0x8f, 0x8f },
-{ 0x00, 0x90, 0x90 },
-{ 0x00, 0x91, 0x91 },
-{ 0x00, 0x92, 0x92 },
-{ 0x00, 0x93, 0x93 },
-{ 0x00, 0x94, 0x94 },
-{ 0x00, 0x95, 0x95 },
-{ 0x00, 0x96, 0x96 },
-{ 0x00, 0x97, 0x97 },
-{ 0x00, 0x98, 0x98 },
-{ 0x00, 0x99, 0x99 },
-{ 0x00, 0x9a, 0x9a },
-{ 0x00, 0x9b, 0x9b },
-{ 0x00, 0x9c, 0x9c },
-{ 0x00, 0x9d, 0x9d },
-{ 0x00, 0x9e, 0x9e },
-{ 0x00, 0x9f, 0x9f },
-{ 0x00, 0xa0, 0xa0 },
-{ 0x01, 0xb1, 0xa1 },
-{ 0x00, 0xa2, 0xa2 },
-{ 0x01, 0xb3, 0xa3 },
-{ 0x00, 0xa4, 0xa4 },
-{ 0x01, 0xb5, 0xa5 },
-{ 0x01, 0xb6, 0xa6 },
-{ 0x00, 0xa7, 0xa7 },
-{ 0x00, 0xa8, 0xa8 },
-{ 0x01, 0xb9, 0xa9 },
-{ 0x01, 0xba, 0xaa },
-{ 0x01, 0xbb, 0xab },
-{ 0x01, 0xbc, 0xac },
-{ 0x00, 0xad, 0xad },
-{ 0x01, 0xbe, 0xae },
-{ 0x00, 0xaf, 0xaf },
-{ 0x00, 0xb0, 0xb0 },
-{ 0x00, 0xb1, 0xa1 },
-{ 0x00, 0xb2, 0xb2 },
-{ 0x00, 0xb3, 0xa3 },
-{ 0x00, 0xb4, 0xb4 },
-{ 0x00, 0xb5, 0xa5 },
-{ 0x00, 0xb6, 0xa6 },
-{ 0x00, 0xb7, 0xb7 },
-{ 0x00, 0xb8, 0xb8 },
-{ 0x00, 0xb9, 0xa9 },
-{ 0x00, 0xba, 0xaa },
-{ 0x00, 0xbb, 0xab },
-{ 0x00, 0xbc, 0xac },
-{ 0x00, 0xbd, 0xbd },
-{ 0x00, 0xbe, 0xae },
-{ 0x00, 0xbf, 0xbf },
-{ 0x01, 0xe0, 0xc0 },
-{ 0x01, 0xe1, 0xc1 },
-{ 0x01, 0xe2, 0xc2 },
-{ 0x01, 0xe3, 0xc3 },
-{ 0x01, 0xe4, 0xc4 },
-{ 0x01, 0xe5, 0xc5 },
-{ 0x01, 0xe6, 0xc6 },
-{ 0x01, 0xe7, 0xc7 },
-{ 0x01, 0xe8, 0xc8 },
-{ 0x01, 0xe9, 0xc9 },
-{ 0x01, 0xea, 0xca },
-{ 0x01, 0xeb, 0xcb },
-{ 0x01, 0xec, 0xcc },
-{ 0x01, 0xed, 0xcd },
-{ 0x01, 0xee, 0xce },
-{ 0x01, 0xef, 0xcf },
-{ 0x01, 0xf0, 0xd0 },
-{ 0x01, 0xf1, 0xd1 },
-{ 0x01, 0xf2, 0xd2 },
-{ 0x01, 0xf3, 0xd3 },
-{ 0x01, 0xf4, 0xd4 },
-{ 0x01, 0xf5, 0xd5 },
-{ 0x01, 0xf6, 0xd6 },
-{ 0x00, 0xd7, 0xd7 },
-{ 0x01, 0xf8, 0xd8 },
-{ 0x01, 0xf9, 0xd9 },
-{ 0x01, 0xfa, 0xda },
-{ 0x01, 0xfb, 0xdb },
-{ 0x01, 0xfc, 0xdc },
-{ 0x01, 0xfd, 0xdd },
-{ 0x01, 0xfe, 0xde },
-{ 0x00, 0xdf, 0xdf },
-{ 0x00, 0xe0, 0xc0 },
-{ 0x00, 0xe1, 0xc1 },
-{ 0x00, 0xe2, 0xc2 },
-{ 0x00, 0xe3, 0xc3 },
-{ 0x00, 0xe4, 0xc4 },
-{ 0x00, 0xe5, 0xc5 },
-{ 0x00, 0xe6, 0xc6 },
-{ 0x00, 0xe7, 0xc7 },
-{ 0x00, 0xe8, 0xc8 },
-{ 0x00, 0xe9, 0xc9 },
-{ 0x00, 0xea, 0xca },
-{ 0x00, 0xeb, 0xcb },
-{ 0x00, 0xec, 0xcc },
-{ 0x00, 0xed, 0xcd },
-{ 0x00, 0xee, 0xce },
-{ 0x00, 0xef, 0xcf },
-{ 0x00, 0xf0, 0xd0 },
-{ 0x00, 0xf1, 0xd1 },
-{ 0x00, 0xf2, 0xd2 },
-{ 0x00, 0xf3, 0xd3 },
-{ 0x00, 0xf4, 0xd4 },
-{ 0x00, 0xf5, 0xd5 },
-{ 0x00, 0xf6, 0xd6 },
-{ 0x00, 0xf7, 0xf7 },
-{ 0x00, 0xf8, 0xd8 },
-{ 0x00, 0xf9, 0xd9 },
-{ 0x00, 0xfa, 0xda },
-{ 0x00, 0xfb, 0xdb },
-{ 0x00, 0xfc, 0xdc },
-{ 0x00, 0xfd, 0xdd },
-{ 0x00, 0xfe, 0xde },
-{ 0x00, 0xff, 0xff }
-};
-
-static struct cs_info iso5_tbl[] = {
-{ 0x00, 0x00, 0x00 },
-{ 0x00, 0x01, 0x01 },
-{ 0x00, 0x02, 0x02 },
-{ 0x00, 0x03, 0x03 },
-{ 0x00, 0x04, 0x04 },
-{ 0x00, 0x05, 0x05 },
-{ 0x00, 0x06, 0x06 },
-{ 0x00, 0x07, 0x07 },
-{ 0x00, 0x08, 0x08 },
-{ 0x00, 0x09, 0x09 },
-{ 0x00, 0x0a, 0x0a },
-{ 0x00, 0x0b, 0x0b },
-{ 0x00, 0x0c, 0x0c },
-{ 0x00, 0x0d, 0x0d },
-{ 0x00, 0x0e, 0x0e },
-{ 0x00, 0x0f, 0x0f },
-{ 0x00, 0x10, 0x10 },
-{ 0x00, 0x11, 0x11 },
-{ 0x00, 0x12, 0x12 },
-{ 0x00, 0x13, 0x13 },
-{ 0x00, 0x14, 0x14 },
-{ 0x00, 0x15, 0x15 },
-{ 0x00, 0x16, 0x16 },
-{ 0x00, 0x17, 0x17 },
-{ 0x00, 0x18, 0x18 },
-{ 0x00, 0x19, 0x19 },
-{ 0x00, 0x1a, 0x1a },
-{ 0x00, 0x1b, 0x1b },
-{ 0x00, 0x1c, 0x1c },
-{ 0x00, 0x1d, 0x1d },
-{ 0x00, 0x1e, 0x1e },
-{ 0x00, 0x1f, 0x1f },
-{ 0x00, 0x20, 0x20 },
-{ 0x00, 0x21, 0x21 },
-{ 0x00, 0x22, 0x22 },
-{ 0x00, 0x23, 0x23 },
-{ 0x00, 0x24, 0x24 },
-{ 0x00, 0x25, 0x25 },
-{ 0x00, 0x26, 0x26 },
-{ 0x00, 0x27, 0x27 },
-{ 0x00, 0x28, 0x28 },
-{ 0x00, 0x29, 0x29 },
-{ 0x00, 0x2a, 0x2a },
-{ 0x00, 0x2b, 0x2b },
-{ 0x00, 0x2c, 0x2c },
-{ 0x00, 0x2d, 0x2d },
-{ 0x00, 0x2e, 0x2e },
-{ 0x00, 0x2f, 0x2f },
-{ 0x00, 0x30, 0x30 },
-{ 0x00, 0x31, 0x31 },
-{ 0x00, 0x32, 0x32 },
-{ 0x00, 0x33, 0x33 },
-{ 0x00, 0x34, 0x34 },
-{ 0x00, 0x35, 0x35 },
-{ 0x00, 0x36, 0x36 },
-{ 0x00, 0x37, 0x37 },
-{ 0x00, 0x38, 0x38 },
-{ 0x00, 0x39, 0x39 },
-{ 0x00, 0x3a, 0x3a },
-{ 0x00, 0x3b, 0x3b },
-{ 0x00, 0x3c, 0x3c },
-{ 0x00, 0x3d, 0x3d },
-{ 0x00, 0x3e, 0x3e },
-{ 0x00, 0x3f, 0x3f },
-{ 0x00, 0x40, 0x40 },
-{ 0x01, 0x61, 0x41 },
-{ 0x01, 0x62, 0x42 },
-{ 0x01, 0x63, 0x43 },
-{ 0x01, 0x64, 0x44 },
-{ 0x01, 0x65, 0x45 },
-{ 0x01, 0x66, 0x46 },
-{ 0x01, 0x67, 0x47 },
-{ 0x01, 0x68, 0x48 },
-{ 0x01, 0x69, 0x49 },
-{ 0x01, 0x6a, 0x4a },
-{ 0x01, 0x6b, 0x4b },
-{ 0x01, 0x6c, 0x4c },
-{ 0x01, 0x6d, 0x4d },
-{ 0x01, 0x6e, 0x4e },
-{ 0x01, 0x6f, 0x4f },
-{ 0x01, 0x70, 0x50 },
-{ 0x01, 0x71, 0x51 },
-{ 0x01, 0x72, 0x52 },
-{ 0x01, 0x73, 0x53 },
-{ 0x01, 0x74, 0x54 },
-{ 0x01, 0x75, 0x55 },
-{ 0x01, 0x76, 0x56 },
-{ 0x01, 0x77, 0x57 },
-{ 0x01, 0x78, 0x58 },
-{ 0x01, 0x79, 0x59 },
-{ 0x01, 0x7a, 0x5a },
-{ 0x00, 0x5b, 0x5b },
-{ 0x00, 0x5c, 0x5c },
-{ 0x00, 0x5d, 0x5d },
-{ 0x00, 0x5e, 0x5e },
-{ 0x00, 0x5f, 0x5f },
-{ 0x00, 0x60, 0x60 },
-{ 0x00, 0x61, 0x41 },
-{ 0x00, 0x62, 0x42 },
-{ 0x00, 0x63, 0x43 },
-{ 0x00, 0x64, 0x44 },
-{ 0x00, 0x65, 0x45 },
-{ 0x00, 0x66, 0x46 },
-{ 0x00, 0x67, 0x47 },
-{ 0x00, 0x68, 0x48 },
-{ 0x00, 0x69, 0x49 },
-{ 0x00, 0x6a, 0x4a },
-{ 0x00, 0x6b, 0x4b },
-{ 0x00, 0x6c, 0x4c },
-{ 0x00, 0x6d, 0x4d },
-{ 0x00, 0x6e, 0x4e },
-{ 0x00, 0x6f, 0x4f },
-{ 0x00, 0x70, 0x50 },
-{ 0x00, 0x71, 0x51 },
-{ 0x00, 0x72, 0x52 },
-{ 0x00, 0x73, 0x53 },
-{ 0x00, 0x74, 0x54 },
-{ 0x00, 0x75, 0x55 },
-{ 0x00, 0x76, 0x56 },
-{ 0x00, 0x77, 0x57 },
-{ 0x00, 0x78, 0x58 },
-{ 0x00, 0x79, 0x59 },
-{ 0x00, 0x7a, 0x5a },
-{ 0x00, 0x7b, 0x7b },
-{ 0x00, 0x7c, 0x7c },
-{ 0x00, 0x7d, 0x7d },
-{ 0x00, 0x7e, 0x7e },
-{ 0x00, 0x7f, 0x7f },
-{ 0x00, 0x80, 0x80 },
-{ 0x00, 0x81, 0x81 },
-{ 0x00, 0x82, 0x82 },
-{ 0x00, 0x83, 0x83 },
-{ 0x00, 0x84, 0x84 },
-{ 0x00, 0x85, 0x85 },
-{ 0x00, 0x86, 0x86 },
-{ 0x00, 0x87, 0x87 },
-{ 0x00, 0x88, 0x88 },
-{ 0x00, 0x89, 0x89 },
-{ 0x00, 0x8a, 0x8a },
-{ 0x00, 0x8b, 0x8b },
-{ 0x00, 0x8c, 0x8c },
-{ 0x00, 0x8d, 0x8d },
-{ 0x00, 0x8e, 0x8e },
-{ 0x00, 0x8f, 0x8f },
-{ 0x00, 0x90, 0x90 },
-{ 0x00, 0x91, 0x91 },
-{ 0x00, 0x92, 0x92 },
-{ 0x00, 0x93, 0x93 },
-{ 0x00, 0x94, 0x94 },
-{ 0x00, 0x95, 0x95 },
-{ 0x00, 0x96, 0x96 },
-{ 0x00, 0x97, 0x97 },
-{ 0x00, 0x98, 0x98 },
-{ 0x00, 0x99, 0x99 },
-{ 0x00, 0x9a, 0x9a },
-{ 0x00, 0x9b, 0x9b },
-{ 0x00, 0x9c, 0x9c },
-{ 0x00, 0x9d, 0x9d },
-{ 0x00, 0x9e, 0x9e },
-{ 0x00, 0x9f, 0x9f },
-{ 0x00, 0xa0, 0xa0 },
-{ 0x01, 0xf1, 0xa1 },
-{ 0x01, 0xf2, 0xa2 },
-{ 0x01, 0xf3, 0xa3 },
-{ 0x01, 0xf4, 0xa4 },
-{ 0x01, 0xf5, 0xa5 },
-{ 0x01, 0xf6, 0xa6 },
-{ 0x01, 0xf7, 0xa7 },
-{ 0x01, 0xf8, 0xa8 },
-{ 0x01, 0xf9, 0xa9 },
-{ 0x01, 0xfa, 0xaa },
-{ 0x01, 0xfb, 0xab },
-{ 0x01, 0xfc, 0xac },
-{ 0x00, 0xad, 0xad },
-{ 0x01, 0xfe, 0xae },
-{ 0x01, 0xff, 0xaf },
-{ 0x01, 0xd0, 0xb0 },
-{ 0x01, 0xd1, 0xb1 },
-{ 0x01, 0xd2, 0xb2 },
-{ 0x01, 0xd3, 0xb3 },
-{ 0x01, 0xd4, 0xb4 },
-{ 0x01, 0xd5, 0xb5 },
-{ 0x01, 0xd6, 0xb6 },
-{ 0x01, 0xd7, 0xb7 },
-{ 0x01, 0xd8, 0xb8 },
-{ 0x01, 0xd9, 0xb9 },
-{ 0x01, 0xda, 0xba },
-{ 0x01, 0xdb, 0xbb },
-{ 0x01, 0xdc, 0xbc },
-{ 0x01, 0xdd, 0xbd },
-{ 0x01, 0xde, 0xbe },
-{ 0x01, 0xdf, 0xbf },
-{ 0x01, 0xe0, 0xc0 },
-{ 0x01, 0xe1, 0xc1 },
-{ 0x01, 0xe2, 0xc2 },
-{ 0x01, 0xe3, 0xc3 },
-{ 0x01, 0xe4, 0xc4 },
-{ 0x01, 0xe5, 0xc5 },
-{ 0x01, 0xe6, 0xc6 },
-{ 0x01, 0xe7, 0xc7 },
-{ 0x01, 0xe8, 0xc8 },
-{ 0x01, 0xe9, 0xc9 },
-{ 0x01, 0xea, 0xca },
-{ 0x01, 0xeb, 0xcb },
-{ 0x01, 0xec, 0xcc },
-{ 0x01, 0xed, 0xcd },
-{ 0x01, 0xee, 0xce },
-{ 0x01, 0xef, 0xcf },
-{ 0x00, 0xd0, 0xb0 },
-{ 0x00, 0xd1, 0xb1 },
-{ 0x00, 0xd2, 0xb2 },
-{ 0x00, 0xd3, 0xb3 },
-{ 0x00, 0xd4, 0xb4 },
-{ 0x00, 0xd5, 0xb5 },
-{ 0x00, 0xd6, 0xb6 },
-{ 0x00, 0xd7, 0xb7 },
-{ 0x00, 0xd8, 0xb8 },
-{ 0x00, 0xd9, 0xb9 },
-{ 0x00, 0xda, 0xba },
-{ 0x00, 0xdb, 0xbb },
-{ 0x00, 0xdc, 0xbc },
-{ 0x00, 0xdd, 0xbd },
-{ 0x00, 0xde, 0xbe },
-{ 0x00, 0xdf, 0xbf },
-{ 0x00, 0xe0, 0xc0 },
-{ 0x00, 0xe1, 0xc1 },
-{ 0x00, 0xe2, 0xc2 },
-{ 0x00, 0xe3, 0xc3 },
-{ 0x00, 0xe4, 0xc4 },
-{ 0x00, 0xe5, 0xc5 },
-{ 0x00, 0xe6, 0xc6 },
-{ 0x00, 0xe7, 0xc7 },
-{ 0x00, 0xe8, 0xc8 },
-{ 0x00, 0xe9, 0xc9 },
-{ 0x00, 0xea, 0xca },
-{ 0x00, 0xeb, 0xcb },
-{ 0x00, 0xec, 0xcc },
-{ 0x00, 0xed, 0xcd },
-{ 0x00, 0xee, 0xce },
-{ 0x00, 0xef, 0xcf },
-{ 0x00, 0xf0, 0xf0 },
-{ 0x00, 0xf1, 0xa1 },
-{ 0x00, 0xf2, 0xa2 },
-{ 0x00, 0xf3, 0xa3 },
-{ 0x00, 0xf4, 0xa4 },
-{ 0x00, 0xf5, 0xa5 },
-{ 0x00, 0xf6, 0xa6 },
-{ 0x00, 0xf7, 0xa7 },
-{ 0x00, 0xf8, 0xa8 },
-{ 0x00, 0xf9, 0xa9 },
-{ 0x00, 0xfa, 0xaa },
-{ 0x00, 0xfb, 0xab },
-{ 0x00, 0xfc, 0xac },
-{ 0x00, 0xfd, 0xfd },
-{ 0x00, 0xfe, 0xae },
-{ 0x00, 0xff, 0xaf }
-};
-
-static struct cs_info iso6_tbl[] = {
-{ 0x00, 0x00, 0x00 },
-{ 0x00, 0x01, 0x01 },
-{ 0x00, 0x02, 0x02 },
-{ 0x00, 0x03, 0x03 },
-{ 0x00, 0x04, 0x04 },
-{ 0x00, 0x05, 0x05 },
-{ 0x00, 0x06, 0x06 },
-{ 0x00, 0x07, 0x07 },
-{ 0x00, 0x08, 0x08 },
-{ 0x00, 0x09, 0x09 },
-{ 0x00, 0x0a, 0x0a },
-{ 0x00, 0x0b, 0x0b },
-{ 0x00, 0x0c, 0x0c },
-{ 0x00, 0x0d, 0x0d },
-{ 0x00, 0x0e, 0x0e },
-{ 0x00, 0x0f, 0x0f },
-{ 0x00, 0x10, 0x10 },
-{ 0x00, 0x11, 0x11 },
-{ 0x00, 0x12, 0x12 },
-{ 0x00, 0x13, 0x13 },
-{ 0x00, 0x14, 0x14 },
-{ 0x00, 0x15, 0x15 },
-{ 0x00, 0x16, 0x16 },
-{ 0x00, 0x17, 0x17 },
-{ 0x00, 0x18, 0x18 },
-{ 0x00, 0x19, 0x19 },
-{ 0x00, 0x1a, 0x1a },
-{ 0x00, 0x1b, 0x1b },
-{ 0x00, 0x1c, 0x1c },
-{ 0x00, 0x1d, 0x1d },
-{ 0x00, 0x1e, 0x1e },
-{ 0x00, 0x1f, 0x1f },
-{ 0x00, 0x20, 0x20 },
-{ 0x00, 0x21, 0x21 },
-{ 0x00, 0x22, 0x22 },
-{ 0x00, 0x23, 0x23 },
-{ 0x00, 0x24, 0x24 },
-{ 0x00, 0x25, 0x25 },
-{ 0x00, 0x26, 0x26 },
-{ 0x00, 0x27, 0x27 },
-{ 0x00, 0x28, 0x28 },
-{ 0x00, 0x29, 0x29 },
-{ 0x00, 0x2a, 0x2a },
-{ 0x00, 0x2b, 0x2b },
-{ 0x00, 0x2c, 0x2c },
-{ 0x00, 0x2d, 0x2d },
-{ 0x00, 0x2e, 0x2e },
-{ 0x00, 0x2f, 0x2f },
-{ 0x00, 0x30, 0x30 },
-{ 0x00, 0x31, 0x31 },
-{ 0x00, 0x32, 0x32 },
-{ 0x00, 0x33, 0x33 },
-{ 0x00, 0x34, 0x34 },
-{ 0x00, 0x35, 0x35 },
-{ 0x00, 0x36, 0x36 },
-{ 0x00, 0x37, 0x37 },
-{ 0x00, 0x38, 0x38 },
-{ 0x00, 0x39, 0x39 },
-{ 0x00, 0x3a, 0x3a },
-{ 0x00, 0x3b, 0x3b },
-{ 0x00, 0x3c, 0x3c },
-{ 0x00, 0x3d, 0x3d },
-{ 0x00, 0x3e, 0x3e },
-{ 0x00, 0x3f, 0x3f },
-{ 0x00, 0x40, 0x40 },
-{ 0x01, 0x61, 0x41 },
-{ 0x01, 0x62, 0x42 },
-{ 0x01, 0x63, 0x43 },
-{ 0x01, 0x64, 0x44 },
-{ 0x01, 0x65, 0x45 },
-{ 0x01, 0x66, 0x46 },
-{ 0x01, 0x67, 0x47 },
-{ 0x01, 0x68, 0x48 },
-{ 0x01, 0x69, 0x49 },
-{ 0x01, 0x6a, 0x4a },
-{ 0x01, 0x6b, 0x4b },
-{ 0x01, 0x6c, 0x4c },
-{ 0x01, 0x6d, 0x4d },
-{ 0x01, 0x6e, 0x4e },
-{ 0x01, 0x6f, 0x4f },
-{ 0x01, 0x70, 0x50 },
-{ 0x01, 0x71, 0x51 },
-{ 0x01, 0x72, 0x52 },
-{ 0x01, 0x73, 0x53 },
-{ 0x01, 0x74, 0x54 },
-{ 0x01, 0x75, 0x55 },
-{ 0x01, 0x76, 0x56 },
-{ 0x01, 0x77, 0x57 },
-{ 0x01, 0x78, 0x58 },
-{ 0x01, 0x79, 0x59 },
-{ 0x01, 0x7a, 0x5a },
-{ 0x00, 0x5b, 0x5b },
-{ 0x00, 0x5c, 0x5c },
-{ 0x00, 0x5d, 0x5d },
-{ 0x00, 0x5e, 0x5e },
-{ 0x00, 0x5f, 0x5f },
-{ 0x00, 0x60, 0x60 },
-{ 0x00, 0x61, 0x41 },
-{ 0x00, 0x62, 0x42 },
-{ 0x00, 0x63, 0x43 },
-{ 0x00, 0x64, 0x44 },
-{ 0x00, 0x65, 0x45 },
-{ 0x00, 0x66, 0x46 },
-{ 0x00, 0x67, 0x47 },
-{ 0x00, 0x68, 0x48 },
-{ 0x00, 0x69, 0x49 },
-{ 0x00, 0x6a, 0x4a },
-{ 0x00, 0x6b, 0x4b },
-{ 0x00, 0x6c, 0x4c },
-{ 0x00, 0x6d, 0x4d },
-{ 0x00, 0x6e, 0x4e },
-{ 0x00, 0x6f, 0x4f },
-{ 0x00, 0x70, 0x50 },
-{ 0x00, 0x71, 0x51 },
-{ 0x00, 0x72, 0x52 },
-{ 0x00, 0x73, 0x53 },
-{ 0x00, 0x74, 0x54 },
-{ 0x00, 0x75, 0x55 },
-{ 0x00, 0x76, 0x56 },
-{ 0x00, 0x77, 0x57 },
-{ 0x00, 0x78, 0x58 },
-{ 0x00, 0x79, 0x59 },
-{ 0x00, 0x7a, 0x5a },
-{ 0x00, 0x7b, 0x7b },
-{ 0x00, 0x7c, 0x7c },
-{ 0x00, 0x7d, 0x7d },
-{ 0x00, 0x7e, 0x7e },
-{ 0x00, 0x7f, 0x7f },
-{ 0x00, 0x80, 0x80 },
-{ 0x00, 0x81, 0x81 },
-{ 0x00, 0x82, 0x82 },
-{ 0x00, 0x83, 0x83 },
-{ 0x00, 0x84, 0x84 },
-{ 0x00, 0x85, 0x85 },
-{ 0x00, 0x86, 0x86 },
-{ 0x00, 0x87, 0x87 },
-{ 0x00, 0x88, 0x88 },
-{ 0x00, 0x89, 0x89 },
-{ 0x00, 0x8a, 0x8a },
-{ 0x00, 0x8b, 0x8b },
-{ 0x00, 0x8c, 0x8c },
-{ 0x00, 0x8d, 0x8d },
-{ 0x00, 0x8e, 0x8e },
-{ 0x00, 0x8f, 0x8f },
-{ 0x00, 0x90, 0x90 },
-{ 0x00, 0x91, 0x91 },
-{ 0x00, 0x92, 0x92 },
-{ 0x00, 0x93, 0x93 },
-{ 0x00, 0x94, 0x94 },
-{ 0x00, 0x95, 0x95 },
-{ 0x00, 0x96, 0x96 },
-{ 0x00, 0x97, 0x97 },
-{ 0x00, 0x98, 0x98 },
-{ 0x00, 0x99, 0x99 },
-{ 0x00, 0x9a, 0x9a },
-{ 0x00, 0x9b, 0x9b },
-{ 0x00, 0x9c, 0x9c },
-{ 0x00, 0x9d, 0x9d },
-{ 0x00, 0x9e, 0x9e },
-{ 0x00, 0x9f, 0x9f },
-{ 0x00, 0xa0, 0xa0 },
-{ 0x00, 0xa1, 0xa1 },
-{ 0x00, 0xa2, 0xa2 },
-{ 0x00, 0xa3, 0xa3 },
-{ 0x00, 0xa4, 0xa4 },
-{ 0x00, 0xa5, 0xa5 },
-{ 0x00, 0xa6, 0xa6 },
-{ 0x00, 0xa7, 0xa7 },
-{ 0x00, 0xa8, 0xa8 },
-{ 0x00, 0xa9, 0xa9 },
-{ 0x00, 0xaa, 0xaa },
-{ 0x00, 0xab, 0xab },
-{ 0x00, 0xac, 0xac },
-{ 0x00, 0xad, 0xad },
-{ 0x00, 0xae, 0xae },
-{ 0x00, 0xaf, 0xaf },
-{ 0x00, 0xb0, 0xb0 },
-{ 0x00, 0xb1, 0xb1 },
-{ 0x00, 0xb2, 0xb2 },
-{ 0x00, 0xb3, 0xb3 },
-{ 0x00, 0xb4, 0xb4 },
-{ 0x00, 0xb5, 0xb5 },
-{ 0x00, 0xb6, 0xb6 },
-{ 0x00, 0xb7, 0xb7 },
-{ 0x00, 0xb8, 0xb8 },
-{ 0x00, 0xb9, 0xb9 },
-{ 0x00, 0xba, 0xba },
-{ 0x00, 0xbb, 0xbb },
-{ 0x00, 0xbc, 0xbc },
-{ 0x00, 0xbd, 0xbd },
-{ 0x00, 0xbe, 0xbe },
-{ 0x00, 0xbf, 0xbf },
-{ 0x00, 0xc0, 0xc0 },
-{ 0x00, 0xc1, 0xc1 },
-{ 0x00, 0xc2, 0xc2 },
-{ 0x00, 0xc3, 0xc3 },
-{ 0x00, 0xc4, 0xc4 },
-{ 0x00, 0xc5, 0xc5 },
-{ 0x00, 0xc6, 0xc6 },
-{ 0x00, 0xc7, 0xc7 },
-{ 0x00, 0xc8, 0xc8 },
-{ 0x00, 0xc9, 0xc9 },
-{ 0x00, 0xca, 0xca },
-{ 0x00, 0xcb, 0xcb },
-{ 0x00, 0xcc, 0xcc },
-{ 0x00, 0xcd, 0xcd },
-{ 0x00, 0xce, 0xce },
-{ 0x00, 0xcf, 0xcf },
-{ 0x00, 0xd0, 0xd0 },
-{ 0x00, 0xd1, 0xd1 },
-{ 0x00, 0xd2, 0xd2 },
-{ 0x00, 0xd3, 0xd3 },
-{ 0x00, 0xd4, 0xd4 },
-{ 0x00, 0xd5, 0xd5 },
-{ 0x00, 0xd6, 0xd6 },
-{ 0x00, 0xd7, 0xd7 },
-{ 0x00, 0xd8, 0xd8 },
-{ 0x00, 0xd9, 0xd9 },
-{ 0x00, 0xda, 0xda },
-{ 0x00, 0xdb, 0xdb },
-{ 0x00, 0xdc, 0xdc },
-{ 0x00, 0xdd, 0xdd },
-{ 0x00, 0xde, 0xde },
-{ 0x00, 0xdf, 0xdf },
-{ 0x00, 0xe0, 0xe0 },
-{ 0x00, 0xe1, 0xe1 },
-{ 0x00, 0xe2, 0xe2 },
-{ 0x00, 0xe3, 0xe3 },
-{ 0x00, 0xe4, 0xe4 },
-{ 0x00, 0xe5, 0xe5 },
-{ 0x00, 0xe6, 0xe6 },
-{ 0x00, 0xe7, 0xe7 },
-{ 0x00, 0xe8, 0xe8 },
-{ 0x00, 0xe9, 0xe9 },
-{ 0x00, 0xea, 0xea },
-{ 0x00, 0xeb, 0xeb },
-{ 0x00, 0xec, 0xec },
-{ 0x00, 0xed, 0xed },
-{ 0x00, 0xee, 0xee },
-{ 0x00, 0xef, 0xef },
-{ 0x00, 0xf0, 0xf0 },
-{ 0x00, 0xf1, 0xf1 },
-{ 0x00, 0xf2, 0xf2 },
-{ 0x00, 0xf3, 0xf3 },
-{ 0x00, 0xf4, 0xf4 },
-{ 0x00, 0xf5, 0xf5 },
-{ 0x00, 0xf6, 0xf6 },
-{ 0x00, 0xf7, 0xf7 },
-{ 0x00, 0xf8, 0xf8 },
-{ 0x00, 0xf9, 0xf9 },
-{ 0x00, 0xfa, 0xfa },
-{ 0x00, 0xfb, 0xfb },
-{ 0x00, 0xfc, 0xfc },
-{ 0x00, 0xfd, 0xfd },
-{ 0x00, 0xfe, 0xfe },
-{ 0x00, 0xff, 0xff }
-};
-
-static struct cs_info iso7_tbl[] = {
-{ 0x00, 0x00, 0x00 },
-{ 0x00, 0x01, 0x01 },
-{ 0x00, 0x02, 0x02 },
-{ 0x00, 0x03, 0x03 },
-{ 0x00, 0x04, 0x04 },
-{ 0x00, 0x05, 0x05 },
-{ 0x00, 0x06, 0x06 },
-{ 0x00, 0x07, 0x07 },
-{ 0x00, 0x08, 0x08 },
-{ 0x00, 0x09, 0x09 },
-{ 0x00, 0x0a, 0x0a },
-{ 0x00, 0x0b, 0x0b },
-{ 0x00, 0x0c, 0x0c },
-{ 0x00, 0x0d, 0x0d },
-{ 0x00, 0x0e, 0x0e },
-{ 0x00, 0x0f, 0x0f },
-{ 0x00, 0x10, 0x10 },
-{ 0x00, 0x11, 0x11 },
-{ 0x00, 0x12, 0x12 },
-{ 0x00, 0x13, 0x13 },
-{ 0x00, 0x14, 0x14 },
-{ 0x00, 0x15, 0x15 },
-{ 0x00, 0x16, 0x16 },
-{ 0x00, 0x17, 0x17 },
-{ 0x00, 0x18, 0x18 },
-{ 0x00, 0x19, 0x19 },
-{ 0x00, 0x1a, 0x1a },
-{ 0x00, 0x1b, 0x1b },
-{ 0x00, 0x1c, 0x1c },
-{ 0x00, 0x1d, 0x1d },
-{ 0x00, 0x1e, 0x1e },
-{ 0x00, 0x1f, 0x1f },
-{ 0x00, 0x20, 0x20 },
-{ 0x00, 0x21, 0x21 },
-{ 0x00, 0x22, 0x22 },
-{ 0x00, 0x23, 0x23 },
-{ 0x00, 0x24, 0x24 },
-{ 0x00, 0x25, 0x25 },
-{ 0x00, 0x26, 0x26 },
-{ 0x00, 0x27, 0x27 },
-{ 0x00, 0x28, 0x28 },
-{ 0x00, 0x29, 0x29 },
-{ 0x00, 0x2a, 0x2a },
-{ 0x00, 0x2b, 0x2b },
-{ 0x00, 0x2c, 0x2c },
-{ 0x00, 0x2d, 0x2d },
-{ 0x00, 0x2e, 0x2e },
-{ 0x00, 0x2f, 0x2f },
-{ 0x00, 0x30, 0x30 },
-{ 0x00, 0x31, 0x31 },
-{ 0x00, 0x32, 0x32 },
-{ 0x00, 0x33, 0x33 },
-{ 0x00, 0x34, 0x34 },
-{ 0x00, 0x35, 0x35 },
-{ 0x00, 0x36, 0x36 },
-{ 0x00, 0x37, 0x37 },
-{ 0x00, 0x38, 0x38 },
-{ 0x00, 0x39, 0x39 },
-{ 0x00, 0x3a, 0x3a },
-{ 0x00, 0x3b, 0x3b },
-{ 0x00, 0x3c, 0x3c },
-{ 0x00, 0x3d, 0x3d },
-{ 0x00, 0x3e, 0x3e },
-{ 0x00, 0x3f, 0x3f },
-{ 0x00, 0x40, 0x40 },
-{ 0x01, 0x61, 0x41 },
-{ 0x01, 0x62, 0x42 },
-{ 0x01, 0x63, 0x43 },
-{ 0x01, 0x64, 0x44 },
-{ 0x01, 0x65, 0x45 },
-{ 0x01, 0x66, 0x46 },
-{ 0x01, 0x67, 0x47 },
-{ 0x01, 0x68, 0x48 },
-{ 0x01, 0x69, 0x49 },
-{ 0x01, 0x6a, 0x4a },
-{ 0x01, 0x6b, 0x4b },
-{ 0x01, 0x6c, 0x4c },
-{ 0x01, 0x6d, 0x4d },
-{ 0x01, 0x6e, 0x4e },
-{ 0x01, 0x6f, 0x4f },
-{ 0x01, 0x70, 0x50 },
-{ 0x01, 0x71, 0x51 },
-{ 0x01, 0x72, 0x52 },
-{ 0x01, 0x73, 0x53 },
-{ 0x01, 0x74, 0x54 },
-{ 0x01, 0x75, 0x55 },
-{ 0x01, 0x76, 0x56 },
-{ 0x01, 0x77, 0x57 },
-{ 0x01, 0x78, 0x58 },
-{ 0x01, 0x79, 0x59 },
-{ 0x01, 0x7a, 0x5a },
-{ 0x00, 0x5b, 0x5b },
-{ 0x00, 0x5c, 0x5c },
-{ 0x00, 0x5d, 0x5d },
-{ 0x00, 0x5e, 0x5e },
-{ 0x00, 0x5f, 0x5f },
-{ 0x00, 0x60, 0x60 },
-{ 0x00, 0x61, 0x41 },
-{ 0x00, 0x62, 0x42 },
-{ 0x00, 0x63, 0x43 },
-{ 0x00, 0x64, 0x44 },
-{ 0x00, 0x65, 0x45 },
-{ 0x00, 0x66, 0x46 },
-{ 0x00, 0x67, 0x47 },
-{ 0x00, 0x68, 0x48 },
-{ 0x00, 0x69, 0x49 },
-{ 0x00, 0x6a, 0x4a },
-{ 0x00, 0x6b, 0x4b },
-{ 0x00, 0x6c, 0x4c },
-{ 0x00, 0x6d, 0x4d },
-{ 0x00, 0x6e, 0x4e },
-{ 0x00, 0x6f, 0x4f },
-{ 0x00, 0x70, 0x50 },
-{ 0x00, 0x71, 0x51 },
-{ 0x00, 0x72, 0x52 },
-{ 0x00, 0x73, 0x53 },
-{ 0x00, 0x74, 0x54 },
-{ 0x00, 0x75, 0x55 },
-{ 0x00, 0x76, 0x56 },
-{ 0x00, 0x77, 0x57 },
-{ 0x00, 0x78, 0x58 },
-{ 0x00, 0x79, 0x59 },
-{ 0x00, 0x7a, 0x5a },
-{ 0x00, 0x7b, 0x7b },
-{ 0x00, 0x7c, 0x7c },
-{ 0x00, 0x7d, 0x7d },
-{ 0x00, 0x7e, 0x7e },
-{ 0x00, 0x7f, 0x7f },
-{ 0x00, 0x80, 0x80 },
-{ 0x00, 0x81, 0x81 },
-{ 0x00, 0x82, 0x82 },
-{ 0x00, 0x83, 0x83 },
-{ 0x00, 0x84, 0x84 },
-{ 0x00, 0x85, 0x85 },
-{ 0x00, 0x86, 0x86 },
-{ 0x00, 0x87, 0x87 },
-{ 0x00, 0x88, 0x88 },
-{ 0x00, 0x89, 0x89 },
-{ 0x00, 0x8a, 0x8a },
-{ 0x00, 0x8b, 0x8b },
-{ 0x00, 0x8c, 0x8c },
-{ 0x00, 0x8d, 0x8d },
-{ 0x00, 0x8e, 0x8e },
-{ 0x00, 0x8f, 0x8f },
-{ 0x00, 0x90, 0x90 },
-{ 0x00, 0x91, 0x91 },
-{ 0x00, 0x92, 0x92 },
-{ 0x00, 0x93, 0x93 },
-{ 0x00, 0x94, 0x94 },
-{ 0x00, 0x95, 0x95 },
-{ 0x00, 0x96, 0x96 },
-{ 0x00, 0x97, 0x97 },
-{ 0x00, 0x98, 0x98 },
-{ 0x00, 0x99, 0x99 },
-{ 0x00, 0x9a, 0x9a },
-{ 0x00, 0x9b, 0x9b },
-{ 0x00, 0x9c, 0x9c },
-{ 0x00, 0x9d, 0x9d },
-{ 0x00, 0x9e, 0x9e },
-{ 0x00, 0x9f, 0x9f },
-{ 0x00, 0xa0, 0xa0 },
-{ 0x00, 0xa1, 0xa1 },
-{ 0x00, 0xa2, 0xa2 },
-{ 0x00, 0xa3, 0xa3 },
-{ 0x00, 0xa4, 0xa4 },
-{ 0x00, 0xa5, 0xa5 },
-{ 0x00, 0xa6, 0xa6 },
-{ 0x00, 0xa7, 0xa7 },
-{ 0x00, 0xa8, 0xa8 },
-{ 0x00, 0xa9, 0xa9 },
-{ 0x00, 0xaa, 0xaa },
-{ 0x00, 0xab, 0xab },
-{ 0x00, 0xac, 0xac },
-{ 0x00, 0xad, 0xad },
-{ 0x00, 0xae, 0xae },
-{ 0x00, 0xaf, 0xaf },
-{ 0x00, 0xb0, 0xb0 },
-{ 0x00, 0xb1, 0xb1 },
-{ 0x00, 0xb2, 0xb2 },
-{ 0x00, 0xb3, 0xb3 },
-{ 0x00, 0xb4, 0xb4 },
-{ 0x00, 0xb5, 0xb5 },
-{ 0x01, 0xdc, 0xb6 },
-{ 0x00, 0xb7, 0xb7 },
-{ 0x01, 0xdd, 0xb8 },
-{ 0x01, 0xde, 0xb9 },
-{ 0x01, 0xdf, 0xba },
-{ 0x00, 0xbb, 0xbb },
-{ 0x01, 0xfc, 0xbc },
-{ 0x00, 0xbd, 0xbd },
-{ 0x01, 0xfd, 0xbe },
-{ 0x01, 0xfe, 0xbf },
-{ 0x00, 0xc0, 0xc0 },
-{ 0x01, 0xe1, 0xc1 },
-{ 0x01, 0xe2, 0xc2 },
-{ 0x01, 0xe3, 0xc3 },
-{ 0x01, 0xe4, 0xc4 },
-{ 0x01, 0xe5, 0xc5 },
-{ 0x01, 0xe6, 0xc6 },
-{ 0x01, 0xe7, 0xc7 },
-{ 0x01, 0xe8, 0xc8 },
-{ 0x01, 0xe9, 0xc9 },
-{ 0x01, 0xea, 0xca },
-{ 0x01, 0xeb, 0xcb },
-{ 0x01, 0xec, 0xcc },
-{ 0x01, 0xed, 0xcd },
-{ 0x01, 0xee, 0xce },
-{ 0x01, 0xef, 0xcf },
-{ 0x01, 0xf0, 0xd0 },
-{ 0x01, 0xf1, 0xd1 },
-{ 0x00, 0xd2, 0xd2 },
-{ 0x01, 0xf3, 0xd3 },
-{ 0x01, 0xf4, 0xd4 },
-{ 0x01, 0xf5, 0xd5 },
-{ 0x01, 0xf6, 0xd6 },
-{ 0x01, 0xf7, 0xd7 },
-{ 0x01, 0xf8, 0xd8 },
-{ 0x01, 0xf9, 0xd9 },
-{ 0x01, 0xfa, 0xda },
-{ 0x01, 0xfb, 0xdb },
-{ 0x00, 0xdc, 0xb6 },
-{ 0x00, 0xdd, 0xb8 },
-{ 0x00, 0xde, 0xb9 },
-{ 0x00, 0xdf, 0xba },
-{ 0x00, 0xe0, 0xe0 },
-{ 0x00, 0xe1, 0xc1 },
-{ 0x00, 0xe2, 0xc2 },
-{ 0x00, 0xe3, 0xc3 },
-{ 0x00, 0xe4, 0xc4 },
-{ 0x00, 0xe5, 0xc5 },
-{ 0x00, 0xe6, 0xc6 },
-{ 0x00, 0xe7, 0xc7 },
-{ 0x00, 0xe8, 0xc8 },
-{ 0x00, 0xe9, 0xc9 },
-{ 0x00, 0xea, 0xca },
-{ 0x00, 0xeb, 0xcb },
-{ 0x00, 0xec, 0xcc },
-{ 0x00, 0xed, 0xcd },
-{ 0x00, 0xee, 0xce },
-{ 0x00, 0xef, 0xcf },
-{ 0x00, 0xf0, 0xd0 },
-{ 0x00, 0xf1, 0xd1 },
-{ 0x00, 0xf2, 0xd3 },
-{ 0x00, 0xf3, 0xd3 },
-{ 0x00, 0xf4, 0xd4 },
-{ 0x00, 0xf5, 0xd5 },
-{ 0x00, 0xf6, 0xd6 },
-{ 0x00, 0xf7, 0xd7 },
-{ 0x00, 0xf8, 0xd8 },
-{ 0x00, 0xf9, 0xd9 },
-{ 0x00, 0xfa, 0xda },
-{ 0x00, 0xfb, 0xdb },
-{ 0x00, 0xfc, 0xbc },
-{ 0x00, 0xfd, 0xbe },
-{ 0x00, 0xfe, 0xbf },
-{ 0x00, 0xff, 0xff }
-};
-
-static struct cs_info iso8_tbl[] = {
-{ 0x00, 0x00, 0x00 },
-{ 0x00, 0x01, 0x01 },
-{ 0x00, 0x02, 0x02 },
-{ 0x00, 0x03, 0x03 },
-{ 0x00, 0x04, 0x04 },
-{ 0x00, 0x05, 0x05 },
-{ 0x00, 0x06, 0x06 },
-{ 0x00, 0x07, 0x07 },
-{ 0x00, 0x08, 0x08 },
-{ 0x00, 0x09, 0x09 },
-{ 0x00, 0x0a, 0x0a },
-{ 0x00, 0x0b, 0x0b },
-{ 0x00, 0x0c, 0x0c },
-{ 0x00, 0x0d, 0x0d },
-{ 0x00, 0x0e, 0x0e },
-{ 0x00, 0x0f, 0x0f },
-{ 0x00, 0x10, 0x10 },
-{ 0x00, 0x11, 0x11 },
-{ 0x00, 0x12, 0x12 },
-{ 0x00, 0x13, 0x13 },
-{ 0x00, 0x14, 0x14 },
-{ 0x00, 0x15, 0x15 },
-{ 0x00, 0x16, 0x16 },
-{ 0x00, 0x17, 0x17 },
-{ 0x00, 0x18, 0x18 },
-{ 0x00, 0x19, 0x19 },
-{ 0x00, 0x1a, 0x1a },
-{ 0x00, 0x1b, 0x1b },
-{ 0x00, 0x1c, 0x1c },
-{ 0x00, 0x1d, 0x1d },
-{ 0x00, 0x1e, 0x1e },
-{ 0x00, 0x1f, 0x1f },
-{ 0x00, 0x20, 0x20 },
-{ 0x00, 0x21, 0x21 },
-{ 0x00, 0x22, 0x22 },
-{ 0x00, 0x23, 0x23 },
-{ 0x00, 0x24, 0x24 },
-{ 0x00, 0x25, 0x25 },
-{ 0x00, 0x26, 0x26 },
-{ 0x00, 0x27, 0x27 },
-{ 0x00, 0x28, 0x28 },
-{ 0x00, 0x29, 0x29 },
-{ 0x00, 0x2a, 0x2a },
-{ 0x00, 0x2b, 0x2b },
-{ 0x00, 0x2c, 0x2c },
-{ 0x00, 0x2d, 0x2d },
-{ 0x00, 0x2e, 0x2e },
-{ 0x00, 0x2f, 0x2f },
-{ 0x00, 0x30, 0x30 },
-{ 0x00, 0x31, 0x31 },
-{ 0x00, 0x32, 0x32 },
-{ 0x00, 0x33, 0x33 },
-{ 0x00, 0x34, 0x34 },
-{ 0x00, 0x35, 0x35 },
-{ 0x00, 0x36, 0x36 },
-{ 0x00, 0x37, 0x37 },
-{ 0x00, 0x38, 0x38 },
-{ 0x00, 0x39, 0x39 },
-{ 0x00, 0x3a, 0x3a },
-{ 0x00, 0x3b, 0x3b },
-{ 0x00, 0x3c, 0x3c },
-{ 0x00, 0x3d, 0x3d },
-{ 0x00, 0x3e, 0x3e },
-{ 0x00, 0x3f, 0x3f },
-{ 0x00, 0x40, 0x40 },
-{ 0x01, 0x61, 0x41 },
-{ 0x01, 0x62, 0x42 },
-{ 0x01, 0x63, 0x43 },
-{ 0x01, 0x64, 0x44 },
-{ 0x01, 0x65, 0x45 },
-{ 0x01, 0x66, 0x46 },
-{ 0x01, 0x67, 0x47 },
-{ 0x01, 0x68, 0x48 },
-{ 0x01, 0x69, 0x49 },
-{ 0x01, 0x6a, 0x4a },
-{ 0x01, 0x6b, 0x4b },
-{ 0x01, 0x6c, 0x4c },
-{ 0x01, 0x6d, 0x4d },
-{ 0x01, 0x6e, 0x4e },
-{ 0x01, 0x6f, 0x4f },
-{ 0x01, 0x70, 0x50 },
-{ 0x01, 0x71, 0x51 },
-{ 0x01, 0x72, 0x52 },
-{ 0x01, 0x73, 0x53 },
-{ 0x01, 0x74, 0x54 },
-{ 0x01, 0x75, 0x55 },
-{ 0x01, 0x76, 0x56 },
-{ 0x01, 0x77, 0x57 },
-{ 0x01, 0x78, 0x58 },
-{ 0x01, 0x79, 0x59 },
-{ 0x01, 0x7a, 0x5a },
-{ 0x00, 0x5b, 0x5b },
-{ 0x00, 0x5c, 0x5c },
-{ 0x00, 0x5d, 0x5d },
-{ 0x00, 0x5e, 0x5e },
-{ 0x00, 0x5f, 0x5f },
-{ 0x00, 0x60, 0x60 },
-{ 0x00, 0x61, 0x41 },
-{ 0x00, 0x62, 0x42 },
-{ 0x00, 0x63, 0x43 },
-{ 0x00, 0x64, 0x44 },
-{ 0x00, 0x65, 0x45 },
-{ 0x00, 0x66, 0x46 },
-{ 0x00, 0x67, 0x47 },
-{ 0x00, 0x68, 0x48 },
-{ 0x00, 0x69, 0x49 },
-{ 0x00, 0x6a, 0x4a },
-{ 0x00, 0x6b, 0x4b },
-{ 0x00, 0x6c, 0x4c },
-{ 0x00, 0x6d, 0x4d },
-{ 0x00, 0x6e, 0x4e },
-{ 0x00, 0x6f, 0x4f },
-{ 0x00, 0x70, 0x50 },
-{ 0x00, 0x71, 0x51 },
-{ 0x00, 0x72, 0x52 },
-{ 0x00, 0x73, 0x53 },
-{ 0x00, 0x74, 0x54 },
-{ 0x00, 0x75, 0x55 },
-{ 0x00, 0x76, 0x56 },
-{ 0x00, 0x77, 0x57 },
-{ 0x00, 0x78, 0x58 },
-{ 0x00, 0x79, 0x59 },
-{ 0x00, 0x7a, 0x5a },
-{ 0x00, 0x7b, 0x7b },
-{ 0x00, 0x7c, 0x7c },
-{ 0x00, 0x7d, 0x7d },
-{ 0x00, 0x7e, 0x7e },
-{ 0x00, 0x7f, 0x7f },
-{ 0x00, 0x80, 0x80 },
-{ 0x00, 0x81, 0x81 },
-{ 0x00, 0x82, 0x82 },
-{ 0x00, 0x83, 0x83 },
-{ 0x00, 0x84, 0x84 },
-{ 0x00, 0x85, 0x85 },
-{ 0x00, 0x86, 0x86 },
-{ 0x00, 0x87, 0x87 },
-{ 0x00, 0x88, 0x88 },
-{ 0x00, 0x89, 0x89 },
-{ 0x00, 0x8a, 0x8a },
-{ 0x00, 0x8b, 0x8b },
-{ 0x00, 0x8c, 0x8c },
-{ 0x00, 0x8d, 0x8d },
-{ 0x00, 0x8e, 0x8e },
-{ 0x00, 0x8f, 0x8f },
-{ 0x00, 0x90, 0x90 },
-{ 0x00, 0x91, 0x91 },
-{ 0x00, 0x92, 0x92 },
-{ 0x00, 0x93, 0x93 },
-{ 0x00, 0x94, 0x94 },
-{ 0x00, 0x95, 0x95 },
-{ 0x00, 0x96, 0x96 },
-{ 0x00, 0x97, 0x97 },
-{ 0x00, 0x98, 0x98 },
-{ 0x00, 0x99, 0x99 },
-{ 0x00, 0x9a, 0x9a },
-{ 0x00, 0x9b, 0x9b },
-{ 0x00, 0x9c, 0x9c },
-{ 0x00, 0x9d, 0x9d },
-{ 0x00, 0x9e, 0x9e },
-{ 0x00, 0x9f, 0x9f },
-{ 0x00, 0xa0, 0xa0 },
-{ 0x00, 0xa1, 0xa1 },
-{ 0x00, 0xa2, 0xa2 },
-{ 0x00, 0xa3, 0xa3 },
-{ 0x00, 0xa4, 0xa4 },
-{ 0x00, 0xa5, 0xa5 },
-{ 0x00, 0xa6, 0xa6 },
-{ 0x00, 0xa7, 0xa7 },
-{ 0x00, 0xa8, 0xa8 },
-{ 0x00, 0xa9, 0xa9 },
-{ 0x00, 0xaa, 0xaa },
-{ 0x00, 0xab, 0xab },
-{ 0x00, 0xac, 0xac },
-{ 0x00, 0xad, 0xad },
-{ 0x00, 0xae, 0xae },
-{ 0x00, 0xaf, 0xaf },
-{ 0x00, 0xb0, 0xb0 },
-{ 0x00, 0xb1, 0xb1 },
-{ 0x00, 0xb2, 0xb2 },
-{ 0x00, 0xb3, 0xb3 },
-{ 0x00, 0xb4, 0xb4 },
-{ 0x00, 0xb5, 0xb5 },
-{ 0x00, 0xb6, 0xb6 },
-{ 0x00, 0xb7, 0xb7 },
-{ 0x00, 0xb8, 0xb8 },
-{ 0x00, 0xb9, 0xb9 },
-{ 0x00, 0xba, 0xba },
-{ 0x00, 0xbb, 0xbb },
-{ 0x00, 0xbc, 0xbc },
-{ 0x00, 0xbd, 0xbd },
-{ 0x00, 0xbe, 0xbe },
-{ 0x00, 0xbf, 0xbf },
-{ 0x00, 0xc0, 0xc0 },
-{ 0x00, 0xc1, 0xc1 },
-{ 0x00, 0xc2, 0xc2 },
-{ 0x00, 0xc3, 0xc3 },
-{ 0x00, 0xc4, 0xc4 },
-{ 0x00, 0xc5, 0xc5 },
-{ 0x00, 0xc6, 0xc6 },
-{ 0x00, 0xc7, 0xc7 },
-{ 0x00, 0xc8, 0xc8 },
-{ 0x00, 0xc9, 0xc9 },
-{ 0x00, 0xca, 0xca },
-{ 0x00, 0xcb, 0xcb },
-{ 0x00, 0xcc, 0xcc },
-{ 0x00, 0xcd, 0xcd },
-{ 0x00, 0xce, 0xce },
-{ 0x00, 0xcf, 0xcf },
-{ 0x00, 0xd0, 0xd0 },
-{ 0x00, 0xd1, 0xd1 },
-{ 0x00, 0xd2, 0xd2 },
-{ 0x00, 0xd3, 0xd3 },
-{ 0x00, 0xd4, 0xd4 },
-{ 0x00, 0xd5, 0xd5 },
-{ 0x00, 0xd6, 0xd6 },
-{ 0x00, 0xd7, 0xd7 },
-{ 0x00, 0xd8, 0xd8 },
-{ 0x00, 0xd9, 0xd9 },
-{ 0x00, 0xda, 0xda },
-{ 0x00, 0xdb, 0xdb },
-{ 0x00, 0xdc, 0xdc },
-{ 0x00, 0xdd, 0xdd },
-{ 0x00, 0xde, 0xde },
-{ 0x00, 0xdf, 0xdf },
-{ 0x00, 0xe0, 0xe0 },
-{ 0x00, 0xe1, 0xe1 },
-{ 0x00, 0xe2, 0xe2 },
-{ 0x00, 0xe3, 0xe3 },
-{ 0x00, 0xe4, 0xe4 },
-{ 0x00, 0xe5, 0xe5 },
-{ 0x00, 0xe6, 0xe6 },
-{ 0x00, 0xe7, 0xe7 },
-{ 0x00, 0xe8, 0xe8 },
-{ 0x00, 0xe9, 0xe9 },
-{ 0x00, 0xea, 0xea },
-{ 0x00, 0xeb, 0xeb },
-{ 0x00, 0xec, 0xec },
-{ 0x00, 0xed, 0xed },
-{ 0x00, 0xee, 0xee },
-{ 0x00, 0xef, 0xef },
-{ 0x00, 0xf0, 0xf0 },
-{ 0x00, 0xf1, 0xf1 },
-{ 0x00, 0xf2, 0xf2 },
-{ 0x00, 0xf3, 0xf3 },
-{ 0x00, 0xf4, 0xf4 },
-{ 0x00, 0xf5, 0xf5 },
-{ 0x00, 0xf6, 0xf6 },
-{ 0x00, 0xf7, 0xf7 },
-{ 0x00, 0xf8, 0xf8 },
-{ 0x00, 0xf9, 0xf9 },
-{ 0x00, 0xfa, 0xfa },
-{ 0x00, 0xfb, 0xfb },
-{ 0x00, 0xfc, 0xfc },
-{ 0x00, 0xfd, 0xfd },
-{ 0x00, 0xfe, 0xfe },
-{ 0x00, 0xff, 0xff }
-};
-
-static struct cs_info iso9_tbl[] = {
-{ 0x00, 0x00, 0x00 },
-{ 0x00, 0x01, 0x01 },
-{ 0x00, 0x02, 0x02 },
-{ 0x00, 0x03, 0x03 },
-{ 0x00, 0x04, 0x04 },
-{ 0x00, 0x05, 0x05 },
-{ 0x00, 0x06, 0x06 },
-{ 0x00, 0x07, 0x07 },
-{ 0x00, 0x08, 0x08 },
-{ 0x00, 0x09, 0x09 },
-{ 0x00, 0x0a, 0x0a },
-{ 0x00, 0x0b, 0x0b },
-{ 0x00, 0x0c, 0x0c },
-{ 0x00, 0x0d, 0x0d },
-{ 0x00, 0x0e, 0x0e },
-{ 0x00, 0x0f, 0x0f },
-{ 0x00, 0x10, 0x10 },
-{ 0x00, 0x11, 0x11 },
-{ 0x00, 0x12, 0x12 },
-{ 0x00, 0x13, 0x13 },
-{ 0x00, 0x14, 0x14 },
-{ 0x00, 0x15, 0x15 },
-{ 0x00, 0x16, 0x16 },
-{ 0x00, 0x17, 0x17 },
-{ 0x00, 0x18, 0x18 },
-{ 0x00, 0x19, 0x19 },
-{ 0x00, 0x1a, 0x1a },
-{ 0x00, 0x1b, 0x1b },
-{ 0x00, 0x1c, 0x1c },
-{ 0x00, 0x1d, 0x1d },
-{ 0x00, 0x1e, 0x1e },
-{ 0x00, 0x1f, 0x1f },
-{ 0x00, 0x20, 0x20 },
-{ 0x00, 0x21, 0x21 },
-{ 0x00, 0x22, 0x22 },
-{ 0x00, 0x23, 0x23 },
-{ 0x00, 0x24, 0x24 },
-{ 0x00, 0x25, 0x25 },
-{ 0x00, 0x26, 0x26 },
-{ 0x00, 0x27, 0x27 },
-{ 0x00, 0x28, 0x28 },
-{ 0x00, 0x29, 0x29 },
-{ 0x00, 0x2a, 0x2a },
-{ 0x00, 0x2b, 0x2b },
-{ 0x00, 0x2c, 0x2c },
-{ 0x00, 0x2d, 0x2d },
-{ 0x00, 0x2e, 0x2e },
-{ 0x00, 0x2f, 0x2f },
-{ 0x00, 0x30, 0x30 },
-{ 0x00, 0x31, 0x31 },
-{ 0x00, 0x32, 0x32 },
-{ 0x00, 0x33, 0x33 },
-{ 0x00, 0x34, 0x34 },
-{ 0x00, 0x35, 0x35 },
-{ 0x00, 0x36, 0x36 },
-{ 0x00, 0x37, 0x37 },
-{ 0x00, 0x38, 0x38 },
-{ 0x00, 0x39, 0x39 },
-{ 0x00, 0x3a, 0x3a },
-{ 0x00, 0x3b, 0x3b },
-{ 0x00, 0x3c, 0x3c },
-{ 0x00, 0x3d, 0x3d },
-{ 0x00, 0x3e, 0x3e },
-{ 0x00, 0x3f, 0x3f },
-{ 0x00, 0x40, 0x40 },
-{ 0x01, 0x61, 0x41 },
-{ 0x01, 0x62, 0x42 },
-{ 0x01, 0x63, 0x43 },
-{ 0x01, 0x64, 0x44 },
-{ 0x01, 0x65, 0x45 },
-{ 0x01, 0x66, 0x46 },
-{ 0x01, 0x67, 0x47 },
-{ 0x01, 0x68, 0x48 },
-{ 0x01, 0xfd, 0x49 },
-{ 0x01, 0x6a, 0x4a },
-{ 0x01, 0x6b, 0x4b },
-{ 0x01, 0x6c, 0x4c },
-{ 0x01, 0x6d, 0x4d },
-{ 0x01, 0x6e, 0x4e },
-{ 0x01, 0x6f, 0x4f },
-{ 0x01, 0x70, 0x50 },
-{ 0x01, 0x71, 0x51 },
-{ 0x01, 0x72, 0x52 },
-{ 0x01, 0x73, 0x53 },
-{ 0x01, 0x74, 0x54 },
-{ 0x01, 0x75, 0x55 },
-{ 0x01, 0x76, 0x56 },
-{ 0x01, 0x77, 0x57 },
-{ 0x01, 0x78, 0x58 },
-{ 0x01, 0x79, 0x59 },
-{ 0x01, 0x7a, 0x5a },
-{ 0x00, 0x5b, 0x5b },
-{ 0x00, 0x5c, 0x5c },
-{ 0x00, 0x5d, 0x5d },
-{ 0x00, 0x5e, 0x5e },
-{ 0x00, 0x5f, 0x5f },
-{ 0x00, 0x60, 0x60 },
-{ 0x00, 0x61, 0x41 },
-{ 0x00, 0x62, 0x42 },
-{ 0x00, 0x63, 0x43 },
-{ 0x00, 0x64, 0x44 },
-{ 0x00, 0x65, 0x45 },
-{ 0x00, 0x66, 0x46 },
-{ 0x00, 0x67, 0x47 },
-{ 0x00, 0x68, 0x48 },
-{ 0x00, 0x69, 0xdd },
-{ 0x00, 0x6a, 0x4a },
-{ 0x00, 0x6b, 0x4b },
-{ 0x00, 0x6c, 0x4c },
-{ 0x00, 0x6d, 0x4d },
-{ 0x00, 0x6e, 0x4e },
-{ 0x00, 0x6f, 0x4f },
-{ 0x00, 0x70, 0x50 },
-{ 0x00, 0x71, 0x51 },
-{ 0x00, 0x72, 0x52 },
-{ 0x00, 0x73, 0x53 },
-{ 0x00, 0x74, 0x54 },
-{ 0x00, 0x75, 0x55 },
-{ 0x00, 0x76, 0x56 },
-{ 0x00, 0x77, 0x57 },
-{ 0x00, 0x78, 0x58 },
-{ 0x00, 0x79, 0x59 },
-{ 0x00, 0x7a, 0x5a },
-{ 0x00, 0x7b, 0x7b },
-{ 0x00, 0x7c, 0x7c },
-{ 0x00, 0x7d, 0x7d },
-{ 0x00, 0x7e, 0x7e },
-{ 0x00, 0x7f, 0x7f },
-{ 0x00, 0x80, 0x80 },
-{ 0x00, 0x81, 0x81 },
-{ 0x00, 0x82, 0x82 },
-{ 0x00, 0x83, 0x83 },
-{ 0x00, 0x84, 0x84 },
-{ 0x00, 0x85, 0x85 },
-{ 0x00, 0x86, 0x86 },
-{ 0x00, 0x87, 0x87 },
-{ 0x00, 0x88, 0x88 },
-{ 0x00, 0x89, 0x89 },
-{ 0x00, 0x8a, 0x8a },
-{ 0x00, 0x8b, 0x8b },
-{ 0x00, 0x8c, 0x8c },
-{ 0x00, 0x8d, 0x8d },
-{ 0x00, 0x8e, 0x8e },
-{ 0x00, 0x8f, 0x8f },
-{ 0x00, 0x90, 0x90 },
-{ 0x00, 0x91, 0x91 },
-{ 0x00, 0x92, 0x92 },
-{ 0x00, 0x93, 0x93 },
-{ 0x00, 0x94, 0x94 },
-{ 0x00, 0x95, 0x95 },
-{ 0x00, 0x96, 0x96 },
-{ 0x00, 0x97, 0x97 },
-{ 0x00, 0x98, 0x98 },
-{ 0x00, 0x99, 0x99 },
-{ 0x00, 0x9a, 0x9a },
-{ 0x00, 0x9b, 0x9b },
-{ 0x00, 0x9c, 0x9c },
-{ 0x00, 0x9d, 0x9d },
-{ 0x00, 0x9e, 0x9e },
-{ 0x00, 0x9f, 0x9f },
-{ 0x00, 0xa0, 0xa0 },
-{ 0x00, 0xa1, 0xa1 },
-{ 0x00, 0xa2, 0xa2 },
-{ 0x00, 0xa3, 0xa3 },
-{ 0x00, 0xa4, 0xa4 },
-{ 0x00, 0xa5, 0xa5 },
-{ 0x00, 0xa6, 0xa6 },
-{ 0x00, 0xa7, 0xa7 },
-{ 0x00, 0xa8, 0xa8 },
-{ 0x00, 0xa9, 0xa9 },
-{ 0x00, 0xaa, 0xaa },
-{ 0x00, 0xab, 0xab },
-{ 0x00, 0xac, 0xac },
-{ 0x00, 0xad, 0xad },
-{ 0x00, 0xae, 0xae },
-{ 0x00, 0xaf, 0xaf },
-{ 0x00, 0xb0, 0xb0 },
-{ 0x00, 0xb1, 0xb1 },
-{ 0x00, 0xb2, 0xb2 },
-{ 0x00, 0xb3, 0xb3 },
-{ 0x00, 0xb4, 0xb4 },
-{ 0x00, 0xb5, 0xb5 },
-{ 0x00, 0xb6, 0xb6 },
-{ 0x00, 0xb7, 0xb7 },
-{ 0x00, 0xb8, 0xb8 },
-{ 0x00, 0xb9, 0xb9 },
-{ 0x00, 0xba, 0xba },
-{ 0x00, 0xbb, 0xbb },
-{ 0x00, 0xbc, 0xbc },
-{ 0x00, 0xbd, 0xbd },
-{ 0x00, 0xbe, 0xbe },
-{ 0x00, 0xbf, 0xbf },
-{ 0x01, 0xe0, 0xc0 },
-{ 0x01, 0xe1, 0xc1 },
-{ 0x01, 0xe2, 0xc2 },
-{ 0x01, 0xe3, 0xc3 },
-{ 0x01, 0xe4, 0xc4 },
-{ 0x01, 0xe5, 0xc5 },
-{ 0x01, 0xe6, 0xc6 },
-{ 0x01, 0xe7, 0xc7 },
-{ 0x01, 0xe8, 0xc8 },
-{ 0x01, 0xe9, 0xc9 },
-{ 0x01, 0xea, 0xca },
-{ 0x01, 0xeb, 0xcb },
-{ 0x01, 0xec, 0xcc },
-{ 0x01, 0xed, 0xcd },
-{ 0x01, 0xee, 0xce },
-{ 0x01, 0xef, 0xcf },
-{ 0x01, 0xf0, 0xd0 },
-{ 0x01, 0xf1, 0xd1 },
-{ 0x01, 0xf2, 0xd2 },
-{ 0x01, 0xf3, 0xd3 },
-{ 0x01, 0xf4, 0xd4 },
-{ 0x01, 0xf5, 0xd5 },
-{ 0x01, 0xf6, 0xd6 },
-{ 0x00, 0xd7, 0xd7 },
-{ 0x01, 0xf8, 0xd8 },
-{ 0x01, 0xf9, 0xd9 },
-{ 0x01, 0xfa, 0xda },
-{ 0x01, 0xfb, 0xdb },
-{ 0x01, 0xfc, 0xdc },
-{ 0x01, 0x69, 0xdd },
-{ 0x01, 0xfe, 0xde },
-{ 0x00, 0xdf, 0xdf },
-{ 0x00, 0xe0, 0xc0 },
-{ 0x00, 0xe1, 0xc1 },
-{ 0x00, 0xe2, 0xc2 },
-{ 0x00, 0xe3, 0xc3 },
-{ 0x00, 0xe4, 0xc4 },
-{ 0x00, 0xe5, 0xc5 },
-{ 0x00, 0xe6, 0xc6 },
-{ 0x00, 0xe7, 0xc7 },
-{ 0x00, 0xe8, 0xc8 },
-{ 0x00, 0xe9, 0xc9 },
-{ 0x00, 0xea, 0xca },
-{ 0x00, 0xeb, 0xcb },
-{ 0x00, 0xec, 0xcc },
-{ 0x00, 0xed, 0xcd },
-{ 0x00, 0xee, 0xce },
-{ 0x00, 0xef, 0xcf },
-{ 0x00, 0xf0, 0xd0 },
-{ 0x00, 0xf1, 0xd1 },
-{ 0x00, 0xf2, 0xd2 },
-{ 0x00, 0xf3, 0xd3 },
-{ 0x00, 0xf4, 0xd4 },
-{ 0x00, 0xf5, 0xd5 },
-{ 0x00, 0xf6, 0xd6 },
-{ 0x00, 0xf7, 0xf7 },
-{ 0x00, 0xf8, 0xd8 },
-{ 0x00, 0xf9, 0xd9 },
-{ 0x00, 0xfa, 0xda },
-{ 0x00, 0xfb, 0xdb },
-{ 0x00, 0xfc, 0xdc },
-{ 0x00, 0xfd, 0x49 },
-{ 0x00, 0xfe, 0xde },
-{ 0x00, 0xff, 0xff }
-};
-
-static struct cs_info iso10_tbl[] = {
-{ 0x00, 0x00, 0x00 },
-{ 0x00, 0x01, 0x01 },
-{ 0x00, 0x02, 0x02 },
-{ 0x00, 0x03, 0x03 },
-{ 0x00, 0x04, 0x04 },
-{ 0x00, 0x05, 0x05 },
-{ 0x00, 0x06, 0x06 },
-{ 0x00, 0x07, 0x07 },
-{ 0x00, 0x08, 0x08 },
-{ 0x00, 0x09, 0x09 },
-{ 0x00, 0x0a, 0x0a },
-{ 0x00, 0x0b, 0x0b },
-{ 0x00, 0x0c, 0x0c },
-{ 0x00, 0x0d, 0x0d },
-{ 0x00, 0x0e, 0x0e },
-{ 0x00, 0x0f, 0x0f },
-{ 0x00, 0x10, 0x10 },
-{ 0x00, 0x11, 0x11 },
-{ 0x00, 0x12, 0x12 },
-{ 0x00, 0x13, 0x13 },
-{ 0x00, 0x14, 0x14 },
-{ 0x00, 0x15, 0x15 },
-{ 0x00, 0x16, 0x16 },
-{ 0x00, 0x17, 0x17 },
-{ 0x00, 0x18, 0x18 },
-{ 0x00, 0x19, 0x19 },
-{ 0x00, 0x1a, 0x1a },
-{ 0x00, 0x1b, 0x1b },
-{ 0x00, 0x1c, 0x1c },
-{ 0x00, 0x1d, 0x1d },
-{ 0x00, 0x1e, 0x1e },
-{ 0x00, 0x1f, 0x1f },
-{ 0x00, 0x20, 0x20 },
-{ 0x00, 0x21, 0x21 },
-{ 0x00, 0x22, 0x22 },
-{ 0x00, 0x23, 0x23 },
-{ 0x00, 0x24, 0x24 },
-{ 0x00, 0x25, 0x25 },
-{ 0x00, 0x26, 0x26 },
-{ 0x00, 0x27, 0x27 },
-{ 0x00, 0x28, 0x28 },
-{ 0x00, 0x29, 0x29 },
-{ 0x00, 0x2a, 0x2a },
-{ 0x00, 0x2b, 0x2b },
-{ 0x00, 0x2c, 0x2c },
-{ 0x00, 0x2d, 0x2d },
-{ 0x00, 0x2e, 0x2e },
-{ 0x00, 0x2f, 0x2f },
-{ 0x00, 0x30, 0x30 },
-{ 0x00, 0x31, 0x31 },
-{ 0x00, 0x32, 0x32 },
-{ 0x00, 0x33, 0x33 },
-{ 0x00, 0x34, 0x34 },
-{ 0x00, 0x35, 0x35 },
-{ 0x00, 0x36, 0x36 },
-{ 0x00, 0x37, 0x37 },
-{ 0x00, 0x38, 0x38 },
-{ 0x00, 0x39, 0x39 },
-{ 0x00, 0x3a, 0x3a },
-{ 0x00, 0x3b, 0x3b },
-{ 0x00, 0x3c, 0x3c },
-{ 0x00, 0x3d, 0x3d },
-{ 0x00, 0x3e, 0x3e },
-{ 0x00, 0x3f, 0x3f },
-{ 0x00, 0x40, 0x40 },
-{ 0x01, 0x61, 0x41 },
-{ 0x01, 0x62, 0x42 },
-{ 0x01, 0x63, 0x43 },
-{ 0x01, 0x64, 0x44 },
-{ 0x01, 0x65, 0x45 },
-{ 0x01, 0x66, 0x46 },
-{ 0x01, 0x67, 0x47 },
-{ 0x01, 0x68, 0x48 },
-{ 0x01, 0x69, 0x49 },
-{ 0x01, 0x6a, 0x4a },
-{ 0x01, 0x6b, 0x4b },
-{ 0x01, 0x6c, 0x4c },
-{ 0x01, 0x6d, 0x4d },
-{ 0x01, 0x6e, 0x4e },
-{ 0x01, 0x6f, 0x4f },
-{ 0x01, 0x70, 0x50 },
-{ 0x01, 0x71, 0x51 },
-{ 0x01, 0x72, 0x52 },
-{ 0x01, 0x73, 0x53 },
-{ 0x01, 0x74, 0x54 },
-{ 0x01, 0x75, 0x55 },
-{ 0x01, 0x76, 0x56 },
-{ 0x01, 0x77, 0x57 },
-{ 0x01, 0x78, 0x58 },
-{ 0x01, 0x79, 0x59 },
-{ 0x01, 0x7a, 0x5a },
-{ 0x00, 0x5b, 0x5b },
-{ 0x00, 0x5c, 0x5c },
-{ 0x00, 0x5d, 0x5d },
-{ 0x00, 0x5e, 0x5e },
-{ 0x00, 0x5f, 0x5f },
-{ 0x00, 0x60, 0x60 },
-{ 0x00, 0x61, 0x41 },
-{ 0x00, 0x62, 0x42 },
-{ 0x00, 0x63, 0x43 },
-{ 0x00, 0x64, 0x44 },
-{ 0x00, 0x65, 0x45 },
-{ 0x00, 0x66, 0x46 },
-{ 0x00, 0x67, 0x47 },
-{ 0x00, 0x68, 0x48 },
-{ 0x00, 0x69, 0x49 },
-{ 0x00, 0x6a, 0x4a },
-{ 0x00, 0x6b, 0x4b },
-{ 0x00, 0x6c, 0x4c },
-{ 0x00, 0x6d, 0x4d },
-{ 0x00, 0x6e, 0x4e },
-{ 0x00, 0x6f, 0x4f },
-{ 0x00, 0x70, 0x50 },
-{ 0x00, 0x71, 0x51 },
-{ 0x00, 0x72, 0x52 },
-{ 0x00, 0x73, 0x53 },
-{ 0x00, 0x74, 0x54 },
-{ 0x00, 0x75, 0x55 },
-{ 0x00, 0x76, 0x56 },
-{ 0x00, 0x77, 0x57 },
-{ 0x00, 0x78, 0x58 },
-{ 0x00, 0x79, 0x59 },
-{ 0x00, 0x7a, 0x5a },
-{ 0x00, 0x7b, 0x7b },
-{ 0x00, 0x7c, 0x7c },
-{ 0x00, 0x7d, 0x7d },
-{ 0x00, 0x7e, 0x7e },
-{ 0x00, 0x7f, 0x7f },
-{ 0x00, 0x80, 0x80 },
-{ 0x00, 0x81, 0x81 },
-{ 0x00, 0x82, 0x82 },
-{ 0x00, 0x83, 0x83 },
-{ 0x00, 0x84, 0x84 },
-{ 0x00, 0x85, 0x85 },
-{ 0x00, 0x86, 0x86 },
-{ 0x00, 0x87, 0x87 },
-{ 0x00, 0x88, 0x88 },
-{ 0x00, 0x89, 0x89 },
-{ 0x00, 0x8a, 0x8a },
-{ 0x00, 0x8b, 0x8b },
-{ 0x00, 0x8c, 0x8c },
-{ 0x00, 0x8d, 0x8d },
-{ 0x00, 0x8e, 0x8e },
-{ 0x00, 0x8f, 0x8f },
-{ 0x00, 0x90, 0x90 },
-{ 0x00, 0x91, 0x91 },
-{ 0x00, 0x92, 0x92 },
-{ 0x00, 0x93, 0x93 },
-{ 0x00, 0x94, 0x94 },
-{ 0x00, 0x95, 0x95 },
-{ 0x00, 0x96, 0x96 },
-{ 0x00, 0x97, 0x97 },
-{ 0x00, 0x98, 0x98 },
-{ 0x00, 0x99, 0x99 },
-{ 0x00, 0x9a, 0x9a },
-{ 0x00, 0x9b, 0x9b },
-{ 0x00, 0x9c, 0x9c },
-{ 0x00, 0x9d, 0x9d },
-{ 0x00, 0x9e, 0x9e },
-{ 0x00, 0x9f, 0x9f },
-{ 0x00, 0xa0, 0xa0 },
-{ 0x00, 0xa1, 0xa1 },
-{ 0x00, 0xa2, 0xa2 },
-{ 0x00, 0xa3, 0xa3 },
-{ 0x00, 0xa4, 0xa4 },
-{ 0x00, 0xa5, 0xa5 },
-{ 0x00, 0xa6, 0xa6 },
-{ 0x00, 0xa7, 0xa7 },
-{ 0x00, 0xa8, 0xa8 },
-{ 0x00, 0xa9, 0xa9 },
-{ 0x00, 0xaa, 0xaa },
-{ 0x00, 0xab, 0xab },
-{ 0x00, 0xac, 0xac },
-{ 0x00, 0xad, 0xad },
-{ 0x00, 0xae, 0xae },
-{ 0x00, 0xaf, 0xaf },
-{ 0x00, 0xb0, 0xb0 },
-{ 0x00, 0xb1, 0xb1 },
-{ 0x00, 0xb2, 0xb2 },
-{ 0x00, 0xb3, 0xb3 },
-{ 0x00, 0xb4, 0xb4 },
-{ 0x00, 0xb5, 0xb5 },
-{ 0x00, 0xb6, 0xb6 },
-{ 0x00, 0xb7, 0xb7 },
-{ 0x00, 0xb8, 0xb8 },
-{ 0x00, 0xb9, 0xb9 },
-{ 0x00, 0xba, 0xba },
-{ 0x00, 0xbb, 0xbb },
-{ 0x00, 0xbc, 0xbc },
-{ 0x00, 0xbd, 0xbd },
-{ 0x00, 0xbe, 0xbe },
-{ 0x00, 0xbf, 0xbf },
-{ 0x00, 0xc0, 0xc0 },
-{ 0x00, 0xc1, 0xc1 },
-{ 0x00, 0xc2, 0xc2 },
-{ 0x00, 0xc3, 0xc3 },
-{ 0x00, 0xc4, 0xc4 },
-{ 0x00, 0xc5, 0xc5 },
-{ 0x00, 0xc6, 0xc6 },
-{ 0x00, 0xc7, 0xc7 },
-{ 0x00, 0xc8, 0xc8 },
-{ 0x00, 0xc9, 0xc9 },
-{ 0x00, 0xca, 0xca },
-{ 0x00, 0xcb, 0xcb },
-{ 0x00, 0xcc, 0xcc },
-{ 0x00, 0xcd, 0xcd },
-{ 0x00, 0xce, 0xce },
-{ 0x00, 0xcf, 0xcf },
-{ 0x00, 0xd0, 0xd0 },
-{ 0x00, 0xd1, 0xd1 },
-{ 0x00, 0xd2, 0xd2 },
-{ 0x00, 0xd3, 0xd3 },
-{ 0x00, 0xd4, 0xd4 },
-{ 0x00, 0xd5, 0xd5 },
-{ 0x00, 0xd6, 0xd6 },
-{ 0x00, 0xd7, 0xd7 },
-{ 0x00, 0xd8, 0xd8 },
-{ 0x00, 0xd9, 0xd9 },
-{ 0x00, 0xda, 0xda },
-{ 0x00, 0xdb, 0xdb },
-{ 0x00, 0xdc, 0xdc },
-{ 0x00, 0xdd, 0xdd },
-{ 0x00, 0xde, 0xde },
-{ 0x00, 0xdf, 0xdf },
-{ 0x00, 0xe0, 0xe0 },
-{ 0x00, 0xe1, 0xe1 },
-{ 0x00, 0xe2, 0xe2 },
-{ 0x00, 0xe3, 0xe3 },
-{ 0x00, 0xe4, 0xe4 },
-{ 0x00, 0xe5, 0xe5 },
-{ 0x00, 0xe6, 0xe6 },
-{ 0x00, 0xe7, 0xe7 },
-{ 0x00, 0xe8, 0xe8 },
-{ 0x00, 0xe9, 0xe9 },
-{ 0x00, 0xea, 0xea },
-{ 0x00, 0xeb, 0xeb },
-{ 0x00, 0xec, 0xec },
-{ 0x00, 0xed, 0xed },
-{ 0x00, 0xee, 0xee },
-{ 0x00, 0xef, 0xef },
-{ 0x00, 0xf0, 0xf0 },
-{ 0x00, 0xf1, 0xf1 },
-{ 0x00, 0xf2, 0xf2 },
-{ 0x00, 0xf3, 0xf3 },
-{ 0x00, 0xf4, 0xf4 },
-{ 0x00, 0xf5, 0xf5 },
-{ 0x00, 0xf6, 0xf6 },
-{ 0x00, 0xf7, 0xf7 },
-{ 0x00, 0xf8, 0xf8 },
-{ 0x00, 0xf9, 0xf9 },
-{ 0x00, 0xfa, 0xfa },
-{ 0x00, 0xfb, 0xfb },
-{ 0x00, 0xfc, 0xfc },
-{ 0x00, 0xfd, 0xfd },
-{ 0x00, 0xfe, 0xfe },
-{ 0x00, 0xff, 0xff }
-};
-
-static struct cs_info koi8r_tbl[] = {
-{ 0x00, 0x00, 0x00 },
-{ 0x00, 0x01, 0x01 },
-{ 0x00, 0x02, 0x02 },
-{ 0x00, 0x03, 0x03 },
-{ 0x00, 0x04, 0x04 },
-{ 0x00, 0x05, 0x05 },
-{ 0x00, 0x06, 0x06 },
-{ 0x00, 0x07, 0x07 },
-{ 0x00, 0x08, 0x08 },
-{ 0x00, 0x09, 0x09 },
-{ 0x00, 0x0a, 0x0a },
-{ 0x00, 0x0b, 0x0b },
-{ 0x00, 0x0c, 0x0c },
-{ 0x00, 0x0d, 0x0d },
-{ 0x00, 0x0e, 0x0e },
-{ 0x00, 0x0f, 0x0f },
-{ 0x00, 0x10, 0x10 },
-{ 0x00, 0x11, 0x11 },
-{ 0x00, 0x12, 0x12 },
-{ 0x00, 0x13, 0x13 },
-{ 0x00, 0x14, 0x14 },
-{ 0x00, 0x15, 0x15 },
-{ 0x00, 0x16, 0x16 },
-{ 0x00, 0x17, 0x17 },
-{ 0x00, 0x18, 0x18 },
-{ 0x00, 0x19, 0x19 },
-{ 0x00, 0x1a, 0x1a },
-{ 0x00, 0x1b, 0x1b },
-{ 0x00, 0x1c, 0x1c },
-{ 0x00, 0x1d, 0x1d },
-{ 0x00, 0x1e, 0x1e },
-{ 0x00, 0x1f, 0x1f },
-{ 0x00, 0x20, 0x20 },
-{ 0x00, 0x21, 0x21 },
-{ 0x00, 0x22, 0x22 },
-{ 0x00, 0x23, 0x23 },
-{ 0x00, 0x24, 0x24 },
-{ 0x00, 0x25, 0x25 },
-{ 0x00, 0x26, 0x26 },
-{ 0x00, 0x27, 0x27 },
-{ 0x00, 0x28, 0x28 },
-{ 0x00, 0x29, 0x29 },
-{ 0x00, 0x2a, 0x2a },
-{ 0x00, 0x2b, 0x2b },
-{ 0x00, 0x2c, 0x2c },
-{ 0x00, 0x2d, 0x2d },
-{ 0x00, 0x2e, 0x2e },
-{ 0x00, 0x2f, 0x2f },
-{ 0x00, 0x30, 0x30 },
-{ 0x00, 0x31, 0x31 },
-{ 0x00, 0x32, 0x32 },
-{ 0x00, 0x33, 0x33 },
-{ 0x00, 0x34, 0x34 },
-{ 0x00, 0x35, 0x35 },
-{ 0x00, 0x36, 0x36 },
-{ 0x00, 0x37, 0x37 },
-{ 0x00, 0x38, 0x38 },
-{ 0x00, 0x39, 0x39 },
-{ 0x00, 0x3a, 0x3a },
-{ 0x00, 0x3b, 0x3b },
-{ 0x00, 0x3c, 0x3c },
-{ 0x00, 0x3d, 0x3d },
-{ 0x00, 0x3e, 0x3e },
-{ 0x00, 0x3f, 0x3f },
-{ 0x00, 0x40, 0x40 },
-{ 0x01, 0x61, 0x41 },
-{ 0x01, 0x62, 0x42 },
-{ 0x01, 0x63, 0x43 },
-{ 0x01, 0x64, 0x44 },
-{ 0x01, 0x65, 0x45 },
-{ 0x01, 0x66, 0x46 },
-{ 0x01, 0x67, 0x47 },
-{ 0x01, 0x68, 0x48 },
-{ 0x01, 0x69, 0x49 },
-{ 0x01, 0x6a, 0x4a },
-{ 0x01, 0x6b, 0x4b },
-{ 0x01, 0x6c, 0x4c },
-{ 0x01, 0x6d, 0x4d },
-{ 0x01, 0x6e, 0x4e },
-{ 0x01, 0x6f, 0x4f },
-{ 0x01, 0x70, 0x50 },
-{ 0x01, 0x71, 0x51 },
-{ 0x01, 0x72, 0x52 },
-{ 0x01, 0x73, 0x53 },
-{ 0x01, 0x74, 0x54 },
-{ 0x01, 0x75, 0x55 },
-{ 0x01, 0x76, 0x56 },
-{ 0x01, 0x77, 0x57 },
-{ 0x01, 0x78, 0x58 },
-{ 0x01, 0x79, 0x59 },
-{ 0x01, 0x7a, 0x5a },
-{ 0x00, 0x5b, 0x5b },
-{ 0x00, 0x5c, 0x5c },
-{ 0x00, 0x5d, 0x5d },
-{ 0x00, 0x5e, 0x5e },
-{ 0x00, 0x5f, 0x5f },
-{ 0x00, 0x60, 0x60 },
-{ 0x00, 0x61, 0x41 },
-{ 0x00, 0x62, 0x42 },
-{ 0x00, 0x63, 0x43 },
-{ 0x00, 0x64, 0x44 },
-{ 0x00, 0x65, 0x45 },
-{ 0x00, 0x66, 0x46 },
-{ 0x00, 0x67, 0x47 },
-{ 0x00, 0x68, 0x48 },
-{ 0x00, 0x69, 0x49 },
-{ 0x00, 0x6a, 0x4a },
-{ 0x00, 0x6b, 0x4b },
-{ 0x00, 0x6c, 0x4c },
-{ 0x00, 0x6d, 0x4d },
-{ 0x00, 0x6e, 0x4e },
-{ 0x00, 0x6f, 0x4f },
-{ 0x00, 0x70, 0x50 },
-{ 0x00, 0x71, 0x51 },
-{ 0x00, 0x72, 0x52 },
-{ 0x00, 0x73, 0x53 },
-{ 0x00, 0x74, 0x54 },
-{ 0x00, 0x75, 0x55 },
-{ 0x00, 0x76, 0x56 },
-{ 0x00, 0x77, 0x57 },
-{ 0x00, 0x78, 0x58 },
-{ 0x00, 0x79, 0x59 },
-{ 0x00, 0x7a, 0x5a },
-{ 0x00, 0x7b, 0x7b },
-{ 0x00, 0x7c, 0x7c },
-{ 0x00, 0x7d, 0x7d },
-{ 0x00, 0x7e, 0x7e },
-{ 0x00, 0x7f, 0x7f },
-{ 0x00, 0x80, 0x80 },
-{ 0x00, 0x81, 0x81 },
-{ 0x00, 0x82, 0x82 },
-{ 0x00, 0x83, 0x83 },
-{ 0x00, 0x84, 0x84 },
-{ 0x00, 0x85, 0x85 },
-{ 0x00, 0x86, 0x86 },
-{ 0x00, 0x87, 0x87 },
-{ 0x00, 0x88, 0x88 },
-{ 0x00, 0x89, 0x89 },
-{ 0x00, 0x8a, 0x8a },
-{ 0x00, 0x8b, 0x8b },
-{ 0x00, 0x8c, 0x8c },
-{ 0x00, 0x8d, 0x8d },
-{ 0x00, 0x8e, 0x8e },
-{ 0x00, 0x8f, 0x8f },
-{ 0x00, 0x90, 0x90 },
-{ 0x00, 0x91, 0x91 },
-{ 0x00, 0x92, 0x92 },
-{ 0x00, 0x93, 0x93 },
-{ 0x00, 0x94, 0x94 },
-{ 0x00, 0x95, 0x95 },
-{ 0x00, 0x96, 0x96 },
-{ 0x00, 0x97, 0x97 },
-{ 0x00, 0x98, 0x98 },
-{ 0x00, 0x99, 0x99 },
-{ 0x00, 0x9a, 0x9a },
-{ 0x00, 0x9b, 0x9b },
-{ 0x00, 0x9c, 0x9c },
-{ 0x00, 0x9d, 0x9d },
-{ 0x00, 0x9e, 0x9e },
-{ 0x00, 0x9f, 0x9f },
-{ 0x00, 0xa0, 0xa0 },
-{ 0x00, 0xa1, 0xa1 },
-{ 0x00, 0xa2, 0xa2 },
-{ 0x00, 0xa3, 0xb3 },
-{ 0x00, 0xa4, 0xa4 },
-{ 0x00, 0xa5, 0xa5 },
-{ 0x00, 0xa6, 0xa6 },
-{ 0x00, 0xa7, 0xa7 },
-{ 0x00, 0xa8, 0xa8 },
-{ 0x00, 0xa9, 0xa9 },
-{ 0x00, 0xaa, 0xaa },
-{ 0x00, 0xab, 0xab },
-{ 0x00, 0xac, 0xac },
-{ 0x00, 0xad, 0xad },
-{ 0x00, 0xae, 0xae },
-{ 0x00, 0xaf, 0xaf },
-{ 0x00, 0xb0, 0xb0 },
-{ 0x00, 0xb1, 0xb1 },
-{ 0x00, 0xb2, 0xb2 },
-{ 0x01, 0xa3, 0xb3 },
-{ 0x00, 0xb4, 0xb4 },
-{ 0x00, 0xb5, 0xb5 },
-{ 0x00, 0xb6, 0xb6 },
-{ 0x00, 0xb7, 0xb7 },
-{ 0x00, 0xb8, 0xb8 },
-{ 0x00, 0xb9, 0xb9 },
-{ 0x00, 0xba, 0xba },
-{ 0x00, 0xbb, 0xbb },
-{ 0x00, 0xbc, 0xbc },
-{ 0x00, 0xbd, 0xbd },
-{ 0x00, 0xbe, 0xbe },
-{ 0x00, 0xbf, 0xbf },
-{ 0x00, 0xc0, 0xe0 },
-{ 0x00, 0xc1, 0xe1 },
-{ 0x00, 0xc2, 0xe2 },
-{ 0x00, 0xc3, 0xe3 },
-{ 0x00, 0xc4, 0xe4 },
-{ 0x00, 0xc5, 0xe5 },
-{ 0x00, 0xc6, 0xe6 },
-{ 0x00, 0xc7, 0xe7 },
-{ 0x00, 0xc8, 0xe8 },
-{ 0x00, 0xc9, 0xe9 },
-{ 0x00, 0xca, 0xea },
-{ 0x00, 0xcb, 0xeb },
-{ 0x00, 0xcc, 0xec },
-{ 0x00, 0xcd, 0xed },
-{ 0x00, 0xce, 0xee },
-{ 0x00, 0xcf, 0xef },
-{ 0x00, 0xd0, 0xf0 },
-{ 0x00, 0xd1, 0xf1 },
-{ 0x00, 0xd2, 0xf2 },
-{ 0x00, 0xd3, 0xf3 },
-{ 0x00, 0xd4, 0xf4 },
-{ 0x00, 0xd5, 0xf5 },
-{ 0x00, 0xd6, 0xf6 },
-{ 0x00, 0xd7, 0xf7 },
-{ 0x00, 0xd8, 0xf8 },
-{ 0x00, 0xd9, 0xf9 },
-{ 0x00, 0xda, 0xfa },
-{ 0x00, 0xdb, 0xfb },
-{ 0x00, 0xdc, 0xfc },
-{ 0x00, 0xdd, 0xfd },
-{ 0x00, 0xde, 0xfe },
-{ 0x00, 0xdf, 0xff },
-{ 0x01, 0xc0, 0xe0 },
-{ 0x01, 0xc1, 0xe1 },
-{ 0x01, 0xc2, 0xe2 },
-{ 0x01, 0xc3, 0xe3 },
-{ 0x01, 0xc4, 0xe4 },
-{ 0x01, 0xc5, 0xe5 },
-{ 0x01, 0xc6, 0xe6 },
-{ 0x01, 0xc7, 0xe7 },
-{ 0x01, 0xc8, 0xe8 },
-{ 0x01, 0xc9, 0xe9 },
-{ 0x01, 0xca, 0xea },
-{ 0x01, 0xcb, 0xeb },
-{ 0x01, 0xcc, 0xec },
-{ 0x01, 0xcd, 0xed },
-{ 0x01, 0xce, 0xee },
-{ 0x01, 0xcf, 0xef },
-{ 0x01, 0xd0, 0xf0 },
-{ 0x01, 0xd1, 0xf1 },
-{ 0x01, 0xd2, 0xf2 },
-{ 0x01, 0xd3, 0xf3 },
-{ 0x01, 0xd4, 0xf4 },
-{ 0x01, 0xd5, 0xf5 },
-{ 0x01, 0xd6, 0xf6 },
-{ 0x01, 0xd7, 0xf7 },
-{ 0x01, 0xd8, 0xf8 },
-{ 0x01, 0xd9, 0xf9 },
-{ 0x01, 0xda, 0xfa },
-{ 0x01, 0xdb, 0xfb },
-{ 0x01, 0xdc, 0xfc },
-{ 0x01, 0xdd, 0xfd },
-{ 0x01, 0xde, 0xfe },
-{ 0x01, 0xdf, 0xff }
-};
-
-static struct cs_info koi8u_tbl[] = {
-{ 0x00, 0x00, 0x00 },
-{ 0x00, 0x01, 0x01 },
-{ 0x00, 0x02, 0x02 },
-{ 0x00, 0x03, 0x03 },
-{ 0x00, 0x04, 0x04 },
-{ 0x00, 0x05, 0x05 },
-{ 0x00, 0x06, 0x06 },
-{ 0x00, 0x07, 0x07 },
-{ 0x00, 0x08, 0x08 },
-{ 0x00, 0x09, 0x09 },
-{ 0x00, 0x0a, 0x0a },
-{ 0x00, 0x0b, 0x0b },
-{ 0x00, 0x0c, 0x0c },
-{ 0x00, 0x0d, 0x0d },
-{ 0x00, 0x0e, 0x0e },
-{ 0x00, 0x0f, 0x0f },
-{ 0x00, 0x10, 0x10 },
-{ 0x00, 0x11, 0x11 },
-{ 0x00, 0x12, 0x12 },
-{ 0x00, 0x13, 0x13 },
-{ 0x00, 0x14, 0x14 },
-{ 0x00, 0x15, 0x15 },
-{ 0x00, 0x16, 0x16 },
-{ 0x00, 0x17, 0x17 },
-{ 0x00, 0x18, 0x18 },
-{ 0x00, 0x19, 0x19 },
-{ 0x00, 0x1a, 0x1a },
-{ 0x00, 0x1b, 0x1b },
-{ 0x00, 0x1c, 0x1c },
-{ 0x00, 0x1d, 0x1d },
-{ 0x00, 0x1e, 0x1e },
-{ 0x00, 0x1f, 0x1f },
-{ 0x00, 0x20, 0x20 },
-{ 0x00, 0x21, 0x21 },
-{ 0x00, 0x22, 0x22 },
-{ 0x00, 0x23, 0x23 },
-{ 0x00, 0x24, 0x24 },
-{ 0x00, 0x25, 0x25 },
-{ 0x00, 0x26, 0x26 },
-{ 0x00, 0x27, 0x27 },
-{ 0x00, 0x28, 0x28 },
-{ 0x00, 0x29, 0x29 },
-{ 0x00, 0x2a, 0x2a },
-{ 0x00, 0x2b, 0x2b },
-{ 0x00, 0x2c, 0x2c },
-{ 0x00, 0x2d, 0x2d },
-{ 0x00, 0x2e, 0x2e },
-{ 0x00, 0x2f, 0x2f },
-{ 0x00, 0x30, 0x30 },
-{ 0x00, 0x31, 0x31 },
-{ 0x00, 0x32, 0x32 },
-{ 0x00, 0x33, 0x33 },
-{ 0x00, 0x34, 0x34 },
-{ 0x00, 0x35, 0x35 },
-{ 0x00, 0x36, 0x36 },
-{ 0x00, 0x37, 0x37 },
-{ 0x00, 0x38, 0x38 },
-{ 0x00, 0x39, 0x39 },
-{ 0x00, 0x3a, 0x3a },
-{ 0x00, 0x3b, 0x3b },
-{ 0x00, 0x3c, 0x3c },
-{ 0x00, 0x3d, 0x3d },
-{ 0x00, 0x3e, 0x3e },
-{ 0x00, 0x3f, 0x3f },
-{ 0x00, 0x40, 0x40 },
-{ 0x01, 0x61, 0x41 },
-{ 0x01, 0x62, 0x42 },
-{ 0x01, 0x63, 0x43 },
-{ 0x01, 0x64, 0x44 },
-{ 0x01, 0x65, 0x45 },
-{ 0x01, 0x66, 0x46 },
-{ 0x01, 0x67, 0x47 },
-{ 0x01, 0x68, 0x48 },
-{ 0x01, 0x69, 0x49 },
-{ 0x01, 0x6a, 0x4a },
-{ 0x01, 0x6b, 0x4b },
-{ 0x01, 0x6c, 0x4c },
-{ 0x01, 0x6d, 0x4d },
-{ 0x01, 0x6e, 0x4e },
-{ 0x01, 0x6f, 0x4f },
-{ 0x01, 0x70, 0x50 },
-{ 0x01, 0x71, 0x51 },
-{ 0x01, 0x72, 0x52 },
-{ 0x01, 0x73, 0x53 },
-{ 0x01, 0x74, 0x54 },
-{ 0x01, 0x75, 0x55 },
-{ 0x01, 0x76, 0x56 },
-{ 0x01, 0x77, 0x57 },
-{ 0x01, 0x78, 0x58 },
-{ 0x01, 0x79, 0x59 },
-{ 0x01, 0x7a, 0x5a },
-{ 0x00, 0x5b, 0x5b },
-{ 0x00, 0x5c, 0x5c },
-{ 0x00, 0x5d, 0x5d },
-{ 0x00, 0x5e, 0x5e },
-{ 0x00, 0x5f, 0x5f },
-{ 0x00, 0x60, 0x60 },
-{ 0x00, 0x61, 0x41 },
-{ 0x00, 0x62, 0x42 },
-{ 0x00, 0x63, 0x43 },
-{ 0x00, 0x64, 0x44 },
-{ 0x00, 0x65, 0x45 },
-{ 0x00, 0x66, 0x46 },
-{ 0x00, 0x67, 0x47 },
-{ 0x00, 0x68, 0x48 },
-{ 0x00, 0x69, 0x49 },
-{ 0x00, 0x6a, 0x4a },
-{ 0x00, 0x6b, 0x4b },
-{ 0x00, 0x6c, 0x4c },
-{ 0x00, 0x6d, 0x4d },
-{ 0x00, 0x6e, 0x4e },
-{ 0x00, 0x6f, 0x4f },
-{ 0x00, 0x70, 0x50 },
-{ 0x00, 0x71, 0x51 },
-{ 0x00, 0x72, 0x52 },
-{ 0x00, 0x73, 0x53 },
-{ 0x00, 0x74, 0x54 },
-{ 0x00, 0x75, 0x55 },
-{ 0x00, 0x76, 0x56 },
-{ 0x00, 0x77, 0x57 },
-{ 0x00, 0x78, 0x58 },
-{ 0x00, 0x79, 0x59 },
-{ 0x00, 0x7a, 0x5a },
-{ 0x00, 0x7b, 0x7b },
-{ 0x00, 0x7c, 0x7c },
-{ 0x00, 0x7d, 0x7d },
-{ 0x00, 0x7e, 0x7e },
-{ 0x00, 0x7f, 0x7f },
-{ 0x00, 0x80, 0x80 },
-{ 0x00, 0x81, 0x81 },
-{ 0x00, 0x82, 0x82 },
-{ 0x00, 0x83, 0x83 },
-{ 0x00, 0x84, 0x84 },
-{ 0x00, 0x85, 0x85 },
-{ 0x00, 0x86, 0x86 },
-{ 0x00, 0x87, 0x87 },
-{ 0x00, 0x88, 0x88 },
-{ 0x00, 0x89, 0x89 },
-{ 0x00, 0x8a, 0x8a },
-{ 0x00, 0x8b, 0x8b },
-{ 0x00, 0x8c, 0x8c },
-{ 0x00, 0x8d, 0x8d },
-{ 0x00, 0x8e, 0x8e },
-{ 0x00, 0x8f, 0x8f },
-{ 0x00, 0x90, 0x90 },
-{ 0x00, 0x91, 0x91 },
-{ 0x00, 0x92, 0x92 },
-{ 0x00, 0x93, 0x93 },
-{ 0x00, 0x94, 0x94 },
-{ 0x00, 0x95, 0x95 },
-{ 0x00, 0x96, 0x96 },
-{ 0x00, 0x97, 0x97 },
-{ 0x00, 0x98, 0x98 },
-{ 0x00, 0x99, 0x99 },
-{ 0x00, 0x9a, 0x9a },
-{ 0x00, 0x9b, 0x9b },
-{ 0x00, 0x9c, 0x9c },
-{ 0x00, 0x9d, 0x9d },
-{ 0x00, 0x9e, 0x9e },
-{ 0x00, 0x9f, 0x9f },
-{ 0x00, 0xa0, 0xa0 },
-{ 0x00, 0xa1, 0xa1 },
-{ 0x00, 0xa2, 0xa2 },