diff options
| author | Sam Varshavchik | 2014-01-12 12:39:27 -0500 | 
|---|---|---|
| committer | Sam Varshavchik | 2014-01-12 12:39:27 -0500 | 
| commit | a307e734a37763fc25778adffc2cd5c0d0390555 (patch) | |
| tree | 6d3c1a6ab37626fbce8afa591f1054789582159b /unicode | |
| parent | 17317c25aecbf38f43bfcf8e7a63194cd345e696 (diff) | |
| download | courier-libs-a307e734a37763fc25778adffc2cd5c0d0390555.tar.bz2 | |
Refactor unicode library as a standalone package
Diffstat (limited to 'unicode')
| -rw-r--r-- | unicode/.gitignore | 29 | ||||
| -rw-r--r-- | unicode/AUTHORS | 7 | ||||
| -rw-r--r-- | unicode/COPYING | 674 | ||||
| -rw-r--r-- | unicode/ChangeLog | 3 | ||||
| -rw-r--r-- | unicode/Makefile.am | 84 | ||||
| -rw-r--r-- | unicode/README | 68 | ||||
| -rw-r--r-- | unicode/book.xml | 2181 | ||||
| -rw-r--r-- | unicode/configure.ac | 9 | ||||
| -rw-r--r-- | unicode/courier-unicode.spec.in | 61 | ||||
| -rw-r--r-- | unicode/docbook/book.css | 155 | ||||
| -rw-r--r-- | unicode/docbook/docbook.xsl | 48 | ||||
| -rw-r--r-- | unicode/docbook/frame.js | 8 | ||||
| -rw-r--r-- | unicode/docbook/icon.gif | bin | 0 -> 105 bytes | |||
| -rw-r--r-- | unicode/linebreaktest.C | 14 | ||||
| -rw-r--r-- | unicode/unicode.c | 283 | ||||
| -rw-r--r-- | unicode/unicode.h | 157 | ||||
| -rw-r--r-- | unicode/unicode_linebreak.c | 17 | ||||
| -rw-r--r-- | unicode/unicode_ultcasetab.c | 508 | ||||
| -rw-r--r-- | unicode/unicodecpp.C | 145 | ||||
| -rw-r--r-- | unicode/unicodetest.c | 36 | ||||
| -rw-r--r-- | unicode/wordbreaktest.C | 8 | 
21 files changed, 3860 insertions, 635 deletions
| diff --git a/unicode/.gitignore b/unicode/.gitignore index cdd150a..87f4156 100644 --- a/unicode/.gitignore +++ b/unicode/.gitignore @@ -1,18 +1,33 @@ -/enttest -/graphemetest -/linebreaktest -/unicode_config.h -/unicode_config.h.in -/unicodetest -/wordbreaktest +/*.bz2 +/*.gz  /EastAsianWidth.txt  /GraphemeBreakProperty.txt +/INSTALL  /LineBreak.txt  /LineBreakTest.txt  /UnicodeData.txt  /Unihan.zip  /WordBreakProperty.txt  /WordBreakTest.txt +/config.cache +/config.guess +/config.sub +/courier-unicode.spec +/depcomp +/enttest +/graphemetest +/html +/install-sh +/linebreaktest +/ltmain.sh +/man +/missing +/rpm +/rpm.release +/unicode_config.h +/unicode_config.h.in +/unicodetest +/wordbreaktest  /xhtml-lat1.ent  /xhtml-special.ent  /xhtml-symbol.ent diff --git a/unicode/AUTHORS b/unicode/AUTHORS new file mode 100644 index 0000000..551605f --- /dev/null +++ b/unicode/AUTHORS @@ -0,0 +1,7 @@ +The Courier Unicode Library is written by: + +Sam Varshavchik <mrsam@courier-mta.com> +Double Precision, Inc. +402 Main Street +Suite 100-241 +Metuchen, NJ 08840 diff --git a/unicode/COPYING b/unicode/COPYING new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/unicode/COPYING @@ -0,0 +1,674 @@ +                    GNU GENERAL PUBLIC LICENSE +                       Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +                            Preamble + +  The GNU General Public License is a free, copyleft license for +software and other kinds of works. + +  The licenses for most software and other practical works are designed +to take away your freedom to share and change the works.  By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users.  We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors.  You can apply it to +your programs, too. + +  When we speak of free software, we are referring to freedom, not +price.  Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + +  To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights.  Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + +  For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received.  You must make sure that they, too, receive +or can get the source code.  And you must show them these terms so they +know their rights. + +  Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + +  For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software.  For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + +  Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so.  This is fundamentally incompatible with the aim of +protecting users' freedom to change the software.  The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable.  Therefore, we +have designed this version of the GPL to prohibit the practice for those +products.  If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + +  Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary.  To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + +  The precise terms and conditions for copying, distribution and +modification follow. + +                       TERMS AND CONDITIONS + +  0. Definitions. + +  "This License" refers to version 3 of the GNU General Public License. + +  "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + +  "The Program" refers to any copyrightable work licensed under this +License.  Each licensee is addressed as "you".  "Licensees" and +"recipients" may be individuals or organizations. + +  To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy.  The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + +  A "covered work" means either the unmodified Program or a work based +on the Program. + +  To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy.  Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + +  To "convey" a work means any kind of propagation that enables other +parties to make or receive copies.  Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + +  An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License.  If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + +  1. Source Code. + +  The "source code" for a work means the preferred form of the work +for making modifications to it.  "Object code" means any non-source +form of a work. + +  A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + +  The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form.  A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + +  The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities.  However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work.  For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + +  The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + +  The Corresponding Source for a work in source code form is that +same work. + +  2. Basic Permissions. + +  All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met.  This License explicitly affirms your unlimited +permission to run the unmodified Program.  The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work.  This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + +  You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force.  You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright.  Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + +  Conveying under any other circumstances is permitted solely under +the conditions stated below.  Sublicensing is not allowed; section 10 +makes it unnecessary. + +  3. Protecting Users' Legal Rights From Anti-Circumvention Law. + +  No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + +  When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + +  4. Conveying Verbatim Copies. + +  You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + +  You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + +  5. Conveying Modified Source Versions. + +  You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + +    a) The work must carry prominent notices stating that you modified +    it, and giving a relevant date. + +    b) The work must carry prominent notices stating that it is +    released under this License and any conditions added under section +    7.  This requirement modifies the requirement in section 4 to +    "keep intact all notices". + +    c) You must license the entire work, as a whole, under this +    License to anyone who comes into possession of a copy.  This +    License will therefore apply, along with any applicable section 7 +    additional terms, to the whole of the work, and all its parts, +    regardless of how they are packaged.  This License gives no +    permission to license the work in any other way, but it does not +    invalidate such permission if you have separately received it. + +    d) If the work has interactive user interfaces, each must display +    Appropriate Legal Notices; however, if the Program has interactive +    interfaces that do not display Appropriate Legal Notices, your +    work need not make them do so. + +  A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit.  Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + +  6. Conveying Non-Source Forms. + +  You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + +    a) Convey the object code in, or embodied in, a physical product +    (including a physical distribution medium), accompanied by the +    Corresponding Source fixed on a durable physical medium +    customarily used for software interchange. + +    b) Convey the object code in, or embodied in, a physical product +    (including a physical distribution medium), accompanied by a +    written offer, valid for at least three years and valid for as +    long as you offer spare parts or customer support for that product +    model, to give anyone who possesses the object code either (1) a +    copy of the Corresponding Source for all the software in the +    product that is covered by this License, on a durable physical +    medium customarily used for software interchange, for a price no +    more than your reasonable cost of physically performing this +    conveying of source, or (2) access to copy the +    Corresponding Source from a network server at no charge. + +    c) Convey individual copies of the object code with a copy of the +    written offer to provide the Corresponding Source.  This +    alternative is allowed only occasionally and noncommercially, and +    only if you received the object code with such an offer, in accord +    with subsection 6b. + +    d) Convey the object code by offering access from a designated +    place (gratis or for a charge), and offer equivalent access to the +    Corresponding Source in the same way through the same place at no +    further charge.  You need not require recipients to copy the +    Corresponding Source along with the object code.  If the place to +    copy the object code is a network server, the Corresponding Source +    may be on a different server (operated by you or a third party) +    that supports equivalent copying facilities, provided you maintain +    clear directions next to the object code saying where to find the +    Corresponding Source.  Regardless of what server hosts the +    Corresponding Source, you remain obligated to ensure that it is +    available for as long as needed to satisfy these requirements. + +    e) Convey the object code using peer-to-peer transmission, provided +    you inform other peers where the object code and Corresponding +    Source of the work are being offered to the general public at no +    charge under subsection 6d. + +  A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + +  A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling.  In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage.  For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product.  A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + +  "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source.  The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + +  If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information.  But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + +  The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed.  Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + +  Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + +  7. Additional Terms. + +  "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law.  If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + +  When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it.  (Additional permissions may be written to require their own +removal in certain cases when you modify the work.)  You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + +  Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + +    a) Disclaiming warranty or limiting liability differently from the +    terms of sections 15 and 16 of this License; or + +    b) Requiring preservation of specified reasonable legal notices or +    author attributions in that material or in the Appropriate Legal +    Notices displayed by works containing it; or + +    c) Prohibiting misrepresentation of the origin of that material, or +    requiring that modified versions of such material be marked in +    reasonable ways as different from the original version; or + +    d) Limiting the use for publicity purposes of names of licensors or +    authors of the material; or + +    e) Declining to grant rights under trademark law for use of some +    trade names, trademarks, or service marks; or + +    f) Requiring indemnification of licensors and authors of that +    material by anyone who conveys the material (or modified versions of +    it) with contractual assumptions of liability to the recipient, for +    any liability that these contractual assumptions directly impose on +    those licensors and authors. + +  All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10.  If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term.  If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + +  If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + +  Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + +  8. Termination. + +  You may not propagate or modify a covered work except as expressly +provided under this License.  Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + +  However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + +  Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + +  Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License.  If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + +  9. Acceptance Not Required for Having Copies. + +  You are not required to accept this License in order to receive or +run a copy of the Program.  Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance.  However, +nothing other than this License grants you permission to propagate or +modify any covered work.  These actions infringe copyright if you do +not accept this License.  Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + +  10. Automatic Licensing of Downstream Recipients. + +  Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License.  You are not responsible +for enforcing compliance by third parties with this License. + +  An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations.  If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + +  You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License.  For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + +  11. Patents. + +  A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based.  The +work thus licensed is called the contributor's "contributor version". + +  A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version.  For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + +  Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + +  In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement).  To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + +  If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients.  "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + +  If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + +  A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License.  You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + +  Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + +  12. No Surrender of Others' Freedom. + +  If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License.  If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all.  For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + +  13. Use with the GNU Affero General Public License. + +  Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work.  The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + +  14. Revised Versions of this License. + +  The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time.  Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +  Each version is given a distinguishing version number.  If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation.  If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + +  If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + +  Later license versions may give you additional or different +permissions.  However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + +  15. Disclaimer of Warranty. + +  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +  16. Limitation of Liability. + +  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + +  17. Interpretation of Sections 15 and 16. + +  If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + +                     END OF TERMS AND CONDITIONS + +            How to Apply These Terms to Your New Programs + +  If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + +  To do so, attach the following notices to the program.  It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + +    <one line to give the program's name and a brief idea of what it does.> +    Copyright (C) <year>  <name of author> + +    This program is free software: you can redistribute it and/or modify +    it under the terms of the GNU General Public License as published by +    the Free Software Foundation, either version 3 of the License, or +    (at your option) any later version. + +    This program is distributed in the hope that it will be useful, +    but WITHOUT ANY WARRANTY; without even the implied warranty of +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +    GNU General Public License for more details. + +    You should have received a copy of the GNU General Public License +    along with this program.  If not, see <http://www.gnu.org/licenses/>. + +Also add information on how to contact you by electronic and paper mail. + +  If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + +    <program>  Copyright (C) <year>  <name of author> +    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. +    This is free software, and you are welcome to redistribute it +    under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License.  Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + +  You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +<http://www.gnu.org/licenses/>. + +  The GNU General Public License does not permit incorporating your program +into proprietary programs.  If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library.  If this is what you want to do, use the GNU Lesser General +Public License instead of this License.  But first, please read +<http://www.gnu.org/philosophy/why-not-lgpl.html>. diff --git a/unicode/ChangeLog b/unicode/ChangeLog new file mode 100644 index 0000000..ef75d5e --- /dev/null +++ b/unicode/ChangeLog @@ -0,0 +1,3 @@ +2014-01-06  Sam Varshavchik  <mrsam@courier-mta.com> + +	* Refactored as a standalone library, changed some symbol names. diff --git a/unicode/Makefile.am b/unicode/Makefile.am index cf1c63f..588491b 100644 --- a/unicode/Makefile.am +++ b/unicode/Makefile.am @@ -1,5 +1,5 @@  # -# Copyright 2000-2011 Double Precision, Inc.  See COPYING for +# Copyright 2000-2014 Double Precision, Inc.  See COPYING for  # distribution information. @@ -43,7 +43,9 @@ update-www-htmlent:  	@SHELL@ $(srcdir)/update.sh xhtml-symbol.ent http://www.w3.org/TR/xhtml1/DTD/xhtml-symbol.ent  	@SHELL@ $(srcdir)/update.sh xhtml-special.ent http://www.w3.org/TR/xhtml1/DTD/xhtml-special.ent -noinst_LTLIBRARIES=libunicode.la +lib_LTLIBRARIES=libunicode.la +include_HEADERS=unicode.h +man_MANS=man/courier-unicode.7 man/unicode[\:][\:]iconvert[\:][\:]convert.3 man/unicode[\:][\:]iconvert[\:][\:]convert_tocase.3 man/unicode[\:][\:]iconvert[\:][\:]fromu.3 man/unicode[\:][\:]iconvert[\:][\:]tou.3 man/unicode[\:][\:]linebreak_callback_base.3 man/unicode[\:][\:]linebreak_callback_save_buf.3 man/unicode[\:][\:]linebreak_iter.3 man/unicode[\:][\:]linebreakc_callback_base.3 man/unicode[\:][\:]linebreakc_iter.3 man/unicode[\:][\:]wordbreak_callback_base.3 man/unicode_convert.3 man/unicode_convert_deinit.3 man/unicode_convert_fromu_init.3 man/unicode_convert_fromu_tobuf.3 man/unicode_convert_fromutf8.3 man/unicode_convert_init.3 man/unicode_convert_tobuf.3 man/unicode_convert_tocase.3 man/unicode_convert_tocbuf_fromutf8_init.3 man/unicode_convert_tocbuf_init.3 man/unicode_convert_tocbuf_toutf8_init.3 man/unicode_convert_tou_init.3 man/unicode_convert_tou_tobuf.3 man/unicode_convert_toutf8.3 man/unicode_convert_uc.3 man/unicode_default_chset.3 man/unicode_grapheme_break.3 man/unicode_html40ent_lookup.3 man/unicode_isspace.3 man/unicode_lb_end.3 man/unicode_lb_init.3 man/unicode_lb_next.3 man/unicode_lb_next_cnt.3 man/unicode_lb_set_opts.3 man/unicode_lbc_end.3 man/unicode_lbc_init.3 man/unicode_lbc_next.3 man/unicode_lbc_next_cnt.3 man/unicode_lbc_set_opts.3 man/unicode_lc.3 man/unicode_tc.3 man/unicode_u_ucs2_native.3 man/unicode_u_ucs4_native.3 man/unicode_uc.3 man/unicode_wb_end.3 man/unicode_wb_init.3 man/unicode_wb_next.3 man/unicode_wb_next_cnt.3 man/unicode_wbscan_end.3 man/unicode_wbscan_init.3 man/unicode_wbscan_next.3  libunicode_la_SOURCES=unicode.h unicode.c unicodebuf.c \  			unicodecpp.C \ @@ -57,8 +59,9 @@ libunicode_la_SOURCES=unicode.h unicode.c unicodebuf.c \  			linebreaktab_internal.h \  			unicode_wordbreak.c wordbreaktab.h \  			wordbreaktab_internal.h +libunicode_la_LDFLAGS=-version-info 0:0:0 -EXTRA_DIST=$(noinst_SCRIPTS) +EXTRA_DIST=$(noinst_SCRIPTS) $(man_MANS) $(PACKAGE).spec  if UPDATE_UNICODE @@ -113,7 +116,8 @@ enttest_LDFLAGS=-static  check-am: unicodetest  	./unicodetest  	./enttest -	test -f ./LineBreakTest.txt || exit 0; ./linebreaktest +	set -vx; test -f ./LineBreakTest.txt || exit 0; ./linebreaktest +	set -vx; test -f ./WordBreakTest.txt || exit 0; ./wordbreaktest  	test "`./unicodetest foo`" = "foo"  	test "`./unicodetest 'foo&bar.~'`" = "foo&-bar.~"  	test "`./unicodetest 'foobаr'`" = "foob&BDA-r" @@ -167,4 +171,76 @@ check-am: unicodetest  	exit 0; test "`./graphemetest 0xAABB 0x0041`" = "0" # GB9b N/A  	test "`./graphemetest 0x0041 0x0041`" = "1" +docs: +	rm -rf html.tmp +	mkdir html.tmp +	xsltproc --nonet -o html.tmp/ --xinclude \ +		--stringparam use.id.as.filename 1 \ +		--stringparam html.stylesheet book.css \ +		--stringparam root.filename 'index' \ +		--stringparam generate.id.attributes 1 \ +		$(srcdir)/docbook/docbook.xsl $(srcdir)/book.xml +	mkdir -p html +	rm -f html/* +	mv html.tmp/* html +	cp -p docbook/frame.js docbook/icon.gif docbook/book.css html +	rm -rf man.tmp +	mkdir man.tmp +	d=`cd $(srcdir); pwd`; cd man.tmp; xsltproc --nonet --xinclude \ +	http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl\ +		$$d/book.xml +	mkdir -p man +	rm -f man/*.[123456789] +	mv man.tmp/* man +	rm -rf html.tmp man.tmp +	perl -p -i -e 's/:/[\\:]/g if s@^man_MANS=.*@"man_MANS=" . join(" ", glob("man/*.[123456789]"))@e' Makefile.am + +if HAVE_DOCS +all-am: INSTALL README + +README: html/index.html +	elinks -dump -no-numbering -no-references html/index.html >README.tmp +	mv -f README.tmp README + +INSTALL: html/INSTALL.html +	elinks -dump -no-numbering -no-references html/INSTALL.html >INSTALL.tmp +	mv -f INSTALL.tmp INSTALL +endif +.PHONY: rpm + +rpm: +	$(MAKE) bump.rpm.release +	$(MAKE) dist +	$(MAKE) dorpm +	$$HOME/repos.sh + +dorpm: +	rm -rf rpm/BUILD/* +	rm -f rpm/RPMS/*/* +	rm -f rpm/SOURCES/* +	rm -f rpm/SPECS/* +	rm -f rpm/SRPMS/* +	rpmbuild -ta --clean \ +		--define "_topdir `pwd`/rpm" \ +		--define '_rpmdir %{_topdir}/RPMS' \ +		--define '_srcrpmdir %{_topdir}/SRPMS' \ +		--define '_sourcedir %{_topdir}/SOURCES' \ +		--define '_specdir %{_topdir}/SPECS' \ +		--define '_builddir %{_topdir}/BUILD' \ +		--define '_build_name_fmt %%{ARCH}/%%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm' \ +		--define '_tmppath %{_var}/tmp' \ +		--define '__spec_prep_pre %{___build_pre}' \ +		$(RPMFLAGS) @PACKAGE@-@VERSION@.tar.bz2 + +bump.rpm.release: $(PACKAGE).spec +	VERSION="x"; \ +	test -f $(srcdir)/rpm.release && . $(srcdir)/rpm.release; \ +	NEXT_RELEASE=0; \ +	test "$$VERSION" = "@VERSION@" && NEXT_RELEASE="$$RELEASE"; \ +	RELEASE=`expr $$NEXT_RELEASE + 1`; \ +	echo "VERSION=@VERSION@" >$(srcdir)/rpm.release; \ +	echo "RELEASE=$$RELEASE" >>$(srcdir)/rpm.release; \ +	sed 's/^Release: .*/Release: '$$RELEASE'%{?dist}%{?courier_release}/' \ +		<$(PACKAGE).spec >$(PACKAGE).spec.new; \ +	mv $(PACKAGE).spec.new $(PACKAGE).spec diff --git a/unicode/README b/unicode/README index 3112508..ff899c4 100644 --- a/unicode/README +++ b/unicode/README @@ -1,49 +1,49 @@ +   Link: Courier Unicode Library (start) +   Link: Installation (next) -HOW TO ADD A NEW CHARACTER SET MAPPING. +                            Courier Unicode Library +                                                                         Next - * Create a struct unicode_info structure.  This structure defines the - official character set name, as well as pointers to conversion functions. +   -------------------------------------------------------------------------- - * Add the name of the character set, and the name of your structure to - unicode/charsetlist.txt.  Multiple entries in unicode/charsetlist.txt can - be used to define aliases for the same character set.  Example - "IBM869" - and "CP869" both specify the same character set, they both point to the - unicode_IBM_869 object, which is defined in ibm869.c +Courier Unicode Library - There's an automatically generated source file, charsetlist.c, which is - generated by a script from charsetlist.txt.  That's how character sets end up - being linked into the code, and how individual character sets can be - selectively included or excluded. +   -------------------------------------------------------------------------- - The struct unicode_info structure contains pointers to the following - functions: +   Table of Contents - + Convert text in this character set to unicode. +   Current status - + Convert unicode to text in this character set. +   Installation - + Convert text in this character set to uppercase. +   Manual pages - + Convert text in this character set to lowercase. +   COPYING - + Convert text in this character set to titlecase. +   This library implements several algorithms related to the Unicode +   Standard: - If the character set allows for convenient conversion to - upper/lower/titlecase, the conversion code should be coded directly.  - Otherwise, the library has a set of convenient functions that go against - the unicode master table.  Text in any character set can - upper/lower/titlecased by converting it to unicode, running it through - unicode_uc/unicode_lc/unicode_tc, then converting unicode back to the - original character set.  See utf8_chset.c for an example. +     * Look up uppercase, lowercase, and titlecase equivalents of a unicode +       character. - Note that unicode_uc/unicode_lc/unicode_tc carries a heavy penalty, and - should be avoided.  unicode_[ult]c() adds about 26Kb of data tables. +     * Implementation of grapheme and work breaking rules. - Finally, all this code has to be added to libunicode.a.  It can simply be - added to libunicode_a_SOURCES. +     * Implementation of line breaking rules. - If, after doing all that, run make to build libunicode.a and the - unicode-info program.  Run unicode-info.  If the character set is listed by - unicode-info, you should be all set, provided that the conversion functions - actually work as advertised. +     * Several ancillary functions, like looking up the unicode character +       that corresponds to some HTML 4.0 entity (such as “&”, for +       example), and determining the normal width or a double-width status of +       a unicode character. Also, an adaptation of the iconv(3) API for this +       unicode library. +   This library also implements C++ bindings for these algorithms. + +Current status + +   The current release of the Courier Unicode library is based on the Unicode +   6.3.0 standard. + +   -------------------------------------------------------------------------- + +                                                                         Next +                                                                 Installation diff --git a/unicode/book.xml b/unicode/book.xml new file mode 100644 index 0000000..f16bac0 --- /dev/null +++ b/unicode/book.xml @@ -0,0 +1,2181 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE article PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" + "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [ + +]> + +<!-- + +Copyright 2014 Double Precision, Inc. +See COPYING for distribution information. + +--> + +<article id="index"> +  <title>Courier Unicode Library</title> + +  <para> +    This library implements several algorithms related to the +    <ulink url="http://www.unicode.org/standard/standard.html">Unicode +    Standard</ulink>: +  </para> + +  <itemizedlist> +    <listitem> +      <para> +	Look up uppercase, lowercase, and titlecase equivalents of a unicode +	character. +      </para> +    </listitem> +    <listitem> +      <para> +	Implementation of +	<ulink url="http://www.unicode.org/reports/tr29/tr29-23.html">grapheme +	and work breaking</ulink> rules. +      </para> +    </listitem> +    <listitem> +      <para> +	Implementation of +	<ulink url="http://www.unicode.org/reports/tr14/tr14-32.html">line +	breaking</ulink> rules. +      </para> +    </listitem> +    <listitem> +      <para> +	Several ancillary functions, like looking up +	the unicode character that corresponds to some HTML 4.0 +	entity (such as <quote>&amp;</quote>, for example), and +	determining the normal width or a double-width status of a unicode +	character. Also, an adaptation of the +	<ulink url="http://manpages.courier-mta.org/htmlman3/iconv.3.html"> +	<citerefentry><refentrytitle>iconv</refentrytitle> +	<manvolnum>3</manvolnum></citerefentry></ulink> +	API for this unicode library. +      </para> +    </listitem> +  </itemizedlist> + +  <para> +    This library also implements C++ bindings for these algorithms. +  </para> + +  <section id="status"> +    <title>Current status</title> + +    <para> +      The current release of the Courier Unicode library is based on the +      Unicode 6.3.0 standard. +    </para> +  </section> + +  <section id="INSTALL"> +    <title>Installation</title> + +    <para> +      Download the current version of the library from +      <ulink url="/download.html#unicode">http://www.courier-mta.org/download.html#unicode</ulink>. +      After unpacking the tarball, run the configure script, which takes +      the usual options, followed by <command>make</command>, then +      <command>make install</command>. +    </para> +  </section> + +  <section id="manpages"> +    <title>Manual pages</title> + +    <section id="manpagesc"> +      <title>C manual pages</title> +      <refentry id="courier-unicode"> + +	<info><author><firstname>Sam</firstname><surname>Varshavchik</surname><contrib>Author</contrib></author><productname>Courier Unicode Library</productname></info> +	<refmeta> +	  <refentrytitle>courier-unicode</refentrytitle> +	  <manvolnum>7</manvolnum> +	</refmeta> + +	<refnamediv> +	  <refname>courier-unicode</refname> +	  <refpurpose>Courier Unicode Library</refpurpose> + +	</refnamediv> + +	<refsynopsisdiv> +	  <programlisting> +#include <unicode.h></programlisting> +	</refsynopsisdiv> +	<refsect1> +	  <title>DESCRIPTION</title> + +	  <para> +	    This library implements several algorithms related to the +	    <ulink url="http://www.unicode.org/standard/standard.html">Unicode +	    Standard</ulink>. +	    This library uses +	    <ulink url="http://manpages.courier-mta.org/htmlman3/iconv.3.html"> +	      <citerefentry><refentrytitle>iconv</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></ulink> to convert +	      text in a given character set to unicode. Any character set +	      displayed by <command>iconv --list</command> can be specified +	      for the corresponding character set parameter. Additionally, +	      <filename>unicode.h</filename> defines a special character +	      string <literal>unicode_x_imap_modutf7</literal> that specifies +	      the pseudo-character set for the modified-UTF7 +	      encoding used in IMAP. This string can also be appended by +	      a space, and up to fifteen additional US-ASCII characters. +	      The resulting character set also encodes these additional +	      characters, in addition to unicode characters, with +	      modified-UTF7. +	  </para> +	</refsect1> +	<refsect1> +	  <title>SEE ALSO</title> + +	  <para> +	    <link linkend="unicode_convert"> +	      <citerefentry><refentrytitle>unicode_convert</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode_default_chset"> +	      <citerefentry><refentrytitle>unicode_default_chset</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode_html40ent_lookup"> +	      <citerefentry><refentrytitle>unicode_html40ent_lookup</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode_isspace"> +	      <citerefentry><refentrytitle>unicode_convert</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode_grapheme_break"> +	      <citerefentry><refentrytitle>unicode_grapheme_break</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode_line_break"> +	      <citerefentry><refentrytitle>unicode_line_break</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode_word_break"> +	      <citerefentry><refentrytitle>unicode_word_break</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode_uc"> +	      <citerefentry><refentrytitle>unicode_uc</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode__iconvert__convert"> +	      <citerefentry><refentrytitle>unicode::iconvert::convert</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode__iconvert__convert_tocase"> +	      <citerefentry><refentrytitle>unicode::iconvert::convert_tocase</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode__iconvert__fromu"> +	      <citerefentry><refentrytitle>unicode::iconvert::fromu</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode__iconvert__tou"> +	      <citerefentry><refentrytitle>unicode::iconvert::tou</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode__linebreak"> +	      <citerefentry><refentrytitle>unicode::linebreak</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode__wordbreak"> +	      <citerefentry><refentrytitle>unicode::wordbreak</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>. +	  </para> +	</refsect1> +      </refentry> + +      <refentry id="unicode_convert"> +	<info><author><firstname>Sam</firstname><surname>Varshavchik</surname><contrib>Author</contrib></author><productname>Courier Unicode Library</productname></info> + +	<refmeta> +	  <refentrytitle>unicode_convert</refentrytitle> +	  <manvolnum>3</manvolnum> +	</refmeta> + +	<refnamediv> +	  <refname>unicode_u_ucs4_native</refname> +	  <refname>unicode_u_ucs2_native</refname> +	  <refname>unicode_convert_init</refname> +	  <refname>unicode_convert</refname> +	  <refname>unicode_convert_deinit</refname> + +          <refname>unicode_convert_tocbuf_init</refname> +	  <refname>unicode_convert_tou_init</refname> +	  <refname>unicode_convert_fromu_init</refname> +	  <refname>unicode_convert_uc</refname> + +	  <refname>unicode_convert_tocbuf_toutf8_init</refname> +	  <refname>unicode_convert_tocbuf_fromutf8_init</refname> + +	  <refname>unicode_convert_toutf8</refname> +	  <refname>unicode_convert_fromutf8</refname> +	  <refname>unicode_convert_tobuf</refname> +	  <refname>unicode_convert_tou_tobuf</refname> +	  <refname>unicode_convert_fromu_tobuf</refname> + +	  <refpurpose>unicode character set conversion</refpurpose> +	</refnamediv> + +	<refsynopsisdiv> +	  <funcsynopsis> +	    <funcsynopsisinfo>#include <unicode.h> + +	    extern const char unicode_u_ucs4_native[]; + +	    extern const char unicode_u_ucs2_native[];</funcsynopsisinfo> +	    <funcprototype> +              <funcdef>unicode_convert_handle_t <function>unicode_convert_init</function></funcdef> +              <paramdef>const char *<parameter>src_chset</parameter></paramdef> +              <paramdef>const char *<parameter>dst_chset</parameter></paramdef> +              <paramdef>void *<parameter>cb_arg</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>int <function>unicode_convert</function></funcdef> +              <paramdef>unicode_convert_handle_t <parameter>handle</parameter></paramdef> +              <paramdef>const char *<parameter>text</parameter></paramdef> +              <paramdef>size_t <parameter>cnt</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>int <function>unicode_convert_deinit</function></funcdef> +              <paramdef>unicode_convert_handle_t <parameter>handle</parameter></paramdef> +              <paramdef>int *<parameter>errptr</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>unicode_convert_handle_t <function>unicode_convert_tocbuf_init</function></funcdef> +              <paramdef>const char *<parameter>src_chset</parameter></paramdef> +              <paramdef>const char *<parameter>dst_chset</parameter></paramdef> +	      <paramdef>char **<parameter>cbufptr_ret</parameter></paramdef> +	      <paramdef>size_t *<parameter>cbufsize_ret</parameter></paramdef> +              <paramdef>int <parameter>nullterminate</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>unicode_convert_handle_t <function>unicode_convert_tocbuf_toutf8_init</function></funcdef> +              <paramdef>const char *<parameter>src_chset</parameter></paramdef> +	      <paramdef>char **<parameter>cbufptr_ret</parameter></paramdef> +	      <paramdef>size_t *<parameter>cbufsize_ret</parameter></paramdef> +              <paramdef>int <parameter>nullterminate</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>unicode_convert_handle_t <function>unicode_convert_tocbuf_fromutf8_init</function></funcdef> +              <paramdef>const char *<parameter>dst_chset</parameter></paramdef> +	      <paramdef>char **<parameter>cbufptr_ret</parameter></paramdef> +	      <paramdef>size_t *<parameter>cbufsize_ret</parameter></paramdef> +              <paramdef>int <parameter>nullterminate</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>unicode_convert_handle_t <function>unicode_convert_tou_init</function></funcdef> +              <paramdef>const char *<parameter>src_chset</parameter></paramdef> +	      <paramdef>unicode_char **<parameter>ucptr_ret</parameter></paramdef> +	      <paramdef>size_t *<parameter>ucsize_ret</parameter></paramdef> +              <paramdef>int <parameter>nullterminate</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>unicode_convert_handle_t <function>unicode_convert_fromu_init</function></funcdef> +              <paramdef>const char *<parameter>dst_chset</parameter></paramdef> +	      <paramdef>char **<parameter>cbufptr_ret</parameter></paramdef> +	      <paramdef>size_t *<parameter>cbufsize_ret</parameter></paramdef> +              <paramdef>int <parameter>nullterminate</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>int <function>unicode_convert_uc</function></funcdef> +              <paramdef>unicode_convert_handle_t <parameter>handle</parameter></paramdef> +              <paramdef>const unicode_char *<parameter>text</parameter></paramdef> +	      <paramdef>size_t <parameter>cnt</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>char *<function>unicode_convert_toutf8</function></funcdef> +              <paramdef>const char *<parameter>text</parameter></paramdef> +              <paramdef>const char *<parameter>charset</parameter></paramdef> +	      <paramdef>int *<parameter>error</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>char *<function>unicode_convert_fromutf8</function></funcdef> +              <paramdef>const char *<parameter>text</parameter></paramdef> +              <paramdef>const char *<parameter>charset</parameter></paramdef> +	      <paramdef>int *<parameter>error</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>char *<function>unicode_convert_tobuf</function></funcdef> +              <paramdef>const char *<parameter>text</parameter></paramdef> +              <paramdef>const char *<parameter>charset</parameter></paramdef> +              <paramdef>const char *<parameter>dstcharset</parameter></paramdef> +	      <paramdef>int *<parameter>error</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>int <function>unicode_convert_toubuf</function></funcdef> +              <paramdef>const char *<parameter>text</parameter></paramdef> +	      <paramdef>size_t <parameter>text_l</parameter></paramdef> +              <paramdef>const char *<parameter>charset</parameter></paramdef> +              <paramdef>unicode_char **<parameter>uc</parameter></paramdef> +	      <paramdef>size_t *<parameter>ucsize</parameter></paramdef> +	      <paramdef>int *<parameter>error</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>int <function>unicode_convert_fromu_tobuf</function></funcdef> +              <paramdef>const unicode_char *<parameter>utext</parameter></paramdef> +	      <paramdef>size_t <parameter>utext_l</parameter></paramdef> +              <paramdef>const char *<parameter>charset</parameter></paramdef> +              <paramdef>char **<parameter>c</parameter></paramdef> +	      <paramdef>size_t *<parameter>csize</parameter></paramdef> +	      <paramdef>int *<parameter>error</parameter></paramdef> +	    </funcprototype> + +	  </funcsynopsis> + +	</refsynopsisdiv> + +	<refsect1> +	  <title>DESCRIPTION</title> + +	  <para> +	    <varname>unicode_u_ucs4_native</varname>[] contains the +	    string <quote>UCS-4BE</quote> or <quote>UCS-4LE</quote>, +	    matching the native <classname>unicode_char</classname> endianness. +	  </para> + +	  <para> +	    <varname>unicode_u_ucs2_native</varname>[] contains the +	    string <quote>UCS-2BE</quote> or <quote>UCS-2LE</quote>, +	    matching the native <classname>unicode_char</classname> endianness. +	  </para> + +	  <para> +	    <function>unicode_convert_init</function>(), +	    <function>unicode_convert</function>(), and +	    <function>unicode_convert_deinit</function>() are an adaption of th +	    <ulink url="http://manpages.courier-mta.org/htmlman3/iconv.3.html"> +	      <citerefentry><refentrytitle>iconv</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></ulink> API that uses the same +	      calling convention as the other algorithms in this unicode library, +	      with some value-added features. +	      These functions use +	      <citerefentry><refentrytitle>iconv</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry> to effect the actual +	      character set conversion. +	  </para> + +	  <para> +	    <function>unicode_convert_init</function>() returns a non-NULL handle +	    for the requested conversion, or NULL if the requested conversion is +	    not available. + +	    <function>unicode_convert_init</function>() takes a pointer to +	    the output function that receives receives converted character text. +	    The output function receives a pointer to the converted character +	    text, and the number of characters in the converted text. +	    The output function gets repeatedly called, until it receives +	    the entire converted text. +	  </para> + +	  <para> +	    The character text to convert gets passed, repeatedly, to +	    <function>unicode_convert</function>(). +	    Each call to <function>unicode_convert</function>() results in +	    the output function getting invoked, zero or more times, with each +	    successive part of the +	    converted text. Finally, +	    <function>unicode_convert_deinit</function>() stops the conversion +	    and deallocates the conversion handle. +	  </para> + +	  <para> +	    It's possible that a call to +	    <function>unicode_convert_deinit</function>() results in some +	    additional calls to the output function, passing the remaining, +	    final parts, of the converted text, before +	    <function>unicode_convert_deinit</function>() deallocates the +	    handle, and returns. +	  </para> + +	  <para> +	    The output function should return 0 normally. A non-0 return +	    indicates n error condition. +	    <function>unicode_convert_deinit</function>() returns +	    non-zero if any previous invocation of the output function returned +	    non-zero (this includes any invocations of the output function +	    resulting from this call, or prior +	    <function>unicode_convert</function>() calls), or 0 if all +	    invocations of the output function returned 0. +	  </para> + +	  <para> +	    If the <parameter>errptr</parameter> is not <literal>NULL</literal>, +	    *<parameter>errptr</parameter> gets set to non-zero if there were +	    any conversion errors -- if there was any text that could not be +	    converted to the destination character text. +	  </para> + +	  <para> +	    <function>unicode_convert</function>() also returns non-zero if +	    it calls the output function and it returns non-zero, however +	    the conversion handle remains allocated, so +	    <function>unicode_convert_deinit</function>() must still be called, +	    to clean that up. +	  </para> + + +	  <refsect2> +	    <title>Collecting converted text into a buffer</title> + +	    <para> +	      Call +	      <function>unicode_convert_tocbuf_init</function>() +	      instead of +	      <function>unicode_convert_init</function>(), then call +	      <function>unicode_convert</function>() +	      and +	      <function>unicode_convert_deinit</function>() normally. + +	      The parameters to +	      <function>unicode_convert_init</function>() specify the source +	      and the destination character sets. + +	      <function>unicode_convert_tocbuf_toutf8_init</function>() is +	      just an alias that specifies <literal>UTF-8</literal> as the +	      destination character set. + +	      <function>unicode_convert_tocbuf_fromutf8_init</function>() is +	      just an alias that specifies <literal>UTF-8</literal> as the +	      source character st. + +	    </para> + +	    <para> +	      These functions +	      supply an output function that collects the converted text into +	      a malloc()ed buffer. + +	      If <function>unicode_convert_deinit</function>() returns 0, +	      *<parameter>cbufptr_ret</parameter> gets initialized to a +	      malloc()ed buffer, and the number of converted characters, +	      the size of the +	      malloc()ed buffer, get placed into +	      *<parameter>cbufsize_ret</parameter>. +	    </para> + +	    <note> +	      <para> +		If the converted string is an empty string, +		*<parameter>cbufsize_ret</parameter> +		gets set to 0, +		but +		*<parameter>cbufptr_ret</parameter> +		still gets initialized (to a dummy malloced buffer). +	      </para> +	    </note> + +	    <para> +	      A non-zero <parameter>nullterminate</parameter> places a trailing \0 +	      character after the converted string (this is included in +	      *<parameter>cbufsize_ret</parameter>). +	    </para> +	  </refsect2> + +	  <refsect2> +	    <title>Converting between character sets and unicode</title> + +	    <para> +	      <function>unicode_convert_tou_init</function>() +	      converts character text into a <classname>unicode_char</classname> +	      buffer. +	      It works just like +	      <function>unicode_convert_tocbuf_init</function>(), except +	      that only the source character set gets specified and the output +	      buffer is a <classname>unicode_char</classname> buffer. +	      <parameter>nullterminate</parameter> terminates the converted +	      unicode characters with a <literal>U+0000</literal>. +	    </para> + +	    <para> +	      <function>unicode_convert_fromu_init</function>() +	      converts <classname>unicode_char</classname>s to the output +	      character set, and also works like +	      <function>unicode_convert_tocbuf_init</function>(). +	      Additionally, in this case, +	      <function>unicode_convert_uc</function>() works just like +	      <function>unicode_convert</function>() except that the +	      input sequence is a +	      <classname>unicode_char</classname> sequence, and the +	      count parameter is th enumber of unicode characters. +	    </para> +	  </refsect2> + +	  <refsect2> +	    <title>One-shot conversions</title> + +	    <para> +	      <function>unicode_convert_toutf8</function>() +	      converts the specified text in the specified text into a UTF-8 +	      string, returning a malloced buffer. +	      If <parameter>error</parameter> is +	      not <literal>NULL</literal>, even if +	      <function>unicode_convert_toutf8</function>() +	      returns a non <literal>NULL</literal> value +	      *<parameter>error</parameter> gets set to a non-zero value if +	      a character conversion error has occured, and some characters +	      could not be converted. +	    </para> + +	    <para> +	      <function>unicode_convert_fromutf8</function>() does a similar +	      conversion from UTF-8 <parameter>text</parameter> to the specified +	      character set. +	    </para> + +	    <para> +	      <function>unicode_convert_tobuf</function>() does a similar +	      conversion between two different character sets. +	    </para> + +	    <para> +	      <function>unicode_convert_tou_tobuf</function>() calls +	      <function>unicode_convert_tou_init</function>(), feeds the +	      character string through <function>unicode_convert</function>(), +	      then calls <function>unicode_convert_deinit</function>(). +	      If this function returns 0, +	      *<parameter>uc</parameter> and *<parameter>ucsize</parameter> +	      are set to a malloced buffer+size holding the unicode char array. +	    </para> + +	    <para> +	      <function>unicode_convert_fromu_tobuf</function>() calls +	      <function>unicode_convert_fromu_init</function>(), feeds the +	      unicode array through <function>unicode_convert_uc</function>(), +	      then calls unicode_convert_deinit(). + +	      If this function returns 0, +	      *<parameter>c</parameter> and *<parameter>csize</parameter> +	      are set to a malloced buffer+size holding the char array. +	    </para> +	  </refsect2> +	</refsect1> +	<refsect1> +	  <title>SEE ALSO</title> +	  <para> +	    <link linkend="courier-unicode"> +	      <citerefentry> +		<refentrytitle>courier-unicode</refentrytitle> +		<manvolnum>7</manvolnum></citerefentry></link>, +	    <link linkend="unicode_uc"> +	      <citerefentry><refentrytitle>unicode_convert_tocase</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	      <link linkend="unicode_default_chset"> +		<citerefentry><refentrytitle>unicode_default_chset</refentrytitle> +		<manvolnum>3</manvolnum></citerefentry></link>. +	  </para> +	</refsect1> +      </refentry> + +      <refentry id="unicode_default_chset"> +	<info><author><firstname>Sam</firstname><surname>Varshavchik</surname><contrib>Author</contrib></author><productname>Courier Unicode Library</productname></info> + +	<refmeta> +	  <refentrytitle>unicode_default_chset</refentrytitle> +	  <manvolnum>3</manvolnum> +	</refmeta> + +	<refnamediv> +	  <refname>unicode_default_chset</refname> +	  <refpurpose>return the system character set name</refpurpose> +	</refnamediv> + +	<refsynopsisdiv> +	  <funcsynopsis> +	    <funcsynopsisinfo>#include <unicode.h></funcsynopsisinfo> +	    <funcprototype> +              <funcdef>const char *<function>unicode_default_chset</function></funcdef> +	      <void /> +	    </funcprototype> +	  </funcsynopsis> +	</refsynopsisdiv> +	<refsect1> +	  <title>DESCRIPTION</title> +	  <para> +	    <function>unicode_default_chset</function>() returns the name of the +	    system environment character set (usually +	    <quote>nl_langinfo(CODESET)</quote>, or from some suitable environment +	    variable). +	  </para> +	</refsect1> +	<refsect1> +	  <title>SEE ALSO</title> +	  <para> +	    <link linkend="courier-unicode"> +	      <citerefentry> +		<refentrytitle>courier-unicode</refentrytitle> +		<manvolnum>7</manvolnum></citerefentry></link>, +	    <link linkend="unicode_uc"> +	      <citerefentry><refentrytitle>unicode_convert_tocase</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>. +	  </para> +	</refsect1> +      </refentry> + +      <refentry id="unicode_html40ent_lookup"> +	<info><author><firstname>Sam</firstname><surname>Varshavchik</surname><contrib>Author</contrib></author><productname>Courier Unicode Library</productname></info> + +	<refmeta> +	  <refentrytitle>unicode_html40ent_lookup</refentrytitle> +	  <manvolnum>3</manvolnum> +	</refmeta> + +	<refnamediv> +	  <refname>unicode_html40ent_lookup</refname> +	  <refpurpose>look up unicode character for an HTML 4.0 entity</refpurpose> +	</refnamediv> + +	<refsynopsisdiv> +	  <funcsynopsis> +	    <funcsynopsisinfo>#include <unicode.h></funcsynopsisinfo> +	    <funcprototype> +              <funcdef>unicode_char <function>unicode_html40ent_lookup</function></funcdef> +              <paramdef>const char *<parameter>entity</parameter></paramdef> +	    </funcprototype> +	  </funcsynopsis> +	</refsynopsisdiv> +	<refsect1> +	  <title>DESCRIPTION</title> +	  <para> +	    <function>unicode_html40ent_lookup</function>() returns the +	    unicode character represented by an HTML 4.0 entity. The +	    <parameter>entity</parameter> is a string, such as +	    <quote>quot</quote>, in which case +	    <function>unicode_html40ent_lookup</function>() returns 34. +	  </para> + +	  <para> +	    <function>unicode_html40ent_lookup</function>() returns 0 if the +	    <parameter>entity</parameter> is not a known entity that represents +	    a single unicode character. +	  </para> +	</refsect1> +	<refsect1> +	  <title>SEE ALSO</title> +	  <para> +	    <link linkend="courier-unicode"> +	      <citerefentry> +		<refentrytitle>courier-unicode</refentrytitle> +		<manvolnum>7</manvolnum></citerefentry></link>, +	    <link linkend="unicode_uc"> +	      <citerefentry><refentrytitle>unicode_convert_tocase</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>. +	  </para> +	</refsect1> +      </refentry> + +      <refentry id="unicode_isspace"> +	<info><author><firstname>Sam</firstname><surname>Varshavchik</surname><contrib>Author</contrib></author><productname>Courier Unicode Library</productname></info> + +	<refmeta> +	  <refentrytitle>unicode_isspace</refentrytitle> +	  <manvolnum>3</manvolnum> +	</refmeta> + +	<refnamediv> +	  <refname>unicode_isspace</refname> +	  <refpurpose>unicode character classification</refpurpose> +	</refnamediv> + +	<refsynopsisdiv> +	  <funcsynopsis> +	    <funcsynopsisinfo>#include <unicode.h></funcsynopsisinfo> +	    <funcprototype> +              <funcdef>int <function>unicode_isspace</function></funcdef> +              <paramdef>unicode_char <parameter>c</parameter></paramdef> +	    </funcprototype> +	  </funcsynopsis> +	</refsynopsisdiv> +	<refsect1> +	  <title>DESCRIPTION</title> +	  <para> +	    <function>unicode_isspace</function>() returns non-zero +	    if the unicode character <parameter>c</parameter>'s line breaking +	    class is +	    <literal>BK</literal>, +	    <literal>CR</literal>, +	    <literal>LF</literal>, +	    <literal>NL</literal>, or +	    <literal>SP</literal>; and zero for all other characters. +	    Those line breaking classes include the traditional ASCII control +	    characters, and several additional unicode characters. +	  </para> +	</refsect1> +	<refsect1> +	  <title>SEE ALSO</title> +	  <para> +	    <link linkend="courier-unicode"> +	      <citerefentry> +		<refentrytitle>courier-unicode</refentrytitle> +		<manvolnum>7</manvolnum></citerefentry></link>, +	    <link linkend="unicode_uc"> +	      <citerefentry><refentrytitle>unicode_convert_tocase</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>. +	  </para> +	</refsect1> +      </refentry> + +      <refentry id="unicode_grapheme_break"> +	<info><author><firstname>Sam</firstname><surname>Varshavchik</surname><contrib>Author</contrib></author><productname>Courier Unicode Library</productname></info> +	<refmeta> +	  <refentrytitle>unicode_grapheme_break</refentrytitle> +	  <manvolnum>3</manvolnum> +	</refmeta> + +	<refnamediv> +	  <refname>unicode_grapheme_break</refname> +	  <refpurpose>unicode grapheme cluster boundary rules</refpurpose> +	</refnamediv> + +	<refsynopsisdiv> +	  <funcsynopsis> +	    <funcsynopsisinfo>#include <unicode.h></funcsynopsisinfo> +	    <funcprototype> +              <funcdef>int <function>unicode_grapheme_break</function></funcdef> +              <paramdef>unicode_char <parameter>a</parameter></paramdef> +              <paramdef>unicode_char <parameter>b</parameter></paramdef> +	    </funcprototype> +	  </funcsynopsis> +	</refsynopsisdiv> +	<refsect1> +	  <title>DESCRIPTION</title> +	  <para> +	    <function>unicode_grapheme_break</function>() returns non-zero +	    if there is a grapheme break between the two unicode characters +	    <parameter>a</parameter> and +	    <parameter>b</parameter>. +	  </para> +	</refsect1> + +	<refsect1> +	  <title>SEE ALSO</title> + +	  <para> +	    <ulink url="http://www.unicode.org/reports/tr29/tr29-23.html">TR-29</ulink>, +	    <link linkend="courier-unicode"> +	      <citerefentry> +		<refentrytitle>courier-unicode</refentrytitle> +		<manvolnum>7</manvolnum></citerefentry></link>, +	    <link linkend="unicode_uc"> +	      <citerefentry><refentrytitle>unicode_convert_tocase</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	      <link linkend="unicode_line_break"> +		<citerefentry><refentrytitle>unicode_line_break</refentrytitle> +		<manvolnum>3</manvolnum></citerefentry></link>, +		<link linkend="unicode_word_break"> +		  <citerefentry><refentrytitle>unicode_word_break</refentrytitle> +		  <manvolnum>3</manvolnum></citerefentry></link>. +	  </para> +	</refsect1> +      </refentry> + +      <refentry id="unicode_line_break"> +	<info><author><firstname>Sam</firstname><surname>Varshavchik</surname><contrib>Author</contrib></author><productname>Courier Unicode Library</productname></info> +	<refmeta> +	  <refentrytitle>unicode_line_break</refentrytitle> +	  <manvolnum>3</manvolnum> +	</refmeta> + +	<refnamediv> +	  <refname>unicode_lb_init</refname> +	  <refname>unicode_lb_set_opts</refname> +	  <refname>unicode_lb_next</refname> +	  <refname>unicode_lb_next_cnt</refname> +	  <refname>unicode_lb_end</refname> + +	  <refname>unicode_lbc_init</refname> +	  <refname>unicode_lbc_set_opts</refname> +	  <refname>unicode_lbc_next</refname> +	  <refname>unicode_lbc_next_cnt</refname> +	  <refname>unicode_lbc_end</refname> +	  <refpurpose>calculate mandatory or allowed line breaks</refpurpose> +	</refnamediv> + +	<refsynopsisdiv> +	  <funcsynopsis> +	    <funcsynopsisinfo>#include <unicode.h></funcsynopsisinfo> +	    <funcprototype> +              <funcdef>unicode_lb_info_t <function>unicode_lb_init</function></funcdef> +              <paramdef>int (*<parameter>cb_func</parameter>)(int, void *)</paramdef> +              <paramdef>void *<parameter>cb_arg</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>void <function>unicode_lb_set_opts</function></funcdef> +              <paramdef>unicode_lb_info_t <parameter>lb</parameter></paramdef> +              <paramdef>int <parameter>opts</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>int <function>unicode_lb_next</function></funcdef> +              <paramdef>unicode_lb_info_t <parameter>lb</parameter></paramdef> +              <paramdef>unicode_char <parameter>c</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>int <function>unicode_lb_next_cnt</function></funcdef> +              <paramdef>unicode_lb_info_t <parameter>lb</parameter></paramdef> +              <paramdef>const unicode_char *<parameter>cptr</parameter></paramdef> +              <paramdef>size_t <parameter>cnt</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>int <function>unicode_lb_end</function></funcdef> +              <paramdef>unicode_lb_info_t <parameter>lb</parameter></paramdef> +	    </funcprototype> +	  </funcsynopsis> + +	  <funcsynopsis> +	    <funcprototype> +              <funcdef>unicode_lbc_info_t <function>unicode_lbc_init</function></funcdef> +              <paramdef>int (*<parameter>cb_func</parameter>)(int, unicode_char, void *)</paramdef> +              <paramdef>void *<parameter>cb_arg</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>void <function>unicode_lbc_set_opts</function></funcdef> +              <paramdef>unicode_lbc_info_t <parameter>lb</parameter></paramdef> +              <paramdef>int <parameter>opts</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>int <function>unicode_lbc_next</function></funcdef> +              <paramdef>unicode_lb_info_t <parameter>lb</parameter></paramdef> +              <paramdef>unicode_char <parameter>c</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>int <function>unicode_lbc_next_cnt</function></funcdef> +              <paramdef>unicode_lb_info_t <parameter>lb</parameter></paramdef> +              <paramdef>const unicode_char *<parameter>cptr</parameter></paramdef> +              <paramdef>size_t <parameter>cnt</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>int <function>unicode_lbc_end</function></funcdef> +              <paramdef>unicode_lb_info_t <parameter>lb</parameter></paramdef> +	    </funcprototype> +	  </funcsynopsis> +	</refsynopsisdiv> +	<refsect1> +	  <title>DESCRIPTION</title> +	  <para> +	    These functions implement the unicode line breaking algorithm. +	    Invoke <function>unicode_lb_init</function>() to initialize the +	    line breaking algorithm. The +	    first parameter is a callback function. +	    The second parameter is an opaque pointer. +	    The callback function gets invoked with two parameters. The first +	    parameter is one of three values: +	    <literal>UNICODE_LB_MANDATORY</literal>, +	    <literal>UNICODE_LB_NONE</literal>, or +	    <literal>UNICODE_LB_ALLOWED</literal>, as described below. +	    The second parameter is +	    the opaque pointer that was passed to +	    <function>unicode_lb_init</function>(); the opaque pointer +	    is not subject to any further interpretation by these functions. +	  </para> + +	  <para> +	    <function>unicode_lb_init</function>() returns an opaque handle. +	    Repeated invocations of <function>unicode_lb_next</function>(), +	    passing the handle and one unicode character at a time, +	    defines a sequence +	    of unicode characters over which the line breaking algorithm +	    calculation takes place. +	    <function>unicode_lb_next_cnt</function>() is a shortcut +	    for invoking <function>unicode_lb_next</function>() +	    repeatedly over an array +	    <literal>cptr</literal> containing +	    <literal>cnt</literal> unicode characters. +	  </para> + +	  <para> +	    <function>unicode_lb_end</function>() denotes the end of the +	    unicode character sequence. After the call to +	    <function>unicode_lb_end</function>() the line breaking +	    <classname>unicode_lb_info_t</classname> handle is no longer valid. +	  </para> + +	  <para> +	    Between the call to +	    <function>unicode_lb_init</function>() and +	    <function>unicode_lb_end</function>(), the callback function +	    gets invoked exactly once for each unicode character given to +	    <function>unicode_lb_next</function>() or +	    <function>unicode_lb_next_cnt</function>(). +	    Usually each call to +	    <function>unicode_lb_next</function>() results in the callback +	    function getting invoked immediately, but it does not have to be. +	    It's possible that a call to <function>unicode_lb_next</function>() +	    returns without invoking the callback function, and some subsequent +	    call to <function>unicode_lb_next</function>() (or +	    <function>unicode_lb_end</function>()) invokes the callback function +	    more than once, to catch up. +	    The contract is that before <function>unicode_lb_end</function>() +	    returns, the callback function gets invoked the exact number of times +	    as the number of characters in the unicode sequence defined by +	    the intervening calls to <function>unicode_lb_next</function>() and +	    <function>unicode_lb_next_cnt</function>(), unless an error +	    occurs. +	  </para> + +	  <para> +	    Each call to the callback function reports the calculated +	    line breaking status of the corresponding character in the unicode +	    character sequence: +	  </para> + +	  <variablelist> +	    <varlistentry> +	      <term><literal>UNICODE_LB_MANDATORY</literal></term> +	      <listitem> +		<para> +		  A line break is MANDATORY +		  <emphasis>before</emphasis> the corresponding character. +		</para> +	      </listitem> +	    </varlistentry> + +	    <varlistentry> +	      <term><literal>UNICODE_LB_NONE</literal></term> +	      <listitem> +		<para> +		  A line break is PROHIBITED +		  <emphasis>before</emphasis> the corresponding character. +		</para> +	      </listitem> +	    </varlistentry> + +	    <varlistentry> +	      <term><literal>UNICODE_LB_ALLOWED</literal></term> +	      <listitem> +		<para> +		  A line break is OPTIONAL +		  <emphasis>before</emphasis> the corresponding character. +		</para> +	      </listitem> +	    </varlistentry> +	  </variablelist> + +	  <para> +	    The callback function should return 0. A non-zero value +	    indicates to the line breaking algorithm that an error has +	    occured. +	    <function>unicode_lb_next</function>() and +	    <function>unicode_lb_next_cnt</function>() return zero either if +	    they never invoked the callback function, or if each call to the +	    callback function returned zero. +	    A non zero return from the callback function results in +	    <function>unicode_lb_next</function>() and +	    <function>unicode_lb_next_cnt</function>() immediately returning +	    the same value. +	  </para> + +	  <para> +	    <function>unicode_lb_end</function>() must be invoked to destroy +	    the line breaking handle even if +	    <function>unicode_lb_next</function>() and +	    <function>unicode_lb_next_cnt</function>() returned an error +	    indication. It's also possible that, under normal circumstances, +	    <function>unicode_lb_end</function>() invokes the callback function +	    one or more times. The return value from  +	    <function>unicode_lb_end</function>() has the same meaning as +	    from <function>unicode_lb_next</function>() and +	    <function>unicode_lb_next_cnt</function>(); however in all cases +	    after <function>unicode_lb_end</function>() returns the +	    line breaking handle is no longer valid. +	  </para> + +	  <refsect2> +	    <title>Alternative callback function</title> + +	    <para> +	      <function>unicode_lbc_init</function>(), +	      <function>unicode_lbc_next</function>(), +	      <function>unicode_lbc_next_cnt</function>(), +	      <function>unicode_lbc_end</function>() are alternative functions +	      that implement the same algorithm. The only difference is that +	      the callback function receives an extra parameter, the unicode +	      character value to which the line breaking status applies to, +	      passed through from the input unicode character sequence. +	    </para> +	  </refsect2> + +	  <refsect2> +	    <title>Options</title> + +	    <para> +	      <function>unicode_lb_set_opts</function>() and +	      <function>unicode_lbc_set_opts</function>() enable non-default +	      options for the line breaking algorithm. These functions must be +	      called immediately after +	      <function>unicode_lb_init</function>() or +	      <function>unicode_lbc_init</function>(), and before any other +	      function. +	      <parameter>opts</parameter> is a bitmask that can contain +	      the following values: +	    </para> + +	    <variablelist> +	      <varlistentry> +		<term><literal>UNICODE_LB_OPT_PRBREAK</literal></term> +		<listitem> +		  <para> +		    Enables a modified <literal>LB24</literal> rule. +		    This prevents +		    plus signs, as in <quote>C++</quote> from breaking. This +		    flag adds the following rules to the LB24 rule: +		  </para> + +		  <blockquote> +		    <informalexample> +		      <programlisting> +			PR x PR + +			AL x PR + +		        ID x PR</programlisting> +		    </informalexample> +		  </blockquote> +		</listitem> +	      </varlistentry> +	      <varlistentry> +		<term><literal>UNICODE_LB_OPT_SYBREAK</literal></term> +		<listitem> +		  <para> +		    Tailored breaking rules for the <quote>/</quote> character. +		    This prevents breaking after the <quote>/</quote> character +		    (think URLs); including an exception to the +		    <quote>x SY</quote> rule in <literal>LB13</literal>. +		    This flag adds the following rules to the LB24 rule: +		  </para> +		  <blockquote> +		    <informalexample> +		      <programlisting> +			SY x EX + +			SY x AL + +			SY x ID + +		        SP ÷ SY, which takes precedence over "x SY".</programlisting> +		    </informalexample> +		  </blockquote> +		</listitem> +	      </varlistentry> +	      <varlistentry> +		<term><literal>UNICODE_LB_OPT_DASHWJ</literal></term> +		<listitem> +		  <para> +		    This flag reclassifies <literal>U+2013</literal> and +		    <literal>U+2014</literal> as class <literal>WJ</literal>, +		    prohibiting breaks before and after the m-dash and the +		    n-dash unicode characters. +		  </para> +		</listitem> +	      </varlistentry> +	    </variablelist> +	  </refsect2> +	</refsect1> + +	<refsect1> +	  <title>SEE ALSO</title> + +	  <para> +	    <link linkend="courier-unicode"> +	      <citerefentry> +		<refentrytitle>courier-unicode</refentrytitle> +		<manvolnum>7</manvolnum></citerefentry></link>, +	    <link linkend="unicode_line_break"> +	      <citerefentry><refentrytitle>unicode::linebreak</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <ulink url="http://www.unicode.org/reports/tr14/tr14-32.html">TR-14</ulink> +	  </para> +	</refsect1> +      </refentry> + +      <refentry id="unicode_word_break"> +	<info><author><firstname>Sam</firstname><surname>Varshavchik</surname><contrib>Author</contrib></author><productname>Courier Unicode Library</productname></info> +	<refmeta> +	  <refentrytitle>unicode_word_break</refentrytitle> +	  <manvolnum>3</manvolnum> +	</refmeta> + +	<refnamediv> +	  <refname>unicode_wb_init</refname> +	  <refname>unicode_wb_next</refname> +	  <refname>unicode_wb_next_cnt</refname> +	  <refname>unicode_wb_end</refname> + +	  <refname>unicode_wbscan_init</refname> +	  <refname>unicode_wbscan_next</refname> +	  <refname>unicode_wbscan_end</refname> +	   +	  <refpurpose>calculate word breaks</refpurpose> +	</refnamediv> + +	<refsynopsisdiv> +	  <funcsynopsis> +	    <funcsynopsisinfo>#include <unicode.h></funcsynopsisinfo> +	    <funcprototype> +              <funcdef>unicode_wb_info_t <function>unicode_wb_init</function></funcdef> +              <paramdef>int (*<parameter>cb_func</parameter>)(int, void *)</paramdef> +              <paramdef>void *<parameter>cb_arg</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>int <function>unicode_wb_next</function></funcdef> +              <paramdef>unicode_wb_info_t <parameter>wb</parameter></paramdef> +              <paramdef>unicode_char <parameter>c</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>int <function>unicode_wb_next_cnt</function></funcdef> +              <paramdef>unicode_wb_info_t <parameter>wb</parameter></paramdef> +              <paramdef>const unicode_char *<parameter>cptr</parameter></paramdef> +              <paramdef>size_t <parameter>cnt</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>int <function>unicode_wb_end</function></funcdef> +              <paramdef>unicode_wb_info_t <parameter>wb</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>unicode_wbscan_info_t <function>unicode_wbscan_init</function></funcdef> +	      <void /> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>int <function>unicode_wbscan_next</function></funcdef> +              <paramdef>unicode_wbscan_info_t <parameter>wbs</parameter></paramdef> +              <paramdef>unicode_char <parameter>c</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>size_t <function>unicode_wbscan_end</function></funcdef> +              <paramdef>unicode_wbscan_info_t <parameter>wbs</parameter></paramdef> +	    </funcprototype> + +	  </funcsynopsis> +	</refsynopsisdiv> +	<refsect1> +	  <title>DESCRIPTION</title> +	  <para> +	    These functions implement the unicode word breaking algorithm. +	    Invoke <function>unicode_wb_init</function>() to initialize the +	    word breaking algorithm. The +	    first parameter is a callback function. +	    The second parameter is an opaque pointer. +	    The callback function gets invoked with two parameters. +	    The second parameter is +	    the opaque pointer that was given to +	    <function>unicode_wb_init</function>(); and the opaque pointer +	    is not subject to any further interpretation by these functions. +	  </para> + +	  <para> +	    <function>unicode_wb_init</function>() returns an opaque handle. +	    Repeated invocations of <function>unicode_wb_next</function>(), +	    passing the handle, and one unicode character defines a sequence +	    of unicode characters over which the word breaking algorithm +	    calculation takes place. +	    <function>unicode_wb_next_cnt</function>() is a shortcut +	    for invoking <function>unicode_wb_next</function>() +	    repeatedly over an array +	    <literal>cptr</literal> containing +	    <literal>cnt</literal> unicode characters. +	  </para> + +	  <para> +	    <function>unicode_wb_end</function>() denotes the end of the +	    unicode character sequence. After the call to +	    <function>unicode_wb_end</function>() the word breaking +	    <classname>unicode_wb_info_t</classname> handle is no longer valid. +	  </para> + +	  <para> +	    Between the call to +	    <function>unicode_wb_init</function>() and +	    <function>unicode_wb_end</function>(), the callback function +	    gets invoked exactly once for each unicode character given to +	    <function>unicode_wb_next</function>() or +	    <function>unicode_wb_next_cnt</function>(). +	    Usually each call to +	    <function>unicode_wb_next</function>() results in the callback +	    function getting invoked immediately, but it does not have to be. +	    It's possible that a call to <function>unicode_wb_next</function>() +	    returns without invoking the callback function, and some subsequent +	    call to <function>unicode_wb_next</function>() (or +	    <function>unicode_wb_end</function>()) invokes the callback function +	    more than once, to catch things up. +	    The contract is that before <function>unicode_wb_end</function>() +	    returns, the callback function gets invoked the exact number of times +	    as the number of characters in the unicode sequence defined by +	    the intervening calls to <function>unicode_wb_next</function>() and +	    <function>unicode_wb_next_cnt</function>(), unless an error +	    occurs. +	  </para> + +	  <para> +	    Each call to the callback function reports the calculated +	    wordbreaking status of the corresponding character in the unicode +	    character sequence. If the parameter to the callback function +	    is non zero, a word break is permitted <emphasis>before</emphasis> +	    the corresponding character. A zero value indicates that a word +	    break is prohibited <emphasis>before</emphasis> the corresponding +	    character. +	  </para> + +	  <para> +	    The callback function should return 0. A non-zero value +	    indicates to the word breaking algorithm that an error has +	    occured. +	    <function>unicode_wb_next</function>() and +	    <function>unicode_wb_next_cnt</function>() return zero either if +	    they never invoked the callback function, or if each call to the +	    callback function returned zero. +	    A non zero return from the callback function results in +	    <function>unicode_wb_next</function>() and +	    <function>unicode_wb_next_cnt</function>() immediately returning +	    the same value. +	  </para> + +	  <para> +	    <function>unicode_wb_end</function>() must be invoked to destroy +	    the word breaking handle even if +	    <function>unicode_wb_next</function>() and +	    <function>unicode_wb_next_cnt</function>() returned an error +	    indication. It's also possible that, under normal circumstances, +	    <function>unicode_wb_end</function>() invokes the callback function +	    one or more times. The return value from  +	    <function>unicode_wb_end</function>() has the same meaning as +	    from <function>unicode_wb_next</function>() and +	    <function>unicode_wb_next_cnt</function>(); however in all cases +	    after <function>unicode_wb_end</function>() returns the +	    line breaking handle is no longer valid. +	  </para> + +	  <refsect2> +	    <title>Word scan</title> + +	    <para> +	      <function>unicode_wbscan_init</function>(), +              <function>unicode_wbscan_next</function>() and +              <function>unicode_wbscan_end</function> +	      scan for the next word boundary in a unicode character sequence. + +	      <function>unicode_wbscan_init</function>() obtains a handle, +	      then +              <function>unicode_wbscan_next</function>() gets repeatedly invoked +	      to define the unicode character sequence. +	      <function>unicode_wbscan_end</function>() deallocates the handle +	      and returns the number of leading characters in the unicode character +	      sequence up to the first word break. +	    </para> + +	    <para> +	      A non-0 return value from +              <function>unicode_wbscan_next</function>() indicates that the +	      word boundary is already known, and any further calls to +              <function>unicode_wbscan_next</function>() will be ignored. +	      <function>unicode_wbscan_end</function>() must still be called, +	      to obtain the unicode character count. +	    </para> +	  </refsect2> +	</refsect1> + +	<refsect1> +	  <title>SEE ALSO</title> +	  <para> +	    <ulink url="http://www.unicode.org/reports/tr29/tr29-23.html">TR-29</ulink>, +	    <link linkend="courier-unicode"> +	      <citerefentry> +		<refentrytitle>courier-unicode</refentrytitle> +		<manvolnum>7</manvolnum></citerefentry></link>, +	    <link linkend="unicode_word_break"> +	      <citerefentry><refentrytitle>unicode::wordbreak</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	      <link linkend="unicode_uc"> +		<citerefentry><refentrytitle>unicode_convert_tocase</refentrytitle> +		<manvolnum>3</manvolnum></citerefentry></link>, +		<link linkend="unicode_line_break"> +		  <citerefentry><refentrytitle>unicode_line_break</refentrytitle> +		  <manvolnum>3</manvolnum></citerefentry></link>, +		  <link linkend="unicode_grapheme_break"> +		    <citerefentry><refentrytitle>unicode_grapheme_break</refentrytitle> +		    <manvolnum>3</manvolnum></citerefentry></link>. +	  </para> +	</refsect1> +      </refentry> + +      <refentry id="unicode_uc"> +	<info><author><firstname>Sam</firstname><surname>Varshavchik</surname><contrib>Author</contrib></author><productname>Courier Unicode Library</productname></info> +	<refmeta> +	  <refentrytitle>unicode_uc</refentrytitle> +	  <manvolnum>3</manvolnum> +	</refmeta> + +	<refnamediv> +	  <refname>unicode_uc</refname> +	  <refname>unicode_lc</refname> +	  <refname>unicode_tc</refname> +	  <refname>unicode_convert_tocase</refname> +	  <refpurpose>unicode uppercase, lowercase, and titlecase character lookup</refpurpose> +	</refnamediv> + +	<refsynopsisdiv> +	  <funcsynopsis> +	    <funcsynopsisinfo>#include <unicode.h></funcsynopsisinfo> +	    <funcprototype> +              <funcdef>unicode_char <function>unicode_uc</function></funcdef> +              <paramdef>unicode_char <parameter>c</parameter></paramdef> +	    </funcprototype> +	  </funcsynopsis> +	  <funcsynopsis> +	    <funcprototype> +              <funcdef>unicode_char <function>unicode_lc</function></funcdef> +              <paramdef>unicode_char <parameter>c</parameter></paramdef> +	    </funcprototype> +	  </funcsynopsis> +	  <funcsynopsis> +	    <funcprototype> +              <funcdef>unicode_char <function>unicode_tc</function></funcdef> +              <paramdef>unicode_char <parameter>c</parameter></paramdef> +	    </funcprototype> +	  </funcsynopsis> +	  <funcsynopsis> +	    <funcprototype> +              <funcdef>char *<function>unicode_convert_tocase</function></funcdef> +              <paramdef>const char *<parameter>str</parameter></paramdef> +              <paramdef>const char *<parameter>charset</parameter></paramdef> +              <paramdef>unicode_char (*<parameter>first_char_func</parameter>)(uncode_char)</paramdef> +              <paramdef>unicode_char (*<parameter>char_func</parameter>)(uncode_char)</paramdef> +	    </funcprototype> +	  </funcsynopsis> +	</refsynopsisdiv> +	<refsect1> +	  <title>DESCRIPTION</title> +	  <para> +	    <function>unicode_uc</function>(), +	    <function>unicode_lc</function>(), +	    <function>unicode_tc</function>() +	    return the uppercase, lowercase, or the titlecase +	    equivalent of the unicode character <parameter>c</parameter>. +	    If this character does not have an uppercase, lowercase, or a titlecase +	    equivalent, these functions return <parameter>c</parameter>, the +	    same character. +	  </para> + +	  <para> +	    <function>unicode_convert_tocase</function>() +	    takes the string <parameter>str</parameter> in the +	    character set <parameter>charset</parameter>. +	    <parameter>first_char_func</parameter> and +	    <parameter>char_func</parameter>, each, should be +	    <function>unicode_uc</function>, +	    <function>unicode_lc</function>, or +	    <function>unicode_tc</function>. +	    <function>unicode_convert_tocase</function>() returns a malloc()ed +	    buffer. The first unicode character in +	    <parameter>str</parameter> gets processed by +	    <parameter>first_char_func</parameter>, and all other characters by +	    <parameter>char_func</parameter>. +	  </para> +	</refsect1> + +	<refsect1> +	  <title>SEE ALSO</title> +	  <para> +	    <link linkend="courier-unicode"> +	      <citerefentry> +		<refentrytitle>courier-unicode</refentrytitle> +		<manvolnum>7</manvolnum></citerefentry></link>, +	    <link linkend="unicode_convert"> +	      <citerefentry> +		<refentrytitle>unicode_convert</refentrytitle> +		<manvolnum>3</manvolnum></citerefentry></link>, +	      <link linkend="unicode_default_chset"> +		<citerefentry><refentrytitle>unicode_default_chset</refentrytitle> +		<manvolnum>3</manvolnum></citerefentry></link>, +		<link linkend="unicode_html40ent_lookup"> +		  <citerefentry><refentrytitle>unicode_html40ent_lookup</refentrytitle> +		  <manvolnum>3</manvolnum></citerefentry></link>, +		  <link linkend="unicode_isspace"> +		    <citerefentry><refentrytitle>unicode_isspace</refentrytitle> +		    <manvolnum>3</manvolnum></citerefentry></link>, +		    <link linkend="unicode_grapheme_break"> +		      <citerefentry><refentrytitle>unicode_grapheme_break</refentrytitle> +		      <manvolnum>3</manvolnum></citerefentry></link>, +		      <link linkend="unicode_word_break"> +			<citerefentry><refentrytitle>unicode_word_break</refentrytitle> +			<manvolnum>3</manvolnum></citerefentry></link>, +			<link linkend="unicode_line_break"> +			  <citerefentry><refentrytitle>unicode_line_break</refentrytitle> +			  <manvolnum>3</manvolnum></citerefentry></link>. + +	  </para> +	</refsect1> +      </refentry> +    </section> + +    <section id="manpagescpp"> +      <title>C++ manual pages</title> + +      <refentry id="unicode__iconvert__convert"> +	<info><author><firstname>Sam</firstname><surname>Varshavchik</surname><contrib>Author</contrib></author><productname>Courier Unicode Library</productname></info> + +	<refmeta> +	  <refentrytitle>unicode::iconvert::convert</refentrytitle> +	  <manvolnum>3</manvolnum> +	</refmeta> + +	<refnamediv> +	  <refname>unicode::iconvert::convert</refname> + +	  <refpurpose>unicode character set conversion</refpurpose> +	</refnamediv> + +	<refsynopsisdiv> +	  <funcsynopsis> +	    <funcsynopsisinfo>#include <unicode.h></funcsynopsisinfo> + +	    <funcprototype> +              <funcdef>std::string <function>unicode::iconvert::convert</function></funcdef> +              <paramdef>const std::string &<parameter>text</parameter></paramdef> +              <paramdef>const std::string &<parameter>srccharset</parameter></paramdef> +              <paramdef>const std::string &<parameter>dstcharset</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>std::string <function>unicode::iconvert::convert</function></funcdef> +              <paramdef>const std::string &<parameter>text</parameter></paramdef> +              <paramdef>const std::string &<parameter>srccharset</parameter></paramdef> +              <paramdef>const std::string &<parameter>dstcharset</parameter></paramdef> +              <paramdef>bool &<parameter>errflag</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>std::string <function>unicode::iconvert::convert</function></funcdef> +              <paramdef>const std::vector<unicode_char> &<parameter>text</parameter></paramdef> +              <paramdef>const std::string &<parameter>dstcharset</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>std::string <function>unicode::iconvert::convert</function></funcdef> +              <paramdef>const std::vector<unicode_char> &<parameter>text</parameter></paramdef> +              <paramdef>const std::string &<parameter>dstcharset</parameter></paramdef> +              <paramdef>bool &<parameter>errflag</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>bool <function>unicode::iconvert::convert</function></funcdef> +              <paramdef>const std::string &<parameter>text</parameter></paramdef> +              <paramdef>const std::string &<parameter>charset</parameter></paramdef> +              <paramdef>std::vector<unicode_char> &<parameter>text</parameter></paramdef> +	    </funcprototype> +	  </funcsynopsis> +	</refsynopsisdiv> + +	<refsect1> +	  <title>DESCRIPTION</title> + +	  <para> +	    The overloaded +	    <function>unicode::convert::convert</function>() functions +	    convert: +	  </para> + +	  <itemizedlist> +	    <listitem> +	      <para> +		A text string between two different character sets, returning +		the new string. +	      </para> +	    </listitem> + +	    <listitem> +	      <para> +		A vector of unicode characters (not null-terminated) to +		a character string in a supported character set. +	      </para> +	    </listitem> + +	    <listitem> +	      <para> +		Initialize a vector of unicode characters, passed by +		reference, by converting a text string in a given character +		set to unicode. +	      </para> +	    </listitem> +	  </itemizedlist> + +	  <para> +	    These functions use +	    <citerefentry><refentrytitle>iconv</refentrytitle> +	    <manvolnum>3</manvolnum></citerefentry>, and can use any +	    character set that's supported by +	    <citerefentry><refentrytitle>iconv</refentrytitle> +	    <manvolnum>3</manvolnum></citerefentry>. +	    The overloaded versions that pass a reference to a +	    <classname>bool</classname> set the flag to <literal>true</literal> +	    if some characters could not be converted. +	    The overloaded version that initializes a unicode vector returns +	    the <classname>bool</classname> flag, instead. +	  </para> +	</refsect1> + +	<refsect1> +	  <title>SEE ALSO</title> +	  <para> +	    <link linkend="courier-unicode"> +	      <citerefentry> +		<refentrytitle>courier-unicode</refentrytitle> +		<manvolnum>7</manvolnum></citerefentry></link>, +	    <link linkend="unicode__iconvert__convert_tocase"> +	      <citerefentry><refentrytitle>unicode::convert::convert_tocase</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode_convert"> +	      <citerefentry><refentrytitle>unicode_convert</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	      <ulink url="http://manpages.courier-mta.org/htmlman3/iconv.3.html"> +	      <citerefentry><refentrytitle>iconv</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></ulink>. + +	  </para> +	</refsect1> +      </refentry> + +      <refentry id="unicode__iconvert__convert_tocase"> +	<info><author><firstname>Sam</firstname><surname>Varshavchik</surname><contrib>Author</contrib></author><productname>Courier Unicode Library</productname></info> + +	<refmeta> +	  <refentrytitle>unicode::iconvert::convert_tocase</refentrytitle> +	  <manvolnum>3</manvolnum> +	</refmeta> + +	<refnamediv> +	  <refname>unicode::iconvert::convert_tocase</refname> + +	  <refpurpose>unicode uppercase, lowercase, and titlecase conversion</refpurpose> +	</refnamediv> + +	<refsynopsisdiv> +	  <funcsynopsis> +	    <funcsynopsisinfo>#include <unicode.h></funcsynopsisinfo> + +	    <funcprototype> +              <funcdef>std::string <function>unicode::iconvert::convert_tocase</function></funcdef> +              <paramdef>const std::string &<parameter>text</parameter></paramdef> +              <paramdef>const std::string &<parameter>charset</parameter></paramdef> +              <paramdef>unicode_char (*<parameter>first_char_func</parameter>)(unicode_char)</paramdef> +              <paramdef>unicode_char (*<parameter>char_func</parameter>)(unicode_char)</paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>std::string <function>unicode::iconvert::convert_tocase</function></funcdef> +              <paramdef>const std::string &<parameter>text</parameter></paramdef> +              <paramdef>const std::string &<parameter>charset</parameter></paramdef> +              <paramdef>bool &<parameter>err</parameter></paramdef> +              <paramdef>unicode_char (*<parameter>first_char_func</parameter>)(unicode_char)</paramdef> +              <paramdef>unicode_char (*<parameter>char_func</parameter>)(unicode_char)</paramdef> +	    </funcprototype> +	  </funcsynopsis> +	</refsynopsisdiv> + +	<refsect1> +	  <title>DESCRIPTION</title> + +	  <para> +	    The overloaded +	    <function>unicode::convert::convert_tocase</function>() function +	    converts the <parameter>text</parameter> parameter, in the +	    <parameter>charset</parameter> characters to lowercase, uppercase, +	    and titlecase. <parameter>text</parameter> gets converted, +	    internally, into unicode. +            <parameter>first_char_func</parameter> and +            <parameter>char_func</parameter> are either: +	    <function>unicode_lc</function>, +	    <function>unicode_uc</function>, or +	    <function>unicode_tc</function>. If the converted text string is +	    not empty, <parameter>first_char_func</parameter> converts the +	    first unicode character in the text string, and +            <parameter>char_func</parameter> converts any remaining characters. +	    <function>unicode_lc</function> converts its character to lowercase, +	    <function>unicode_uc</function> to uppercase, and +	    <function>unicode_tc</function> to titlecase. Finally, the +	    unicode string gets converted back to +	    <parameter>charset</parameter>, which gets returned. +	  </para> + +	  <para> +	    The optional <parameter>err</parameter> parameter gets set to true if +	    an error was encounted converting the text string to or from +	    unicode. +	  </para> +	</refsect1> + +	<refsect1> +	  <title>SEE ALSO</title> +	  <para> +	    <link linkend="courier-unicode"> +	      <citerefentry> +		<refentrytitle>courier-unicode</refentrytitle> +		<manvolnum>7</manvolnum></citerefentry></link>, +	    <link linkend="unicode__iconvert__convert"> +	      <citerefentry><refentrytitle>unicode::convert::convert</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode_convert"> +	      <citerefentry><refentrytitle>unicode_convert</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	      <ulink url="http://manpages.courier-mta.org/htmlman3/iconv.3.html"> +	      <citerefentry><refentrytitle>iconv</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></ulink>. + +	  </para> +	</refsect1> +      </refentry> + +      <refentry id="unicode__iconvert__fromu"> +	<info><author><firstname>Sam</firstname><surname>Varshavchik</surname><contrib>Author</contrib></author><productname>Courier Unicode Library</productname></info> + +	<refmeta> +	  <refentrytitle>unicode::iconvert::fromu</refentrytitle> +	  <manvolnum>3</manvolnum> +	</refmeta> + +	<refnamediv> +	  <refname>unicode::iconvert::fromu</refname> + +	  <refpurpose>template for converting text sequence from unicode</refpurpose> +	</refnamediv> + +	<refsynopsisdiv> +	  <funcsynopsis> +	    <funcsynopsisinfo>#include <unicode.h></funcsynopsisinfo> + +	    <funcprototype> +              <funcdef>output_iter_t <function>unicode::iconvert::fromu::convert</function></funcdef> +              <paramdef>input_iter_t <parameter>beg_iter</parameter></paramdef> +              <paramdef>input_iter_t <parameter>end_iter</parameter></paramdef> +              <paramdef>const std::string &<parameter>charset</parameter></paramdef> +              <paramdef>output_iter_t <parameter>output_iter</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>void <function>unicode::iconvert::fromu::convert</function></funcdef> +              <paramdef>input_iter_t <parameter>beg_iter</parameter></paramdef> +              <paramdef>input_iter_t <parameter>end_iter</parameter></paramdef> +              <paramdef>const std::string &<parameter>charset</parameter></paramdef> +              <paramdef>std::string &<parameter>out_buf</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>void <function>unicode::iconvert::fromu::convert</function></funcdef> +              <paramdef>const std::vector<unicode_char> &<parameter>text</parameter></paramdef> +              <paramdef>const std::string &<parameter>charset</parameter></paramdef> +              <paramdef>std::string &<parameter>out_buf</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>std::string <function>unicode::iconvert::fromu::convert</function></funcdef> +              <paramdef>const std::vector<unicode_char> &<parameter>text</parameter></paramdef> +              <paramdef>const std::string &<parameter>charset</parameter></paramdef> +	    </funcprototype> +	  </funcsynopsis> +	</refsynopsisdiv> + +	<refsect1> +	  <title>DESCRIPTION</title> + +	  <para> +	    These template functions convert unicode characters to +	    text in the given character set. +	    <parameter>beg_iter</parameter> and +	    <parameter>end_iter</parameter> define an input sequence of +	    <classname>unicode_char</classname>s. +	    They get converted to unicode characters. +	    <parameter>output_iter</parameter> is an output iterator that +	    <function>convert</function>() +	    iterates over <classname>char</classname>s in the specified +	    character set. +	    <function>convert</function>() returns the value of the output +	    iterator after iterating over the converted character sequence. +	  </para> + +	  <para> +	    An overloaded <function>convert</function>() puts the text string +	    into a <classname>std::string</classname>, instead of using +	    an output iterator. +	    Finally, a single +	    <classname>std::vector<unicode_char></classname> +	    specifies the character string, instead of a beginning and an +	    ending iterator. +	  </para> +	</refsect1> + +	<refsect1> +	  <title>SEE ALSO</title> +	  <para> +	    <link linkend="courier-unicode"> +	      <citerefentry> +		<refentrytitle>courier-unicode</refentrytitle> +		<manvolnum>7</manvolnum></citerefentry></link>, +	    <link linkend="unicode__iconvert__convert"> +	      <citerefentry><refentrytitle>unicode::convert::convert</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode_convert"> +	      <citerefentry><refentrytitle>unicode_convert</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	      <ulink url="http://manpages.courier-mta.org/htmlman3/iconv.3.html"> +	      <citerefentry><refentrytitle>iconv</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></ulink>. + +	  </para> +	</refsect1> +      </refentry> + +      <refentry id="unicode__iconvert__tou"> +	<info><author><firstname>Sam</firstname><surname>Varshavchik</surname><contrib>Author</contrib></author><productname>Courier Unicode Library</productname></info> + +	<refmeta> +	  <refentrytitle>unicode::iconvert::tou</refentrytitle> +	  <manvolnum>3</manvolnum> +	</refmeta> + +	<refnamediv> +	  <refname>unicode::iconvert::tou</refname> + +	  <refpurpose>template for converting text sequence to unicode</refpurpose> +	</refnamediv> + +	<refsynopsisdiv> +	  <funcsynopsis> +	    <funcsynopsisinfo>#include <unicode.h></funcsynopsisinfo> + +	    <funcprototype> +              <funcdef>output_iter_t <function>convert</function></funcdef> +              <paramdef>input_iter_t <parameter>beg_iter</parameter></paramdef> +              <paramdef>input_iter_t <parameter>end_iter</parameter></paramdef> +              <paramdef>const std::string &<parameter>charset</parameter></paramdef> +              <paramdef>output_iter_t <parameter>output_iter</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>void <function>convert</function></funcdef> +              <paramdef>input_iter_t <parameter>beg_iter</parameter></paramdef> +              <paramdef>input_iter_t <parameter>end_iter</parameter></paramdef> +              <paramdef>const std::string &<parameter>charset</parameter></paramdef> +              <paramdef>std::vector<unicode_char> &<parameter>out_buf</parameter></paramdef> +	    </funcprototype> + +	    <funcprototype> +              <funcdef>void <function>convert</function></funcdef> +              <paramdef>const std::string &<parameter>text</parameter></paramdef> +              <paramdef>const std::string &<parameter>charset</parameter></paramdef> +              <paramdef>std::vector<unicode_char> &<parameter>out_buf</parameter></paramdef> +	    </funcprototype> +	  </funcsynopsis> +	</refsynopsisdiv> + +	<refsect1> +	  <title>DESCRIPTION</title> + +	  <para> +	    These template functions convert text in a given character set +	    to unicode characters. +	    <parameter>beg_iter</parameter> and +	    <parameter>end_iter</parameter> define an input sequence of +	    <classname>char</classname>s in the <parameter>charset</parameter> +	    character set. They get converted to unicode characters. +	    <parameter>output_iter</parameter> is an output iterator that +	    <function>convert</function>() +	    iterates over <classname>unicode_char</classname>s. +	    <function>convert</function>() returns the value of the output +	    iterator after iterating over the converted character sequence. +	  </para> + +	  <para> +	    An overloaded <function>convert</function>() puts the unicode +	    character sequence into a vector of +	    <classname>unicode_char</classname>s, instead of an output +	    sequence. Finally, a single <classname>std::string</classname> +	    specifies the character string, instead of a beginning and an +	    ending iterator. +	  </para> +	</refsect1> + +	<refsect1> +	  <title>SEE ALSO</title> +	  <para> +	    <link linkend="courier-unicode"> +	      <citerefentry> +		<refentrytitle>courier-unicode</refentrytitle> +		<manvolnum>7</manvolnum></citerefentry></link>, +	    <link linkend="unicode__iconvert__convert"> +	      <citerefentry><refentrytitle>unicode::convert::convert</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	    <link linkend="unicode_convert"> +	      <citerefentry><refentrytitle>unicode_convert</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>, +	      <ulink url="http://manpages.courier-mta.org/htmlman3/iconv.3.html"> +	      <citerefentry><refentrytitle>iconv</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></ulink>. + +	  </para> +	</refsect1> +      </refentry> + +      <refentry id="unicode__linebreak"> +	<info><author><firstname>Sam</firstname><surname>Varshavchik</surname><contrib>Author</contrib></author><productname>Courier Unicode Library</productname></info> + +	<refmeta> +	  <refentrytitle>unicode::linebreak</refentrytitle> +	  <manvolnum>3</manvolnum> +	</refmeta> + +	<refnamediv> +	  <refname>unicode::linebreak_callback_base</refname> +	  <refname>unicode::linebreak_callback_save_buf</refname> +	  <refname>unicode::linebreakc_callback_base</refname> +	  <refname>unicode::linebreak_iter</refname> +	  <refname>unicode::linebreakc_iter</refname> + +	  <refpurpose>unicode line-breaking rules</refpurpose> +	</refnamediv> + +	<refsynopsisdiv> +	  <programlisting> +#include <unicode.h> + +class linebreak : public unicode::linebreak_callback_base { + +public: + +    using unicode::linebreak_callback_base::operator<<; +    using unicode::linebreak_callback_base::operator(); +    int callback(int linebreak_code) +    { +        // ... +    } +}; + +unicode_char c; +std::vector<unicode_char> buf; + +linebreak compute_linebreak; + +compute_linebreak.set_opts(UNICODE_LB_OPT_SYBREAK); +compute_linebreak << c; + +compute_linebreak(buf); +compute_linebreak(buf.begin(), buf.end()); + +compute_linebreak.finish(); + +// ... + +unicode::linebreak_callback_save_buf linebreaks; + +std::list<int> lb=linebreaks.lb_buf; + +class linebreakc : public unicode::linebreakc_callback_base { + +public: + +    using unicode::linebreak_callback_base::operator<<; +    using unicode::linebreak_callback_base::operator(); +    int callback(int linebreak_code, unicode_char ch) +    { +        // ... +    } +}; + +// ... + +std::vector<unicode_char> buf; + +typedef unicode::linebreak_iter<std::vector<unicode_char>::const_iterator> iter_t; + +iter_t beg_iter(buf.begin(), buf.end()), end_iter; + +beg_iter.set_opts(UNICODE_LB_OPT_SYBREAK); + +std::vector<int> linebreaks; + +std::copy(beg_iter, end_iter, std::back_insert_iterator<std::vector<int>>(linebreaks)); + +// ... + +typedef unicode::linebreakc_iter<std::vector<unicode_char>::const_iterator> iter_t; + +iter_t beg_iter(buf.begin(), buf.end()), end_iter; + +beg_iter.set_opts(UNICODE_LB_OPT_SYBREAK); + +std::vector<std::pair<int, unicode_char>> linebreaks; + +std::copy(beg_iter, end_iter, std::back_insert_iterator<std::vector<int>>(linebreaks));</programlisting> +	</refsynopsisdiv> + +	<refsect1> +	  <title>DESCRIPTION</title> + +	  <para> +	    <classname>unicode::linebreak_callback_base</classname> is a C++ +	    binding for the unicode line-breaking rule implementation described +	    in +	    <link linkend="unicode_line_break"> +	      <citerefentry><refentrytitle>unicode_line_break</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>. +	  </para> + +	  <para> +	    Subclass <classname>unicode::linebreak_callback_base</classname> +	    and implement <methodname>callback</methodname>() that's virtually +	    inherited from +	    <classname>unicode::linebreak_callback_base</classname>. +	    The +	    <methodname>callback</methodname>() callback function receives the +	    output values from the line-breaking algorithm, the +	    <literal>UNICODE_LB_MANDATORY</literal>, +	    <literal>UNICODE_LB_NONE</literal>, or the +	    <literal>UNICODE_LB_ALLOWED</literal> value, for each unicode +	    character. +	  </para> + +	  <para> +	    <methodname>callback</methodname>() should return 0. A non-zero +	    return reports an error, that stops the line-breaking algorithm. +	    See +	    <link linkend="unicode_line_break"> +	      <citerefentry><refentrytitle>unicode_line_break</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link> for more +	      information. +	  </para> + +	  <para> +	    The alternate +	    <classname>unicode::linebreakc_callback_base</classname> +	    interface uses a virtually inherited +	    <methodname>callback</methodname>() that receives two parameters, +	    the line-break code value, and the corresponding unicode character. +	  </para> + 	  <para> +	    The input unicode characters for the line-breaking +	    algorithm are provided by the <literal><<</literal> +	    operator, one unicode character at a time; or by the +	    <literal>()</literal> operator, passing either a container, or +	    a beginning and an ending iterator value for an input sequence +	    of unicode characters. <methodname>finish</methodname>() indicates +	    the end of the unicode character sequence. +	  </para> + +	  <para> +	    <methodname>set_opts</methodname> sets line-breaking options +	    (see <methodname>unicode_lb_set_opts</methodname>() for more +	    information). +	  </para> +	  <para> +	    <classname>unicode::linebreak_callback_save_buf</classname> is a +	    subclass that implements <methodname>callback</methodname>() by +	    saving the linebreaks codes into a <classname>std::list</classname>. +	  </para> + +	  <para> +	    The <classname>linebreak_iter</classname> template implements an +	    input iterator over <classname>int</classname>s.  +	    The template parameter is an input iterator over +	    <classname>unicode</classname> chars. The constructor's parameters +	    are a beginning and an ending iterator value for a sequence of +	    <classname>unicode_char</classname>. This constructs the beginning +	    iterator value for a sequence of <classname>int</classname>s +	    consisting of line-break values +	    (<literal>UNICODE_LB_MANDATORY</literal>, +	    <literal>UNICODE_LB_NONE</literal>, or +	    <literal>UNICODE_LB_ALLOWED</literal>) corresponding to each +	    <classname>unicode_char</classname> in the underlying sequence. +	    The default constructor creates the ending iterator value for the +	    sequence. +	  </para> + +	  <para> +	    The iterator implements a <methodname>set_opts</methodname>() +	    methods that sets the options for the line-breaking algorithm. +	  </para> + +	  <para> +	    The <classname>linebreakc_iter</classname> template implements a +	    similar input iterator, with the difference that it ends up iterating +	    over a <classname>std::pair</classname> of line-breaking values and +	    the corresponding <classname>unicode_char</classname> from the +	    underlying input sequence. +	  </para> +	</refsect1> + +	<refsect1> +	  <title>SEE ALSO</title> +	  <para> +	    <link linkend="courier-unicode"> +	      <citerefentry> +		<refentrytitle>courier-unicode</refentrytitle> +		<manvolnum>7</manvolnum></citerefentry></link>, +	    <link linkend="unicode_line_break"> +	      <citerefentry><refentrytitle>unicode_line_break</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>. +	  </para> +	</refsect1> +      </refentry> + +      <refentry id="unicode__wordbreak"> +	<info><author><firstname>Sam</firstname><surname>Varshavchik</surname><contrib>Author</contrib></author><productname>Courier Unicode Library</productname></info> + +	<refmeta> +	  <refentrytitle>unicode::wordbreak</refentrytitle> +	  <manvolnum>3</manvolnum> +	</refmeta> + +	<refnamediv> +	  <refname>unicode::wordbreak_callback_base</refname> +	  <refname>unicode::wordbreak_callback_base</refname> +	  <refpurpose>unicode word-breaking rules</refpurpose> +	</refnamediv> + +	<refsynopsisdiv> +	  <programlisting> +#include <unicode.h> + +class wordbreak : public unicode::wordbreak_callback_base { + +public: + +    using unicode::wordbreak_callback_base::operator<<; +    using unicode::wordbreak_callback_base::operator(); +    int callback(bool flag) +    { +        // ... +    } +}; + +unicode_char c; +std::vector<unicode_char> buf; + +wordbreak compute_wordbreak; + +compute_wordbreak << c; + +compute_wordbreak(buf); +compute_wordbreak(buf.begin(), buf.end()); + +compute_wordbreak.finish(); + +// ... + +unicode_wordbreakscan scan; + +scan << c; + +size_t nchars=scan.finish(); + +</programlisting> +	</refsynopsisdiv> + +	<refsect1> +	  <title>DESCRIPTION</title> + +	  <para> +	    <classname>unicode::wordbreak_callback_base</classname> is a C++ +	    binding for the unicode word-breaking rule implementation described +	    in +	    <link linkend="unicode_word_break"> +	      <citerefentry><refentrytitle>unicode_word_break</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>. +	  </para> + +	  <para> +	    Subclass <classname>unicode::wordbreak_callback_base</classname> +	    and implement <methodname>callback</methodname>() that's virtually +	    inherited from +	    <classname>unicode::wordbreak_callback_base</classname>. +	    The +	    <methodname>callback</methodname>() callback function receives the +	    output values from the word-breaking algorithm, namely a +	    <classname>bool</classname> indicating whether a word break +	    exists before the unicode character in the underlying input sequence. +	  </para> + +	  <para> +	    <methodname>callback</methodname>() should return 0. A non-zero +	    return reports an error, that stops the word-breaking algorithm. +	    See +	    <link linkend="unicode_word_break"> +	      <citerefentry><refentrytitle>unicode_word_break</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link> for more +	      information. +	  </para> + + 	  <para> +	    The input unicode characters for the word-breaking +	    algorithm are provided by the <literal><<</literal> +	    operator, one unicode character at a time; or by the +	    <literal>()</literal> operator, passing either a container, or +	    a beginning and an ending iterator value for an input sequence +	    of unicode characters. <methodname>finish</methodname>() indicates +	    the end of the unicode character sequence. +	  </para> + +	  <para> +	    <classname>unicode::wordbreakscan</classname> is a C++ +	    binding for the  +	    <function>unicode_wbscan_init</function>(), +            <function>unicode_wbscan_next</function>() and +            <function>unicode_wbscan_end</function> +	    methods described in +	    <link linkend="unicode_word_break"> +	      <citerefentry><refentrytitle>unicode_word_break</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>. +	      Its <methodname><<</methodname> iterates over the +	      unicode characters, and <methodname>finish</methodname>() +	      indicates the number of characters before the first unicode +	      word break. The <methodname><<</methodname> iterator +	      returns a <classname>bool</classname> indicating when the first +	      word break has already been found, so further calls are not +	      necessary. +	  </para> +	</refsect1> + +	<refsect1> +	  <title>SEE ALSO</title> +	  <para> +	    <link linkend="courier-unicode"> +	      <citerefentry> +		<refentrytitle>courier-unicode</refentrytitle> +		<manvolnum>7</manvolnum></citerefentry></link>, +	    <link linkend="unicode_word_break"> +	      <citerefentry><refentrytitle>unicode_word_break</refentrytitle> +	      <manvolnum>3</manvolnum></citerefentry></link>. +	  </para> +	</refsect1> +      </refentry> + +    </section> +  </section> +  <section id="COPYING"> +    <title>COPYING</title> + +    <para role="COPYING"> +      The Courier Unicode Library is free software, distributed under the +      terms of the GPL, version 3: +    </para> +    <blockquote> +      <literallayout><xi:include href="COPYING" parse="text" xmlns:xi="http://www.w3.org/2001/XInclude" /></literallayout> +    </blockquote> +  </section> +</article> diff --git a/unicode/configure.ac b/unicode/configure.ac index a8adc78..f15042f 100644 --- a/unicode/configure.ac +++ b/unicode/configure.ac @@ -1,16 +1,15 @@  dnl Process this file with autoconf to produce a configure script. -AC_INIT(unicode, 0.10, [courier-maildrop@lists.sourceforge.net]) +AC_INIT([courier-unicode], [1.0], [courier-users@lists.sourceforge.net])  >confdefs.h  # Kill PACKAGE_ macros  AC_CONFIG_SRCDIR(unicodecpp.C) -AC_CONFIG_AUX_DIR(../..)  LPATH="$PATH:/usr/local/bin"  AM_CONFIG_HEADER(unicode_config.h) -AM_INIT_AUTOMAKE([foreign no-define]) +AM_INIT_AUTOMAKE([foreign no-define dist-bzip2])  dnl Checks for programs.  AC_PROG_MAKE_SET @@ -80,4 +79,6 @@ then  fi  CFLAGS="-I.. -I$srcdir/.. $CFLAGS"  CXXFLAGS="-I.. -I$srcdir/.. $CXXFLAGS" -AC_OUTPUT(Makefile) + +AM_CONDITIONAL(HAVE_DOCS,[test -f $srcdir/docbook/icon.gif]) +AC_OUTPUT(Makefile courier-unicode.spec) diff --git a/unicode/courier-unicode.spec.in b/unicode/courier-unicode.spec.in new file mode 100644 index 0000000..e048a3b --- /dev/null +++ b/unicode/courier-unicode.spec.in @@ -0,0 +1,61 @@ +Summary: Courier Unicode Library +Name: courier-unicode +Version: @VERSION@ +Release: 1%{?dist}%{?courier_release} +License: GPL3 +Group: System Environment/Libraries +URL: http://www.courier-mta.org/unicode/ +Source: http://download.sourceforge.net/courier/courier-unicode-@VERSION@.tar.bz2 +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root + +%package devel +Summary: Courier Unicode Library development files +Group: Development/Libraries +Requires: %{name} = 0:%{version}-%{release} + +%description +This library implements several algorithms related to the Unicode +Standard. + +This package installs only the runtime libraries needed by applications that +use this library. Install the courier-unicode-devel package if you want +to develop new applications using this library. + +%description devel +This package contains development files for the Courier Unicode Library. +Install this package if you want to develop applications that uses this +unicode library. + +%prep +%setup -q +%configure +%build +%{__make} -s %{?_smp_mflags} + +%install +rm -rf $RPM_BUILD_ROOT +%{__make} install DESTDIR=$RPM_BUILD_ROOT + +%post -p /sbin/ldconfig +%postun -p /sbin/ldconfig + +%clean +rm -rf $RPM_BUILD_ROOT + + +%files +%defattr(-,root,root,-) +%doc README COPYING ChangeLog AUTHORS +%{_libdir}/*.so.* + +%files devel +%{_mandir}/*/* +%{_includedir}/* +%{_libdir}/*.so +%{_libdir}/*.la +%{_libdir}/*.a + +%changelog +* Sun Jan 12 2014 Sam Varshavchik <mrsam@octopus.email-scan.com> +- Initial build. + diff --git a/unicode/docbook/book.css b/unicode/docbook/book.css new file mode 100644 index 0000000..1f893ad --- /dev/null +++ b/unicode/docbook/book.css @@ -0,0 +1,155 @@ +/* stylesheet */ + +.informaltable table { +    border-collapse: collapse; +} + +.informaltable table th, .informaltable table td { +    border-width: 3px; +    border-style: ridge; +    border-color: #bbbbbb; +    background-color: #eeeeee; +    padding: .2em; +} + +.tblfootnote { +    font-size: 80%; +} + +.informaltable .tblfootnote { +    text-align: left; +} + +blockquote.blockquote, code.computeroutput div.literallayout { +    border-width: 2px; +    border-style: ridge; +    border-color: #bbbbbb; +    background-color: #eeeeee; +} + +.tblfootnote blockquote.blockquote { +    border-width: 0px; +} + +pre.programlisting, code.computeroutput div.literallayout { +    padding-left: 1em; +} + +code.computeroutput div.literallayout { +    margin-left: 4em; +} + +.application { +    font-family: "liberation sans", arial, "sans serif"; +    font-weight: bold; +} + +.command, .acronym { +    font-family: "liberation mono", "courier new", monospace; +} + +div.blockquote-title { +    text-align:center; +} + +#COPYING div.literallayout { +    font-family: "liberation mono", "courier new", monospace; +    height: 400px; +    overflow-y: scroll; +    padding-left: 1em; +} + +blockquote.blockquote { +    padding-left: 1em; +    padding-right: 1em; +} + +#COPYING blockquote.blockquote { +    padding-left: 0em; +    padding-right: 0em; +} + +code.varname { +    color: #404000 +} + +code.classname { +    color: #000080 +} + +code.methodname { +    color: #004000 +} + +code.function { +    color: #402000 +} + +div.note + div.note { +    margin-top: 1em; +} + +div.note { +    border-radius: 10px; +    border-width: thin; +    border-style: solid; +    border-color: #000000; +    background-color: #dddddd; +    padding-left: 1em; +    padding-right: 1em; +} + +div.note h3 { +    border-bottom-width: thin; +    border-bottom-style: dashed; +    border-bottom-color: #bbbbbb; +} + +a:link, a:visited { +    color: blue; +} + +#bodyindex { +    background-position: center; +    background-repeat: no-repeat; +    background-color: #ffffff; +    color: #000000; +} + +#index div.toc, #externallinks { +    float: right; +    border-width: thin; +    border-color: #000000; +    border-style: solid; +    border-radius: 5px; +    font-size: 80%; +    background-color: #eeeeee; +    margin-left: 1em; +} + +#index div.toc { +    padding-left: 1em; +    padding-right: 1em; +} + +#externallinks { +    margin-left: 1em; +    padding-left: .5em; +    padding-right: .5em; +} + +#externallinks p { +    margin-top: .1em; +    margin-bottom: .1em; +    margin-left: .1em; +    margin-right: .1em; +} + +#externallinks th { +    text-align: left; +} + +#externallinks th, #externallinks td { +    border-width: 0px; +} + diff --git a/unicode/docbook/docbook.xsl b/unicode/docbook/docbook.xsl new file mode 100644 index 0000000..d30cf39 --- /dev/null +++ b/unicode/docbook/docbook.xsl @@ -0,0 +1,48 @@ +<?xml version='1.0'?> +<xsl:stylesheet   +    xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + +  <xsl:template name="user.head.content"> +    <xsl:element name="script" namespace="http://www.w3.org/1999/xhtml"> +      <xsl:attribute name="type">text/javascript</xsl:attribute> +      <xsl:attribute name="src"> +	<xsl:text>frame.js</xsl:text> +      </xsl:attribute> +      <xsl:text> </xsl:text> +    </xsl:element> + +    <xsl:element name="link" namespace="http://www.w3.org/1999/xhtml"> +      <xsl:attribute name="rel">icon</xsl:attribute> +      <xsl:attribute name="href"> +	<xsl:text>icon.gif</xsl:text> +      </xsl:attribute> +      <xsl:attribute name="type">image/gif</xsl:attribute> +    </xsl:element> +  </xsl:template> + +  <xsl:template name="body.attributes"> +    <xsl:choose> +      <xsl:when test='@id'> +	<xsl:attribute name="id"><xsl:text>body</xsl:text><xsl:value-of select='@id' /></xsl:attribute> +      </xsl:when> +    </xsl:choose> +  </xsl:template> + +  <xsl:param name="funcsynopsis.style">ansi</xsl:param> +  <xsl:param name="toc.section.depth">1</xsl:param> + +  <xsl:include href="http://docbook.sourceforge.net/release/xsl/current/xhtml-1_1/chunk.xsl" /> + +  <!-- Bug fix 1.76.1 --> +  <xsl:template match="funcdef/function" mode="ansi-tabular"> +    <xsl:choose> +      <xsl:when test="$funcsynopsis.decoration != 0"> +	<strong xmlns="http://www.w3.org/1999/xhtml" +		xmlns:xslo="http://www.w3.org/1999/XSL/Transform"><xsl:apply-templates mode="ansi-nontabular"/></strong> +      </xsl:when> +      <xsl:otherwise> +	<xsl:apply-templates mode="kr-tabular"/> +      </xsl:otherwise> +    </xsl:choose> +  </xsl:template> +</xsl:stylesheet> diff --git a/unicode/docbook/frame.js b/unicode/docbook/frame.js new file mode 100644 index 0000000..5104629 --- /dev/null +++ b/unicode/docbook/frame.js @@ -0,0 +1,8 @@ +myname=self.location.href; + +x=top.location.href; + +if (x != myname) +{ +   top.location=myname; +} diff --git a/unicode/docbook/icon.gif b/unicode/docbook/icon.gifBinary files differ new file mode 100644 index 0000000..06b938d --- /dev/null +++ b/unicode/docbook/icon.gif diff --git a/unicode/linebreaktest.C b/unicode/linebreaktest.C index 0816b22..d7b93c4 100644 --- a/unicode/linebreaktest.C +++ b/unicode/linebreaktest.C @@ -111,7 +111,7 @@ static void testsuite()  		std::vector<int> computed_status;  		typedef std::vector<unicode_char>::const_iterator ubuf_iter; -		typedef mail::linebreak_iter<ubuf_iter> lb_iter; +		typedef unicode::linebreak_iter<ubuf_iter> lb_iter;  		std::copy(lb_iter(ubuf.begin(), ubuf.end()), lb_iter(),  			  std::back_insert_iterator<std::vector<int> > @@ -146,10 +146,10 @@ static void testlinebreakc()  	linebreakvec_t linebreakvec; -	std::copy(mail::linebreakc_iter<unicode_char *>(str, +	std::copy(unicode::linebreakc_iter<unicode_char *>(str,  							str + sizeof(str)  							/sizeof(str[0])), -		  mail::linebreakc_iter<unicode_char *>(), +		  unicode::linebreakc_iter<unicode_char *>(),  		  std::back_insert_iterator<linebreakvec_t>  		  (linebreakvec)); @@ -181,7 +181,7 @@ int main(int argc, char **argv)  	std::vector<unicode_char> uc; -	mail::iconvert::tou +	unicode::iconvert::tou  		::convert(convteststr, "utf-8", uc);  	std::vector<unicode_char>::iterator e(uc.end()), @@ -192,14 +192,14 @@ int main(int argc, char **argv)  	if (b == e || *b++ != 0x30A2 || b != e)  	{ -		std::cerr << "mail::iconvert::tou::convert failed" +		std::cerr << "unicode::iconvert::tou::convert failed"  			  << std::endl;  		exit(1);  	} -	if (mail::iconvert::fromu::convert(uc, "utf-8") != convteststr) +	if (unicode::iconvert::fromu::convert(uc, "utf-8") != convteststr)  	{ -		std::cerr << "mail::iconvert::fromu::convert failed" +		std::cerr << "unicode::iconvert::fromu::convert failed"  			  << std::endl;  		exit(1);  	} diff --git a/unicode/unicode.c b/unicode/unicode.c index 4ca098b..ed909fe 100644 --- a/unicode/unicode.c +++ b/unicode/unicode.c @@ -6,7 +6,6 @@  #include	"unicode_config.h"  #include	"unicode.h" -#include	"../rfc822/rfc822hdr.h"  #include	<string.h>  #include	<ctype.h>  #include	<stdlib.h> @@ -118,7 +117,7 @@ const char *unicode_default_chset()  /*****************************************************************************/ -const char libmail_u_ucs4_native[]= +const char unicode_u_ucs4_native[]=  #if WORDS_BIGENDIAN  	"UCS-4BE"  #else @@ -126,7 +125,7 @@ const char libmail_u_ucs4_native[]=  #endif  	; -const char libmail_u_ucs2_native[]= +const char unicode_u_ucs2_native[]=  #if WORDS_BIGENDIAN  	"UCS-2BE"  #else @@ -136,14 +135,14 @@ const char libmail_u_ucs2_native[]=  /* A stack of conversion modules */ -struct libmail_u_convert_hdr { +struct unicode_convert_hdr {  	int (*convert_handler)(void *ptr,  			       const char *text, size_t cnt);  	int (*deinit_handler)(void *ptr, int *errptr);  	void *ptr; -	struct libmail_u_convert_hdr *next; +	struct unicode_convert_hdr *next;  };  /* Decoding table for modified UTF7-encoding as used in imap */ @@ -178,7 +177,7 @@ static const char mbase64[]=  ** init_nottoimaputf7() returns an opaque stack for converting to ucs2.  */ -static libmail_u_convert_handle_t +static unicode_convert_handle_t  init_nottoimaputf7(const char *src_chset,  		   const char *dst_chset,  		   int (*output_func)(const char *, size_t, void *), @@ -188,9 +187,9 @@ init_nottoimaputf7(const char *src_chset,  ** The to modified UTF7 module  */ -struct libmail_u_convert_toimaputf7 { +struct unicode_convert_toimaputf7 { -	struct libmail_u_convert_hdr hdr; +	struct unicode_convert_hdr hdr;  	/* Accumulated output buffer */ @@ -233,7 +232,7 @@ struct libmail_u_convert_toimaputf7 {  		(p)->utf7encodebuf_cnt=0;				\  	} while (0) -static int toimaputf7_encode_flushfinal(struct libmail_u_convert_toimaputf7 *p) +static int toimaputf7_encode_flushfinal(struct unicode_convert_toimaputf7 *p)  {  	if (p->utf7encodebuf_cnt > 0)  		toimaputf7_encode_flush(p); @@ -258,14 +257,14 @@ static int convert_utf7_handler(void *ptr, const char *text, size_t cnt);  ** Create a conversion module stack  */ -libmail_u_convert_handle_t -libmail_u_convert_init(const char *src_chset, +unicode_convert_handle_t +unicode_convert_init(const char *src_chset,  		       const char *dst_chset,  		       int (*output_func)(const char *, size_t, void *),  		       void *convert_arg)  { -	struct libmail_u_convert_toimaputf7 *toutf7; -	libmail_u_convert_handle_t h; +	struct unicode_convert_toimaputf7 *toutf7; +	unicode_convert_handle_t h;  	const char *smapmunge;  	size_t l=strlen(unicode_x_imap_modutf7); @@ -282,14 +281,14 @@ libmail_u_convert_init(const char *src_chset,  					     output_func,  					     convert_arg); -	toutf7=malloc(sizeof(struct libmail_u_convert_toimaputf7)); +	toutf7=malloc(sizeof(struct unicode_convert_toimaputf7));  	if (!toutf7)  		return NULL;  	memset(toutf7, 0, sizeof(*toutf7)); -	h=init_nottoimaputf7(src_chset, libmail_u_ucs2_native, +	h=init_nottoimaputf7(src_chset, unicode_u_ucs2_native,  			     do_convert_toutf7, toutf7);  	if (!h)  	{ @@ -313,14 +312,14 @@ libmail_u_convert_init(const char *src_chset,  static int convert_utf7_handler(void *ptr, const char *text, size_t cnt)  { -	struct libmail_u_convert_toimaputf7 *toutf7= -		(struct libmail_u_convert_toimaputf7 *)ptr; +	struct unicode_convert_toimaputf7 *toutf7= +		(struct unicode_convert_toimaputf7 *)ptr;  	return (*toutf7->hdr.next->convert_handler)(toutf7->hdr.next->ptr,  						    text, cnt);  } -static int utf7off(struct libmail_u_convert_toimaputf7 *toutf7) +static int utf7off(struct unicode_convert_toimaputf7 *toutf7)  {  	if (!toutf7->utfmode)  		return 0; @@ -338,8 +337,8 @@ static int utf7off(struct libmail_u_convert_toimaputf7 *toutf7)  static int do_convert_toutf7(const char *text, size_t cnt, void *arg)  { -	struct libmail_u_convert_toimaputf7 *toutf7= -		(struct libmail_u_convert_toimaputf7 *)arg; +	struct unicode_convert_toimaputf7 *toutf7= +		(struct unicode_convert_toimaputf7 *)arg;  	/* We better be getting UCS-2 here! */ @@ -415,8 +414,8 @@ static int deinit_toimaputf7(void *ptr, int *errptr)  {  	int rc; -	struct libmail_u_convert_toimaputf7 *toutf7= -		(struct libmail_u_convert_toimaputf7 *)ptr; +	struct unicode_convert_toimaputf7 *toutf7= +		(struct unicode_convert_toimaputf7 *)ptr;  	/* Flush out the downstream stack */  	rc=(*toutf7->hdr.next->deinit_handler)(toutf7->hdr.next->ptr, errptr); @@ -442,15 +441,15 @@ static int deinit_toimaputf7(void *ptr, int *errptr)  ** converts UCS-2 to the requested charset.  */ -static libmail_u_convert_handle_t +static unicode_convert_handle_t  init_notfromimaputf7(const char *src_chset,  		     const char *dst_chset,  		     int (*output_func)(const char *, size_t, void *),  		     void *convert_arg); -struct libmail_u_convert_fromimaputf7 { +struct unicode_convert_fromimaputf7 { -	struct libmail_u_convert_hdr hdr; +	struct unicode_convert_hdr hdr;  	/* Accumulated UCS-2 stream */  	uint16_t convbuf[512]; @@ -498,14 +497,14 @@ static int convert_fromutf7(void *ptr,  			    const char *text, size_t cnt);  static int deinit_fromutf7(void *ptr, int *errptr); -static libmail_u_convert_handle_t +static unicode_convert_handle_t  init_nottoimaputf7(const char *src_chset,  		   const char *dst_chset,  		   int (*output_func)(const char *, size_t, void *),  		   void *convert_arg)  { -	struct libmail_u_convert_fromimaputf7 *fromutf7; -	libmail_u_convert_handle_t h; +	struct unicode_convert_fromimaputf7 *fromutf7; +	unicode_convert_handle_t h;  	size_t l=strlen(unicode_x_imap_modutf7);  	if (strncmp(src_chset, unicode_x_imap_modutf7, l) == 0 && @@ -516,8 +515,8 @@ init_nottoimaputf7(const char *src_chset,  					    output_func,  					    convert_arg); -	fromutf7=(struct libmail_u_convert_fromimaputf7 *) -		malloc(sizeof(struct libmail_u_convert_fromimaputf7)); +	fromutf7=(struct unicode_convert_fromimaputf7 *) +		malloc(sizeof(struct unicode_convert_fromimaputf7));  	if (!fromutf7)  		return NULL; @@ -526,7 +525,7 @@ init_nottoimaputf7(const char *src_chset,  	/* Create a stack for converting UCS-2 to the dest charset */ -	h=init_notfromimaputf7(libmail_u_ucs2_native, dst_chset, +	h=init_notfromimaputf7(unicode_u_ucs2_native, dst_chset,  			       output_func, convert_arg);  	if (!h) @@ -545,8 +544,8 @@ init_nottoimaputf7(const char *src_chset,  static int convert_fromutf7(void *ptr,  			    const char *text, size_t cnt)  { -	struct libmail_u_convert_fromimaputf7 *fromutf7= -		(struct libmail_u_convert_fromimaputf7 *)ptr; +	struct unicode_convert_fromimaputf7 *fromutf7= +		(struct unicode_convert_fromimaputf7 *)ptr;  	int bits;  	while (cnt) @@ -634,8 +633,8 @@ static int convert_fromutf7(void *ptr,  static int deinit_fromutf7(void *ptr, int *errptr)  { -	struct libmail_u_convert_fromimaputf7 *fromutf7= -		(struct libmail_u_convert_fromimaputf7 *)ptr; +	struct unicode_convert_fromimaputf7 *fromutf7= +		(struct unicode_convert_fromimaputf7 *)ptr;  	int rc;  	if (fromutf7->seenamp || fromutf7->inmod) @@ -666,9 +665,9 @@ static int deinit_fromutf7(void *ptr, int *errptr)  /* A real conversion module, via iconv */ -struct libmail_u_convert_iconv { +struct unicode_convert_iconv { -	struct libmail_u_convert_hdr hdr; +	struct unicode_convert_hdr hdr;  	iconv_t h;  	int errflag; /* Accumulated errors */ @@ -683,13 +682,13 @@ struct libmail_u_convert_iconv {  	char converr; /* Flag - an EILSEQ was encountered */  } ; -static int init_iconv(struct libmail_u_convert_iconv *h, +static int init_iconv(struct unicode_convert_iconv *h,  		      const char *src_chset,  		      const char *dst_chset,  		      int (*output_func)(const char *, size_t, void *),  		      void *convert_arg); -static libmail_u_convert_handle_t +static unicode_convert_handle_t  init_notfromimaputf7(const char *src_chset,  		     const char *dst_chset,  		     int (*output_func)(const char *, size_t, void *), @@ -697,8 +696,8 @@ init_notfromimaputf7(const char *src_chset,  { -	struct libmail_u_convert_iconv *h= -		malloc(sizeof(struct libmail_u_convert_iconv)); +	struct unicode_convert_iconv *h= +		malloc(sizeof(struct unicode_convert_iconv));  	if (!h)  		return NULL; @@ -715,7 +714,7 @@ init_notfromimaputf7(const char *src_chset,  /* Run the stack */ -int libmail_u_convert(libmail_u_convert_handle_t h, +int unicode_convert(unicode_convert_handle_t h,  		      const char *text, size_t cnt)  {  	return (*h->convert_handler)(h->ptr, text, cnt); @@ -723,7 +722,7 @@ int libmail_u_convert(libmail_u_convert_handle_t h,  /* Destroy the stack */ -int libmail_u_convert_deinit(libmail_u_convert_handle_t h, int *errptr) +int unicode_convert_deinit(unicode_convert_handle_t h, int *errptr)  {  	return (*h->deinit_handler)(h, errptr);  } @@ -734,7 +733,7 @@ static int convert_iconv(void *ptr,  /* Initialize a single conversion module, in the stack */ -static int init_iconv(struct libmail_u_convert_iconv *h, +static int init_iconv(struct unicode_convert_iconv *h,  		      const char *src_chset,  		      const char *dst_chset,  		      int (*output_func)(const char *, size_t, void *), @@ -798,8 +797,8 @@ static int init_iconv(struct libmail_u_convert_iconv *h,  	return 0;  } -static void convert_flush(struct libmail_u_convert_iconv *); -static void convert_flush_iconv(struct libmail_u_convert_iconv *, const char **, +static void convert_flush(struct unicode_convert_iconv *); +static void convert_flush_iconv(struct unicode_convert_iconv *, const char **,  				size_t *);  /* @@ -810,7 +809,7 @@ static void convert_flush_iconv(struct libmail_u_convert_iconv *, const char **,  static int convert_iconv(void *ptr,  			 const char *text, size_t cnt)  { -	struct libmail_u_convert_iconv *h=(struct libmail_u_convert_iconv *)ptr; +	struct unicode_convert_iconv *h=(struct unicode_convert_iconv *)ptr;  	while (cnt && h->errflag == 0)  	{ @@ -839,8 +838,8 @@ static int deinit_iconv(void *ptr, int *errptr)  {  	int rc;  	int converr; -	struct libmail_u_convert_iconv *h=(struct libmail_u_convert_iconv *)ptr; -	libmail_u_convert_handle_t next; +	struct unicode_convert_iconv *h=(struct unicode_convert_iconv *)ptr; +	unicode_convert_handle_t next;  	if (h->errflag == 0)  		convert_flush(h); @@ -864,7 +863,7 @@ static int deinit_iconv(void *ptr, int *errptr)  	if (next)  	{  		int converrnext; -		int rcnext=libmail_u_convert_deinit(next, &converrnext); +		int rcnext=unicode_convert_deinit(next, &converrnext);  		if (converrnext && errptr && *errptr == 0)  			*errptr=converr; @@ -881,7 +880,7 @@ static int deinit_iconv(void *ptr, int *errptr)  ** buffer.  */ -static void convert_flush(struct libmail_u_convert_iconv *h) +static void convert_flush(struct unicode_convert_iconv *h)  {  	const char *p;  	size_t n; @@ -916,7 +915,7 @@ static void convert_flush(struct libmail_u_convert_iconv *h)  ** Convert text via iconv.  */ -static void convert_flush_iconv(struct libmail_u_convert_iconv *h, +static void convert_flush_iconv(struct unicode_convert_iconv *h,  				const char **inbuf, size_t *inbytesleft)  {  	int save_errno; @@ -1053,23 +1052,23 @@ static void convert_flush_iconv(struct libmail_u_convert_iconv *h,  /*****************************************************************************/  /* -** A wrapper for libmail_u_convert() that collects the converted character +** A wrapper for unicode_convert() that collects the converted character  ** text into a buffer. This is done by passing an output function to -** libmail_u_convert() that saves converted text in a linked-list +** unicode_convert() that saves converted text in a linked-list  ** of buffers.  **  ** Then, in the deinitialization function, the buffers get concatenated into  ** the final character buffer.  */ -struct libmail_u_convert_cbuf { -	struct libmail_u_convert_cbuf *next; +struct unicode_convert_cbuf { +	struct unicode_convert_cbuf *next;  	char *fragment;  	size_t fragment_size;  }; -struct libmail_u_convert_tocbuf { -	struct libmail_u_convert_hdr hdr; +struct unicode_convert_tocbuf { +	struct unicode_convert_hdr hdr;  	char **cbufptr_ret;  	size_t *cbufsize_ret; @@ -1077,7 +1076,7 @@ struct libmail_u_convert_tocbuf {  	size_t tot_size;  	int nullterminate; -	struct libmail_u_convert_cbuf *first, **last; +	struct unicode_convert_cbuf *first, **last;  };  static int save_tocbuf(const char *, size_t, void *); @@ -1085,24 +1084,24 @@ static int convert_tocbuf(void *ptr,  			  const char *text, size_t cnt);  static int deinit_tocbuf(void *ptr, int *errptr); -libmail_u_convert_handle_t -libmail_u_convert_tocbuf_init(const char *src_chset, +unicode_convert_handle_t +unicode_convert_tocbuf_init(const char *src_chset,  			      const char *dst_chset,  			      char **cbufptr_ret,  			      size_t *cbufsize_ret,  			      int nullterminate  			      )  { -	struct libmail_u_convert_tocbuf *p= -		malloc(sizeof(struct libmail_u_convert_tocbuf)); -	libmail_u_convert_handle_t h; +	struct unicode_convert_tocbuf *p= +		malloc(sizeof(struct unicode_convert_tocbuf)); +	unicode_convert_handle_t h;  	if (!p)  		return NULL;  	memset(p, 0, sizeof(*p)); -	h=libmail_u_convert_init(src_chset, dst_chset, save_tocbuf, p); +	h=unicode_convert_init(src_chset, dst_chset, save_tocbuf, p);  	if (!h)  	{ @@ -1125,10 +1124,10 @@ libmail_u_convert_tocbuf_init(const char *src_chset,  static int save_tocbuf(const char *text, size_t cnt, void *ptr)  { -	struct libmail_u_convert_tocbuf *p= -		(struct libmail_u_convert_tocbuf *)ptr; -	struct libmail_u_convert_cbuf *fragment= -		malloc(sizeof(struct libmail_u_convert_cbuf)+cnt); +	struct unicode_convert_tocbuf *p= +		(struct unicode_convert_tocbuf *)ptr; +	struct unicode_convert_cbuf *fragment= +		malloc(sizeof(struct unicode_convert_cbuf)+cnt);  	size_t tot_size;  	if (!fragment) @@ -1160,10 +1159,10 @@ static int save_tocbuf(const char *text, size_t cnt, void *ptr)  static int convert_tocbuf(void *ptr, const char *text, size_t cnt)  { -	struct libmail_u_convert_tocbuf *p= -		(struct libmail_u_convert_tocbuf *)ptr; +	struct unicode_convert_tocbuf *p= +		(struct unicode_convert_tocbuf *)ptr; -	return libmail_u_convert(p->hdr.next, text, cnt); +	return unicode_convert(p->hdr.next, text, cnt);  }  /* @@ -1173,10 +1172,10 @@ static int convert_tocbuf(void *ptr, const char *text, size_t cnt)  static int deinit_tocbuf(void *ptr, int *errptr)  { -	struct libmail_u_convert_tocbuf *p= -		(struct libmail_u_convert_tocbuf *)ptr; -	int rc=libmail_u_convert_deinit(p->hdr.next, errptr); -	struct libmail_u_convert_cbuf *bufptr; +	struct unicode_convert_tocbuf *p= +		(struct unicode_convert_tocbuf *)ptr; +	int rc=unicode_convert_deinit(p->hdr.next, errptr); +	struct unicode_convert_cbuf *bufptr;  	if (rc == 0 && p->nullterminate)  	{ @@ -1210,7 +1209,7 @@ static int deinit_tocbuf(void *ptr, int *errptr)  	for (bufptr=p->first; bufptr; )  	{ -		struct libmail_u_convert_cbuf *b=bufptr; +		struct unicode_convert_cbuf *b=bufptr;  		bufptr=bufptr->next; @@ -1221,83 +1220,83 @@ static int deinit_tocbuf(void *ptr, int *errptr)  	return rc;  } -libmail_u_convert_handle_t -libmail_u_convert_tocbuf_toutf8_init(const char *src_chset, +unicode_convert_handle_t +unicode_convert_tocbuf_toutf8_init(const char *src_chset,  				     char **cbufptr_ret,  				     size_t *cbufsize_ret,  				     int nullterminate  				     )  { -	return libmail_u_convert_tocbuf_init(src_chset, "utf-8", +	return unicode_convert_tocbuf_init(src_chset, "utf-8",  					     cbufptr_ret, cbufsize_ret,  					     nullterminate);  } -libmail_u_convert_handle_t -libmail_u_convert_tocbuf_fromutf8_init(const char *dst_chset, +unicode_convert_handle_t +unicode_convert_tocbuf_fromutf8_init(const char *dst_chset,  				       char **cbufptr_ret,  				       size_t *cbufsize_ret,  				       int nullterminate  				       )  { -	return libmail_u_convert_tocbuf_init("utf-8", dst_chset, +	return unicode_convert_tocbuf_init("utf-8", dst_chset,  					     cbufptr_ret, cbufsize_ret,  					     nullterminate);  } -char *libmail_u_convert_toutf8(const char *text, +char *unicode_convert_toutf8(const char *text,  			       const char *charset,  			       int *error)  {  	char *cbufptr;  	size_t cbufsize; -	libmail_u_convert_handle_t h= -		libmail_u_convert_tocbuf_toutf8_init(charset, +	unicode_convert_handle_t h= +		unicode_convert_tocbuf_toutf8_init(charset,  						     &cbufptr,  						     &cbufsize, 1);  	if (!h)  		return NULL; -	libmail_u_convert(h, text, strlen(text)); +	unicode_convert(h, text, strlen(text)); -	if (libmail_u_convert_deinit(h, error) == 0) +	if (unicode_convert_deinit(h, error) == 0)  		return cbufptr;  	return NULL;  } -char *libmail_u_convert_fromutf8(const char *text, +char *unicode_convert_fromutf8(const char *text,  				 const char *charset,  				 int *error)  {  	char *cbufptr;  	size_t cbufsize; -	libmail_u_convert_handle_t h= -		libmail_u_convert_tocbuf_fromutf8_init(charset, +	unicode_convert_handle_t h= +		unicode_convert_tocbuf_fromutf8_init(charset,  						       &cbufptr,  						       &cbufsize, 1);  	if (!h)  		return NULL; -	libmail_u_convert(h, text, strlen(text)); +	unicode_convert(h, text, strlen(text)); -	if (libmail_u_convert_deinit(h, error) == 0) +	if (unicode_convert_deinit(h, error) == 0)  		return cbufptr;  	return NULL;  } -char *libmail_u_convert_tobuf(const char *text, +char *unicode_convert_tobuf(const char *text,  			      const char *charset,  			      const char *dstcharset,  			      int *error)  {  	char *cbufptr;  	size_t cbufsize; -	libmail_u_convert_handle_t h= -		libmail_u_convert_tocbuf_init(charset, +	unicode_convert_handle_t h= +		unicode_convert_tocbuf_init(charset,  					      dstcharset,  					      &cbufptr,  					      &cbufsize, 1); @@ -1305,9 +1304,9 @@ char *libmail_u_convert_tobuf(const char *text,  	if (!h)  		return NULL; -	libmail_u_convert(h, text, strlen(text)); +	unicode_convert(h, text, strlen(text)); -	if (libmail_u_convert_deinit(h, error) == 0) +	if (unicode_convert_deinit(h, error) == 0)  		return cbufptr;  	return NULL; @@ -1317,20 +1316,20 @@ char *libmail_u_convert_tobuf(const char *text,  /*  ** Convert text to unicode_chars. Same basic approach as -** libmail_u_convert_tocbuf_init(). The output character set gets specified +** unicode_convert_tocbuf_init(). The output character set gets specified  ** as UCS-4, the final output size is divided by 4, and the output buffer gets  ** typed as a unicode_char array.  */ -struct libmail_u_convert_buf { -	struct libmail_u_convert_buf *next; +struct unicode_convert_buf { +	struct unicode_convert_buf *next;  	unicode_char *fragment;  	size_t fragment_size;  	size_t max_fragment_size;  }; -struct libmail_u_convert_tou { -	struct libmail_u_convert_hdr hdr; +struct unicode_convert_tou { +	struct unicode_convert_hdr hdr;  	unicode_char **ucptr_ret;  	size_t *ucsize_ret; @@ -1338,7 +1337,7 @@ struct libmail_u_convert_tou {  	size_t tot_size;  	int nullterminate; -	struct libmail_u_convert_buf *first, *tail, **last; +	struct unicode_convert_buf *first, *tail, **last;  };  static int save_unicode(const char *, size_t, void *); @@ -1346,23 +1345,23 @@ static int convert_tounicode(void *ptr,  			 const char *text, size_t cnt);  static int deinit_tounicode(void *ptr, int *errptr); -libmail_u_convert_handle_t -libmail_u_convert_tou_init(const char *src_chset, +unicode_convert_handle_t +unicode_convert_tou_init(const char *src_chset,  			   unicode_char **ucptr_ret,  			   size_t *ucsize_ret,  			   int nullterminate  			   )  { -	struct libmail_u_convert_tou *p= -		malloc(sizeof(struct libmail_u_convert_tou)); -	libmail_u_convert_handle_t h; +	struct unicode_convert_tou *p= +		malloc(sizeof(struct unicode_convert_tou)); +	unicode_convert_handle_t h;  	if (!p)  		return NULL;  	memset(p, 0, sizeof(*p)); -	h=libmail_u_convert_init(src_chset, libmail_u_ucs4_native, +	h=unicode_convert_init(src_chset, unicode_u_ucs4_native,  				 save_unicode, p);  	if (!h) @@ -1382,25 +1381,25 @@ libmail_u_convert_tou_init(const char *src_chset,  	return &p->hdr;  } -libmail_u_convert_handle_t -libmail_u_convert_fromu_init(const char *dst_chset, +unicode_convert_handle_t +unicode_convert_fromu_init(const char *dst_chset,  			     char **cbufptr_ret,  			     size_t *csize_ret,  			     int nullterminate  			     )  { -	return libmail_u_convert_tocbuf_init(libmail_u_ucs4_native, +	return unicode_convert_tocbuf_init(unicode_u_ucs4_native,  					     dst_chset,  					     cbufptr_ret,  					     csize_ret,  					     nullterminate);  } -int libmail_u_convert_uc(libmail_u_convert_handle_t handle, +int unicode_convert_uc(unicode_convert_handle_t handle,  			 const unicode_char *text,  			 size_t cnt)  { -	return libmail_u_convert(handle, (const char *)text, +	return unicode_convert(handle, (const char *)text,  				 cnt * sizeof(*text));  } @@ -1408,9 +1407,9 @@ int libmail_u_convert_uc(libmail_u_convert_handle_t handle,  static int save_unicode(const char *text, size_t cnt, void *ptr)  { -	struct libmail_u_convert_tou *p= -		(struct libmail_u_convert_tou *)ptr; -	struct libmail_u_convert_buf *fragment; +	struct unicode_convert_tou *p= +		(struct unicode_convert_tou *)ptr; +	struct unicode_convert_buf *fragment;  	size_t tot_size;  	cnt /= sizeof(unicode_char); @@ -1443,7 +1442,7 @@ static int save_unicode(const char *text, size_t cnt, void *ptr)  		if (cnt_alloc < 16)  			cnt_alloc=16; -		if ((fragment=malloc(sizeof(struct libmail_u_convert_buf) +		if ((fragment=malloc(sizeof(struct unicode_convert_buf)  				     +cnt_alloc*sizeof(unicode_char)))  		    == NULL)  		{ @@ -1476,10 +1475,10 @@ static int save_unicode(const char *text, size_t cnt, void *ptr)  static int convert_tounicode(void *ptr,  			     const char *text, size_t cnt)  { -	struct libmail_u_convert_tou *p= -		(struct libmail_u_convert_tou *)ptr; +	struct unicode_convert_tou *p= +		(struct unicode_convert_tou *)ptr; -	return libmail_u_convert(p->hdr.next, text, cnt); +	return unicode_convert(p->hdr.next, text, cnt);  }  /* @@ -1489,10 +1488,10 @@ static int convert_tounicode(void *ptr,  static int deinit_tounicode(void *ptr, int *errptr)  { -	struct libmail_u_convert_tou *p= -		(struct libmail_u_convert_tou *)ptr; -	int rc=libmail_u_convert_deinit(p->hdr.next, errptr); -	struct libmail_u_convert_buf *bufptr; +	struct unicode_convert_tou *p= +		(struct unicode_convert_tou *)ptr; +	int rc=unicode_convert_deinit(p->hdr.next, errptr); +	struct unicode_convert_buf *bufptr;  	if (rc == 0 && p->nullterminate)  	{ @@ -1528,7 +1527,7 @@ static int deinit_tounicode(void *ptr, int *errptr)  	for (bufptr=p->first; bufptr; )  	{ -		struct libmail_u_convert_buf *b=bufptr; +		struct unicode_convert_buf *b=bufptr;  		bufptr=bufptr->next; @@ -1539,38 +1538,38 @@ static int deinit_tounicode(void *ptr, int *errptr)  	return rc;  } -int libmail_u_convert_tou_tobuf(const char *text, +int unicode_convert_tou_tobuf(const char *text,  				size_t text_l,  				const char *charset,  				unicode_char **uc,  				size_t *ucsize,  				int *err)  { -	libmail_u_convert_handle_t h; +	unicode_convert_handle_t h; -	if ((h=libmail_u_convert_tou_init(charset, uc, ucsize, 0)) == NULL) +	if ((h=unicode_convert_tou_init(charset, uc, ucsize, 0)) == NULL)  		return -1; -	if (libmail_u_convert(h, text, text_l) < 0) +	if (unicode_convert(h, text, text_l) < 0)  	{ -		libmail_u_convert_deinit(h, NULL); +		unicode_convert_deinit(h, NULL);  		return -1;  	} -	if (libmail_u_convert_deinit(h, err)) +	if (unicode_convert_deinit(h, err))  		return -1;  	return 0;  } -int libmail_u_convert_fromu_tobuf(const unicode_char *utext, +int unicode_convert_fromu_tobuf(const unicode_char *utext,  				  size_t utext_l,  				  const char *charset,  				  char **c,  				  size_t *csize,  				  int *err)  { -	libmail_u_convert_handle_t h; +	unicode_convert_handle_t h;  	if (utext_l == (size_t)-1)  	{ @@ -1578,22 +1577,22 @@ int libmail_u_convert_fromu_tobuf(const unicode_char *utext,  		     ;  	} -	if ((h=libmail_u_convert_fromu_init(charset, c, csize, 1)) == NULL) +	if ((h=unicode_convert_fromu_init(charset, c, csize, 1)) == NULL)  		return -1; -	if (libmail_u_convert_uc(h, utext, utext_l) < 0) +	if (unicode_convert_uc(h, utext, utext_l) < 0)  	{ -		libmail_u_convert_deinit(h, NULL); +		unicode_convert_deinit(h, NULL);  		return -1;  	} -	if (libmail_u_convert_deinit(h, err)) +	if (unicode_convert_deinit(h, err))  		return -1;  	return 0;  } -char *libmail_u_convert_tocase(const char *str, +char *unicode_convert_tocase(const char *str,  			       const char *charset,  			       unicode_char (*first_char_func)(unicode_char),  			       unicode_char (*char_func)(unicode_char)) @@ -1605,7 +1604,7 @@ char *libmail_u_convert_tocase(const char *str,  	char *c;  	size_t csize; -	if (libmail_u_convert_tou_tobuf(str, strlen(str), +	if (unicode_convert_tou_tobuf(str, strlen(str),  					charset, &uc, &ucsize, &err))  		return NULL; @@ -1623,7 +1622,7 @@ char *libmail_u_convert_tocase(const char *str,  			first_char_func=char_func;  	} -	if (libmail_u_convert_fromu_tobuf(uc, ucsize, +	if (unicode_convert_fromu_tobuf(uc, ucsize,  					  charset,  					  &c, &csize, &err))  	{ diff --git a/unicode/unicode.h b/unicode/unicode.h index 5e850a1..3789e7e 100644 --- a/unicode/unicode.h +++ b/unicode/unicode.h @@ -2,7 +2,7 @@  #define	unicode_h  /* -** Copyright 2000-2013 Double Precision, Inc. +** Copyright 2000-2014 Double Precision, Inc.  ** See COPYING for distribution information.  **  */ @@ -20,20 +20,9 @@ extern "C" {  }  #endif -#include	"unicode/unicode_config.h" -  #include	<stdlib.h> -  #include	<stdio.h> -#if HAVE_WCHAR_H -#include	<wchar.h> -#endif - -#if HAVE_STDDEF_H -#include	<stddef.h> -#endif  #include	<stdint.h> -  #include	<sys/types.h>  typedef uint32_t unicode_char; @@ -94,7 +83,7 @@ extern uint8_t unicode_tab_lookup(unicode_char ch,  /*  ** Implementation of grapheme cluster boundary rules, as per -** http://www.unicode.org/reports/tr29/tr29-23.html +** http://www.unicode.org/reports/tr29/tr29-23.html4  ** including  GB9a and GB9b.  **  ** Returns non-zero if there's a grapheme break between the two referenced @@ -209,6 +198,9 @@ extern unicode_lbc_info_t unicode_lbc_init(int (*cb_func)(int, unicode_char,  							  void *),  					   void *cb_arg);  extern int unicode_lbc_next(unicode_lbc_info_t i, unicode_char ch); +extern int unicode_lbc_next_cnt(unicode_lbc_info_t i, +				const unicode_char *chars, +				size_t cnt);  extern int unicode_lbc_end(unicode_lbc_info_t i);  /* @@ -474,39 +466,39 @@ int unicode_buf_cmp_str(const struct unicode_buf *p,  /*  ** A wrapper for iconv(3). This wrapper provides a different API for iconv(3). -** A handle gets created by libmail_u_convert_init(). -** libmail_u_convert_init() receives a pointer to the output function +** A handle gets created by unicode_convert_init(). +** unicode_convert_init() receives a pointer to the output function  ** which receives converted character text.  **  ** The output function receives a pointer to the converted character text, and  ** the number of characters in the converted text.  **  ** The character text to convert gets passed, repeatedly, to -** libmail_u_convert(). Each call to libmail_u_convert() results in +** unicode_convert(). Each call to unicode_convert() results in  ** the output function being invoked, zero or more times, with the converted -** text. Finally, libmail_u_convert_deinit() stops the conversion and +** text. Finally, unicode_convert_deinit() stops the conversion and  ** deallocates the conversion handle.  ** -** Internal buffering takes place. libmail_u_convert_deinit() may result +** Internal buffering takes place. unicode_convert_deinit() may result  ** in the output function being called one or more times, to receive the final  ** part of the converted character stream.  **  ** The output function should return 0. A non-0 value causes -** libmail_u_convert() and/or libmail_u_convert_deinit() returning +** unicode_convert() and/or unicode_convert_deinit() returning  ** non-0.  */ -struct libmail_u_convert_hdr; +struct unicode_convert_hdr; -typedef struct libmail_u_convert_hdr *libmail_u_convert_handle_t; +typedef struct unicode_convert_hdr *unicode_convert_handle_t;  /* -** libmail_u_convert_init() returns a non-NULL handle for the requested +** unicode_convert_init() returns a non-NULL handle for the requested  ** conversion, or NULL if the requested conversion is not available.  */ -libmail_u_convert_handle_t -libmail_u_convert_init(/* Convert from this chset */ +unicode_convert_handle_t +unicode_convert_init(/* Convert from this chset */  		       const char *src_chset,  		       /* Convert to this chset */ @@ -520,14 +512,14 @@ libmail_u_convert_init(/* Convert from this chset */  		       void *convert_arg);  /* -** Repeatedly pass the character text to convert to libmail_u_convert(). +** Repeatedly pass the character text to convert to unicode_convert().  **  ** Returns non-0 if the output function returned non-0, or 0 if all invocations  ** of the output function returned 0.  */ -int libmail_u_convert(/* The conversion handle */ -		      libmail_u_convert_handle_t handle, +int unicode_convert(/* The conversion handle */ +		      unicode_convert_handle_t handle,  		      /* Text to convert */  		      const char *text, @@ -541,7 +533,7 @@ int libmail_u_convert(/* The conversion handle */  ** May still result in one or more invocations of the output function.  ** Returns non-zero if any previous invocation of the output function returned  ** non-zero (this includes any invocations of the output function resulting -** from this call, or prior libmail_u_convert() calls), or 0 if all +** from this call, or prior unicode_convert() calls), or 0 if all  ** invocations of the output function returned 0.  **  ** If the errptr is not NULL, *errptr is set to non-zero if there were any @@ -549,21 +541,21 @@ int libmail_u_convert(/* The conversion handle */  ** the destination character text.  */ -int libmail_u_convert_deinit(libmail_u_convert_handle_t handle, +int unicode_convert_deinit(unicode_convert_handle_t handle,  			     int *errptr);  /*  ** Specialization: save converted character text in a buffer.  ** -** Implementation: call libmail_u_convert_tocbuf_init() instead of -** libmail_u_convert_init(), then call libmail_u_convert() and -** libmail_u_convert_deinit(), as usual. +** Implementation: call unicode_convert_tocbuf_init() instead of +** unicode_convert_init(), then call unicode_convert() and +** unicode_convert_deinit(), as usual.  ** -** If libmail_u_convert_deinit() returns 0, *cbufptr_ret gets initialized to a +** If unicode_convert_deinit() returns 0, *cbufptr_ret gets initialized to a  ** malloc()ed buffer, and the number of converted characters, the size of the  ** malloc()ed buffer, are placed into *csize_ret arguments, that were passed -** to libmail_u_convert_tou_init(). +** to unicode_convert_tou_init().  **  ** Note: if the converted string is an empty string, *cbufsize_ret is set to 0,  ** but *cbufptr_ptr still gets initialized (to a dummy malloced buffer). @@ -572,8 +564,8 @@ int libmail_u_convert_deinit(libmail_u_convert_handle_t handle,  ** converted string (this is included in *cbufsize_ret).  */ -libmail_u_convert_handle_t -libmail_u_convert_tocbuf_init(/* Convert from this chset */ +unicode_convert_handle_t +unicode_convert_tocbuf_init(/* Convert from this chset */  			      const char *src_chset,  			      /* Convert to this chset */ @@ -593,18 +585,18 @@ libmail_u_convert_tocbuf_init(/* Convert from this chset */  /*  ** Specialization: convert some character text to a unicode_char array.  ** -** This is like libmail_u_convert_tocbuf_init(), but converts to a unicode_char +** This is like unicode_convert_tocbuf_init(), but converts to a unicode_char  ** array.  **  ** The returned *ucsize_ret is initialized with the number of unicode_chars,  ** rather than the byte count.  **  ** In all other ways, this function behaves identically to -** libmail_u_convert_tocbuf_init(). +** unicode_convert_tocbuf_init().  */ -libmail_u_convert_handle_t -libmail_u_convert_tou_init(/* Convert from this chset */ +unicode_convert_handle_t +unicode_convert_tou_init(/* Convert from this chset */  			   const char *src_chset,  			   /* malloc()ed buffer pointer, on exit. */ @@ -620,13 +612,13 @@ libmail_u_convert_tou_init(/* Convert from this chset */  /*  ** Specialization: convert a unicode_char array to some character text.  ** -** This is the opposite of libmail_u_convert_tou_init(). Call this to -** initialize the conversion handle, then use libmail_u_convert_uc() -** instead of libmail_u_convert. +** This is the opposite of unicode_convert_tou_init(). Call this to +** initialize the conversion handle, then use unicode_convert_uc() +** instead of unicode_convert.  */ -libmail_u_convert_handle_t -libmail_u_convert_fromu_init(/* Convert to this chset */ +unicode_convert_handle_t +unicode_convert_fromu_init(/* Convert to this chset */  			     const char *dst_chset,  			     /* malloc()ed buffer pointer, on exit. */ @@ -639,8 +631,8 @@ libmail_u_convert_fromu_init(/* Convert to this chset */  			     int nullterminate  			     ); -int libmail_u_convert_uc(/* The conversion handle */ -			 libmail_u_convert_handle_t handle, +int unicode_convert_uc(/* The conversion handle */ +			 unicode_convert_handle_t handle,  			 /* Text to convert */  			 const unicode_char *text, @@ -651,12 +643,12 @@ int libmail_u_convert_uc(/* The conversion handle */  /*  ** Initialize conversion to UTF-8.  ** -** This is a wrapper for libmail_u_convert_tocbuf_init() that specifies the +** This is a wrapper for unicode_convert_tocbuf_init() that specifies the  ** destination charset as UTF-8.  */ -libmail_u_convert_handle_t -libmail_u_convert_tocbuf_toutf8_init(const char *src_chset, +unicode_convert_handle_t +unicode_convert_tocbuf_toutf8_init(const char *src_chset,  				     char **cbufptr_ret,  				     size_t *cbufsize_ret,  				     int nullterminate); @@ -664,12 +656,12 @@ libmail_u_convert_tocbuf_toutf8_init(const char *src_chset,  /*  ** Initialize conversion from UTF-8.  ** -** This is a wrapper for libmail_u_convert_tocbuf_init() that specifies the +** This is a wrapper for unicode_convert_tocbuf_init() that specifies the  ** source charset as UTF-8.  */ -libmail_u_convert_handle_t -libmail_u_convert_tocbuf_fromutf8_init(const char *dst_chset, +unicode_convert_handle_t +unicode_convert_tocbuf_fromutf8_init(const char *dst_chset,  				       char **cbufptr_ret,  				       size_t *cbufsize_ret,  				       int nullterminate); @@ -680,7 +672,7 @@ libmail_u_convert_tocbuf_fromutf8_init(const char *dst_chset,  ** Returns a malloc-ed buffer holding the UTF-8 string, or NULL if an  ** error occured.  */ -char *libmail_u_convert_toutf8(/* Text to convert to UTF-8 */ +char *unicode_convert_toutf8(/* Text to convert to UTF-8 */  			       const char *text,  			       /* Character set to convert to UTF-8 */ @@ -700,7 +692,7 @@ char *libmail_u_convert_toutf8(/* Text to convert to UTF-8 */  ** character set, or NULL if an error occured.  */ -char *libmail_u_convert_fromutf8(/* A UTF-8 string */ +char *unicode_convert_fromutf8(/* A UTF-8 string */  				 const char *text,  				 /* @@ -725,7 +717,7 @@ char *libmail_u_convert_fromutf8(/* A UTF-8 string */  ** character set, or NULL if an error occured.  */ -char *libmail_u_convert_tobuf(/* A string to convert */ +char *unicode_convert_tobuf(/* A string to convert */  			      const char *text,  			      /* @@ -747,15 +739,15 @@ char *libmail_u_convert_tobuf(/* A string to convert */  			      int *error);  /* -** Convenience function: call libmail_u_convert_tou_init(), feed the -** character string through libmail_u_convert(), then call -** libmail_u_convert_deinit(). +** Convenience function: call unicode_convert_tou_init(), feed the +** character string through unicode_convert(), then call +** unicode_convert_deinit().  **  ** If this function returns 0, *uc and *ucsize is set to a malloced buffer+size  ** holding the unicode char array.  */ -int libmail_u_convert_tou_tobuf(/* Character text to convert */ +int unicode_convert_tou_tobuf(/* Character text to convert */  				const char *text,  				/* Number of characters */ @@ -785,15 +777,15 @@ int libmail_u_convert_tou_tobuf(/* Character text to convert */  				int *err);  /* -** Convenience function: call libmail_u_convert_fromu_init(), feed the -** unicode_array through libmail_u_convert_uc(), then call -** libmail_u_convert_deinit(). +** Convenience function: call unicode_convert_fromu_init(), feed the +** unicode_array through unicode_convert_uc(), then call +** unicode_convert_deinit().  **  ** If this function returns 0, *uc and *ucsize is set to a malloced buffer+size  ** holding the converted character string  */ -int libmail_u_convert_fromu_tobuf(/* Unicode array to convert to a char str */ +int unicode_convert_fromu_tobuf(/* Unicode array to convert to a char str */  				  const unicode_char *utext,  				  /* @@ -809,7 +801,7 @@ int libmail_u_convert_fromu_tobuf(/* Unicode array to convert to a char str */  				  const char *charset,  				  /* -				  ** If libmail_u_convert_fromu_tobuf() +				  ** If unicode_convert_fromu_tobuf()  				  ** returns 0, this is initialized to a  				  ** malloced buffer with a 0-terminated  				  ** string is kept. @@ -823,7 +815,7 @@ int libmail_u_convert_fromu_tobuf(/* Unicode array to convert to a char str */  				  size_t *csize,  				  /* -				  ** If libmail_u_convert_fromu_tobuf() +				  ** If unicode_convert_fromu_tobuf()  				  ** returns 0 and this is not NULL,  				  ** *err is set to non-0 if there was a  				  ** conversion error to the requested @@ -835,14 +827,14 @@ int libmail_u_convert_fromu_tobuf(/* Unicode array to convert to a char str */  ** Convenience function: convert a string in a given character set  ** to/from uppercase, lowercase, or something else.  ** -** This is done by calling libmail_u_convert_tou_tobuf() first, +** This is done by calling unicode_convert_tou_tobuf() first,  ** applying the title_func and char_func, then using -** libmail_u_convert_fromu_tobuf(). +** unicode_convert_fromu_tobuf().  **  ** A NULL return indicates that the requested conversion cannot be performed.  */ -char *libmail_u_convert_tocase( /* String to convert */ +char *unicode_convert_tocase( /* String to convert */  			       const char *str,  			       /* String's character set */ @@ -867,11 +859,11 @@ char *libmail_u_convert_tocase( /* String to convert */  /* Either UCS-4BE or UCS-4LE, matching the native unicode_char endianness */ -extern const char libmail_u_ucs4_native[]; +extern const char unicode_u_ucs4_native[];  /* Either UCS-2BE or UCS-2LE, matching the native unicode_char endianness */ -extern const char libmail_u_ucs2_native[]; +extern const char unicode_u_ucs2_native[];  /*  ** Modified-UTF7 encoding used for IMAP folder names. Pass it for a charset @@ -892,7 +884,7 @@ extern const char libmail_u_ucs2_native[];  extern size_t unicode_wcwidth(const std::vector<unicode_char> &uc); -namespace mail { +namespace unicode {  	/*  	** Interface to iconv. @@ -905,7 +897,7 @@ namespace mail {  	class iconvert { -		libmail_u_convert_handle_t handle; +		unicode_convert_handle_t handle;  	public:  		iconvert(); @@ -1300,14 +1292,13 @@ namespace mail {  			return *this;  		} -		linebreak_callback_base &operator<<(const -						    std::vector<unicode_char> -						    &vec) +		template<typename container_type> +			linebreak_callback_base &operator()(const container_type &vec)  		{  			return operator()(vec.begin(), vec.end());  		}  	private: -		virtual int operator()(int); +		virtual int callback(int)=0;  	};  	class linebreak_callback_save_buf : public linebreak_callback_base { @@ -1318,8 +1309,10 @@ namespace mail {  		linebreak_callback_save_buf();  		~linebreak_callback_save_buf(); +		using linebreak_callback_base::operator<<; +		using linebreak_callback_base::operator();  	private: -		int operator()(int value); +		int callback(int value);  	};  	/* @@ -1485,7 +1478,7 @@ namespace mail {  			return operator()(vec.begin(), vec.end());  		}  	private: -		virtual int operator()(int, unicode_char); +		virtual int callback(int, unicode_char)=0;  	};  	class linebreakc_callback_save_buf : public linebreakc_callback_base { @@ -1496,8 +1489,10 @@ namespace mail {  		linebreakc_callback_save_buf();  		~linebreakc_callback_save_buf(); +		using linebreakc_callback_base::operator<<; +		using linebreakc_callback_base::operator();  	private: -		int operator()(int, unicode_char); +		int callback(int, unicode_char);  	}; @@ -1664,7 +1659,7 @@ namespace mail {  			return operator()(vec.begin(), vec.end());  		}  	private: -		virtual int operator()(bool); +		virtual int callback(bool)=0;  	};  	/* diff --git a/unicode/unicode_linebreak.c b/unicode/unicode_linebreak.c index 9b30ae4..736aee0 100644 --- a/unicode/unicode_linebreak.c +++ b/unicode/unicode_linebreak.c @@ -634,6 +634,23 @@ void unicode_lbc_set_opts(unicode_lbc_info_t i, int opts)  {  	unicode_lb_set_opts(i->handle, opts);  } + +int unicode_lbc_next_cnt(unicode_lbc_info_t i, +			 const unicode_char *chars, +			 size_t cnt) +{ +	while (cnt) +	{ +		int n=unicode_lbc_next(i, *chars); + +		--cnt; +		++chars; + +		if (n) +			return n; +	} +	return 0; +}  int unicode_lbc_next(unicode_lbc_info_t i, unicode_char ch)  { diff --git a/unicode/unicode_ultcasetab.c b/unicode/unicode_ultcasetab.c index 4065e62..4c10394 100644 --- a/unicode/unicode_ultcasetab.c +++ b/unicode/unicode_ultcasetab.c @@ -30,10 +30,10 @@ const unicode_char unicode_case_tab[][4]={  {0x10b4,0x10b4,0x2d14,0x10b4},{0x00b5,0x039c,0x00b5,0x039c},{0x10b5,0x10b5,0x2d15,0x10b5},{0x10b6,0x10b6,0x2d16,0x10b6},  {0x10b7,0x10b7,0x2d17,0x10b7},{0x10b8,0x10b8,0x2d18,0x10b8},{0x10b9,0x10b9,0x2d19,0x10b9},{0x10ba,0x10ba,0x2d1a,0x10ba},  {0x10bb,0x10bb,0x2d1b,0x10bb},{0x10bc,0x10bc,0x2d1c,0x10bc},{0x10bd,0x10bd,0x2d1d,0x10bd},{0x10be,0x10be,0x2d1e,0x10be}, -{0x10bf,0x10bf,0x2d1f,0x10bf},{0x00c0,0x00c0,0x00e0,0x00c0},{0x10c0,0x10c0,0x2d20,0x10c0},{0x00c1,0x00c1,0x00e1,0x00c1}, -{0x10c1,0x10c1,0x2d21,0x10c1},{0x10c2,0x10c2,0x2d22,0x10c2},{0x00c2,0x00c2,0x00e2,0x00c2},{0x00c3,0x00c3,0x00e3,0x00c3}, -{0x10c3,0x10c3,0x2d23,0x10c3},{0x00c4,0x00c4,0x00e4,0x00c4},{0x10c4,0x10c4,0x2d24,0x10c4},{0x00c5,0x00c5,0x00e5,0x00c5}, -{0x10c5,0x10c5,0x2d25,0x10c5},{0x00c6,0x00c6,0x00e6,0x00c6},{0x10c7,0x10c7,0x2d27,0x10c7},{0x00c7,0x00c7,0x00e7,0x00c7}, +{0x10bf,0x10bf,0x2d1f,0x10bf},{0x10c0,0x10c0,0x2d20,0x10c0},{0x00c0,0x00c0,0x00e0,0x00c0},{0x00c1,0x00c1,0x00e1,0x00c1}, +{0x10c1,0x10c1,0x2d21,0x10c1},{0x10c2,0x10c2,0x2d22,0x10c2},{0x00c2,0x00c2,0x00e2,0x00c2},{0x10c3,0x10c3,0x2d23,0x10c3}, +{0x00c3,0x00c3,0x00e3,0x00c3},{0x00c4,0x00c4,0x00e4,0x00c4},{0x10c4,0x10c4,0x2d24,0x10c4},{0x10c5,0x10c5,0x2d25,0x10c5}, +{0x00c5,0x00c5,0x00e5,0x00c5},{0x00c6,0x00c6,0x00e6,0x00c6},{0x10c7,0x10c7,0x2d27,0x10c7},{0x00c7,0x00c7,0x00e7,0x00c7},  {0x00c8,0x00c8,0x00e8,0x00c8},{0x00c9,0x00c9,0x00e9,0x00c9},{0x00ca,0x00ca,0x00ea,0x00ca},{0x00cb,0x00cb,0x00eb,0x00cb},  {0x00cc,0x00cc,0x00ec,0x00cc},{0x00cd,0x00cd,0x00ed,0x00cd},{0x10cd,0x10cd,0x2d2d,0x10cd},{0x00ce,0x00ce,0x00ee,0x00ce},  {0x00cf,0x00cf,0x00ef,0x00cf},{0x00d0,0x00d0,0x00f0,0x00d0},{0x00d1,0x00d1,0x00f1,0x00d1},{0x00d2,0x00d2,0x00f2,0x00d2}, @@ -57,9 +57,9 @@ const unicode_char unicode_case_tab[][4]={  {0x011a,0x011a,0x011b,0x011a},{0x011b,0x011a,0x011b,0x011a},{0x011c,0x011c,0x011d,0x011c},{0x011d,0x011c,0x011d,0x011c},  {0x011e,0x011e,0x011f,0x011e},{0x011f,0x011e,0x011f,0x011e},{0x0120,0x0120,0x0121,0x0120},{0x0121,0x0120,0x0121,0x0120},  {0x0122,0x0122,0x0123,0x0122},{0x0123,0x0122,0x0123,0x0122},{0x0124,0x0124,0x0125,0x0124},{0x0125,0x0124,0x0125,0x0124}, -{0x0126,0x0126,0x0127,0x0126},{0x2126,0x2126,0x03c9,0x2126},{0x0127,0x0126,0x0127,0x0126},{0x0128,0x0128,0x0129,0x0128}, -{0x0129,0x0128,0x0129,0x0128},{0x212a,0x212a,0x006b,0x212a},{0x012a,0x012a,0x012b,0x012a},{0x012b,0x012a,0x012b,0x012a}, -{0x212b,0x212b,0x00e5,0x212b},{0x012c,0x012c,0x012d,0x012c},{0x012d,0x012c,0x012d,0x012c},{0x012e,0x012e,0x012f,0x012e}, +{0x2126,0x2126,0x03c9,0x2126},{0x0126,0x0126,0x0127,0x0126},{0x0127,0x0126,0x0127,0x0126},{0x0128,0x0128,0x0129,0x0128}, +{0x0129,0x0128,0x0129,0x0128},{0x212a,0x212a,0x006b,0x212a},{0x012a,0x012a,0x012b,0x012a},{0x212b,0x212b,0x00e5,0x212b}, +{0x012b,0x012a,0x012b,0x012a},{0x012c,0x012c,0x012d,0x012c},{0x012d,0x012c,0x012d,0x012c},{0x012e,0x012e,0x012f,0x012e},  {0x012f,0x012e,0x012f,0x012e},{0x0130,0x0130,0x0069,0x0130},{0x0131,0x0049,0x0131,0x0049},{0x2132,0x2132,0x214e,0x2132},  {0x0132,0x0132,0x0133,0x0132},{0x0133,0x0132,0x0133,0x0132},{0x0134,0x0134,0x0135,0x0134},{0x0135,0x0134,0x0135,0x0134},  {0x0136,0x0136,0x0137,0x0136},{0x0137,0x0136,0x0137,0x0136},{0x0139,0x0139,0x013a,0x0139},{0x013a,0x0139,0x013a,0x0139}, @@ -67,29 +67,29 @@ const unicode_char unicode_case_tab[][4]={  {0x013f,0x013f,0x0140,0x013f},{0x0140,0x013f,0x0140,0x013f},{0x0141,0x0141,0x0142,0x0141},{0x0142,0x0141,0x0142,0x0141},  {0x0143,0x0143,0x0144,0x0143},{0x0144,0x0143,0x0144,0x0143},{0x0145,0x0145,0x0146,0x0145},{0x0146,0x0145,0x0146,0x0145},  {0x0147,0x0147,0x0148,0x0147},{0x0148,0x0147,0x0148,0x0147},{0x014a,0x014a,0x014b,0x014a},{0x014b,0x014a,0x014b,0x014a}, -{0x014c,0x014c,0x014d,0x014c},{0x014d,0x014c,0x014d,0x014c},{0x014e,0x014e,0x014f,0x014e},{0x214e,0x2132,0x214e,0x2132}, +{0x014c,0x014c,0x014d,0x014c},{0x014d,0x014c,0x014d,0x014c},{0x214e,0x2132,0x214e,0x2132},{0x014e,0x014e,0x014f,0x014e},  {0x014f,0x014e,0x014f,0x014e},{0x0150,0x0150,0x0151,0x0150},{0x0151,0x0150,0x0151,0x0150},{0x0152,0x0152,0x0153,0x0152},  {0x0153,0x0152,0x0153,0x0152},{0x0154,0x0154,0x0155,0x0154},{0x0155,0x0154,0x0155,0x0154},{0x0156,0x0156,0x0157,0x0156},  {0x0157,0x0156,0x0157,0x0156},{0x0158,0x0158,0x0159,0x0158},{0x0159,0x0158,0x0159,0x0158},{0x015a,0x015a,0x015b,0x015a},  {0x015b,0x015a,0x015b,0x015a},{0x015c,0x015c,0x015d,0x015c},{0x015d,0x015c,0x015d,0x015c},{0x015e,0x015e,0x015f,0x015e},  {0x015f,0x015e,0x015f,0x015e},{0x2160,0x2160,0x2170,0x2160},{0x0160,0x0160,0x0161,0x0160},{0x0161,0x0160,0x0161,0x0160}, -{0x2161,0x2161,0x2171,0x2161},{0x0162,0x0162,0x0163,0x0162},{0x2162,0x2162,0x2172,0x2162},{0x2163,0x2163,0x2173,0x2163}, -{0x0163,0x0162,0x0163,0x0162},{0x2164,0x2164,0x2174,0x2164},{0x0164,0x0164,0x0165,0x0164},{0x2165,0x2165,0x2175,0x2165}, -{0x0165,0x0164,0x0165,0x0164},{0x0166,0x0166,0x0167,0x0166},{0x2166,0x2166,0x2176,0x2166},{0x2167,0x2167,0x2177,0x2167}, -{0x0167,0x0166,0x0167,0x0166},{0x2168,0x2168,0x2178,0x2168},{0x0168,0x0168,0x0169,0x0168},{0x2169,0x2169,0x2179,0x2169}, -{0x0169,0x0168,0x0169,0x0168},{0x216a,0x216a,0x217a,0x216a},{0x016a,0x016a,0x016b,0x016a},{0x216b,0x216b,0x217b,0x216b}, -{0x016b,0x016a,0x016b,0x016a},{0x216c,0x216c,0x217c,0x216c},{0x016c,0x016c,0x016d,0x016c},{0x016d,0x016c,0x016d,0x016c}, -{0x216d,0x216d,0x217d,0x216d},{0x016e,0x016e,0x016f,0x016e},{0x216e,0x216e,0x217e,0x216e},{0x016f,0x016e,0x016f,0x016e}, +{0x2161,0x2161,0x2171,0x2161},{0x0162,0x0162,0x0163,0x0162},{0x2162,0x2162,0x2172,0x2162},{0x0163,0x0162,0x0163,0x0162}, +{0x2163,0x2163,0x2173,0x2163},{0x2164,0x2164,0x2174,0x2164},{0x0164,0x0164,0x0165,0x0164},{0x2165,0x2165,0x2175,0x2165}, +{0x0165,0x0164,0x0165,0x0164},{0x2166,0x2166,0x2176,0x2166},{0x0166,0x0166,0x0167,0x0166},{0x0167,0x0166,0x0167,0x0166}, +{0x2167,0x2167,0x2177,0x2167},{0x0168,0x0168,0x0169,0x0168},{0x2168,0x2168,0x2178,0x2168},{0x2169,0x2169,0x2179,0x2169}, +{0x0169,0x0168,0x0169,0x0168},{0x216a,0x216a,0x217a,0x216a},{0x016a,0x016a,0x016b,0x016a},{0x016b,0x016a,0x016b,0x016a}, +{0x216b,0x216b,0x217b,0x216b},{0x216c,0x216c,0x217c,0x216c},{0x016c,0x016c,0x016d,0x016c},{0x016d,0x016c,0x016d,0x016c}, +{0x216d,0x216d,0x217d,0x216d},{0x216e,0x216e,0x217e,0x216e},{0x016e,0x016e,0x016f,0x016e},{0x016f,0x016e,0x016f,0x016e},  {0x216f,0x216f,0x217f,0x216f},{0x0170,0x0170,0x0171,0x0170},{0x2170,0x2160,0x2170,0x2160},{0x2171,0x2161,0x2171,0x2161}, -{0x0171,0x0170,0x0171,0x0170},{0x2172,0x2162,0x2172,0x2162},{0x0172,0x0172,0x0173,0x0172},{0x0173,0x0172,0x0173,0x0172}, -{0x2173,0x2163,0x2173,0x2163},{0x2174,0x2164,0x2174,0x2164},{0x0174,0x0174,0x0175,0x0174},{0x2175,0x2165,0x2175,0x2165}, -{0x0175,0x0174,0x0175,0x0174},{0x0176,0x0176,0x0177,0x0176},{0x2176,0x2166,0x2176,0x2166},{0x0177,0x0176,0x0177,0x0176}, -{0x2177,0x2167,0x2177,0x2167},{0x0178,0x0178,0x00ff,0x0178},{0x2178,0x2168,0x2178,0x2168},{0x0179,0x0179,0x017a,0x0179}, -{0x2179,0x2169,0x2179,0x2169},{0x017a,0x0179,0x017a,0x0179},{0x217a,0x216a,0x217a,0x216a},{0x017b,0x017b,0x017c,0x017b}, -{0x217b,0x216b,0x217b,0x216b},{0x017c,0x017b,0x017c,0x017b},{0x217c,0x216c,0x217c,0x216c},{0x217d,0x216d,0x217d,0x216d}, -{0x017d,0x017d,0x017e,0x017d},{0x217e,0x216e,0x217e,0x216e},{0x017e,0x017d,0x017e,0x017d},{0x017f,0x0053,0x017f,0x0053}, -{0x217f,0x216f,0x217f,0x216f},{0x0180,0x0243,0x0180,0x0243},{0x0181,0x0181,0x0253,0x0181},{0x0182,0x0182,0x0183,0x0182}, -{0x2183,0x2183,0x2184,0x2183},{0x0183,0x0182,0x0183,0x0182},{0x0184,0x0184,0x0185,0x0184},{0x2184,0x2183,0x2184,0x2183}, +{0x0171,0x0170,0x0171,0x0170},{0x2172,0x2162,0x2172,0x2162},{0x0172,0x0172,0x0173,0x0172},{0x2173,0x2163,0x2173,0x2163}, +{0x0173,0x0172,0x0173,0x0172},{0x0174,0x0174,0x0175,0x0174},{0x2174,0x2164,0x2174,0x2164},{0x2175,0x2165,0x2175,0x2165}, +{0x0175,0x0174,0x0175,0x0174},{0x0176,0x0176,0x0177,0x0176},{0x2176,0x2166,0x2176,0x2166},{0x2177,0x2167,0x2177,0x2167}, +{0x0177,0x0176,0x0177,0x0176},{0x0178,0x0178,0x00ff,0x0178},{0x2178,0x2168,0x2178,0x2168},{0x0179,0x0179,0x017a,0x0179}, +{0x2179,0x2169,0x2179,0x2169},{0x017a,0x0179,0x017a,0x0179},{0x217a,0x216a,0x217a,0x216a},{0x217b,0x216b,0x217b,0x216b}, +{0x017b,0x017b,0x017c,0x017b},{0x017c,0x017b,0x017c,0x017b},{0x217c,0x216c,0x217c,0x216c},{0x017d,0x017d,0x017e,0x017d}, +{0x217d,0x216d,0x217d,0x216d},{0x217e,0x216e,0x217e,0x216e},{0x017e,0x017d,0x017e,0x017d},{0x217f,0x216f,0x217f,0x216f}, +{0x017f,0x0053,0x017f,0x0053},{0x0180,0x0243,0x0180,0x0243},{0x0181,0x0181,0x0253,0x0181},{0x0182,0x0182,0x0183,0x0182}, +{0x0183,0x0182,0x0183,0x0182},{0x2183,0x2183,0x2184,0x2183},{0x2184,0x2183,0x2184,0x2183},{0x0184,0x0184,0x0185,0x0184},  {0x0185,0x0184,0x0185,0x0184},{0x0186,0x0186,0x0254,0x0186},{0x0187,0x0187,0x0188,0x0187},{0x0188,0x0187,0x0188,0x0187},  {0x0189,0x0189,0x0256,0x0189},{0x018a,0x018a,0x0257,0x018a},{0x018b,0x018b,0x018c,0x018b},{0x018c,0x018b,0x018c,0x018b},  {0x018e,0x018e,0x01dd,0x018e},{0x018f,0x018f,0x0259,0x018f},{0x0190,0x0190,0x025b,0x0190},{0x0191,0x0191,0x0192,0x0191}, @@ -173,177 +173,177 @@ const unicode_char unicode_case_tab[][4]={  {0x03f0,0x039a,0x03f0,0x039a},{0x03f1,0x03a1,0x03f1,0x03a1},{0x03f2,0x03f9,0x03f2,0x03f9},{0x03f4,0x03f4,0x03b8,0x03f4},  {0x03f5,0x0395,0x03f5,0x0395},{0x03f7,0x03f7,0x03f8,0x03f7},{0x03f8,0x03f7,0x03f8,0x03f7},{0x03f9,0x03f9,0x03f2,0x03f9},  {0x03fa,0x03fa,0x03fb,0x03fa},{0x03fb,0x03fa,0x03fb,0x03fa},{0x03fd,0x03fd,0x037b,0x03fd},{0x03fe,0x03fe,0x037c,0x03fe}, -{0x03ff,0x03ff,0x037d,0x03ff},{0x10400,0x10400,0x10428,0x10400},{0x2c00,0x2c00,0x2c30,0x2c00},{0x0400,0x0400,0x0450,0x0400}, -{0x10401,0x10401,0x10429,0x10401},{0x2c01,0x2c01,0x2c31,0x2c01},{0x0401,0x0401,0x0451,0x0401},{0x10402,0x10402,0x1042a,0x10402}, -{0x0402,0x0402,0x0452,0x0402},{0x2c02,0x2c02,0x2c32,0x2c02},{0x2c03,0x2c03,0x2c33,0x2c03},{0x0403,0x0403,0x0453,0x0403}, -{0x10403,0x10403,0x1042b,0x10403},{0x10404,0x10404,0x1042c,0x10404},{0x0404,0x0404,0x0454,0x0404},{0x2c04,0x2c04,0x2c34,0x2c04}, -{0x0405,0x0405,0x0455,0x0405},{0x10405,0x10405,0x1042d,0x10405},{0x2c05,0x2c05,0x2c35,0x2c05},{0x2c06,0x2c06,0x2c36,0x2c06}, -{0x10406,0x10406,0x1042e,0x10406},{0x0406,0x0406,0x0456,0x0406},{0x2c07,0x2c07,0x2c37,0x2c07},{0x0407,0x0407,0x0457,0x0407}, -{0x10407,0x10407,0x1042f,0x10407},{0x0408,0x0408,0x0458,0x0408},{0x10408,0x10408,0x10430,0x10408},{0x2c08,0x2c08,0x2c38,0x2c08}, -{0x0409,0x0409,0x0459,0x0409},{0x2c09,0x2c09,0x2c39,0x2c09},{0x10409,0x10409,0x10431,0x10409},{0x040a,0x040a,0x045a,0x040a}, -{0x2c0a,0x2c0a,0x2c3a,0x2c0a},{0x1040a,0x1040a,0x10432,0x1040a},{0x1040b,0x1040b,0x10433,0x1040b},{0x040b,0x040b,0x045b,0x040b}, -{0x2c0b,0x2c0b,0x2c3b,0x2c0b},{0x2c0c,0x2c0c,0x2c3c,0x2c0c},{0x1040c,0x1040c,0x10434,0x1040c},{0x040c,0x040c,0x045c,0x040c}, -{0x1040d,0x1040d,0x10435,0x1040d},{0x040d,0x040d,0x045d,0x040d},{0x2c0d,0x2c0d,0x2c3d,0x2c0d},{0x040e,0x040e,0x045e,0x040e}, -{0x1040e,0x1040e,0x10436,0x1040e},{0x2c0e,0x2c0e,0x2c3e,0x2c0e},{0x040f,0x040f,0x045f,0x040f},{0x1040f,0x1040f,0x10437,0x1040f}, -{0x2c0f,0x2c0f,0x2c3f,0x2c0f},{0x0410,0x0410,0x0430,0x0410},{0x2c10,0x2c10,0x2c40,0x2c10},{0x10410,0x10410,0x10438,0x10410}, -{0x10411,0x10411,0x10439,0x10411},{0x2c11,0x2c11,0x2c41,0x2c11},{0x0411,0x0411,0x0431,0x0411},{0x0412,0x0412,0x0432,0x0412}, -{0x2c12,0x2c12,0x2c42,0x2c12},{0x10412,0x10412,0x1043a,0x10412},{0x0413,0x0413,0x0433,0x0413},{0x10413,0x10413,0x1043b,0x10413}, -{0x2c13,0x2c13,0x2c43,0x2c13},{0x10414,0x10414,0x1043c,0x10414},{0x0414,0x0414,0x0434,0x0414},{0x2c14,0x2c14,0x2c44,0x2c14}, -{0x10415,0x10415,0x1043d,0x10415},{0x2c15,0x2c15,0x2c45,0x2c15},{0x0415,0x0415,0x0435,0x0415},{0x2c16,0x2c16,0x2c46,0x2c16}, -{0x0416,0x0416,0x0436,0x0416},{0x10416,0x10416,0x1043e,0x10416},{0x0417,0x0417,0x0437,0x0417},{0x10417,0x10417,0x1043f,0x10417}, -{0x2c17,0x2c17,0x2c47,0x2c17},{0x0418,0x0418,0x0438,0x0418},{0x10418,0x10418,0x10440,0x10418},{0x2c18,0x2c18,0x2c48,0x2c18}, -{0x10419,0x10419,0x10441,0x10419},{0x0419,0x0419,0x0439,0x0419},{0x2c19,0x2c19,0x2c49,0x2c19},{0x041a,0x041a,0x043a,0x041a}, -{0x1041a,0x1041a,0x10442,0x1041a},{0x2c1a,0x2c1a,0x2c4a,0x2c1a},{0x1041b,0x1041b,0x10443,0x1041b},{0x2c1b,0x2c1b,0x2c4b,0x2c1b}, -{0x041b,0x041b,0x043b,0x041b},{0x041c,0x041c,0x043c,0x041c},{0x2c1c,0x2c1c,0x2c4c,0x2c1c},{0x1041c,0x1041c,0x10444,0x1041c}, -{0x041d,0x041d,0x043d,0x041d},{0x1041d,0x1041d,0x10445,0x1041d},{0x2c1d,0x2c1d,0x2c4d,0x2c1d},{0x2c1e,0x2c1e,0x2c4e,0x2c1e}, -{0x041e,0x041e,0x043e,0x041e},{0x1041e,0x1041e,0x10446,0x1041e},{0x041f,0x041f,0x043f,0x041f},{0x2c1f,0x2c1f,0x2c4f,0x2c1f}, -{0x1041f,0x1041f,0x10447,0x1041f},{0x10420,0x10420,0x10448,0x10420},{0x0420,0x0420,0x0440,0x0420},{0x2c20,0x2c20,0x2c50,0x2c20}, -{0x10421,0x10421,0x10449,0x10421},{0x0421,0x0421,0x0441,0x0421},{0x2c21,0x2c21,0x2c51,0x2c21},{0x2c22,0x2c22,0x2c52,0x2c22}, -{0x10422,0x10422,0x1044a,0x10422},{0x0422,0x0422,0x0442,0x0422},{0x0423,0x0423,0x0443,0x0423},{0x10423,0x10423,0x1044b,0x10423}, -{0x2c23,0x2c23,0x2c53,0x2c23},{0x10424,0x10424,0x1044c,0x10424},{0x0424,0x0424,0x0444,0x0424},{0x2c24,0x2c24,0x2c54,0x2c24}, -{0x2c25,0x2c25,0x2c55,0x2c25},{0x10425,0x10425,0x1044d,0x10425},{0x0425,0x0425,0x0445,0x0425},{0x0426,0x0426,0x0446,0x0426}, -{0x10426,0x10426,0x1044e,0x10426},{0x2c26,0x2c26,0x2c56,0x2c26},{0x0427,0x0427,0x0447,0x0427},{0x2c27,0x2c27,0x2c57,0x2c27}, -{0x10427,0x10427,0x1044f,0x10427},{0x10428,0x10400,0x10428,0x10400},{0x2c28,0x2c28,0x2c58,0x2c28},{0x0428,0x0428,0x0448,0x0428}, -{0x2c29,0x2c29,0x2c59,0x2c29},{0x0429,0x0429,0x0449,0x0429},{0x10429,0x10401,0x10429,0x10401},{0x1042a,0x10402,0x1042a,0x10402}, -{0x2c2a,0x2c2a,0x2c5a,0x2c2a},{0x042a,0x042a,0x044a,0x042a},{0x042b,0x042b,0x044b,0x042b},{0x1042b,0x10403,0x1042b,0x10403}, -{0x2c2b,0x2c2b,0x2c5b,0x2c2b},{0x1042c,0x10404,0x1042c,0x10404},{0x042c,0x042c,0x044c,0x042c},{0x2c2c,0x2c2c,0x2c5c,0x2c2c}, -{0x2c2d,0x2c2d,0x2c5d,0x2c2d},{0x042d,0x042d,0x044d,0x042d},{0x1042d,0x10405,0x1042d,0x10405},{0x042e,0x042e,0x044e,0x042e}, -{0x1042e,0x10406,0x1042e,0x10406},{0x2c2e,0x2c2e,0x2c5e,0x2c2e},{0x1042f,0x10407,0x1042f,0x10407},{0x042f,0x042f,0x044f,0x042f}, -{0x0430,0x0410,0x0430,0x0410},{0x10430,0x10408,0x10430,0x10408},{0x2c30,0x2c00,0x2c30,0x2c00},{0x10431,0x10409,0x10431,0x10409}, -{0x0431,0x0411,0x0431,0x0411},{0x2c31,0x2c01,0x2c31,0x2c01},{0x0432,0x0412,0x0432,0x0412},{0x2c32,0x2c02,0x2c32,0x2c02}, -{0x10432,0x1040a,0x10432,0x1040a},{0x2c33,0x2c03,0x2c33,0x2c03},{0x0433,0x0413,0x0433,0x0413},{0x10433,0x1040b,0x10433,0x1040b}, -{0x10434,0x1040c,0x10434,0x1040c},{0x2c34,0x2c04,0x2c34,0x2c04},{0x0434,0x0414,0x0434,0x0414},{0x10435,0x1040d,0x10435,0x1040d}, -{0x0435,0x0415,0x0435,0x0415},{0x2c35,0x2c05,0x2c35,0x2c05},{0x0436,0x0416,0x0436,0x0416},{0x10436,0x1040e,0x10436,0x1040e}, -{0x2c36,0x2c06,0x2c36,0x2c06},{0x0437,0x0417,0x0437,0x0417},{0x10437,0x1040f,0x10437,0x1040f},{0x2c37,0x2c07,0x2c37,0x2c07}, -{0x0438,0x0418,0x0438,0x0418},{0x10438,0x10410,0x10438,0x10410},{0x2c38,0x2c08,0x2c38,0x2c08},{0x10439,0x10411,0x10439,0x10411}, -{0x2c39,0x2c09,0x2c39,0x2c09},{0x0439,0x0419,0x0439,0x0419},{0x043a,0x041a,0x043a,0x041a},{0x1043a,0x10412,0x1043a,0x10412}, -{0x2c3a,0x2c0a,0x2c3a,0x2c0a},{0x2c3b,0x2c0b,0x2c3b,0x2c0b},{0x1043b,0x10413,0x1043b,0x10413},{0x043b,0x041b,0x043b,0x041b}, -{0x043c,0x041c,0x043c,0x041c},{0x2c3c,0x2c0c,0x2c3c,0x2c0c},{0x1043c,0x10414,0x1043c,0x10414},{0x1043d,0x10415,0x1043d,0x10415}, -{0x2c3d,0x2c0d,0x2c3d,0x2c0d},{0x043d,0x041d,0x043d,0x041d},{0x1043e,0x10416,0x1043e,0x10416},{0x043e,0x041e,0x043e,0x041e}, -{0x2c3e,0x2c0e,0x2c3e,0x2c0e},{0x043f,0x041f,0x043f,0x041f},{0x2c3f,0x2c0f,0x2c3f,0x2c0f},{0x1043f,0x10417,0x1043f,0x10417}, -{0x10440,0x10418,0x10440,0x10418},{0x0440,0x0420,0x0440,0x0420},{0x2c40,0x2c10,0x2c40,0x2c10},{0x2c41,0x2c11,0x2c41,0x2c11}, -{0x10441,0x10419,0x10441,0x10419},{0x0441,0x0421,0x0441,0x0421},{0x2c42,0x2c12,0x2c42,0x2c12},{0x10442,0x1041a,0x10442,0x1041a}, -{0x0442,0x0422,0x0442,0x0422},{0x0443,0x0423,0x0443,0x0423},{0x10443,0x1041b,0x10443,0x1041b},{0x2c43,0x2c13,0x2c43,0x2c13}, -{0x0444,0x0424,0x0444,0x0424},{0x2c44,0x2c14,0x2c44,0x2c14},{0x10444,0x1041c,0x10444,0x1041c},{0x0445,0x0425,0x0445,0x0425}, -{0x10445,0x1041d,0x10445,0x1041d},{0x2c45,0x2c15,0x2c45,0x2c15},{0x2c46,0x2c16,0x2c46,0x2c16},{0x10446,0x1041e,0x10446,0x1041e}, -{0x0446,0x0426,0x0446,0x0426},{0x10447,0x1041f,0x10447,0x1041f},{0x0447,0x0427,0x0447,0x0427},{0x2c47,0x2c17,0x2c47,0x2c17}, -{0x10448,0x10420,0x10448,0x10420},{0x0448,0x0428,0x0448,0x0428},{0x2c48,0x2c18,0x2c48,0x2c18},{0x10449,0x10421,0x10449,0x10421}, -{0x0449,0x0429,0x0449,0x0429},{0x2c49,0x2c19,0x2c49,0x2c19},{0x2c4a,0x2c1a,0x2c4a,0x2c1a},{0x044a,0x042a,0x044a,0x042a}, -{0x1044a,0x10422,0x1044a,0x10422},{0x044b,0x042b,0x044b,0x042b},{0x2c4b,0x2c1b,0x2c4b,0x2c1b},{0x1044b,0x10423,0x1044b,0x10423}, -{0x1044c,0x10424,0x1044c,0x10424},{0x2c4c,0x2c1c,0x2c4c,0x2c1c},{0x044c,0x042c,0x044c,0x042c},{0x2c4d,0x2c1d,0x2c4d,0x2c1d}, -{0x044d,0x042d,0x044d,0x042d},{0x1044d,0x10425,0x1044d,0x10425},{0x044e,0x042e,0x044e,0x042e},{0x1044e,0x10426,0x1044e,0x10426}, -{0x2c4e,0x2c1e,0x2c4e,0x2c1e},{0x2c4f,0x2c1f,0x2c4f,0x2c1f},{0x044f,0x042f,0x044f,0x042f},{0x1044f,0x10427,0x1044f,0x10427}, +{0x03ff,0x03ff,0x037d,0x03ff},{0x10400,0x10400,0x10428,0x10400},{0x0400,0x0400,0x0450,0x0400},{0x2c00,0x2c00,0x2c30,0x2c00}, +{0x0401,0x0401,0x0451,0x0401},{0x2c01,0x2c01,0x2c31,0x2c01},{0x10401,0x10401,0x10429,0x10401},{0x10402,0x10402,0x1042a,0x10402}, +{0x0402,0x0402,0x0452,0x0402},{0x2c02,0x2c02,0x2c32,0x2c02},{0x2c03,0x2c03,0x2c33,0x2c03},{0x10403,0x10403,0x1042b,0x10403}, +{0x0403,0x0403,0x0453,0x0403},{0x2c04,0x2c04,0x2c34,0x2c04},{0x10404,0x10404,0x1042c,0x10404},{0x0404,0x0404,0x0454,0x0404}, +{0x0405,0x0405,0x0455,0x0405},{0x10405,0x10405,0x1042d,0x10405},{0x2c05,0x2c05,0x2c35,0x2c05},{0x10406,0x10406,0x1042e,0x10406}, +{0x2c06,0x2c06,0x2c36,0x2c06},{0x0406,0x0406,0x0456,0x0406},{0x0407,0x0407,0x0457,0x0407},{0x10407,0x10407,0x1042f,0x10407}, +{0x2c07,0x2c07,0x2c37,0x2c07},{0x2c08,0x2c08,0x2c38,0x2c08},{0x0408,0x0408,0x0458,0x0408},{0x10408,0x10408,0x10430,0x10408}, +{0x10409,0x10409,0x10431,0x10409},{0x0409,0x0409,0x0459,0x0409},{0x2c09,0x2c09,0x2c39,0x2c09},{0x2c0a,0x2c0a,0x2c3a,0x2c0a}, +{0x1040a,0x1040a,0x10432,0x1040a},{0x040a,0x040a,0x045a,0x040a},{0x2c0b,0x2c0b,0x2c3b,0x2c0b},{0x040b,0x040b,0x045b,0x040b}, +{0x1040b,0x1040b,0x10433,0x1040b},{0x1040c,0x1040c,0x10434,0x1040c},{0x040c,0x040c,0x045c,0x040c},{0x2c0c,0x2c0c,0x2c3c,0x2c0c}, +{0x1040d,0x1040d,0x10435,0x1040d},{0x040d,0x040d,0x045d,0x040d},{0x2c0d,0x2c0d,0x2c3d,0x2c0d},{0x2c0e,0x2c0e,0x2c3e,0x2c0e}, +{0x040e,0x040e,0x045e,0x040e},{0x1040e,0x1040e,0x10436,0x1040e},{0x1040f,0x1040f,0x10437,0x1040f},{0x2c0f,0x2c0f,0x2c3f,0x2c0f}, +{0x040f,0x040f,0x045f,0x040f},{0x10410,0x10410,0x10438,0x10410},{0x0410,0x0410,0x0430,0x0410},{0x2c10,0x2c10,0x2c40,0x2c10}, +{0x10411,0x10411,0x10439,0x10411},{0x0411,0x0411,0x0431,0x0411},{0x2c11,0x2c11,0x2c41,0x2c11},{0x2c12,0x2c12,0x2c42,0x2c12}, +{0x10412,0x10412,0x1043a,0x10412},{0x0412,0x0412,0x0432,0x0412},{0x0413,0x0413,0x0433,0x0413},{0x2c13,0x2c13,0x2c43,0x2c13}, +{0x10413,0x10413,0x1043b,0x10413},{0x2c14,0x2c14,0x2c44,0x2c14},{0x10414,0x10414,0x1043c,0x10414},{0x0414,0x0414,0x0434,0x0414}, +{0x10415,0x10415,0x1043d,0x10415},{0x0415,0x0415,0x0435,0x0415},{0x2c15,0x2c15,0x2c45,0x2c15},{0x2c16,0x2c16,0x2c46,0x2c16}, +{0x10416,0x10416,0x1043e,0x10416},{0x0416,0x0416,0x0436,0x0416},{0x0417,0x0417,0x0437,0x0417},{0x2c17,0x2c17,0x2c47,0x2c17}, +{0x10417,0x10417,0x1043f,0x10417},{0x2c18,0x2c18,0x2c48,0x2c18},{0x10418,0x10418,0x10440,0x10418},{0x0418,0x0418,0x0438,0x0418}, +{0x0419,0x0419,0x0439,0x0419},{0x2c19,0x2c19,0x2c49,0x2c19},{0x10419,0x10419,0x10441,0x10419},{0x2c1a,0x2c1a,0x2c4a,0x2c1a}, +{0x1041a,0x1041a,0x10442,0x1041a},{0x041a,0x041a,0x043a,0x041a},{0x1041b,0x1041b,0x10443,0x1041b},{0x041b,0x041b,0x043b,0x041b}, +{0x2c1b,0x2c1b,0x2c4b,0x2c1b},{0x1041c,0x1041c,0x10444,0x1041c},{0x041c,0x041c,0x043c,0x041c},{0x2c1c,0x2c1c,0x2c4c,0x2c1c}, +{0x1041d,0x1041d,0x10445,0x1041d},{0x041d,0x041d,0x043d,0x041d},{0x2c1d,0x2c1d,0x2c4d,0x2c1d},{0x1041e,0x1041e,0x10446,0x1041e}, +{0x2c1e,0x2c1e,0x2c4e,0x2c1e},{0x041e,0x041e,0x043e,0x041e},{0x1041f,0x1041f,0x10447,0x1041f},{0x041f,0x041f,0x043f,0x041f}, +{0x2c1f,0x2c1f,0x2c4f,0x2c1f},{0x0420,0x0420,0x0440,0x0420},{0x10420,0x10420,0x10448,0x10420},{0x2c20,0x2c20,0x2c50,0x2c20}, +{0x0421,0x0421,0x0441,0x0421},{0x10421,0x10421,0x10449,0x10421},{0x2c21,0x2c21,0x2c51,0x2c21},{0x10422,0x10422,0x1044a,0x10422}, +{0x0422,0x0422,0x0442,0x0422},{0x2c22,0x2c22,0x2c52,0x2c22},{0x2c23,0x2c23,0x2c53,0x2c23},{0x0423,0x0423,0x0443,0x0423}, +{0x10423,0x10423,0x1044b,0x10423},{0x10424,0x10424,0x1044c,0x10424},{0x2c24,0x2c24,0x2c54,0x2c24},{0x0424,0x0424,0x0444,0x0424}, +{0x0425,0x0425,0x0445,0x0425},{0x2c25,0x2c25,0x2c55,0x2c25},{0x10425,0x10425,0x1044d,0x10425},{0x10426,0x10426,0x1044e,0x10426}, +{0x2c26,0x2c26,0x2c56,0x2c26},{0x0426,0x0426,0x0446,0x0426},{0x0427,0x0427,0x0447,0x0427},{0x10427,0x10427,0x1044f,0x10427}, +{0x2c27,0x2c27,0x2c57,0x2c27},{0x10428,0x10400,0x10428,0x10400},{0x2c28,0x2c28,0x2c58,0x2c28},{0x0428,0x0428,0x0448,0x0428}, +{0x0429,0x0429,0x0449,0x0429},{0x10429,0x10401,0x10429,0x10401},{0x2c29,0x2c29,0x2c59,0x2c29},{0x042a,0x042a,0x044a,0x042a}, +{0x1042a,0x10402,0x1042a,0x10402},{0x2c2a,0x2c2a,0x2c5a,0x2c2a},{0x1042b,0x10403,0x1042b,0x10403},{0x2c2b,0x2c2b,0x2c5b,0x2c2b}, +{0x042b,0x042b,0x044b,0x042b},{0x1042c,0x10404,0x1042c,0x10404},{0x042c,0x042c,0x044c,0x042c},{0x2c2c,0x2c2c,0x2c5c,0x2c2c}, +{0x1042d,0x10405,0x1042d,0x10405},{0x042d,0x042d,0x044d,0x042d},{0x2c2d,0x2c2d,0x2c5d,0x2c2d},{0x1042e,0x10406,0x1042e,0x10406}, +{0x042e,0x042e,0x044e,0x042e},{0x2c2e,0x2c2e,0x2c5e,0x2c2e},{0x042f,0x042f,0x044f,0x042f},{0x1042f,0x10407,0x1042f,0x10407}, +{0x0430,0x0410,0x0430,0x0410},{0x10430,0x10408,0x10430,0x10408},{0x2c30,0x2c00,0x2c30,0x2c00},{0x2c31,0x2c01,0x2c31,0x2c01}, +{0x0431,0x0411,0x0431,0x0411},{0x10431,0x10409,0x10431,0x10409},{0x10432,0x1040a,0x10432,0x1040a},{0x2c32,0x2c02,0x2c32,0x2c02}, +{0x0432,0x0412,0x0432,0x0412},{0x2c33,0x2c03,0x2c33,0x2c03},{0x10433,0x1040b,0x10433,0x1040b},{0x0433,0x0413,0x0433,0x0413}, +{0x10434,0x1040c,0x10434,0x1040c},{0x0434,0x0414,0x0434,0x0414},{0x2c34,0x2c04,0x2c34,0x2c04},{0x2c35,0x2c05,0x2c35,0x2c05}, +{0x0435,0x0415,0x0435,0x0415},{0x10435,0x1040d,0x10435,0x1040d},{0x0436,0x0416,0x0436,0x0416},{0x2c36,0x2c06,0x2c36,0x2c06}, +{0x10436,0x1040e,0x10436,0x1040e},{0x10437,0x1040f,0x10437,0x1040f},{0x2c37,0x2c07,0x2c37,0x2c07},{0x0437,0x0417,0x0437,0x0417}, +{0x10438,0x10410,0x10438,0x10410},{0x2c38,0x2c08,0x2c38,0x2c08},{0x0438,0x0418,0x0438,0x0418},{0x0439,0x0419,0x0439,0x0419}, +{0x10439,0x10411,0x10439,0x10411},{0x2c39,0x2c09,0x2c39,0x2c09},{0x2c3a,0x2c0a,0x2c3a,0x2c0a},{0x043a,0x041a,0x043a,0x041a}, +{0x1043a,0x10412,0x1043a,0x10412},{0x043b,0x041b,0x043b,0x041b},{0x1043b,0x10413,0x1043b,0x10413},{0x2c3b,0x2c0b,0x2c3b,0x2c0b}, +{0x043c,0x041c,0x043c,0x041c},{0x2c3c,0x2c0c,0x2c3c,0x2c0c},{0x1043c,0x10414,0x1043c,0x10414},{0x2c3d,0x2c0d,0x2c3d,0x2c0d}, +{0x043d,0x041d,0x043d,0x041d},{0x1043d,0x10415,0x1043d,0x10415},{0x1043e,0x10416,0x1043e,0x10416},{0x043e,0x041e,0x043e,0x041e}, +{0x2c3e,0x2c0e,0x2c3e,0x2c0e},{0x1043f,0x10417,0x1043f,0x10417},{0x2c3f,0x2c0f,0x2c3f,0x2c0f},{0x043f,0x041f,0x043f,0x041f}, +{0x0440,0x0420,0x0440,0x0420},{0x10440,0x10418,0x10440,0x10418},{0x2c40,0x2c10,0x2c40,0x2c10},{0x2c41,0x2c11,0x2c41,0x2c11}, +{0x0441,0x0421,0x0441,0x0421},{0x10441,0x10419,0x10441,0x10419},{0x10442,0x1041a,0x10442,0x1041a},{0x2c42,0x2c12,0x2c42,0x2c12}, +{0x0442,0x0422,0x0442,0x0422},{0x0443,0x0423,0x0443,0x0423},{0x2c43,0x2c13,0x2c43,0x2c13},{0x10443,0x1041b,0x10443,0x1041b}, +{0x10444,0x1041c,0x10444,0x1041c},{0x2c44,0x2c14,0x2c44,0x2c14},{0x0444,0x0424,0x0444,0x0424},{0x2c45,0x2c15,0x2c45,0x2c15}, +{0x0445,0x0425,0x0445,0x0425},{0x10445,0x1041d,0x10445,0x1041d},{0x0446,0x0426,0x0446,0x0426},{0x2c46,0x2c16,0x2c46,0x2c16}, +{0x10446,0x1041e,0x10446,0x1041e},{0x2c47,0x2c17,0x2c47,0x2c17},{0x10447,0x1041f,0x10447,0x1041f},{0x0447,0x0427,0x0447,0x0427}, +{0x10448,0x10420,0x10448,0x10420},{0x0448,0x0428,0x0448,0x0428},{0x2c48,0x2c18,0x2c48,0x2c18},{0x0449,0x0429,0x0449,0x0429}, +{0x2c49,0x2c19,0x2c49,0x2c19},{0x10449,0x10421,0x10449,0x10421},{0x1044a,0x10422,0x1044a,0x10422},{0x044a,0x042a,0x044a,0x042a}, +{0x2c4a,0x2c1a,0x2c4a,0x2c1a},{0x044b,0x042b,0x044b,0x042b},{0x1044b,0x10423,0x1044b,0x10423},{0x2c4b,0x2c1b,0x2c4b,0x2c1b}, +{0x1044c,0x10424,0x1044c,0x10424},{0x2c4c,0x2c1c,0x2c4c,0x2c1c},{0x044c,0x042c,0x044c,0x042c},{0x044d,0x042d,0x044d,0x042d}, +{0x2c4d,0x2c1d,0x2c4d,0x2c1d},{0x1044d,0x10425,0x1044d,0x10425},{0x1044e,0x10426,0x1044e,0x10426},{0x2c4e,0x2c1e,0x2c4e,0x2c1e}, +{0x044e,0x042e,0x044e,0x042e},{0x2c4f,0x2c1f,0x2c4f,0x2c1f},{0x1044f,0x10427,0x1044f,0x10427},{0x044f,0x042f,0x044f,0x042f},  {0x2c50,0x2c20,0x2c50,0x2c20},{0x0450,0x0400,0x0450,0x0400},{0x2c51,0x2c21,0x2c51,0x2c21},{0x0451,0x0401,0x0451,0x0401}, -{0x0452,0x0402,0x0452,0x0402},{0x2c52,0x2c22,0x2c52,0x2c22},{0x2c53,0x2c23,0x2c53,0x2c23},{0x0453,0x0403,0x0453,0x0403}, +{0x2c52,0x2c22,0x2c52,0x2c22},{0x0452,0x0402,0x0452,0x0402},{0x2c53,0x2c23,0x2c53,0x2c23},{0x0453,0x0403,0x0453,0x0403},  {0x0454,0x0404,0x0454,0x0404},{0x2c54,0x2c24,0x2c54,0x2c24},{0x2c55,0x2c25,0x2c55,0x2c25},{0x0455,0x0405,0x0455,0x0405}, -{0x2c56,0x2c26,0x2c56,0x2c26},{0x0456,0x0406,0x0456,0x0406},{0x0457,0x0407,0x0457,0x0407},{0x2c57,0x2c27,0x2c57,0x2c27}, +{0x0456,0x0406,0x0456,0x0406},{0x2c56,0x2c26,0x2c56,0x2c26},{0x0457,0x0407,0x0457,0x0407},{0x2c57,0x2c27,0x2c57,0x2c27},  {0x0458,0x0408,0x0458,0x0408},{0x2c58,0x2c28,0x2c58,0x2c28},{0x0459,0x0409,0x0459,0x0409},{0x2c59,0x2c29,0x2c59,0x2c29}, -{0x045a,0x040a,0x045a,0x040a},{0x2c5a,0x2c2a,0x2c5a,0x2c2a},{0x045b,0x040b,0x045b,0x040b},{0x2c5b,0x2c2b,0x2c5b,0x2c2b}, -{0x2c5c,0x2c2c,0x2c5c,0x2c2c},{0x045c,0x040c,0x045c,0x040c},{0x2c5d,0x2c2d,0x2c5d,0x2c2d},{0x045d,0x040d,0x045d,0x040d}, -{0x045e,0x040e,0x045e,0x040e},{0x2c5e,0x2c2e,0x2c5e,0x2c2e},{0x045f,0x040f,0x045f,0x040f},{0x0460,0x0460,0x0461,0x0460}, -{0x2c60,0x2c60,0x2c61,0x2c60},{0x2c61,0x2c60,0x2c61,0x2c60},{0x0461,0x0460,0x0461,0x0460},{0x0462,0x0462,0x0463,0x0462}, -{0x2c62,0x2c62,0x026b,0x2c62},{0x0463,0x0462,0x0463,0x0462},{0x2c63,0x2c63,0x1d7d,0x2c63},{0x0464,0x0464,0x0465,0x0464}, -{0x2c64,0x2c64,0x027d,0x2c64},{0x2c65,0x023a,0x2c65,0x023a},{0x0465,0x0464,0x0465,0x0464},{0x2c66,0x023e,0x2c66,0x023e}, -{0x0466,0x0466,0x0467,0x0466},{0x2c67,0x2c67,0x2c68,0x2c67},{0x0467,0x0466,0x0467,0x0466},{0x0468,0x0468,0x0469,0x0468}, -{0x2c68,0x2c67,0x2c68,0x2c67},{0x0469,0x0468,0x0469,0x0468},{0x2c69,0x2c69,0x2c6a,0x2c69},{0x046a,0x046a,0x046b,0x046a}, -{0x2c6a,0x2c69,0x2c6a,0x2c69},{0x2c6b,0x2c6b,0x2c6c,0x2c6b},{0x046b,0x046a,0x046b,0x046a},{0x046c,0x046c,0x046d,0x046c}, +{0x045a,0x040a,0x045a,0x040a},{0x2c5a,0x2c2a,0x2c5a,0x2c2a},{0x2c5b,0x2c2b,0x2c5b,0x2c2b},{0x045b,0x040b,0x045b,0x040b}, +{0x2c5c,0x2c2c,0x2c5c,0x2c2c},{0x045c,0x040c,0x045c,0x040c},{0x045d,0x040d,0x045d,0x040d},{0x2c5d,0x2c2d,0x2c5d,0x2c2d}, +{0x2c5e,0x2c2e,0x2c5e,0x2c2e},{0x045e,0x040e,0x045e,0x040e},{0x045f,0x040f,0x045f,0x040f},{0x2c60,0x2c60,0x2c61,0x2c60}, +{0x0460,0x0460,0x0461,0x0460},{0x0461,0x0460,0x0461,0x0460},{0x2c61,0x2c60,0x2c61,0x2c60},{0x2c62,0x2c62,0x026b,0x2c62}, +{0x0462,0x0462,0x0463,0x0462},{0x2c63,0x2c63,0x1d7d,0x2c63},{0x0463,0x0462,0x0463,0x0462},{0x0464,0x0464,0x0465,0x0464}, +{0x2c64,0x2c64,0x027d,0x2c64},{0x0465,0x0464,0x0465,0x0464},{0x2c65,0x023a,0x2c65,0x023a},{0x2c66,0x023e,0x2c66,0x023e}, +{0x0466,0x0466,0x0467,0x0466},{0x0467,0x0466,0x0467,0x0466},{0x2c67,0x2c67,0x2c68,0x2c67},{0x2c68,0x2c67,0x2c68,0x2c67}, +{0x0468,0x0468,0x0469,0x0468},{0x2c69,0x2c69,0x2c6a,0x2c69},{0x0469,0x0468,0x0469,0x0468},{0x2c6a,0x2c69,0x2c6a,0x2c69}, +{0x046a,0x046a,0x046b,0x046a},{0x2c6b,0x2c6b,0x2c6c,0x2c6b},{0x046b,0x046a,0x046b,0x046a},{0x046c,0x046c,0x046d,0x046c},  {0x2c6c,0x2c6b,0x2c6c,0x2c6b},{0x046d,0x046c,0x046d,0x046c},{0x2c6d,0x2c6d,0x0251,0x2c6d},{0x2c6e,0x2c6e,0x0271,0x2c6e}, -{0x046e,0x046e,0x046f,0x046e},{0x046f,0x046e,0x046f,0x046e},{0x2c6f,0x2c6f,0x0250,0x2c6f},{0x2c70,0x2c70,0x0252,0x2c70}, -{0x0470,0x0470,0x0471,0x0470},{0x0471,0x0470,0x0471,0x0470},{0x0472,0x0472,0x0473,0x0472},{0x2c72,0x2c72,0x2c73,0x2c72}, +{0x046e,0x046e,0x046f,0x046e},{0x2c6f,0x2c6f,0x0250,0x2c6f},{0x046f,0x046e,0x046f,0x046e},{0x2c70,0x2c70,0x0252,0x2c70}, +{0x0470,0x0470,0x0471,0x0470},{0x0471,0x0470,0x0471,0x0470},{0x2c72,0x2c72,0x2c73,0x2c72},{0x0472,0x0472,0x0473,0x0472},  {0x2c73,0x2c72,0x2c73,0x2c72},{0x0473,0x0472,0x0473,0x0472},{0x0474,0x0474,0x0475,0x0474},{0x2c75,0x2c75,0x2c76,0x2c75}, -{0x0475,0x0474,0x0475,0x0474},{0x0476,0x0476,0x0477,0x0476},{0x2c76,0x2c75,0x2c76,0x2c75},{0x0477,0x0476,0x0477,0x0476}, +{0x0475,0x0474,0x0475,0x0474},{0x2c76,0x2c75,0x2c76,0x2c75},{0x0476,0x0476,0x0477,0x0476},{0x0477,0x0476,0x0477,0x0476},  {0x0478,0x0478,0x0479,0x0478},{0x0479,0x0478,0x0479,0x0478},{0x047a,0x047a,0x047b,0x047a},{0x047b,0x047a,0x047b,0x047a}, -{0x047c,0x047c,0x047d,0x047c},{0x047d,0x047c,0x047d,0x047c},{0x047e,0x047e,0x047f,0x047e},{0x2c7e,0x2c7e,0x023f,0x2c7e}, +{0x047c,0x047c,0x047d,0x047c},{0x047d,0x047c,0x047d,0x047c},{0x2c7e,0x2c7e,0x023f,0x2c7e},{0x047e,0x047e,0x047f,0x047e},  {0x2c7f,0x2c7f,0x0240,0x2c7f},{0x047f,0x047e,0x047f,0x047e},{0x2c80,0x2c80,0x2c81,0x2c80},{0x0480,0x0480,0x0481,0x0480}, -{0x0481,0x0480,0x0481,0x0480},{0x2c81,0x2c80,0x2c81,0x2c80},{0x2c82,0x2c82,0x2c83,0x2c82},{0x2c83,0x2c82,0x2c83,0x2c82}, +{0x2c81,0x2c80,0x2c81,0x2c80},{0x0481,0x0480,0x0481,0x0480},{0x2c82,0x2c82,0x2c83,0x2c82},{0x2c83,0x2c82,0x2c83,0x2c82},  {0x2c84,0x2c84,0x2c85,0x2c84},{0x2c85,0x2c84,0x2c85,0x2c84},{0x2c86,0x2c86,0x2c87,0x2c86},{0x2c87,0x2c86,0x2c87,0x2c86},  {0x2c88,0x2c88,0x2c89,0x2c88},{0x2c89,0x2c88,0x2c89,0x2c88},{0x2c8a,0x2c8a,0x2c8b,0x2c8a},{0x048a,0x048a,0x048b,0x048a}, -{0x2c8b,0x2c8a,0x2c8b,0x2c8a},{0x048b,0x048a,0x048b,0x048a},{0x048c,0x048c,0x048d,0x048c},{0x2c8c,0x2c8c,0x2c8d,0x2c8c}, -{0x048d,0x048c,0x048d,0x048c},{0x2c8d,0x2c8c,0x2c8d,0x2c8c},{0x2c8e,0x2c8e,0x2c8f,0x2c8e},{0x048e,0x048e,0x048f,0x048e}, -{0x2c8f,0x2c8e,0x2c8f,0x2c8e},{0x048f,0x048e,0x048f,0x048e},{0x2c90,0x2c90,0x2c91,0x2c90},{0x0490,0x0490,0x0491,0x0490}, +{0x2c8b,0x2c8a,0x2c8b,0x2c8a},{0x048b,0x048a,0x048b,0x048a},{0x2c8c,0x2c8c,0x2c8d,0x2c8c},{0x048c,0x048c,0x048d,0x048c}, +{0x048d,0x048c,0x048d,0x048c},{0x2c8d,0x2c8c,0x2c8d,0x2c8c},{0x048e,0x048e,0x048f,0x048e},{0x2c8e,0x2c8e,0x2c8f,0x2c8e}, +{0x048f,0x048e,0x048f,0x048e},{0x2c8f,0x2c8e,0x2c8f,0x2c8e},{0x2c90,0x2c90,0x2c91,0x2c90},{0x0490,0x0490,0x0491,0x0490},  {0x2c91,0x2c90,0x2c91,0x2c90},{0x0491,0x0490,0x0491,0x0490},{0x0492,0x0492,0x0493,0x0492},{0x2c92,0x2c92,0x2c93,0x2c92}, -{0x0493,0x0492,0x0493,0x0492},{0x2c93,0x2c92,0x2c93,0x2c92},{0x2c94,0x2c94,0x2c95,0x2c94},{0x0494,0x0494,0x0495,0x0494}, +{0x0493,0x0492,0x0493,0x0492},{0x2c93,0x2c92,0x2c93,0x2c92},{0x0494,0x0494,0x0495,0x0494},{0x2c94,0x2c94,0x2c95,0x2c94},  {0x0495,0x0494,0x0495,0x0494},{0x2c95,0x2c94,0x2c95,0x2c94},{0x2c96,0x2c96,0x2c97,0x2c96},{0x0496,0x0496,0x0497,0x0496},  {0x0497,0x0496,0x0497,0x0496},{0x2c97,0x2c96,0x2c97,0x2c96},{0x2c98,0x2c98,0x2c99,0x2c98},{0x0498,0x0498,0x0499,0x0498}, -{0x0499,0x0498,0x0499,0x0498},{0x2c99,0x2c98,0x2c99,0x2c98},{0x2c9a,0x2c9a,0x2c9b,0x2c9a},{0x049a,0x049a,0x049b,0x049a}, -{0x049b,0x049a,0x049b,0x049a},{0x2c9b,0x2c9a,0x2c9b,0x2c9a},{0x2c9c,0x2c9c,0x2c9d,0x2c9c},{0x049c,0x049c,0x049d,0x049c}, -{0x049d,0x049c,0x049d,0x049c},{0x2c9d,0x2c9c,0x2c9d,0x2c9c},{0x049e,0x049e,0x049f,0x049e},{0x2c9e,0x2c9e,0x2c9f,0x2c9e}, -{0x049f,0x049e,0x049f,0x049e},{0x2c9f,0x2c9e,0x2c9f,0x2c9e},{0x2ca0,0x2ca0,0x2ca1,0x2ca0},{0x04a0,0x04a0,0x04a1,0x04a0}, -{0x2ca1,0x2ca0,0x2ca1,0x2ca0},{0x04a1,0x04a0,0x04a1,0x04a0},{0x04a2,0x04a2,0x04a3,0x04a2},{0x2ca2,0x2ca2,0x2ca3,0x2ca2}, +{0x2c99,0x2c98,0x2c99,0x2c98},{0x0499,0x0498,0x0499,0x0498},{0x2c9a,0x2c9a,0x2c9b,0x2c9a},{0x049a,0x049a,0x049b,0x049a}, +{0x2c9b,0x2c9a,0x2c9b,0x2c9a},{0x049b,0x049a,0x049b,0x049a},{0x049c,0x049c,0x049d,0x049c},{0x2c9c,0x2c9c,0x2c9d,0x2c9c}, +{0x049d,0x049c,0x049d,0x049c},{0x2c9d,0x2c9c,0x2c9d,0x2c9c},{0x2c9e,0x2c9e,0x2c9f,0x2c9e},{0x049e,0x049e,0x049f,0x049e}, +{0x2c9f,0x2c9e,0x2c9f,0x2c9e},{0x049f,0x049e,0x049f,0x049e},{0x04a0,0x04a0,0x04a1,0x04a0},{0x2ca0,0x2ca0,0x2ca1,0x2ca0}, +{0x2ca1,0x2ca0,0x2ca1,0x2ca0},{0x04a1,0x04a0,0x04a1,0x04a0},{0x2ca2,0x2ca2,0x2ca3,0x2ca2},{0x04a2,0x04a2,0x04a3,0x04a2},  {0x04a3,0x04a2,0x04a3,0x04a2},{0x2ca3,0x2ca2,0x2ca3,0x2ca2},{0x04a4,0x04a4,0x04a5,0x04a4},{0x2ca4,0x2ca4,0x2ca5,0x2ca4},  {0x04a5,0x04a4,0x04a5,0x04a4},{0x2ca5,0x2ca4,0x2ca5,0x2ca4},{0x04a6,0x04a6,0x04a7,0x04a6},{0x2ca6,0x2ca6,0x2ca7,0x2ca6},  {0x04a7,0x04a6,0x04a7,0x04a6},{0x2ca7,0x2ca6,0x2ca7,0x2ca6},{0x04a8,0x04a8,0x04a9,0x04a8},{0x2ca8,0x2ca8,0x2ca9,0x2ca8},  {0x2ca9,0x2ca8,0x2ca9,0x2ca8},{0x04a9,0x04a8,0x04a9,0x04a8},{0x04aa,0x04aa,0x04ab,0x04aa},{0x2caa,0x2caa,0x2cab,0x2caa}, -{0x04ab,0x04aa,0x04ab,0x04aa},{0x2cab,0x2caa,0x2cab,0x2caa},{0x04ac,0x04ac,0x04ad,0x04ac},{0x2cac,0x2cac,0x2cad,0x2cac}, -{0x04ad,0x04ac,0x04ad,0x04ac},{0x2cad,0x2cac,0x2cad,0x2cac},{0x2cae,0x2cae,0x2caf,0x2cae},{0x04ae,0x04ae,0x04af,0x04ae}, -{0x2caf,0x2cae,0x2caf,0x2cae},{0x04af,0x04ae,0x04af,0x04ae},{0x04b0,0x04b0,0x04b1,0x04b0},{0x2cb0,0x2cb0,0x2cb1,0x2cb0}, +{0x2cab,0x2caa,0x2cab,0x2caa},{0x04ab,0x04aa,0x04ab,0x04aa},{0x04ac,0x04ac,0x04ad,0x04ac},{0x2cac,0x2cac,0x2cad,0x2cac}, +{0x2cad,0x2cac,0x2cad,0x2cac},{0x04ad,0x04ac,0x04ad,0x04ac},{0x2cae,0x2cae,0x2caf,0x2cae},{0x04ae,0x04ae,0x04af,0x04ae}, +{0x04af,0x04ae,0x04af,0x04ae},{0x2caf,0x2cae,0x2caf,0x2cae},{0x2cb0,0x2cb0,0x2cb1,0x2cb0},{0x04b0,0x04b0,0x04b1,0x04b0},  {0x04b1,0x04b0,0x04b1,0x04b0},{0x2cb1,0x2cb0,0x2cb1,0x2cb0},{0x2cb2,0x2cb2,0x2cb3,0x2cb2},{0x04b2,0x04b2,0x04b3,0x04b2}, -{0x2cb3,0x2cb2,0x2cb3,0x2cb2},{0x04b3,0x04b2,0x04b3,0x04b2},{0x2cb4,0x2cb4,0x2cb5,0x2cb4},{0x04b4,0x04b4,0x04b5,0x04b4}, -{0x04b5,0x04b4,0x04b5,0x04b4},{0x2cb5,0x2cb4,0x2cb5,0x2cb4},{0x24b6,0x24b6,0x24d0,0x24b6},{0x2cb6,0x2cb6,0x2cb7,0x2cb6}, -{0x04b6,0x04b6,0x04b7,0x04b6},{0x2cb7,0x2cb6,0x2cb7,0x2cb6},{0x24b7,0x24b7,0x24d1,0x24b7},{0x04b7,0x04b6,0x04b7,0x04b6}, -{0x2cb8,0x2cb8,0x2cb9,0x2cb8},{0x04b8,0x04b8,0x04b9,0x04b8},{0x24b8,0x24b8,0x24d2,0x24b8},{0x2cb9,0x2cb8,0x2cb9,0x2cb8}, -{0x24b9,0x24b9,0x24d3,0x24b9},{0x04b9,0x04b8,0x04b9,0x04b8},{0x04ba,0x04ba,0x04bb,0x04ba},{0x2cba,0x2cba,0x2cbb,0x2cba}, -{0x24ba,0x24ba,0x24d4,0x24ba},{0x2cbb,0x2cba,0x2cbb,0x2cba},{0x04bb,0x04ba,0x04bb,0x04ba},{0x24bb,0x24bb,0x24d5,0x24bb}, -{0x2cbc,0x2cbc,0x2cbd,0x2cbc},{0x24bc,0x24bc,0x24d6,0x24bc},{0x04bc,0x04bc,0x04bd,0x04bc},{0x24bd,0x24bd,0x24d7,0x24bd}, -{0x2cbd,0x2cbc,0x2cbd,0x2cbc},{0x04bd,0x04bc,0x04bd,0x04bc},{0x24be,0x24be,0x24d8,0x24be},{0x2cbe,0x2cbe,0x2cbf,0x2cbe}, -{0x04be,0x04be,0x04bf,0x04be},{0x2cbf,0x2cbe,0x2cbf,0x2cbe},{0x24bf,0x24bf,0x24d9,0x24bf},{0x04bf,0x04be,0x04bf,0x04be}, -{0x04c0,0x04c0,0x04cf,0x04c0},{0x2cc0,0x2cc0,0x2cc1,0x2cc0},{0x24c0,0x24c0,0x24da,0x24c0},{0x24c1,0x24c1,0x24db,0x24c1}, -{0x04c1,0x04c1,0x04c2,0x04c1},{0x2cc1,0x2cc0,0x2cc1,0x2cc0},{0x24c2,0x24c2,0x24dc,0x24c2},{0x04c2,0x04c1,0x04c2,0x04c1}, -{0x2cc2,0x2cc2,0x2cc3,0x2cc2},{0x24c3,0x24c3,0x24dd,0x24c3},{0x2cc3,0x2cc2,0x2cc3,0x2cc2},{0x04c3,0x04c3,0x04c4,0x04c3}, -{0x2cc4,0x2cc4,0x2cc5,0x2cc4},{0x24c4,0x24c4,0x24de,0x24c4},{0x04c4,0x04c3,0x04c4,0x04c3},{0x24c5,0x24c5,0x24df,0x24c5}, -{0x2cc5,0x2cc4,0x2cc5,0x2cc4},{0x04c5,0x04c5,0x04c6,0x04c5},{0x2cc6,0x2cc6,0x2cc7,0x2cc6},{0x24c6,0x24c6,0x24e0,0x24c6}, -{0x04c6,0x04c5,0x04c6,0x04c5},{0x04c7,0x04c7,0x04c8,0x04c7},{0x24c7,0x24c7,0x24e1,0x24c7},{0x2cc7,0x2cc6,0x2cc7,0x2cc6}, -{0x24c8,0x24c8,0x24e2,0x24c8},{0x04c8,0x04c7,0x04c8,0x04c7},{0x2cc8,0x2cc8,0x2cc9,0x2cc8},{0x2cc9,0x2cc8,0x2cc9,0x2cc8}, -{0x24c9,0x24c9,0x24e3,0x24c9},{0x04c9,0x04c9,0x04ca,0x04c9},{0x04ca,0x04c9,0x04ca,0x04c9},{0x2cca,0x2cca,0x2ccb,0x2cca}, -{0x24ca,0x24ca,0x24e4,0x24ca},{0x04cb,0x04cb,0x04cc,0x04cb},{0x2ccb,0x2cca,0x2ccb,0x2cca},{0x24cb,0x24cb,0x24e5,0x24cb}, +{0x04b3,0x04b2,0x04b3,0x04b2},{0x2cb3,0x2cb2,0x2cb3,0x2cb2},{0x04b4,0x04b4,0x04b5,0x04b4},{0x2cb4,0x2cb4,0x2cb5,0x2cb4}, +{0x04b5,0x04b4,0x04b5,0x04b4},{0x2cb5,0x2cb4,0x2cb5,0x2cb4},{0x24b6,0x24b6,0x24d0,0x24b6},{0x04b6,0x04b6,0x04b7,0x04b6}, +{0x2cb6,0x2cb6,0x2cb7,0x2cb6},{0x04b7,0x04b6,0x04b7,0x04b6},{0x24b7,0x24b7,0x24d1,0x24b7},{0x2cb7,0x2cb6,0x2cb7,0x2cb6}, +{0x2cb8,0x2cb8,0x2cb9,0x2cb8},{0x24b8,0x24b8,0x24d2,0x24b8},{0x04b8,0x04b8,0x04b9,0x04b8},{0x24b9,0x24b9,0x24d3,0x24b9}, +{0x04b9,0x04b8,0x04b9,0x04b8},{0x2cb9,0x2cb8,0x2cb9,0x2cb8},{0x04ba,0x04ba,0x04bb,0x04ba},{0x2cba,0x2cba,0x2cbb,0x2cba}, +{0x24ba,0x24ba,0x24d4,0x24ba},{0x04bb,0x04ba,0x04bb,0x04ba},{0x2cbb,0x2cba,0x2cbb,0x2cba},{0x24bb,0x24bb,0x24d5,0x24bb}, +{0x2cbc,0x2cbc,0x2cbd,0x2cbc},{0x24bc,0x24bc,0x24d6,0x24bc},{0x04bc,0x04bc,0x04bd,0x04bc},{0x04bd,0x04bc,0x04bd,0x04bc}, +{0x2cbd,0x2cbc,0x2cbd,0x2cbc},{0x24bd,0x24bd,0x24d7,0x24bd},{0x24be,0x24be,0x24d8,0x24be},{0x04be,0x04be,0x04bf,0x04be}, +{0x2cbe,0x2cbe,0x2cbf,0x2cbe},{0x2cbf,0x2cbe,0x2cbf,0x2cbe},{0x24bf,0x24bf,0x24d9,0x24bf},{0x04bf,0x04be,0x04bf,0x04be}, +{0x24c0,0x24c0,0x24da,0x24c0},{0x2cc0,0x2cc0,0x2cc1,0x2cc0},{0x04c0,0x04c0,0x04cf,0x04c0},{0x04c1,0x04c1,0x04c2,0x04c1}, +{0x2cc1,0x2cc0,0x2cc1,0x2cc0},{0x24c1,0x24c1,0x24db,0x24c1},{0x04c2,0x04c1,0x04c2,0x04c1},{0x2cc2,0x2cc2,0x2cc3,0x2cc2}, +{0x24c2,0x24c2,0x24dc,0x24c2},{0x24c3,0x24c3,0x24dd,0x24c3},{0x2cc3,0x2cc2,0x2cc3,0x2cc2},{0x04c3,0x04c3,0x04c4,0x04c3}, +{0x2cc4,0x2cc4,0x2cc5,0x2cc4},{0x04c4,0x04c3,0x04c4,0x04c3},{0x24c4,0x24c4,0x24de,0x24c4},{0x04c5,0x04c5,0x04c6,0x04c5}, +{0x24c5,0x24c5,0x24df,0x24c5},{0x2cc5,0x2cc4,0x2cc5,0x2cc4},{0x2cc6,0x2cc6,0x2cc7,0x2cc6},{0x24c6,0x24c6,0x24e0,0x24c6}, +{0x04c6,0x04c5,0x04c6,0x04c5},{0x04c7,0x04c7,0x04c8,0x04c7},{0x2cc7,0x2cc6,0x2cc7,0x2cc6},{0x24c7,0x24c7,0x24e1,0x24c7}, +{0x24c8,0x24c8,0x24e2,0x24c8},{0x2cc8,0x2cc8,0x2cc9,0x2cc8},{0x04c8,0x04c7,0x04c8,0x04c7},{0x24c9,0x24c9,0x24e3,0x24c9}, +{0x2cc9,0x2cc8,0x2cc9,0x2cc8},{0x04c9,0x04c9,0x04ca,0x04c9},{0x2cca,0x2cca,0x2ccb,0x2cca},{0x24ca,0x24ca,0x24e4,0x24ca}, +{0x04ca,0x04c9,0x04ca,0x04c9},{0x04cb,0x04cb,0x04cc,0x04cb},{0x24cb,0x24cb,0x24e5,0x24cb},{0x2ccb,0x2cca,0x2ccb,0x2cca},  {0x24cc,0x24cc,0x24e6,0x24cc},{0x2ccc,0x2ccc,0x2ccd,0x2ccc},{0x04cc,0x04cb,0x04cc,0x04cb},{0x2ccd,0x2ccc,0x2ccd,0x2ccc}, -{0x24cd,0x24cd,0x24e7,0x24cd},{0x04cd,0x04cd,0x04ce,0x04cd},{0x2cce,0x2cce,0x2ccf,0x2cce},{0x04ce,0x04cd,0x04ce,0x04cd}, -{0x24ce,0x24ce,0x24e8,0x24ce},{0x04cf,0x04c0,0x04cf,0x04c0},{0x24cf,0x24cf,0x24e9,0x24cf},{0x2ccf,0x2cce,0x2ccf,0x2cce}, -{0x24d0,0x24b6,0x24d0,0x24b6},{0x2cd0,0x2cd0,0x2cd1,0x2cd0},{0x04d0,0x04d0,0x04d1,0x04d0},{0x2cd1,0x2cd0,0x2cd1,0x2cd0}, -{0x04d1,0x04d0,0x04d1,0x04d0},{0x24d1,0x24b7,0x24d1,0x24b7},{0x04d2,0x04d2,0x04d3,0x04d2},{0x24d2,0x24b8,0x24d2,0x24b8}, -{0x2cd2,0x2cd2,0x2cd3,0x2cd2},{0x04d3,0x04d2,0x04d3,0x04d2},{0x2cd3,0x2cd2,0x2cd3,0x2cd2},{0x24d3,0x24b9,0x24d3,0x24b9}, -{0x24d4,0x24ba,0x24d4,0x24ba},{0x2cd4,0x2cd4,0x2cd5,0x2cd4},{0x04d4,0x04d4,0x04d5,0x04d4},{0x04d5,0x04d4,0x04d5,0x04d4}, -{0x24d5,0x24bb,0x24d5,0x24bb},{0x2cd5,0x2cd4,0x2cd5,0x2cd4},{0x04d6,0x04d6,0x04d7,0x04d6},{0x24d6,0x24bc,0x24d6,0x24bc}, -{0x2cd6,0x2cd6,0x2cd7,0x2cd6},{0x04d7,0x04d6,0x04d7,0x04d6},{0x2cd7,0x2cd6,0x2cd7,0x2cd6},{0x24d7,0x24bd,0x24d7,0x24bd}, -{0x04d8,0x04d8,0x04d9,0x04d8},{0x2cd8,0x2cd8,0x2cd9,0x2cd8},{0x24d8,0x24be,0x24d8,0x24be},{0x04d9,0x04d8,0x04d9,0x04d8}, -{0x24d9,0x24bf,0x24d9,0x24bf},{0x2cd9,0x2cd8,0x2cd9,0x2cd8},{0x2cda,0x2cda,0x2cdb,0x2cda},{0x24da,0x24c0,0x24da,0x24c0}, -{0x04da,0x04da,0x04db,0x04da},{0x2cdb,0x2cda,0x2cdb,0x2cda},{0x04db,0x04da,0x04db,0x04da},{0x24db,0x24c1,0x24db,0x24c1}, -{0x2cdc,0x2cdc,0x2cdd,0x2cdc},{0x04dc,0x04dc,0x04dd,0x04dc},{0x24dc,0x24c2,0x24dc,0x24c2},{0x24dd,0x24c3,0x24dd,0x24c3}, -{0x04dd,0x04dc,0x04dd,0x04dc},{0x2cdd,0x2cdc,0x2cdd,0x2cdc},{0x04de,0x04de,0x04df,0x04de},{0x24de,0x24c4,0x24de,0x24c4}, -{0x2cde,0x2cde,0x2cdf,0x2cde},{0x2cdf,0x2cde,0x2cdf,0x2cde},{0x24df,0x24c5,0x24df,0x24c5},{0x04df,0x04de,0x04df,0x04de}, +{0x24cd,0x24cd,0x24e7,0x24cd},{0x04cd,0x04cd,0x04ce,0x04cd},{0x04ce,0x04cd,0x04ce,0x04cd},{0x24ce,0x24ce,0x24e8,0x24ce}, +{0x2cce,0x2cce,0x2ccf,0x2cce},{0x24cf,0x24cf,0x24e9,0x24cf},{0x2ccf,0x2cce,0x2ccf,0x2cce},{0x04cf,0x04c0,0x04cf,0x04c0}, +{0x24d0,0x24b6,0x24d0,0x24b6},{0x2cd0,0x2cd0,0x2cd1,0x2cd0},{0x04d0,0x04d0,0x04d1,0x04d0},{0x24d1,0x24b7,0x24d1,0x24b7}, +{0x04d1,0x04d0,0x04d1,0x04d0},{0x2cd1,0x2cd0,0x2cd1,0x2cd0},{0x24d2,0x24b8,0x24d2,0x24b8},{0x2cd2,0x2cd2,0x2cd3,0x2cd2}, +{0x04d2,0x04d2,0x04d3,0x04d2},{0x2cd3,0x2cd2,0x2cd3,0x2cd2},{0x24d3,0x24b9,0x24d3,0x24b9},{0x04d3,0x04d2,0x04d3,0x04d2}, +{0x24d4,0x24ba,0x24d4,0x24ba},{0x04d4,0x04d4,0x04d5,0x04d4},{0x2cd4,0x2cd4,0x2cd5,0x2cd4},{0x04d5,0x04d4,0x04d5,0x04d4}, +{0x24d5,0x24bb,0x24d5,0x24bb},{0x2cd5,0x2cd4,0x2cd5,0x2cd4},{0x2cd6,0x2cd6,0x2cd7,0x2cd6},{0x24d6,0x24bc,0x24d6,0x24bc}, +{0x04d6,0x04d6,0x04d7,0x04d6},{0x2cd7,0x2cd6,0x2cd7,0x2cd6},{0x04d7,0x04d6,0x04d7,0x04d6},{0x24d7,0x24bd,0x24d7,0x24bd}, +{0x04d8,0x04d8,0x04d9,0x04d8},{0x2cd8,0x2cd8,0x2cd9,0x2cd8},{0x24d8,0x24be,0x24d8,0x24be},{0x24d9,0x24bf,0x24d9,0x24bf}, +{0x04d9,0x04d8,0x04d9,0x04d8},{0x2cd9,0x2cd8,0x2cd9,0x2cd8},{0x04da,0x04da,0x04db,0x04da},{0x2cda,0x2cda,0x2cdb,0x2cda}, +{0x24da,0x24c0,0x24da,0x24c0},{0x04db,0x04da,0x04db,0x04da},{0x2cdb,0x2cda,0x2cdb,0x2cda},{0x24db,0x24c1,0x24db,0x24c1}, +{0x24dc,0x24c2,0x24dc,0x24c2},{0x04dc,0x04dc,0x04dd,0x04dc},{0x2cdc,0x2cdc,0x2cdd,0x2cdc},{0x24dd,0x24c3,0x24dd,0x24c3}, +{0x2cdd,0x2cdc,0x2cdd,0x2cdc},{0x04dd,0x04dc,0x04dd,0x04dc},{0x2cde,0x2cde,0x2cdf,0x2cde},{0x04de,0x04de,0x04df,0x04de}, +{0x24de,0x24c4,0x24de,0x24c4},{0x2cdf,0x2cde,0x2cdf,0x2cde},{0x24df,0x24c5,0x24df,0x24c5},{0x04df,0x04de,0x04df,0x04de},  {0x04e0,0x04e0,0x04e1,0x04e0},{0x24e0,0x24c6,0x24e0,0x24c6},{0x2ce0,0x2ce0,0x2ce1,0x2ce0},{0x24e1,0x24c7,0x24e1,0x24c7}, -{0x2ce1,0x2ce0,0x2ce1,0x2ce0},{0x04e1,0x04e0,0x04e1,0x04e0},{0x2ce2,0x2ce2,0x2ce3,0x2ce2},{0x04e2,0x04e2,0x04e3,0x04e2}, -{0x24e2,0x24c8,0x24e2,0x24c8},{0x04e3,0x04e2,0x04e3,0x04e2},{0x2ce3,0x2ce2,0x2ce3,0x2ce2},{0x24e3,0x24c9,0x24e3,0x24c9}, -{0x24e4,0x24ca,0x24e4,0x24ca},{0x04e4,0x04e4,0x04e5,0x04e4},{0x04e5,0x04e4,0x04e5,0x04e4},{0x24e5,0x24cb,0x24e5,0x24cb}, -{0x04e6,0x04e6,0x04e7,0x04e6},{0x24e6,0x24cc,0x24e6,0x24cc},{0x04e7,0x04e6,0x04e7,0x04e6},{0x24e7,0x24cd,0x24e7,0x24cd}, -{0x04e8,0x04e8,0x04e9,0x04e8},{0x24e8,0x24ce,0x24e8,0x24ce},{0x04e9,0x04e8,0x04e9,0x04e8},{0x24e9,0x24cf,0x24e9,0x24cf}, -{0x04ea,0x04ea,0x04eb,0x04ea},{0x2ceb,0x2ceb,0x2cec,0x2ceb},{0x04eb,0x04ea,0x04eb,0x04ea},{0x04ec,0x04ec,0x04ed,0x04ec}, -{0x2cec,0x2ceb,0x2cec,0x2ceb},{0x04ed,0x04ec,0x04ed,0x04ec},{0x2ced,0x2ced,0x2cee,0x2ced},{0x04ee,0x04ee,0x04ef,0x04ee}, +{0x04e1,0x04e0,0x04e1,0x04e0},{0x2ce1,0x2ce0,0x2ce1,0x2ce0},{0x24e2,0x24c8,0x24e2,0x24c8},{0x2ce2,0x2ce2,0x2ce3,0x2ce2}, +{0x04e2,0x04e2,0x04e3,0x04e2},{0x04e3,0x04e2,0x04e3,0x04e2},{0x2ce3,0x2ce2,0x2ce3,0x2ce2},{0x24e3,0x24c9,0x24e3,0x24c9}, +{0x04e4,0x04e4,0x04e5,0x04e4},{0x24e4,0x24ca,0x24e4,0x24ca},{0x04e5,0x04e4,0x04e5,0x04e4},{0x24e5,0x24cb,0x24e5,0x24cb}, +{0x04e6,0x04e6,0x04e7,0x04e6},{0x24e6,0x24cc,0x24e6,0x24cc},{0x24e7,0x24cd,0x24e7,0x24cd},{0x04e7,0x04e6,0x04e7,0x04e6}, +{0x04e8,0x04e8,0x04e9,0x04e8},{0x24e8,0x24ce,0x24e8,0x24ce},{0x24e9,0x24cf,0x24e9,0x24cf},{0x04e9,0x04e8,0x04e9,0x04e8}, +{0x04ea,0x04ea,0x04eb,0x04ea},{0x04eb,0x04ea,0x04eb,0x04ea},{0x2ceb,0x2ceb,0x2cec,0x2ceb},{0x2cec,0x2ceb,0x2cec,0x2ceb}, +{0x04ec,0x04ec,0x04ed,0x04ec},{0x04ed,0x04ec,0x04ed,0x04ec},{0x2ced,0x2ced,0x2cee,0x2ced},{0x04ee,0x04ee,0x04ef,0x04ee},  {0x2cee,0x2ced,0x2cee,0x2ced},{0x04ef,0x04ee,0x04ef,0x04ee},{0x04f0,0x04f0,0x04f1,0x04f0},{0x04f1,0x04f0,0x04f1,0x04f0}, -{0x2cf2,0x2cf2,0x2cf3,0x2cf2},{0x04f2,0x04f2,0x04f3,0x04f2},{0x2cf3,0x2cf2,0x2cf3,0x2cf2},{0x04f3,0x04f2,0x04f3,0x04f2}, +{0x2cf2,0x2cf2,0x2cf3,0x2cf2},{0x04f2,0x04f2,0x04f3,0x04f2},{0x04f3,0x04f2,0x04f3,0x04f2},{0x2cf3,0x2cf2,0x2cf3,0x2cf2},  {0x04f4,0x04f4,0x04f5,0x04f4},{0x04f5,0x04f4,0x04f5,0x04f4},{0x04f6,0x04f6,0x04f7,0x04f6},{0x04f7,0x04f6,0x04f7,0x04f6},  {0x04f8,0x04f8,0x04f9,0x04f8},{0x04f9,0x04f8,0x04f9,0x04f8},{0x04fa,0x04fa,0x04fb,0x04fa},{0x04fb,0x04fa,0x04fb,0x04fa},  {0x04fc,0x04fc,0x04fd,0x04fc},{0x04fd,0x04fc,0x04fd,0x04fc},{0x04fe,0x04fe,0x04ff,0x04fe},{0x04ff,0x04fe,0x04ff,0x04fe}, -{0x2d00,0x10a0,0x2d00,0x10a0},{0x0500,0x0500,0x0501,0x0500},{0x0501,0x0500,0x0501,0x0500},{0x2d01,0x10a1,0x2d01,0x10a1}, +{0x0500,0x0500,0x0501,0x0500},{0x2d00,0x10a0,0x2d00,0x10a0},{0x2d01,0x10a1,0x2d01,0x10a1},{0x0501,0x0500,0x0501,0x0500},  {0x2d02,0x10a2,0x2d02,0x10a2},{0x0502,0x0502,0x0503,0x0502},{0x0503,0x0502,0x0503,0x0502},{0x2d03,0x10a3,0x2d03,0x10a3}, -{0x2d04,0x10a4,0x2d04,0x10a4},{0x0504,0x0504,0x0505,0x0504},{0x2d05,0x10a5,0x2d05,0x10a5},{0x0505,0x0504,0x0505,0x0504}, -{0x0506,0x0506,0x0507,0x0506},{0x2d06,0x10a6,0x2d06,0x10a6},{0x0507,0x0506,0x0507,0x0506},{0x2d07,0x10a7,0x2d07,0x10a7}, -{0x2d08,0x10a8,0x2d08,0x10a8},{0x0508,0x0508,0x0509,0x0508},{0x0509,0x0508,0x0509,0x0508},{0x2d09,0x10a9,0x2d09,0x10a9}, +{0x0504,0x0504,0x0505,0x0504},{0x2d04,0x10a4,0x2d04,0x10a4},{0x2d05,0x10a5,0x2d05,0x10a5},{0x0505,0x0504,0x0505,0x0504}, +{0x2d06,0x10a6,0x2d06,0x10a6},{0x0506,0x0506,0x0507,0x0506},{0x2d07,0x10a7,0x2d07,0x10a7},{0x0507,0x0506,0x0507,0x0506}, +{0x0508,0x0508,0x0509,0x0508},{0x2d08,0x10a8,0x2d08,0x10a8},{0x0509,0x0508,0x0509,0x0508},{0x2d09,0x10a9,0x2d09,0x10a9},  {0x2d0a,0x10aa,0x2d0a,0x10aa},{0x050a,0x050a,0x050b,0x050a},{0x050b,0x050a,0x050b,0x050a},{0x2d0b,0x10ab,0x2d0b,0x10ab}, -{0x050c,0x050c,0x050d,0x050c},{0x2d0c,0x10ac,0x2d0c,0x10ac},{0x2d0d,0x10ad,0x2d0d,0x10ad},{0x050d,0x050c,0x050d,0x050c}, -{0x050e,0x050e,0x050f,0x050e},{0x2d0e,0x10ae,0x2d0e,0x10ae},{0x2d0f,0x10af,0x2d0f,0x10af},{0x050f,0x050e,0x050f,0x050e}, +{0x050c,0x050c,0x050d,0x050c},{0x2d0c,0x10ac,0x2d0c,0x10ac},{0x050d,0x050c,0x050d,0x050c},{0x2d0d,0x10ad,0x2d0d,0x10ad}, +{0x2d0e,0x10ae,0x2d0e,0x10ae},{0x050e,0x050e,0x050f,0x050e},{0x2d0f,0x10af,0x2d0f,0x10af},{0x050f,0x050e,0x050f,0x050e},  {0x2d10,0x10b0,0x2d10,0x10b0},{0x0510,0x0510,0x0511,0x0510},{0x2d11,0x10b1,0x2d11,0x10b1},{0x0511,0x0510,0x0511,0x0510},  {0x2d12,0x10b2,0x2d12,0x10b2},{0x0512,0x0512,0x0513,0x0512},{0x0513,0x0512,0x0513,0x0512},{0x2d13,0x10b3,0x2d13,0x10b3}, -{0x2d14,0x10b4,0x2d14,0x10b4},{0x0514,0x0514,0x0515,0x0514},{0x0515,0x0514,0x0515,0x0514},{0x2d15,0x10b5,0x2d15,0x10b5}, +{0x0514,0x0514,0x0515,0x0514},{0x2d14,0x10b4,0x2d14,0x10b4},{0x0515,0x0514,0x0515,0x0514},{0x2d15,0x10b5,0x2d15,0x10b5},  {0x2d16,0x10b6,0x2d16,0x10b6},{0x0516,0x0516,0x0517,0x0516},{0x0517,0x0516,0x0517,0x0516},{0x2d17,0x10b7,0x2d17,0x10b7}, -{0x2d18,0x10b8,0x2d18,0x10b8},{0x0518,0x0518,0x0519,0x0518},{0x0519,0x0518,0x0519,0x0518},{0x2d19,0x10b9,0x2d19,0x10b9}, -{0x051a,0x051a,0x051b,0x051a},{0x2d1a,0x10ba,0x2d1a,0x10ba},{0x051b,0x051a,0x051b,0x051a},{0x2d1b,0x10bb,0x2d1b,0x10bb}, -{0x2d1c,0x10bc,0x2d1c,0x10bc},{0x051c,0x051c,0x051d,0x051c},{0x2d1d,0x10bd,0x2d1d,0x10bd},{0x051d,0x051c,0x051d,0x051c}, +{0x2d18,0x10b8,0x2d18,0x10b8},{0x0518,0x0518,0x0519,0x0518},{0x2d19,0x10b9,0x2d19,0x10b9},{0x0519,0x0518,0x0519,0x0518}, +{0x2d1a,0x10ba,0x2d1a,0x10ba},{0x051a,0x051a,0x051b,0x051a},{0x2d1b,0x10bb,0x2d1b,0x10bb},{0x051b,0x051a,0x051b,0x051a}, +{0x2d1c,0x10bc,0x2d1c,0x10bc},{0x051c,0x051c,0x051d,0x051c},{0x051d,0x051c,0x051d,0x051c},{0x2d1d,0x10bd,0x2d1d,0x10bd},  {0x051e,0x051e,0x051f,0x051e},{0x2d1e,0x10be,0x2d1e,0x10be},{0x051f,0x051e,0x051f,0x051e},{0x2d1f,0x10bf,0x2d1f,0x10bf}, -{0x0520,0x0520,0x0521,0x0520},{0x2d20,0x10c0,0x2d20,0x10c0},{0x0521,0x0520,0x0521,0x0520},{0x2d21,0x10c1,0x2d21,0x10c1}, -{0x2d22,0x10c2,0x2d22,0x10c2},{0x0522,0x0522,0x0523,0x0522},{0x0523,0x0522,0x0523,0x0522},{0x2d23,0x10c3,0x2d23,0x10c3}, -{0x0524,0x0524,0x0525,0x0524},{0x2d24,0x10c4,0x2d24,0x10c4},{0x0525,0x0524,0x0525,0x0524},{0x2d25,0x10c5,0x2d25,0x10c5}, -{0x0526,0x0526,0x0527,0x0526},{0x2d27,0x10c7,0x2d27,0x10c7},{0x0527,0x0526,0x0527,0x0526},{0x2d2d,0x10cd,0x2d2d,0x10cd}, +{0x0520,0x0520,0x0521,0x0520},{0x2d20,0x10c0,0x2d20,0x10c0},{0x2d21,0x10c1,0x2d21,0x10c1},{0x0521,0x0520,0x0521,0x0520}, +{0x2d22,0x10c2,0x2d22,0x10c2},{0x0522,0x0522,0x0523,0x0522},{0x2d23,0x10c3,0x2d23,0x10c3},{0x0523,0x0522,0x0523,0x0522}, +{0x2d24,0x10c4,0x2d24,0x10c4},{0x0524,0x0524,0x0525,0x0524},{0x0525,0x0524,0x0525,0x0524},{0x2d25,0x10c5,0x2d25,0x10c5}, +{0x0526,0x0526,0x0527,0x0526},{0x0527,0x0526,0x0527,0x0526},{0x2d27,0x10c7,0x2d27,0x10c7},{0x2d2d,0x10cd,0x2d2d,0x10cd},  {0x0531,0x0531,0x0561,0x0531},{0x0532,0x0532,0x0562,0x0532},{0x0533,0x0533,0x0563,0x0533},{0x0534,0x0534,0x0564,0x0534},  {0x0535,0x0535,0x0565,0x0535},{0x0536,0x0536,0x0566,0x0536},{0x0537,0x0537,0x0567,0x0537},{0x0538,0x0538,0x0568,0x0538},  {0x0539,0x0539,0x0569,0x0539},{0x053a,0x053a,0x056a,0x053a},{0x053b,0x053b,0x056b,0x053b},{0x053c,0x053c,0x056c,0x053c}, @@ -360,8 +360,8 @@ const unicode_char unicode_case_tab[][4]={  {0x056f,0x053f,0x056f,0x053f},{0x0570,0x0540,0x0570,0x0540},{0x0571,0x0541,0x0571,0x0541},{0x0572,0x0542,0x0572,0x0542},  {0x0573,0x0543,0x0573,0x0543},{0x0574,0x0544,0x0574,0x0544},{0x0575,0x0545,0x0575,0x0545},{0x0576,0x0546,0x0576,0x0546},  {0x0577,0x0547,0x0577,0x0547},{0x0578,0x0548,0x0578,0x0548},{0x1d79,0xa77d,0x1d79,0xa77d},{0x0579,0x0549,0x0579,0x0549}, -{0x057a,0x054a,0x057a,0x054a},{0x057b,0x054b,0x057b,0x054b},{0x057c,0x054c,0x057c,0x054c},{0x057d,0x054d,0x057d,0x054d}, -{0x1d7d,0x2c63,0x1d7d,0x2c63},{0x057e,0x054e,0x057e,0x054e},{0x057f,0x054f,0x057f,0x054f},{0x0580,0x0550,0x0580,0x0550}, +{0x057a,0x054a,0x057a,0x054a},{0x057b,0x054b,0x057b,0x054b},{0x057c,0x054c,0x057c,0x054c},{0x1d7d,0x2c63,0x1d7d,0x2c63}, +{0x057d,0x054d,0x057d,0x054d},{0x057e,0x054e,0x057e,0x054e},{0x057f,0x054f,0x057f,0x054f},{0x0580,0x0550,0x0580,0x0550},  {0x0581,0x0551,0x0581,0x0551},{0x0582,0x0552,0x0582,0x0552},{0x0583,0x0553,0x0583,0x0553},{0x0584,0x0554,0x0584,0x0554},  {0x0585,0x0555,0x0585,0x0555},{0x0586,0x0556,0x0586,0x0556},{0x1e00,0x1e00,0x1e01,0x1e00},{0x1e01,0x1e00,0x1e01,0x1e00},  {0x1e02,0x1e02,0x1e03,0x1e02},{0x1e03,0x1e02,0x1e03,0x1e02},{0x1e04,0x1e04,0x1e05,0x1e04},{0x1e05,0x1e04,0x1e05,0x1e04}, @@ -379,45 +379,45 @@ const unicode_char unicode_case_tab[][4]={  {0x1e32,0x1e32,0x1e33,0x1e32},{0x1e33,0x1e32,0x1e33,0x1e32},{0x1e34,0x1e34,0x1e35,0x1e34},{0x1e35,0x1e34,0x1e35,0x1e34},  {0x1e36,0x1e36,0x1e37,0x1e36},{0x1e37,0x1e36,0x1e37,0x1e36},{0x1e38,0x1e38,0x1e39,0x1e38},{0x1e39,0x1e38,0x1e39,0x1e38},  {0x1e3a,0x1e3a,0x1e3b,0x1e3a},{0x1e3b,0x1e3a,0x1e3b,0x1e3a},{0x1e3c,0x1e3c,0x1e3d,0x1e3c},{0x1e3d,0x1e3c,0x1e3d,0x1e3c}, -{0x1e3e,0x1e3e,0x1e3f,0x1e3e},{0x1e3f,0x1e3e,0x1e3f,0x1e3e},{0xa640,0xa640,0xa641,0xa640},{0x1e40,0x1e40,0x1e41,0x1e40}, -{0x1e41,0x1e40,0x1e41,0x1e40},{0xa641,0xa640,0xa641,0xa640},{0x1e42,0x1e42,0x1e43,0x1e42},{0xa642,0xa642,0xa643,0xa642}, -{0xa643,0xa642,0xa643,0xa642},{0x1e43,0x1e42,0x1e43,0x1e42},{0xa644,0xa644,0xa645,0xa644},{0x1e44,0x1e44,0x1e45,0x1e44}, -{0x1e45,0x1e44,0x1e45,0x1e44},{0xa645,0xa644,0xa645,0xa644},{0xa646,0xa646,0xa647,0xa646},{0x1e46,0x1e46,0x1e47,0x1e46}, +{0x1e3e,0x1e3e,0x1e3f,0x1e3e},{0x1e3f,0x1e3e,0x1e3f,0x1e3e},{0x1e40,0x1e40,0x1e41,0x1e40},{0xa640,0xa640,0xa641,0xa640}, +{0xa641,0xa640,0xa641,0xa640},{0x1e41,0x1e40,0x1e41,0x1e40},{0x1e42,0x1e42,0x1e43,0x1e42},{0xa642,0xa642,0xa643,0xa642}, +{0x1e43,0x1e42,0x1e43,0x1e42},{0xa643,0xa642,0xa643,0xa642},{0x1e44,0x1e44,0x1e45,0x1e44},{0xa644,0xa644,0xa645,0xa644}, +{0x1e45,0x1e44,0x1e45,0x1e44},{0xa645,0xa644,0xa645,0xa644},{0x1e46,0x1e46,0x1e47,0x1e46},{0xa646,0xa646,0xa647,0xa646},  {0x1e47,0x1e46,0x1e47,0x1e46},{0xa647,0xa646,0xa647,0xa646},{0x1e48,0x1e48,0x1e49,0x1e48},{0xa648,0xa648,0xa649,0xa648}, -{0x1e49,0x1e48,0x1e49,0x1e48},{0xa649,0xa648,0xa649,0xa648},{0xa64a,0xa64a,0xa64b,0xa64a},{0x1e4a,0x1e4a,0x1e4b,0x1e4a}, +{0x1e49,0x1e48,0x1e49,0x1e48},{0xa649,0xa648,0xa649,0xa648},{0x1e4a,0x1e4a,0x1e4b,0x1e4a},{0xa64a,0xa64a,0xa64b,0xa64a},  {0x1e4b,0x1e4a,0x1e4b,0x1e4a},{0xa64b,0xa64a,0xa64b,0xa64a},{0x1e4c,0x1e4c,0x1e4d,0x1e4c},{0xa64c,0xa64c,0xa64d,0xa64c}, -{0xa64d,0xa64c,0xa64d,0xa64c},{0x1e4d,0x1e4c,0x1e4d,0x1e4c},{0x1e4e,0x1e4e,0x1e4f,0x1e4e},{0xa64e,0xa64e,0xa64f,0xa64e}, -{0xa64f,0xa64e,0xa64f,0xa64e},{0x1e4f,0x1e4e,0x1e4f,0x1e4e},{0xa650,0xa650,0xa651,0xa650},{0x1e50,0x1e50,0x1e51,0x1e50}, -{0x1e51,0x1e50,0x1e51,0x1e50},{0xa651,0xa650,0xa651,0xa650},{0xa652,0xa652,0xa653,0xa652},{0x1e52,0x1e52,0x1e53,0x1e52}, -{0x1e53,0x1e52,0x1e53,0x1e52},{0xa653,0xa652,0xa653,0xa652},{0x1e54,0x1e54,0x1e55,0x1e54},{0xa654,0xa654,0xa655,0xa654}, +{0x1e4d,0x1e4c,0x1e4d,0x1e4c},{0xa64d,0xa64c,0xa64d,0xa64c},{0x1e4e,0x1e4e,0x1e4f,0x1e4e},{0xa64e,0xa64e,0xa64f,0xa64e}, +{0xa64f,0xa64e,0xa64f,0xa64e},{0x1e4f,0x1e4e,0x1e4f,0x1e4e},{0x1e50,0x1e50,0x1e51,0x1e50},{0xa650,0xa650,0xa651,0xa650}, +{0xa651,0xa650,0xa651,0xa650},{0x1e51,0x1e50,0x1e51,0x1e50},{0x1e52,0x1e52,0x1e53,0x1e52},{0xa652,0xa652,0xa653,0xa652}, +{0x1e53,0x1e52,0x1e53,0x1e52},{0xa653,0xa652,0xa653,0xa652},{0xa654,0xa654,0xa655,0xa654},{0x1e54,0x1e54,0x1e55,0x1e54},  {0xa655,0xa654,0xa655,0xa654},{0x1e55,0x1e54,0x1e55,0x1e54},{0x1e56,0x1e56,0x1e57,0x1e56},{0xa656,0xa656,0xa657,0xa656}, -{0xa657,0xa656,0xa657,0xa656},{0x1e57,0x1e56,0x1e57,0x1e56},{0x1e58,0x1e58,0x1e59,0x1e58},{0xa658,0xa658,0xa659,0xa658}, -{0x1e59,0x1e58,0x1e59,0x1e58},{0xa659,0xa658,0xa659,0xa658},{0x1e5a,0x1e5a,0x1e5b,0x1e5a},{0xa65a,0xa65a,0xa65b,0xa65a}, -{0xa65b,0xa65a,0xa65b,0xa65a},{0x1e5b,0x1e5a,0x1e5b,0x1e5a},{0xa65c,0xa65c,0xa65d,0xa65c},{0x1e5c,0x1e5c,0x1e5d,0x1e5c}, -{0xa65d,0xa65c,0xa65d,0xa65c},{0x1e5d,0x1e5c,0x1e5d,0x1e5c},{0xa65e,0xa65e,0xa65f,0xa65e},{0x1e5e,0x1e5e,0x1e5f,0x1e5e}, -{0x1e5f,0x1e5e,0x1e5f,0x1e5e},{0xa65f,0xa65e,0xa65f,0xa65e},{0x1e60,0x1e60,0x1e61,0x1e60},{0xa660,0xa660,0xa661,0xa660}, -{0xa661,0xa660,0xa661,0xa660},{0x1e61,0x1e60,0x1e61,0x1e60},{0xa662,0xa662,0xa663,0xa662},{0x1e62,0x1e62,0x1e63,0x1e62}, -{0xa663,0xa662,0xa663,0xa662},{0x1e63,0x1e62,0x1e63,0x1e62},{0xa664,0xa664,0xa665,0xa664},{0x1e64,0x1e64,0x1e65,0x1e64}, -{0xa665,0xa664,0xa665,0xa664},{0x1e65,0x1e64,0x1e65,0x1e64},{0x1e66,0x1e66,0x1e67,0x1e66},{0xa666,0xa666,0xa667,0xa666}, -{0x1e67,0x1e66,0x1e67,0x1e66},{0xa667,0xa666,0xa667,0xa666},{0xa668,0xa668,0xa669,0xa668},{0x1e68,0x1e68,0x1e69,0x1e68}, +{0x1e57,0x1e56,0x1e57,0x1e56},{0xa657,0xa656,0xa657,0xa656},{0x1e58,0x1e58,0x1e59,0x1e58},{0xa658,0xa658,0xa659,0xa658}, +{0xa659,0xa658,0xa659,0xa658},{0x1e59,0x1e58,0x1e59,0x1e58},{0xa65a,0xa65a,0xa65b,0xa65a},{0x1e5a,0x1e5a,0x1e5b,0x1e5a}, +{0x1e5b,0x1e5a,0x1e5b,0x1e5a},{0xa65b,0xa65a,0xa65b,0xa65a},{0x1e5c,0x1e5c,0x1e5d,0x1e5c},{0xa65c,0xa65c,0xa65d,0xa65c}, +{0x1e5d,0x1e5c,0x1e5d,0x1e5c},{0xa65d,0xa65c,0xa65d,0xa65c},{0x1e5e,0x1e5e,0x1e5f,0x1e5e},{0xa65e,0xa65e,0xa65f,0xa65e}, +{0x1e5f,0x1e5e,0x1e5f,0x1e5e},{0xa65f,0xa65e,0xa65f,0xa65e},{0xa660,0xa660,0xa661,0xa660},{0x1e60,0x1e60,0x1e61,0x1e60}, +{0x1e61,0x1e60,0x1e61,0x1e60},{0xa661,0xa660,0xa661,0xa660},{0xa662,0xa662,0xa663,0xa662},{0x1e62,0x1e62,0x1e63,0x1e62}, +{0x1e63,0x1e62,0x1e63,0x1e62},{0xa663,0xa662,0xa663,0xa662},{0xa664,0xa664,0xa665,0xa664},{0x1e64,0x1e64,0x1e65,0x1e64}, +{0x1e65,0x1e64,0x1e65,0x1e64},{0xa665,0xa664,0xa665,0xa664},{0x1e66,0x1e66,0x1e67,0x1e66},{0xa666,0xa666,0xa667,0xa666}, +{0xa667,0xa666,0xa667,0xa666},{0x1e67,0x1e66,0x1e67,0x1e66},{0xa668,0xa668,0xa669,0xa668},{0x1e68,0x1e68,0x1e69,0x1e68},  {0x1e69,0x1e68,0x1e69,0x1e68},{0xa669,0xa668,0xa669,0xa668},{0x1e6a,0x1e6a,0x1e6b,0x1e6a},{0xa66a,0xa66a,0xa66b,0xa66a}, -{0xa66b,0xa66a,0xa66b,0xa66a},{0x1e6b,0x1e6a,0x1e6b,0x1e6a},{0xa66c,0xa66c,0xa66d,0xa66c},{0x1e6c,0x1e6c,0x1e6d,0x1e6c}, +{0xa66b,0xa66a,0xa66b,0xa66a},{0x1e6b,0x1e6a,0x1e6b,0x1e6a},{0x1e6c,0x1e6c,0x1e6d,0x1e6c},{0xa66c,0xa66c,0xa66d,0xa66c},  {0xa66d,0xa66c,0xa66d,0xa66c},{0x1e6d,0x1e6c,0x1e6d,0x1e6c},{0x1e6e,0x1e6e,0x1e6f,0x1e6e},{0x1e6f,0x1e6e,0x1e6f,0x1e6e},  {0x1e70,0x1e70,0x1e71,0x1e70},{0x1e71,0x1e70,0x1e71,0x1e70},{0x1e72,0x1e72,0x1e73,0x1e72},{0x1e73,0x1e72,0x1e73,0x1e72},  {0x1e74,0x1e74,0x1e75,0x1e74},{0x1e75,0x1e74,0x1e75,0x1e74},{0x1e76,0x1e76,0x1e77,0x1e76},{0x1e77,0x1e76,0x1e77,0x1e76},  {0x1e78,0x1e78,0x1e79,0x1e78},{0x1e79,0x1e78,0x1e79,0x1e78},{0x1e7a,0x1e7a,0x1e7b,0x1e7a},{0x1e7b,0x1e7a,0x1e7b,0x1e7a},  {0x1e7c,0x1e7c,0x1e7d,0x1e7c},{0x1e7d,0x1e7c,0x1e7d,0x1e7c},{0x1e7e,0x1e7e,0x1e7f,0x1e7e},{0x1e7f,0x1e7e,0x1e7f,0x1e7e},  {0xa680,0xa680,0xa681,0xa680},{0x1e80,0x1e80,0x1e81,0x1e80},{0x1e81,0x1e80,0x1e81,0x1e80},{0xa681,0xa680,0xa681,0xa680}, -{0x1e82,0x1e82,0x1e83,0x1e82},{0xa682,0xa682,0xa683,0xa682},{0xa683,0xa682,0xa683,0xa682},{0x1e83,0x1e82,0x1e83,0x1e82}, -{0xa684,0xa684,0xa685,0xa684},{0x1e84,0x1e84,0x1e85,0x1e84},{0xa685,0xa684,0xa685,0xa684},{0x1e85,0x1e84,0x1e85,0x1e84}, +{0xa682,0xa682,0xa683,0xa682},{0x1e82,0x1e82,0x1e83,0x1e82},{0xa683,0xa682,0xa683,0xa682},{0x1e83,0x1e82,0x1e83,0x1e82}, +{0xa684,0xa684,0xa685,0xa684},{0x1e84,0x1e84,0x1e85,0x1e84},{0x1e85,0x1e84,0x1e85,0x1e84},{0xa685,0xa684,0xa685,0xa684},  {0xa686,0xa686,0xa687,0xa686},{0x1e86,0x1e86,0x1e87,0x1e86},{0x1e87,0x1e86,0x1e87,0x1e86},{0xa687,0xa686,0xa687,0xa686}, -{0x1e88,0x1e88,0x1e89,0x1e88},{0xa688,0xa688,0xa689,0xa688},{0x1e89,0x1e88,0x1e89,0x1e88},{0xa689,0xa688,0xa689,0xa688}, +{0x1e88,0x1e88,0x1e89,0x1e88},{0xa688,0xa688,0xa689,0xa688},{0xa689,0xa688,0xa689,0xa688},{0x1e89,0x1e88,0x1e89,0x1e88},  {0x1e8a,0x1e8a,0x1e8b,0x1e8a},{0xa68a,0xa68a,0xa68b,0xa68a},{0xa68b,0xa68a,0xa68b,0xa68a},{0x1e8b,0x1e8a,0x1e8b,0x1e8a}, -{0xa68c,0xa68c,0xa68d,0xa68c},{0x1e8c,0x1e8c,0x1e8d,0x1e8c},{0x1e8d,0x1e8c,0x1e8d,0x1e8c},{0xa68d,0xa68c,0xa68d,0xa68c}, -{0xa68e,0xa68e,0xa68f,0xa68e},{0x1e8e,0x1e8e,0x1e8f,0x1e8e},{0xa68f,0xa68e,0xa68f,0xa68e},{0x1e8f,0x1e8e,0x1e8f,0x1e8e}, -{0x1e90,0x1e90,0x1e91,0x1e90},{0xa690,0xa690,0xa691,0xa690},{0x1e91,0x1e90,0x1e91,0x1e90},{0xa691,0xa690,0xa691,0xa690}, -{0xa692,0xa692,0xa693,0xa692},{0x1e92,0x1e92,0x1e93,0x1e92},{0x1e93,0x1e92,0x1e93,0x1e92},{0xa693,0xa692,0xa693,0xa692}, -{0xa694,0xa694,0xa695,0xa694},{0x1e94,0x1e94,0x1e95,0x1e94},{0x1e95,0x1e94,0x1e95,0x1e94},{0xa695,0xa694,0xa695,0xa694}, +{0xa68c,0xa68c,0xa68d,0xa68c},{0x1e8c,0x1e8c,0x1e8d,0x1e8c},{0xa68d,0xa68c,0xa68d,0xa68c},{0x1e8d,0x1e8c,0x1e8d,0x1e8c}, +{0x1e8e,0x1e8e,0x1e8f,0x1e8e},{0xa68e,0xa68e,0xa68f,0xa68e},{0x1e8f,0x1e8e,0x1e8f,0x1e8e},{0xa68f,0xa68e,0xa68f,0xa68e}, +{0xa690,0xa690,0xa691,0xa690},{0x1e90,0x1e90,0x1e91,0x1e90},{0x1e91,0x1e90,0x1e91,0x1e90},{0xa691,0xa690,0xa691,0xa690}, +{0xa692,0xa692,0xa693,0xa692},{0x1e92,0x1e92,0x1e93,0x1e92},{0xa693,0xa692,0xa693,0xa692},{0x1e93,0x1e92,0x1e93,0x1e92}, +{0xa694,0xa694,0xa695,0xa694},{0x1e94,0x1e94,0x1e95,0x1e94},{0xa695,0xa694,0xa695,0xa694},{0x1e95,0x1e94,0x1e95,0x1e94},  {0xa696,0xa696,0xa697,0xa696},{0xa697,0xa696,0xa697,0xa696},{0x1e9b,0x1e60,0x1e9b,0x1e60},{0x1e9e,0x1e9e,0x00df,0x1e9e},  {0x1ea0,0x1ea0,0x1ea1,0x1ea0},{0x1ea1,0x1ea0,0x1ea1,0x1ea0},{0x1ea2,0x1ea2,0x1ea3,0x1ea2},{0x1ea3,0x1ea2,0x1ea3,0x1ea2},  {0x1ea4,0x1ea4,0x1ea5,0x1ea4},{0x1ea5,0x1ea4,0x1ea5,0x1ea4},{0x1ea6,0x1ea6,0x1ea7,0x1ea6},{0x1ea7,0x1ea6,0x1ea7,0x1ea6}, @@ -450,78 +450,78 @@ const unicode_char unicode_case_tab[][4]={  {0x1f10,0x1f18,0x1f10,0x1f18},{0x1f11,0x1f19,0x1f11,0x1f19},{0x1f12,0x1f1a,0x1f12,0x1f1a},{0x1f13,0x1f1b,0x1f13,0x1f1b},  {0x1f14,0x1f1c,0x1f14,0x1f1c},{0x1f15,0x1f1d,0x1f15,0x1f1d},{0x1f18,0x1f18,0x1f10,0x1f18},{0x1f19,0x1f19,0x1f11,0x1f19},  {0x1f1a,0x1f1a,0x1f12,0x1f1a},{0x1f1b,0x1f1b,0x1f13,0x1f1b},{0x1f1c,0x1f1c,0x1f14,0x1f1c},{0x1f1d,0x1f1d,0x1f15,0x1f1d}, -{0x1f20,0x1f28,0x1f20,0x1f28},{0xff21,0xff21,0xff41,0xff21},{0x1f21,0x1f29,0x1f21,0x1f29},{0x1f22,0x1f2a,0x1f22,0x1f2a}, -{0xa722,0xa722,0xa723,0xa722},{0xff22,0xff22,0xff42,0xff22},{0xa723,0xa722,0xa723,0xa722},{0xff23,0xff23,0xff43,0xff23}, -{0x1f23,0x1f2b,0x1f23,0x1f2b},{0xff24,0xff24,0xff44,0xff24},{0xa724,0xa724,0xa725,0xa724},{0x1f24,0x1f2c,0x1f24,0x1f2c}, -{0x1f25,0x1f2d,0x1f25,0x1f2d},{0xa725,0xa724,0xa725,0xa724},{0xff25,0xff25,0xff45,0xff25},{0xa726,0xa726,0xa727,0xa726}, -{0x1f26,0x1f2e,0x1f26,0x1f2e},{0xff26,0xff26,0xff46,0xff26},{0xa727,0xa726,0xa727,0xa726},{0xff27,0xff27,0xff47,0xff27}, -{0x1f27,0x1f2f,0x1f27,0x1f2f},{0xa728,0xa728,0xa729,0xa728},{0xff28,0xff28,0xff48,0xff28},{0x1f28,0x1f28,0x1f20,0x1f28}, -{0xff29,0xff29,0xff49,0xff29},{0xa729,0xa728,0xa729,0xa728},{0x1f29,0x1f29,0x1f21,0x1f29},{0xff2a,0xff2a,0xff4a,0xff2a}, -{0xa72a,0xa72a,0xa72b,0xa72a},{0x1f2a,0x1f2a,0x1f22,0x1f2a},{0x1f2b,0x1f2b,0x1f23,0x1f2b},{0xa72b,0xa72a,0xa72b,0xa72a}, -{0xff2b,0xff2b,0xff4b,0xff2b},{0xff2c,0xff2c,0xff4c,0xff2c},{0x1f2c,0x1f2c,0x1f24,0x1f2c},{0xa72c,0xa72c,0xa72d,0xa72c}, +{0x1f20,0x1f28,0x1f20,0x1f28},{0xff21,0xff21,0xff41,0xff21},{0x1f21,0x1f29,0x1f21,0x1f29},{0xff22,0xff22,0xff42,0xff22}, +{0x1f22,0x1f2a,0x1f22,0x1f2a},{0xa722,0xa722,0xa723,0xa722},{0xff23,0xff23,0xff43,0xff23},{0xa723,0xa722,0xa723,0xa722}, +{0x1f23,0x1f2b,0x1f23,0x1f2b},{0xff24,0xff24,0xff44,0xff24},{0x1f24,0x1f2c,0x1f24,0x1f2c},{0xa724,0xa724,0xa725,0xa724}, +{0x1f25,0x1f2d,0x1f25,0x1f2d},{0xa725,0xa724,0xa725,0xa724},{0xff25,0xff25,0xff45,0xff25},{0x1f26,0x1f2e,0x1f26,0x1f2e}, +{0xff26,0xff26,0xff46,0xff26},{0xa726,0xa726,0xa727,0xa726},{0xa727,0xa726,0xa727,0xa726},{0x1f27,0x1f2f,0x1f27,0x1f2f}, +{0xff27,0xff27,0xff47,0xff27},{0x1f28,0x1f28,0x1f20,0x1f28},{0xff28,0xff28,0xff48,0xff28},{0xa728,0xa728,0xa729,0xa728}, +{0xa729,0xa728,0xa729,0xa728},{0xff29,0xff29,0xff49,0xff29},{0x1f29,0x1f29,0x1f21,0x1f29},{0x1f2a,0x1f2a,0x1f22,0x1f2a}, +{0xff2a,0xff2a,0xff4a,0xff2a},{0xa72a,0xa72a,0xa72b,0xa72a},{0xa72b,0xa72a,0xa72b,0xa72a},{0x1f2b,0x1f2b,0x1f23,0x1f2b}, +{0xff2b,0xff2b,0xff4b,0xff2b},{0x1f2c,0x1f2c,0x1f24,0x1f2c},{0xff2c,0xff2c,0xff4c,0xff2c},{0xa72c,0xa72c,0xa72d,0xa72c},  {0xa72d,0xa72c,0xa72d,0xa72c},{0xff2d,0xff2d,0xff4d,0xff2d},{0x1f2d,0x1f2d,0x1f25,0x1f2d},{0xff2e,0xff2e,0xff4e,0xff2e}, -{0xa72e,0xa72e,0xa72f,0xa72e},{0x1f2e,0x1f2e,0x1f26,0x1f2e},{0xff2f,0xff2f,0xff4f,0xff2f},{0xa72f,0xa72e,0xa72f,0xa72e}, -{0x1f2f,0x1f2f,0x1f27,0x1f2f},{0xff30,0xff30,0xff50,0xff30},{0x1f30,0x1f38,0x1f30,0x1f38},{0x1f31,0x1f39,0x1f31,0x1f39}, -{0xff31,0xff31,0xff51,0xff31},{0xff32,0xff32,0xff52,0xff32},{0x1f32,0x1f3a,0x1f32,0x1f3a},{0xa732,0xa732,0xa733,0xa732}, -{0xff33,0xff33,0xff53,0xff33},{0x1f33,0x1f3b,0x1f33,0x1f3b},{0xa733,0xa732,0xa733,0xa732},{0xff34,0xff34,0xff54,0xff34}, -{0xa734,0xa734,0xa735,0xa734},{0x1f34,0x1f3c,0x1f34,0x1f3c},{0xa735,0xa734,0xa735,0xa734},{0xff35,0xff35,0xff55,0xff35}, -{0x1f35,0x1f3d,0x1f35,0x1f3d},{0xa736,0xa736,0xa737,0xa736},{0x1f36,0x1f3e,0x1f36,0x1f3e},{0xff36,0xff36,0xff56,0xff36}, -{0xa737,0xa736,0xa737,0xa736},{0x1f37,0x1f3f,0x1f37,0x1f3f},{0xff37,0xff37,0xff57,0xff37},{0xa738,0xa738,0xa739,0xa738}, -{0x1f38,0x1f38,0x1f30,0x1f38},{0xff38,0xff38,0xff58,0xff38},{0xff39,0xff39,0xff59,0xff39},{0xa739,0xa738,0xa739,0xa738}, -{0x1f39,0x1f39,0x1f31,0x1f39},{0x1f3a,0x1f3a,0x1f32,0x1f3a},{0xff3a,0xff3a,0xff5a,0xff3a},{0xa73a,0xa73a,0xa73b,0xa73a}, -{0xa73b,0xa73a,0xa73b,0xa73a},{0x1f3b,0x1f3b,0x1f33,0x1f3b},{0x1f3c,0x1f3c,0x1f34,0x1f3c},{0xa73c,0xa73c,0xa73d,0xa73c}, +{0x1f2e,0x1f2e,0x1f26,0x1f2e},{0xa72e,0xa72e,0xa72f,0xa72e},{0xa72f,0xa72e,0xa72f,0xa72e},{0xff2f,0xff2f,0xff4f,0xff2f}, +{0x1f2f,0x1f2f,0x1f27,0x1f2f},{0xff30,0xff30,0xff50,0xff30},{0x1f30,0x1f38,0x1f30,0x1f38},{0xff31,0xff31,0xff51,0xff31}, +{0x1f31,0x1f39,0x1f31,0x1f39},{0x1f32,0x1f3a,0x1f32,0x1f3a},{0xff32,0xff32,0xff52,0xff32},{0xa732,0xa732,0xa733,0xa732}, +{0x1f33,0x1f3b,0x1f33,0x1f3b},{0xa733,0xa732,0xa733,0xa732},{0xff33,0xff33,0xff53,0xff33},{0xa734,0xa734,0xa735,0xa734}, +{0xff34,0xff34,0xff54,0xff34},{0x1f34,0x1f3c,0x1f34,0x1f3c},{0xa735,0xa734,0xa735,0xa734},{0x1f35,0x1f3d,0x1f35,0x1f3d}, +{0xff35,0xff35,0xff55,0xff35},{0xa736,0xa736,0xa737,0xa736},{0xff36,0xff36,0xff56,0xff36},{0x1f36,0x1f3e,0x1f36,0x1f3e}, +{0xa737,0xa736,0xa737,0xa736},{0xff37,0xff37,0xff57,0xff37},{0x1f37,0x1f3f,0x1f37,0x1f3f},{0x1f38,0x1f38,0x1f30,0x1f38}, +{0xa738,0xa738,0xa739,0xa738},{0xff38,0xff38,0xff58,0xff38},{0xa739,0xa738,0xa739,0xa738},{0xff39,0xff39,0xff59,0xff39}, +{0x1f39,0x1f39,0x1f31,0x1f39},{0xa73a,0xa73a,0xa73b,0xa73a},{0xff3a,0xff3a,0xff5a,0xff3a},{0x1f3a,0x1f3a,0x1f32,0x1f3a}, +{0x1f3b,0x1f3b,0x1f33,0x1f3b},{0xa73b,0xa73a,0xa73b,0xa73a},{0xa73c,0xa73c,0xa73d,0xa73c},{0x1f3c,0x1f3c,0x1f34,0x1f3c},  {0x1f3d,0x1f3d,0x1f35,0x1f3d},{0xa73d,0xa73c,0xa73d,0xa73c},{0x1f3e,0x1f3e,0x1f36,0x1f3e},{0xa73e,0xa73e,0xa73f,0xa73e}, -{0xa73f,0xa73e,0xa73f,0xa73e},{0x1f3f,0x1f3f,0x1f37,0x1f3f},{0x1f40,0x1f48,0x1f40,0x1f48},{0xa740,0xa740,0xa741,0xa740}, -{0xa741,0xa740,0xa741,0xa740},{0xff41,0xff21,0xff41,0xff21},{0x1f41,0x1f49,0x1f41,0x1f49},{0xa742,0xa742,0xa743,0xa742}, -{0xff42,0xff22,0xff42,0xff22},{0x1f42,0x1f4a,0x1f42,0x1f4a},{0x1f43,0x1f4b,0x1f43,0x1f4b},{0xff43,0xff23,0xff43,0xff23}, -{0xa743,0xa742,0xa743,0xa742},{0xa744,0xa744,0xa745,0xa744},{0x1f44,0x1f4c,0x1f44,0x1f4c},{0xff44,0xff24,0xff44,0xff24}, -{0x1f45,0x1f4d,0x1f45,0x1f4d},{0xff45,0xff25,0xff45,0xff25},{0xa745,0xa744,0xa745,0xa744},{0xa746,0xa746,0xa747,0xa746}, -{0xff46,0xff26,0xff46,0xff26},{0xa747,0xa746,0xa747,0xa746},{0xff47,0xff27,0xff47,0xff27},{0xff48,0xff28,0xff48,0xff28}, -{0xa748,0xa748,0xa749,0xa748},{0x1f48,0x1f48,0x1f40,0x1f48},{0xff49,0xff29,0xff49,0xff29},{0xa749,0xa748,0xa749,0xa748}, -{0x1f49,0x1f49,0x1f41,0x1f49},{0xff4a,0xff2a,0xff4a,0xff2a},{0x1f4a,0x1f4a,0x1f42,0x1f4a},{0xa74a,0xa74a,0xa74b,0xa74a}, -{0x1f4b,0x1f4b,0x1f43,0x1f4b},{0xa74b,0xa74a,0xa74b,0xa74a},{0xff4b,0xff2b,0xff4b,0xff2b},{0xff4c,0xff2c,0xff4c,0xff2c}, -{0x1f4c,0x1f4c,0x1f44,0x1f4c},{0xa74c,0xa74c,0xa74d,0xa74c},{0xff4d,0xff2d,0xff4d,0xff2d},{0x1f4d,0x1f4d,0x1f45,0x1f4d}, -{0xa74d,0xa74c,0xa74d,0xa74c},{0xa74e,0xa74e,0xa74f,0xa74e},{0xff4e,0xff2e,0xff4e,0xff2e},{0xff4f,0xff2f,0xff4f,0xff2f}, -{0xa74f,0xa74e,0xa74f,0xa74e},{0xff50,0xff30,0xff50,0xff30},{0xa750,0xa750,0xa751,0xa750},{0xff51,0xff31,0xff51,0xff31}, -{0x1f51,0x1f59,0x1f51,0x1f59},{0xa751,0xa750,0xa751,0xa750},{0xa752,0xa752,0xa753,0xa752},{0xff52,0xff32,0xff52,0xff32}, -{0x1f53,0x1f5b,0x1f53,0x1f5b},{0xff53,0xff33,0xff53,0xff33},{0xa753,0xa752,0xa753,0xa752},{0xff54,0xff34,0xff54,0xff34}, -{0xa754,0xa754,0xa755,0xa754},{0xa755,0xa754,0xa755,0xa754},{0xff55,0xff35,0xff55,0xff35},{0x1f55,0x1f5d,0x1f55,0x1f5d}, -{0xa756,0xa756,0xa757,0xa756},{0xff56,0xff36,0xff56,0xff36},{0xa757,0xa756,0xa757,0xa756},{0x1f57,0x1f5f,0x1f57,0x1f5f}, -{0xff57,0xff37,0xff57,0xff37},{0xff58,0xff38,0xff58,0xff38},{0xa758,0xa758,0xa759,0xa758},{0x1f59,0x1f59,0x1f51,0x1f59}, -{0xa759,0xa758,0xa759,0xa758},{0xff59,0xff39,0xff59,0xff39},{0xff5a,0xff3a,0xff5a,0xff3a},{0xa75a,0xa75a,0xa75b,0xa75a}, -{0xa75b,0xa75a,0xa75b,0xa75a},{0x1f5b,0x1f5b,0x1f53,0x1f5b},{0xa75c,0xa75c,0xa75d,0xa75c},{0xa75d,0xa75c,0xa75d,0xa75c}, -{0x1f5d,0x1f5d,0x1f55,0x1f5d},{0xa75e,0xa75e,0xa75f,0xa75e},{0x1f5f,0x1f5f,0x1f57,0x1f5f},{0xa75f,0xa75e,0xa75f,0xa75e}, -{0x1f60,0x1f68,0x1f60,0x1f68},{0xa760,0xa760,0xa761,0xa760},{0xa761,0xa760,0xa761,0xa760},{0x1f61,0x1f69,0x1f61,0x1f69}, -{0x1f62,0x1f6a,0x1f62,0x1f6a},{0xa762,0xa762,0xa763,0xa762},{0xa763,0xa762,0xa763,0xa762},{0x1f63,0x1f6b,0x1f63,0x1f6b}, +{0xa73f,0xa73e,0xa73f,0xa73e},{0x1f3f,0x1f3f,0x1f37,0x1f3f},{0xa740,0xa740,0xa741,0xa740},{0x1f40,0x1f48,0x1f40,0x1f48}, +{0xa741,0xa740,0xa741,0xa740},{0xff41,0xff21,0xff41,0xff21},{0x1f41,0x1f49,0x1f41,0x1f49},{0xff42,0xff22,0xff42,0xff22}, +{0xa742,0xa742,0xa743,0xa742},{0x1f42,0x1f4a,0x1f42,0x1f4a},{0x1f43,0x1f4b,0x1f43,0x1f4b},{0xff43,0xff23,0xff43,0xff23}, +{0xa743,0xa742,0xa743,0xa742},{0x1f44,0x1f4c,0x1f44,0x1f4c},{0xff44,0xff24,0xff44,0xff24},{0xa744,0xa744,0xa745,0xa744}, +{0xa745,0xa744,0xa745,0xa744},{0x1f45,0x1f4d,0x1f45,0x1f4d},{0xff45,0xff25,0xff45,0xff25},{0xff46,0xff26,0xff46,0xff26}, +{0xa746,0xa746,0xa747,0xa746},{0xff47,0xff27,0xff47,0xff27},{0xa747,0xa746,0xa747,0xa746},{0x1f48,0x1f48,0x1f40,0x1f48}, +{0xff48,0xff28,0xff48,0xff28},{0xa748,0xa748,0xa749,0xa748},{0xa749,0xa748,0xa749,0xa748},{0x1f49,0x1f49,0x1f41,0x1f49}, +{0xff49,0xff29,0xff49,0xff29},{0xa74a,0xa74a,0xa74b,0xa74a},{0xff4a,0xff2a,0xff4a,0xff2a},{0x1f4a,0x1f4a,0x1f42,0x1f4a}, +{0x1f4b,0x1f4b,0x1f43,0x1f4b},{0xa74b,0xa74a,0xa74b,0xa74a},{0xff4b,0xff2b,0xff4b,0xff2b},{0x1f4c,0x1f4c,0x1f44,0x1f4c}, +{0xff4c,0xff2c,0xff4c,0xff2c},{0xa74c,0xa74c,0xa74d,0xa74c},{0xa74d,0xa74c,0xa74d,0xa74c},{0x1f4d,0x1f4d,0x1f45,0x1f4d}, +{0xff4d,0xff2d,0xff4d,0xff2d},{0xff4e,0xff2e,0xff4e,0xff2e},{0xa74e,0xa74e,0xa74f,0xa74e},{0xff4f,0xff2f,0xff4f,0xff2f}, +{0xa74f,0xa74e,0xa74f,0xa74e},{0xa750,0xa750,0xa751,0xa750},{0xff50,0xff30,0xff50,0xff30},{0xa751,0xa750,0xa751,0xa750}, +{0x1f51,0x1f59,0x1f51,0x1f59},{0xff51,0xff31,0xff51,0xff31},{0xa752,0xa752,0xa753,0xa752},{0xff52,0xff32,0xff52,0xff32}, +{0xa753,0xa752,0xa753,0xa752},{0xff53,0xff33,0xff53,0xff33},{0x1f53,0x1f5b,0x1f53,0x1f5b},{0xa754,0xa754,0xa755,0xa754}, +{0xff54,0xff34,0xff54,0xff34},{0xff55,0xff35,0xff55,0xff35},{0xa755,0xa754,0xa755,0xa754},{0x1f55,0x1f5d,0x1f55,0x1f5d}, +{0xa756,0xa756,0xa757,0xa756},{0xff56,0xff36,0xff56,0xff36},{0x1f57,0x1f5f,0x1f57,0x1f5f},{0xff57,0xff37,0xff57,0xff37}, +{0xa757,0xa756,0xa757,0xa756},{0xff58,0xff38,0xff58,0xff38},{0xa758,0xa758,0xa759,0xa758},{0xff59,0xff39,0xff59,0xff39}, +{0x1f59,0x1f59,0x1f51,0x1f59},{0xa759,0xa758,0xa759,0xa758},{0xff5a,0xff3a,0xff5a,0xff3a},{0xa75a,0xa75a,0xa75b,0xa75a}, +{0xa75b,0xa75a,0xa75b,0xa75a},{0x1f5b,0x1f5b,0x1f53,0x1f5b},{0xa75c,0xa75c,0xa75d,0xa75c},{0x1f5d,0x1f5d,0x1f55,0x1f5d}, +{0xa75d,0xa75c,0xa75d,0xa75c},{0xa75e,0xa75e,0xa75f,0xa75e},{0x1f5f,0x1f5f,0x1f57,0x1f5f},{0xa75f,0xa75e,0xa75f,0xa75e}, +{0x1f60,0x1f68,0x1f60,0x1f68},{0xa760,0xa760,0xa761,0xa760},{0x1f61,0x1f69,0x1f61,0x1f69},{0xa761,0xa760,0xa761,0xa760}, +{0xa762,0xa762,0xa763,0xa762},{0x1f62,0x1f6a,0x1f62,0x1f6a},{0xa763,0xa762,0xa763,0xa762},{0x1f63,0x1f6b,0x1f63,0x1f6b},  {0xa764,0xa764,0xa765,0xa764},{0x1f64,0x1f6c,0x1f64,0x1f6c},{0xa765,0xa764,0xa765,0xa764},{0x1f65,0x1f6d,0x1f65,0x1f6d}, -{0x1f66,0x1f6e,0x1f66,0x1f6e},{0xa766,0xa766,0xa767,0xa766},{0x1f67,0x1f6f,0x1f67,0x1f6f},{0xa767,0xa766,0xa767,0xa766}, -{0x1f68,0x1f68,0x1f60,0x1f68},{0xa768,0xa768,0xa769,0xa768},{0xa769,0xa768,0xa769,0xa768},{0x1f69,0x1f69,0x1f61,0x1f69}, +{0xa766,0xa766,0xa767,0xa766},{0x1f66,0x1f6e,0x1f66,0x1f6e},{0x1f67,0x1f6f,0x1f67,0x1f6f},{0xa767,0xa766,0xa767,0xa766}, +{0xa768,0xa768,0xa769,0xa768},{0x1f68,0x1f68,0x1f60,0x1f68},{0xa769,0xa768,0xa769,0xa768},{0x1f69,0x1f69,0x1f61,0x1f69},  {0x1f6a,0x1f6a,0x1f62,0x1f6a},{0xa76a,0xa76a,0xa76b,0xa76a},{0xa76b,0xa76a,0xa76b,0xa76a},{0x1f6b,0x1f6b,0x1f63,0x1f6b},  {0xa76c,0xa76c,0xa76d,0xa76c},{0x1f6c,0x1f6c,0x1f64,0x1f6c},{0x1f6d,0x1f6d,0x1f65,0x1f6d},{0xa76d,0xa76c,0xa76d,0xa76c}, -{0x1f6e,0x1f6e,0x1f66,0x1f6e},{0xa76e,0xa76e,0xa76f,0xa76e},{0xa76f,0xa76e,0xa76f,0xa76e},{0x1f6f,0x1f6f,0x1f67,0x1f6f}, +{0x1f6e,0x1f6e,0x1f66,0x1f6e},{0xa76e,0xa76e,0xa76f,0xa76e},{0x1f6f,0x1f6f,0x1f67,0x1f6f},{0xa76f,0xa76e,0xa76f,0xa76e},  {0x1f70,0x1fba,0x1f70,0x1fba},{0x1f71,0x1fbb,0x1f71,0x1fbb},{0x1f72,0x1fc8,0x1f72,0x1fc8},{0x1f73,0x1fc9,0x1f73,0x1fc9},  {0x1f74,0x1fca,0x1f74,0x1fca},{0x1f75,0x1fcb,0x1f75,0x1fcb},{0x1f76,0x1fda,0x1f76,0x1fda},{0x1f77,0x1fdb,0x1f77,0x1fdb},  {0x1f78,0x1ff8,0x1f78,0x1ff8},{0x1f79,0x1ff9,0x1f79,0x1ff9},{0xa779,0xa779,0xa77a,0xa779},{0xa77a,0xa779,0xa77a,0xa779}, -{0x1f7a,0x1fea,0x1f7a,0x1fea},{0x1f7b,0x1feb,0x1f7b,0x1feb},{0xa77b,0xa77b,0xa77c,0xa77b},{0xa77c,0xa77b,0xa77c,0xa77b}, +{0x1f7a,0x1fea,0x1f7a,0x1fea},{0xa77b,0xa77b,0xa77c,0xa77b},{0x1f7b,0x1feb,0x1f7b,0x1feb},{0xa77c,0xa77b,0xa77c,0xa77b},  {0x1f7c,0x1ffa,0x1f7c,0x1ffa},{0xa77d,0xa77d,0x1d79,0xa77d},{0x1f7d,0x1ffb,0x1f7d,0x1ffb},{0xa77e,0xa77e,0xa77f,0xa77e}, -{0xa77f,0xa77e,0xa77f,0xa77e},{0x1f80,0x1f88,0x1f80,0x1f88},{0xa780,0xa780,0xa781,0xa780},{0x1f81,0x1f89,0x1f81,0x1f89}, -{0xa781,0xa780,0xa781,0xa780},{0xa782,0xa782,0xa783,0xa782},{0x1f82,0x1f8a,0x1f82,0x1f8a},{0xa783,0xa782,0xa783,0xa782}, -{0x1f83,0x1f8b,0x1f83,0x1f8b},{0xa784,0xa784,0xa785,0xa784},{0x1f84,0x1f8c,0x1f84,0x1f8c},{0x1f85,0x1f8d,0x1f85,0x1f8d}, -{0xa785,0xa784,0xa785,0xa784},{0xa786,0xa786,0xa787,0xa786},{0x1f86,0x1f8e,0x1f86,0x1f8e},{0xa787,0xa786,0xa787,0xa786}, -{0x1f87,0x1f8f,0x1f87,0x1f8f},{0x1f88,0x1f88,0x1f80,0x1f88},{0x1f89,0x1f89,0x1f81,0x1f89},{0x1f8a,0x1f8a,0x1f82,0x1f8a}, -{0x1f8b,0x1f8b,0x1f83,0x1f8b},{0xa78b,0xa78b,0xa78c,0xa78b},{0xa78c,0xa78b,0xa78c,0xa78b},{0x1f8c,0x1f8c,0x1f84,0x1f8c}, +{0xa77f,0xa77e,0xa77f,0xa77e},{0xa780,0xa780,0xa781,0xa780},{0x1f80,0x1f88,0x1f80,0x1f88},{0x1f81,0x1f89,0x1f81,0x1f89}, +{0xa781,0xa780,0xa781,0xa780},{0x1f82,0x1f8a,0x1f82,0x1f8a},{0xa782,0xa782,0xa783,0xa782},{0x1f83,0x1f8b,0x1f83,0x1f8b}, +{0xa783,0xa782,0xa783,0xa782},{0xa784,0xa784,0xa785,0xa784},{0x1f84,0x1f8c,0x1f84,0x1f8c},{0xa785,0xa784,0xa785,0xa784}, +{0x1f85,0x1f8d,0x1f85,0x1f8d},{0xa786,0xa786,0xa787,0xa786},{0x1f86,0x1f8e,0x1f86,0x1f8e},{0x1f87,0x1f8f,0x1f87,0x1f8f}, +{0xa787,0xa786,0xa787,0xa786},{0x1f88,0x1f88,0x1f80,0x1f88},{0x1f89,0x1f89,0x1f81,0x1f89},{0x1f8a,0x1f8a,0x1f82,0x1f8a}, +{0xa78b,0xa78b,0xa78c,0xa78b},{0x1f8b,0x1f8b,0x1f83,0x1f8b},{0xa78c,0xa78b,0xa78c,0xa78b},{0x1f8c,0x1f8c,0x1f84,0x1f8c},  {0xa78d,0xa78d,0x0265,0xa78d},{0x1f8d,0x1f8d,0x1f85,0x1f8d},{0x1f8e,0x1f8e,0x1f86,0x1f8e},{0x1f8f,0x1f8f,0x1f87,0x1f8f}, -{0x1f90,0x1f98,0x1f90,0x1f98},{0xa790,0xa790,0xa791,0xa790},{0xa791,0xa790,0xa791,0xa790},{0x1f91,0x1f99,0x1f91,0x1f99}, -{0xa792,0xa792,0xa793,0xa792},{0x1f92,0x1f9a,0x1f92,0x1f9a},{0x1f93,0x1f9b,0x1f93,0x1f9b},{0xa793,0xa792,0xa793,0xa792}, +{0xa790,0xa790,0xa791,0xa790},{0x1f90,0x1f98,0x1f90,0x1f98},{0xa791,0xa790,0xa791,0xa790},{0x1f91,0x1f99,0x1f91,0x1f99}, +{0x1f92,0x1f9a,0x1f92,0x1f9a},{0xa792,0xa792,0xa793,0xa792},{0x1f93,0x1f9b,0x1f93,0x1f9b},{0xa793,0xa792,0xa793,0xa792},  {0x1f94,0x1f9c,0x1f94,0x1f9c},{0x1f95,0x1f9d,0x1f95,0x1f9d},{0x1f96,0x1f9e,0x1f96,0x1f9e},{0x1f97,0x1f9f,0x1f97,0x1f9f},  {0x1f98,0x1f98,0x1f90,0x1f98},{0x1f99,0x1f99,0x1f91,0x1f99},{0x1f9a,0x1f9a,0x1f92,0x1f9a},{0x1f9b,0x1f9b,0x1f93,0x1f9b},  {0x1f9c,0x1f9c,0x1f94,0x1f9c},{0x1f9d,0x1f9d,0x1f95,0x1f9d},{0x1f9e,0x1f9e,0x1f96,0x1f9e},{0x1f9f,0x1f9f,0x1f97,0x1f9f}, -{0x1fa0,0x1fa8,0x1fa0,0x1fa8},{0xa7a0,0xa7a0,0xa7a1,0xa7a0},{0x1fa1,0x1fa9,0x1fa1,0x1fa9},{0xa7a1,0xa7a0,0xa7a1,0xa7a0}, -{0x1fa2,0x1faa,0x1fa2,0x1faa},{0xa7a2,0xa7a2,0xa7a3,0xa7a2},{0x1fa3,0x1fab,0x1fa3,0x1fab},{0xa7a3,0xa7a2,0xa7a3,0xa7a2}, -{0x1fa4,0x1fac,0x1fa4,0x1fac},{0xa7a4,0xa7a4,0xa7a5,0xa7a4},{0xa7a5,0xa7a4,0xa7a5,0xa7a4},{0x1fa5,0x1fad,0x1fa5,0x1fad}, -{0xa7a6,0xa7a6,0xa7a7,0xa7a6},{0x1fa6,0x1fae,0x1fa6,0x1fae},{0xa7a7,0xa7a6,0xa7a7,0xa7a6},{0x1fa7,0x1faf,0x1fa7,0x1faf}, -{0x1fa8,0x1fa8,0x1fa0,0x1fa8},{0xa7a8,0xa7a8,0xa7a9,0xa7a8},{0x1fa9,0x1fa9,0x1fa1,0x1fa9},{0xa7a9,0xa7a8,0xa7a9,0xa7a8}, -{0x1faa,0x1faa,0x1fa2,0x1faa},{0xa7aa,0xa7aa,0x0266,0xa7aa},{0x1fab,0x1fab,0x1fa3,0x1fab},{0x1fac,0x1fac,0x1fa4,0x1fac}, +{0xa7a0,0xa7a0,0xa7a1,0xa7a0},{0x1fa0,0x1fa8,0x1fa0,0x1fa8},{0x1fa1,0x1fa9,0x1fa1,0x1fa9},{0xa7a1,0xa7a0,0xa7a1,0xa7a0}, +{0xa7a2,0xa7a2,0xa7a3,0xa7a2},{0x1fa2,0x1faa,0x1fa2,0x1faa},{0xa7a3,0xa7a2,0xa7a3,0xa7a2},{0x1fa3,0x1fab,0x1fa3,0x1fab}, +{0xa7a4,0xa7a4,0xa7a5,0xa7a4},{0x1fa4,0x1fac,0x1fa4,0x1fac},{0x1fa5,0x1fad,0x1fa5,0x1fad},{0xa7a5,0xa7a4,0xa7a5,0xa7a4}, +{0x1fa6,0x1fae,0x1fa6,0x1fae},{0xa7a6,0xa7a6,0xa7a7,0xa7a6},{0x1fa7,0x1faf,0x1fa7,0x1faf},{0xa7a7,0xa7a6,0xa7a7,0xa7a6}, +{0xa7a8,0xa7a8,0xa7a9,0xa7a8},{0x1fa8,0x1fa8,0x1fa0,0x1fa8},{0x1fa9,0x1fa9,0x1fa1,0x1fa9},{0xa7a9,0xa7a8,0xa7a9,0xa7a8}, +{0xa7aa,0xa7aa,0x0266,0xa7aa},{0x1faa,0x1faa,0x1fa2,0x1faa},{0x1fab,0x1fab,0x1fa3,0x1fab},{0x1fac,0x1fac,0x1fa4,0x1fac},  {0x1fad,0x1fad,0x1fa5,0x1fad},{0x1fae,0x1fae,0x1fa6,0x1fae},{0x1faf,0x1faf,0x1fa7,0x1faf},{0x1fb0,0x1fb8,0x1fb0,0x1fb8},  {0x1fb1,0x1fb9,0x1fb1,0x1fb9},{0x1fb3,0x1fbc,0x1fb3,0x1fbc},{0x1fb8,0x1fb8,0x1fb0,0x1fb8},{0x1fb9,0x1fb9,0x1fb1,0x1fb9},  {0x1fba,0x1fba,0x1f70,0x1fba},{0x1fbb,0x1fbb,0x1f71,0x1fbb},{0x1fbc,0x1fbc,0x1fb3,0x1fbc},{0x1fbe,0x0399,0x1fbe,0x0399}, diff --git a/unicode/unicodecpp.C b/unicode/unicodecpp.C index e5c2824..87e1cc5 100644 --- a/unicode/unicodecpp.C +++ b/unicode/unicodecpp.C @@ -11,26 +11,26 @@ extern "C" {  	static int iconv_trampoline(const char *str, size_t cnt, void *arg)  	{ -		return reinterpret_cast<mail::iconvert *>(arg) +		return reinterpret_cast<unicode::iconvert *>(arg)  			->converted(str, cnt);  	} -	int mail::linebreak_trampoline(int value, void *ptr) +	int unicode::linebreak_trampoline(int value, void *ptr)  	{ -		return (*reinterpret_cast<mail::linebreak_callback_base *> -			(ptr))(value); +		return (*reinterpret_cast<unicode::linebreak_callback_base *> +			(ptr)).callback(value);  	} -	int mail::linebreakc_trampoline(int value, unicode_char ch, void *ptr) +	int unicode::linebreakc_trampoline(int value, unicode_char ch, void *ptr)  	{ -		return (*reinterpret_cast<mail::linebreakc_callback_base *> -			(ptr))(value, ch); +		return (*reinterpret_cast<unicode::linebreakc_callback_base *> +			(ptr)).callback(value, ch);  	} -	int mail::wordbreak_trampoline(int value, void *ptr) +	int unicode::wordbreak_trampoline(int value, void *ptr)  	{ -		return (*reinterpret_cast<mail::wordbreak_callback_base *> -			(ptr))(value != 0); +		return (*reinterpret_cast<unicode::wordbreak_callback_base *> +			(ptr)).callback(value != 0);  	}  } @@ -45,26 +45,26 @@ size_t unicode_wcwidth(const std::vector<unicode_char> &uc)  	return w;  } -mail::iconvert::iconvert() : handle(NULL) +unicode::iconvert::iconvert() : handle(NULL)  {  } -mail::iconvert::~iconvert() +unicode::iconvert::~iconvert()  {  	end();  } -int mail::iconvert::converted(const char *, size_t) +int unicode::iconvert::converted(const char *, size_t)  {  	return 0;  } -bool mail::iconvert::begin(const std::string &src_chset, +bool unicode::iconvert::begin(const std::string &src_chset,  			   const std::string &dst_chset)  {  	end(); -	if ((handle=libmail_u_convert_init(src_chset.c_str(), +	if ((handle=unicode_convert_init(src_chset.c_str(),  					   dst_chset.c_str(),  					   &iconv_trampoline,  					   this)) == NULL) @@ -72,7 +72,7 @@ bool mail::iconvert::begin(const std::string &src_chset,  	return true;  } -bool mail::iconvert::end(bool *errflag) +bool unicode::iconvert::end(bool *errflag)  {  	int errptr; @@ -81,7 +81,7 @@ bool mail::iconvert::end(bool *errflag)  	if (!handle)  		return true; -	rc=libmail_u_convert_deinit(handle, &errptr); +	rc=unicode_convert_deinit(handle, &errptr);  	handle=NULL;  	if (errflag) @@ -89,23 +89,23 @@ bool mail::iconvert::end(bool *errflag)  	return rc == 0;  } -bool mail::iconvert::operator()(const char *str, size_t cnt) +bool unicode::iconvert::operator()(const char *str, size_t cnt)  {  	if (!handle)  		return false; -	return (libmail_u_convert(handle, str, cnt) == 0); +	return (unicode_convert(handle, str, cnt) == 0);  } -bool mail::iconvert::operator()(const unicode_char *str, size_t cnt) +bool unicode::iconvert::operator()(const unicode_char *str, size_t cnt)  {  	if (!handle)  		return false; -	return (libmail_u_convert_uc(handle, str, cnt) == 0); +	return (unicode_convert_uc(handle, str, cnt) == 0);  } -std::string mail::iconvert::convert(const std::string &text, +std::string unicode::iconvert::convert(const std::string &text,  				    const std::string &charset,  				    const std::string &dstcharset,  				    bool &errflag) @@ -113,7 +113,7 @@ std::string mail::iconvert::convert(const std::string &text,  	std::string buf;  	int errptr; -	char *p=libmail_u_convert_tobuf(text.c_str(), +	char *p=unicode_convert_tobuf(text.c_str(),  					charset.c_str(),  					dstcharset.c_str(),  					&errptr); @@ -132,7 +132,7 @@ std::string mail::iconvert::convert(const std::string &text,  } -std::string mail::iconvert::convert(const std::vector<unicode_char> &uc, +std::string unicode::iconvert::convert(const std::vector<unicode_char> &uc,  				    const std::string &dstcharset,  				    bool &errflag)  { @@ -142,7 +142,7 @@ std::string mail::iconvert::convert(const std::vector<unicode_char> &uc,  	size_t csize;  	int err; -	if (libmail_u_convert_fromu_tobuf(&uc[0], uc.size(), +	if (unicode_convert_fromu_tobuf(&uc[0], uc.size(),  					  dstcharset.c_str(), &c, &csize,  					  &err))  	{ @@ -167,7 +167,7 @@ std::string mail::iconvert::convert(const std::vector<unicode_char> &uc,  	return buf;  } -bool mail::iconvert::convert(const std::string &text, +bool unicode::iconvert::convert(const std::string &text,  			     const std::string &charset,  			     std::vector<unicode_char> &uc)  { @@ -176,7 +176,7 @@ bool mail::iconvert::convert(const std::string &text,  	unicode_char *ucbuf;  	size_t ucsize; -	if (libmail_u_convert_tou_tobuf(text.c_str(), +	if (unicode_convert_tou_tobuf(text.c_str(),  					text.size(),  					charset.c_str(),  					&ucbuf, @@ -198,35 +198,35 @@ bool mail::iconvert::convert(const std::string &text,  	return err == 0;  } -int mail::iconvert::tou::converted(const unicode_char *, size_t) +int unicode::iconvert::tou::converted(const unicode_char *, size_t)  {  	return 0;  } -bool mail::iconvert::tou::begin(const std::string &chset) +bool unicode::iconvert::tou::begin(const std::string &chset)  { -	return iconvert::begin(chset, libmail_u_ucs4_native); +	return iconvert::begin(chset, unicode_u_ucs4_native);  } -int mail::iconvert::tou::converted(const char *ptr, size_t cnt) +int unicode::iconvert::tou::converted(const char *ptr, size_t cnt)  {  	return converted(reinterpret_cast<const unicode_char *>(ptr),  			 cnt/sizeof(unicode_char));  } -void mail::iconvert::tou::convert(const std::string &str, +void unicode::iconvert::tou::convert(const std::string &str,  				  const std::string &chset,  				  std::vector<unicode_char> &out_buf)  {  	convert(str.begin(), str.end(), chset, out_buf);  } -bool mail::iconvert::fromu::begin(const std::string &chset) +bool unicode::iconvert::fromu::begin(const std::string &chset)  { -	return iconvert::begin(libmail_u_ucs4_native, chset); +	return iconvert::begin(unicode_u_ucs4_native, chset);  } -std::string mail::iconvert::fromu::convert(const std::vector<unicode_char> +std::string unicode::iconvert::fromu::convert(const std::vector<unicode_char>  					   &ubuf,  					   const std::string &chset)  { @@ -236,14 +236,14 @@ std::string mail::iconvert::fromu::convert(const std::vector<unicode_char>  	return s;  } -void mail::iconvert::fromu::convert(const std::vector<unicode_char> &ubuf, +void unicode::iconvert::fromu::convert(const std::vector<unicode_char> &ubuf,  				    const std::string &chset,  				    std::string &out_buf)  {  	convert(ubuf.begin(), ubuf.end(), chset, out_buf);  } -std::string mail::iconvert::convert_tocase(const std::string &text, +std::string unicode::iconvert::convert_tocase(const std::string &text,  					   const std::string &charset,  					   bool &err,  					   unicode_char (*first_char_func)(unicode_char), @@ -252,7 +252,7 @@ std::string mail::iconvert::convert_tocase(const std::string &text,  	err=false;  	std::string s; -	char *p=libmail_u_convert_tocase(text.c_str(), +	char *p=unicode_convert_tocase(text.c_str(),  					 charset.c_str(),  					 first_char_func,  					 char_func); @@ -273,13 +273,13 @@ std::string mail::iconvert::convert_tocase(const std::string &text,  	return s;  } -mail::linebreak_callback_base::linebreak_callback_base() +unicode::linebreak_callback_base::linebreak_callback_base()  	: handle(NULL), opts(0)  {  } -void mail::linebreak_callback_base::set_opts(int optsArg) +void unicode::linebreak_callback_base::set_opts(int optsArg)  {  	opts=optsArg; @@ -287,18 +287,13 @@ void mail::linebreak_callback_base::set_opts(int optsArg)  		unicode_lb_set_opts(handle, opts);  } -mail::linebreak_callback_base::~linebreak_callback_base() +unicode::linebreak_callback_base::~linebreak_callback_base()  {  	finish();  } -int mail::linebreak_callback_base::operator()(int) -{ -	return 0; -} - -mail::linebreak_callback_base -&mail::linebreak_callback_base::operator<<(unicode_char uc) +unicode::linebreak_callback_base +&unicode::linebreak_callback_base::operator<<(unicode_char uc)  {  	if (!handle)  	{ @@ -315,7 +310,7 @@ mail::linebreak_callback_base  	return *this;  } -void mail::linebreak_callback_base::finish() +void unicode::linebreak_callback_base::finish()  {  	if (handle)  		unicode_lb_end(handle); @@ -323,36 +318,31 @@ void mail::linebreak_callback_base::finish()  } -mail::linebreak_callback_save_buf::linebreak_callback_save_buf() +unicode::linebreak_callback_save_buf::linebreak_callback_save_buf()  {  } -mail::linebreak_callback_save_buf::~linebreak_callback_save_buf() +unicode::linebreak_callback_save_buf::~linebreak_callback_save_buf()  {  } -int mail::linebreak_callback_save_buf::operator()(int value) +int unicode::linebreak_callback_save_buf::callback(int value)  {  	lb_buf.push_back(value);  	return 0;  } -mail::linebreakc_callback_base::linebreakc_callback_base() +unicode::linebreakc_callback_base::linebreakc_callback_base()  	: handle(NULL), opts(0)  {  } -mail::linebreakc_callback_base::~linebreakc_callback_base() +unicode::linebreakc_callback_base::~linebreakc_callback_base()  {  	finish();  } -int mail::linebreakc_callback_base::operator()(int, unicode_char) -{ -	return 0; -} - -void mail::linebreakc_callback_base::set_opts(int optsArg) +void unicode::linebreakc_callback_base::set_opts(int optsArg)  {  	opts=optsArg; @@ -360,8 +350,8 @@ void mail::linebreakc_callback_base::set_opts(int optsArg)  		unicode_lbc_set_opts(handle, opts);  } -mail::linebreakc_callback_base -&mail::linebreakc_callback_base::operator<<(unicode_char uc) +unicode::linebreakc_callback_base +&unicode::linebreakc_callback_base::operator<<(unicode_char uc)  {  	if (handle == NULL)  	{ @@ -378,7 +368,7 @@ mail::linebreakc_callback_base  	return *this;  } -void mail::linebreakc_callback_base::finish() +void unicode::linebreakc_callback_base::finish()  {  	if (handle)  		unicode_lbc_end(handle); @@ -386,37 +376,32 @@ void mail::linebreakc_callback_base::finish()  } -mail::linebreakc_callback_save_buf::linebreakc_callback_save_buf() +unicode::linebreakc_callback_save_buf::linebreakc_callback_save_buf()  {  } -mail::linebreakc_callback_save_buf::~linebreakc_callback_save_buf() +unicode::linebreakc_callback_save_buf::~linebreakc_callback_save_buf()  {  } -int mail::linebreakc_callback_save_buf::operator()(int c, unicode_char ch) +int unicode::linebreakc_callback_save_buf::callback(int c, unicode_char ch)  {  	lb_buf.push_back(std::make_pair(c, ch));  	return 0;  } -mail::wordbreak_callback_base::wordbreak_callback_base() +unicode::wordbreak_callback_base::wordbreak_callback_base()  	: handle(NULL)  {  } -mail::wordbreak_callback_base::~wordbreak_callback_base() +unicode::wordbreak_callback_base::~wordbreak_callback_base()  {  	finish();  } -int mail::wordbreak_callback_base::operator()(bool) -{ -	return 0; -} - -mail::wordbreak_callback_base -&mail::wordbreak_callback_base::operator<<(unicode_char uc) +unicode::wordbreak_callback_base +&unicode::wordbreak_callback_base::operator<<(unicode_char uc)  {  	if (!handle)  	{ @@ -432,7 +417,7 @@ mail::wordbreak_callback_base  	return *this;  } -void mail::wordbreak_callback_base::finish() +void unicode::wordbreak_callback_base::finish()  {  	if (handle)  		unicode_wb_end(handle); @@ -441,16 +426,16 @@ void mail::wordbreak_callback_base::finish()  /* -------------------------------------------- */ -mail::wordbreakscan::wordbreakscan() : handle(NULL) +unicode::wordbreakscan::wordbreakscan() : handle(NULL)  {  } -mail::wordbreakscan::~wordbreakscan() +unicode::wordbreakscan::~wordbreakscan()  {  	finish();  } -bool mail::wordbreakscan::operator<<(unicode_char uc) +bool unicode::wordbreakscan::operator<<(unicode_char uc)  {  	if (!handle)  		handle=unicode_wbscan_init(); @@ -461,7 +446,7 @@ bool mail::wordbreakscan::operator<<(unicode_char uc)  	return false;  } -size_t mail::wordbreakscan::finish() +size_t unicode::wordbreakscan::finish()  {  	size_t n=0; diff --git a/unicode/unicodetest.c b/unicode/unicodetest.c index 0356624..941b79b 100644 --- a/unicode/unicodetest.c +++ b/unicode/unicodetest.c @@ -40,25 +40,25 @@ static void test1()  		0x00, 0x00, 0x00, 0x42};  	char outputbuf[12];  	struct collect_buf cb; -	libmail_u_convert_handle_t h; +	unicode_convert_handle_t h;  	int checkflag;  	cb.ptr=outputbuf;  	cb.cnt=0;  	cb.size=sizeof(outputbuf); -	if ((h=libmail_u_convert_init("UCS-4BE", "ISO-8859-1", +	if ((h=unicode_convert_init("UCS-4BE", "ISO-8859-1",  				      save_output, &cb)) == NULL)  	{ -		perror("libmail_u_convert_init"); +		perror("unicode_convert_init");  		exit(1);  	} -	libmail_u_convert(h, teststr, sizeof(teststr)); +	unicode_convert(h, teststr, sizeof(teststr)); -	if (libmail_u_convert_deinit(h, &checkflag)) +	if (unicode_convert_deinit(h, &checkflag))  	{ -		perror("libmail_u_convert_deinit"); +		perror("unicode_convert_deinit");  		exit(1);  	}  	if (cb.cnt != 2 || memcmp(cb.ptr, "AB", 2) || !checkflag) @@ -72,8 +72,8 @@ static void test2()  {  	unicode_char *ucptr;  	size_t ucsize; -	libmail_u_convert_handle_t h= -		libmail_u_convert_tou_init("utf-8", &ucptr, &ucsize, 1); +	unicode_convert_handle_t h= +		unicode_convert_tou_init("utf-8", &ucptr, &ucsize, 1);  	char *cptr;  	size_t csize; @@ -82,10 +82,10 @@ static void test2()  		size_t i;  		for (i=0; i<1024/32; ++i) -			libmail_u_convert(h, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", +			unicode_convert(h, "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA",  					  32); -		if (libmail_u_convert_deinit(h, NULL) == 0 && +		if (unicode_convert_deinit(h, NULL) == 0 &&  		    ucsize == 1024+1)  		{  			for (i=0; i<1024; i++) @@ -94,14 +94,14 @@ static void test2()  			if (i == 1024)  			{ -				h=libmail_u_convert_fromu_init("utf-8", +				h=unicode_convert_fromu_init("utf-8",  							       &cptr, &csize,  							       1);  				if (h)  				{ -					libmail_u_convert_uc(h, ucptr, 1024); -					if (libmail_u_convert_deinit(h, NULL) +					unicode_convert_uc(h, ucptr, 1024); +					if (unicode_convert_deinit(h, NULL)  					    == 0 && csize == 1024+1)  					{  						for (i=0; i<1024; i++) @@ -140,7 +140,7 @@ int main(int argc, char **argv)  		if (argn < argc)  		{ -			char *p=libmail_u_convert_tocase(argv[argn], +			char *p=unicode_convert_tocase(argv[argn],  							 "utf-8",  							 unicode_tc,  							 unicode_lc); @@ -158,7 +158,7 @@ int main(int argc, char **argv)  	if (argn < argc)  	{  		int errflag; -		char *p=libmail_u_convert_tobuf(argv[argn], +		char *p=unicode_convert_tobuf(argv[argn],  						"utf-8",  						chset,  						&errflag); @@ -166,7 +166,7 @@ int main(int argc, char **argv)  		if (!p)  		{ -			perror("libmail_u_convert"); +			perror("unicode_convert");  			exit(1);  		} @@ -176,10 +176,10 @@ int main(int argc, char **argv)  			exit(1);  		} -		q=libmail_u_convert_tobuf(p, chset, "utf-8", &errflag); +		q=unicode_convert_tobuf(p, chset, "utf-8", &errflag);  		if (!q)  		{ -			perror("libmail_u_convert"); +			perror("unicode_convert");  			exit(1);  		} diff --git a/unicode/wordbreaktest.C b/unicode/wordbreaktest.C index 35a1d27..a7aaa6a 100644 --- a/unicode/wordbreaktest.C +++ b/unicode/wordbreaktest.C @@ -11,7 +11,7 @@  #include	<list>  #include	<vector> -class collect_wordbreakflags : public mail::wordbreak_callback_base { +class collect_wordbreakflags : public unicode::wordbreak_callback_base {  public: @@ -19,13 +19,13 @@ public:  	template<typename iter_type> void operator()(iter_type b, iter_type e)  	{ -		mail::wordbreak_callback_base::operator()(b, e); +		unicode::wordbreak_callback_base::operator()(b, e);  	} -	using mail::wordbreak_callback_base::operator<<; +	using unicode::wordbreak_callback_base::operator<<;  private: -	int operator()(bool flag) +	int callback(bool flag)  	{  		flags.push_back(flag);  		return 0; | 
