diff --git a/3rdparty/zint-2.4.4/COPYING b/3rdparty/zint-2.4.4/COPYING
deleted file mode 100644
index 94a9ed0..0000000
--- a/3rdparty/zint-2.4.4/COPYING
+++ /dev/null
@@ -1,674 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 3, 29 June 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- 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.
-
-
- Copyright (C)
-
- 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 .
-
-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:
-
- Copyright (C)
- 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
-.
-
- 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
-.
diff --git a/3rdparty/zint-2.4.4/backend/2of5.c b/3rdparty/zint-2.4.4/backend/2of5.c
deleted file mode 100644
index aea79ad..0000000
--- a/3rdparty/zint-2.4.4/backend/2of5.c
+++ /dev/null
@@ -1,357 +0,0 @@
-/* 2of5.c - Handles Code 2 of 5 barcodes */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include
-#include
-#include
-#include "common.h"
-#ifdef _MSC_VER
-#include
-#endif
-
-static char *C25MatrixTable[10] = {"113311", "311131", "131131", "331111", "113131", "313111",
- "133111", "111331", "311311", "131311"};
-
-static char *C25IndustTable[10] = {"1111313111", "3111111131", "1131111131", "3131111111", "1111311131",
- "3111311111", "1131311111", "1111113131", "3111113111", "1131113111"};
-
-static char *C25InterTable[10] = {"11331", "31113", "13113", "33111", "11313", "31311", "13311", "11133",
- "31131", "13131"};
-
-static char check_digit(unsigned int count)
-{
- return itoc((10 - (count % 10)) % 10);
-}
-
-int matrix_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Code 2 of 5 Standard (Code 2 of 5 Matrix) */
-
- int i, error_number;
- char dest[512]; /* 6 + 80 * 6 + 6 + 1 ~ 512*/
-
- error_number = 0;
-
- if(length > 80) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- /* start character */
- strcpy(dest, "411111");
-
- for(i = 0; i < length; i++) {
- lookup(NEON, C25MatrixTable, source[i], dest);
- }
-
- /* Stop character */
- concat (dest, "41111");
-
- expand(symbol, dest);
- ustrcpy(symbol->text, source);
- return error_number;
-}
-
-int industrial_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Code 2 of 5 Industrial */
-
- int i, error_number;
- char dest[512]; /* 6 + 40 * 10 + 6 + 1 */
-
- error_number = 0;
-
- if(length > 45) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid character in data");
- return error_number;
- }
-
- /* start character */
- strcpy(dest, "313111");
-
- for(i = 0; i < length; i++) {
- lookup(NEON, C25IndustTable, source[i], dest);
- }
-
- /* Stop character */
- concat (dest, "31113");
-
- expand(symbol, dest);
- ustrcpy(symbol->text, source);
- return error_number;
-}
-
-int iata_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Code 2 of 5 IATA */
- int i, error_number;
- char dest[512]; /* 4 + 45 * 10 + 3 + 1 */
-
- error_number = 0;
-
- if(length > 45) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- /* start */
- strcpy(dest, "1111");
-
- for(i = 0; i < length; i++) {
- lookup(NEON, C25IndustTable, source[i], dest);
- }
-
- /* stop */
- concat (dest, "311");
-
- expand(symbol, dest);
- ustrcpy(symbol->text, source);
- return error_number;
-}
-
-int logic_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Code 2 of 5 Data Logic */
-
- int i, error_number;
- char dest[512]; /* 4 + 80 * 6 + 3 + 1 */
-
- error_number = 0;
-
- if(length > 80) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- /* start character */
- strcpy(dest, "1111");
-
- for(i = 0; i < length; i++) {
- lookup(NEON, C25MatrixTable, source[i], dest);
- }
-
- /* Stop character */
- concat (dest, "311");
-
- expand(symbol, dest);
- ustrcpy(symbol->text, source);
- return error_number;
-}
-
-int interleaved_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Code 2 of 5 Interleaved */
-
- int i, j, k, error_number;
- char bars[7], spaces[7], mixed[14], dest[1000];
-#ifndef _MSC_VER
- unsigned char temp[length + 2];
-#else
- unsigned char* temp = (unsigned char *)_alloca((length + 2) * sizeof(unsigned char));
-#endif
-
- error_number = 0;
-
- if(length > 89) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if (error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- ustrcpy(temp, (unsigned char *) "");
- /* Input must be an even number of characters for Interlaced 2 of 5 to work:
- if an odd number of characters has been entered then add a leading zero */
- if (length & 1)
- {
- ustrcpy(temp, (unsigned char *) "0");
- length++;
- }
- uconcat(temp, source);
-
- /* start character */
- strcpy(dest, "1111");
-
- for(i = 0; i < length; i+=2 )
- {
- /* look up the bars and the spaces and put them in two strings */
- strcpy(bars, "");
- lookup(NEON, C25InterTable, temp[i], bars);
- strcpy(spaces, "");
- lookup(NEON, C25InterTable, temp[i + 1], spaces);
-
- /* then merge (interlace) the strings together */
- k = 0;
- for(j = 0; j <= 4; j++)
- {
- mixed[k] = bars[j]; k++;
- mixed[k] = spaces[j]; k++;
- }
- mixed[k] = '\0';
- concat (dest, mixed);
- }
-
- /* Stop character */
- concat (dest, "311");
-
- expand(symbol, dest);
- ustrcpy(symbol->text, temp);
- return error_number;
-
-}
-
-int itf14(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- int i, error_number, zeroes;
- unsigned int count;
- char localstr[16];
-
- error_number = 0;
-
- count = 0;
-
- if(length > 13) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid character in data");
- return error_number;
- }
-
- /* Add leading zeros as required */
- zeroes = 13 - length;
- for(i = 0; i < zeroes; i++) {
- localstr[i] = '0';
- }
- strcpy(localstr + zeroes, (char *)source);
-
- /* Calculate the check digit - the same method used for EAN-13 */
-
- for (i = 12; i >= 0; i--) {
- count += ctoi(localstr[i]);
-
- if (!(i & 1)) {
- count += 2 * ctoi(localstr[i]);
- }
- }
- localstr[13] = check_digit(count);
- localstr[14] = '\0';
- error_number = interleaved_two_of_five(symbol, (unsigned char *)localstr, strlen(localstr));
- ustrcpy(symbol->text, (unsigned char*)localstr);
- return error_number;
-}
-
-int dpleit(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Deutshe Post Leitcode */
- int i, error_number;
- unsigned int count;
- char localstr[16];
- int zeroes;
-
- error_number = 0;
- count = 0;
- if(length > 13) {
- strcpy(symbol->errtxt, "Input wrong length");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- zeroes = 13 - length;
- for(i = 0; i < zeroes; i++)
- localstr[i] = '0';
- strcpy(localstr + zeroes, (char *)source);
-
- for (i = 12; i >= 0; i--)
- {
- count += 4 * ctoi(localstr[i]);
-
- if (i & 1) {
- count += 5 * ctoi(localstr[i]);
- }
- }
- localstr[13] = check_digit(count);
- localstr[14] = '\0';
- error_number = interleaved_two_of_five(symbol, (unsigned char *)localstr, strlen(localstr));
- ustrcpy(symbol->text, (unsigned char*)localstr);
- return error_number;
-}
-
-int dpident(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Deutsche Post Identcode */
- int i, error_number, zeroes;
- unsigned int count;
- char localstr[16];
-
- count = 0;
- if(length > 11) {
- strcpy(symbol->errtxt, "Input wrong length");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- zeroes = 11 - length;
- for(i = 0; i < zeroes; i++)
- localstr[i] = '0';
- strcpy(localstr + zeroes, (char *)source);
-
- for (i = 10; i >= 0; i--)
- {
- count += 4 * ctoi(localstr[i]);
-
- if (i & 1) {
- count += 5 * ctoi(localstr[i]);
- }
- }
- localstr[11] = check_digit(count);
- localstr[12] = '\0';
- error_number = interleaved_two_of_five(symbol, (unsigned char *)localstr, strlen(localstr));
- ustrcpy(symbol->text, (unsigned char*)localstr);
- return error_number;
-}
diff --git a/3rdparty/zint-2.4.4/backend/auspost.c b/3rdparty/zint-2.4.4/backend/auspost.c
deleted file mode 100644
index 0278109..0000000
--- a/3rdparty/zint-2.4.4/backend/auspost.c
+++ /dev/null
@@ -1,246 +0,0 @@
-/* auspost.c - Handles Australia Post 4-State Barcode */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#define GDSET "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz #"
-
-static char *AusNTable[10] = {"00", "01", "02", "10", "11", "12", "20", "21", "22", "30"};
-
-static char *AusCTable[64] = {"222", "300", "301", "302", "310", "311", "312", "320", "321", "322",
- "000", "001", "002", "010", "011", "012", "020", "021", "022", "100", "101", "102", "110",
- "111", "112", "120", "121", "122", "200", "201", "202", "210", "211", "212", "220", "221",
- "023", "030", "031", "032", "033", "103", "113", "123", "130", "131", "132", "133", "203",
- "213", "223", "230", "231", "232", "233", "303", "313", "323", "330", "331", "332", "333",
- "003", "013"};
-
-static char *AusBarTable[64] = {"000", "001", "002", "003", "010", "011", "012", "013", "020", "021",
- "022", "023", "030", "031", "032", "033", "100", "101", "102", "103", "110", "111", "112",
- "113", "120", "121", "122", "123", "130", "131", "132", "133", "200", "201", "202", "203",
- "210", "211", "212", "213", "220", "221", "222", "223", "230", "231", "232", "233", "300",
- "301", "302", "303", "310", "311", "312", "313", "320", "321", "322", "323", "330", "331",
- "332", "333"};
-
-#include
-#include
-#include
-#include "common.h"
-#include "reedsol.h"
-
-static char convert_pattern(char data, int shift)
-{
- return (data - '0') << shift;
-}
-
-void rs_error(char data_pattern[])
-{
- /* Adds Reed-Solomon error correction to auspost */
-
- int reader, triple_writer = 0;
- char triple[31], inv_triple[31];
- unsigned char result[5];
-
- for(reader = 2; reader < (int)strlen(data_pattern); reader += 3, triple_writer++)
- {
- triple[triple_writer] = convert_pattern(data_pattern[reader], 4)
- + convert_pattern(data_pattern[reader + 1], 2)
- + convert_pattern(data_pattern[reader + 2], 0);
- }
-
- for(reader = 0; reader < triple_writer; reader++)
- {
- inv_triple[reader] = triple[(triple_writer - 1) - reader];
- }
-
- rs_init_gf(0x43);
- rs_init_code(4, 1);
- rs_encode(triple_writer, (unsigned char*) inv_triple, result);
-
- for(reader = 4; reader > 0; reader--)
- {
- concat(data_pattern, AusBarTable[(int)result[reader - 1]]);
- }
- rs_free();
-}
-
-int australia_post(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- /* Handles Australia Posts's 4 State Codes */
- /* Customer Standard Barcode, Barcode 2 or Barcode 3 system determined automatically
- (i.e. the FCC doesn't need to be specified by the user) dependent
- on the length of the input string */
-
- /* The contents of data_pattern conform to the following standard:
- 0 = Tracker, Ascender and Descender
- 1 = Tracker and Ascender
- 2 = Tracker and Descender
- 3 = Tracker only */
- int error_number, zeroes;
- int writer;
- unsigned int loopey, reader, h;
-
- char data_pattern[200];
- char fcc[3], dpid[10];
- char localstr[30];
-
- error_number = 0;
- strcpy(localstr, "");
-
- /* Do all of the length checking first to avoid stack smashing */
- if(symbol->symbology == BARCODE_AUSPOST) {
- /* Format control code (FCC) */
- switch(length)
- {
- case 8:
- strcpy(fcc, "11");
- break;
- case 13:
- strcpy(fcc, "59");
- break;
- case 16:
- strcpy(fcc, "59");
- error_number = is_sane(NEON, source, length);
- break;
- case 18:
- strcpy(fcc, "62");
- break;
- case 23:
- strcpy(fcc, "62");
- error_number = is_sane(NEON, source, length);
- break;
- default:
- strcpy(symbol->errtxt, "Auspost input is wrong length");
- return ERROR_TOO_LONG;
- break;
- }
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
- } else {
- if(length > 8) {
- strcpy(symbol->errtxt, "Auspost input is too long");
- return ERROR_TOO_LONG;
- }
- switch(symbol->symbology) {
- case BARCODE_AUSREPLY: strcpy(fcc, "45"); break;
- case BARCODE_AUSROUTE: strcpy(fcc, "87"); break;
- case BARCODE_AUSREDIRECT: strcpy(fcc, "92"); break;
- }
-
- /* Add leading zeros as required */
- zeroes = 8 - length;
- memset(localstr, '0', zeroes);
- localstr[8] = '\0';
- }
-
- concat(localstr, (char*)source);
- h = strlen(localstr);
- error_number = is_sane(GDSET, (unsigned char *)localstr, h);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- /* Verifiy that the first 8 characters are numbers */
- memcpy(dpid, localstr, 8);
- dpid[8] = '\0';
- error_number = is_sane(NEON, (unsigned char *)dpid, strlen(dpid));
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in DPID");
- return error_number;
- }
-
- /* Start character */
- strcpy(data_pattern, "13");
-
- /* Encode the FCC */
- for(reader = 0; reader < 2; reader++)
- {
- lookup(NEON, AusNTable, fcc[reader], data_pattern);
- }
-
- /* printf("AUSPOST FCC: %s ", fcc); */
-
- /* Delivery Point Identifier (DPID) */
- for(reader = 0; reader < 8; reader++)
- {
- lookup(NEON, AusNTable, dpid[reader], data_pattern);
- }
-
- /* Customer Information */
- if(h > 8)
- {
- if((h == 13) || (h == 18)) {
- for(reader = 8; reader < h; reader++) {
- lookup(GDSET, AusCTable, localstr[reader], data_pattern);
- }
- }
- else if((h == 16) || (h == 23)) {
- for(reader = 8; reader < h; reader++) {
- lookup(NEON, AusNTable, localstr[reader], data_pattern);
- }
- }
- }
-
- /* Filler bar */
- h = strlen(data_pattern);
- if(h == 22) {
- concat(data_pattern, "3");
- }
- else if(h == 37) {
- concat(data_pattern, "3");
- }
- else if(h == 52) {
- concat(data_pattern, "3");
- }
-
- /* Reed Solomon error correction */
- rs_error(data_pattern);
-
- /* Stop character */
- concat(data_pattern, "13");
-
- /* Turn the symbol into a bar pattern ready for plotting */
- writer = 0;
- h = strlen(data_pattern);
- for(loopey = 0; loopey < h; loopey++)
- {
- if((data_pattern[loopey] == '1') || (data_pattern[loopey] == '0'))
- {
- set_module(symbol, 0, writer);
- }
- set_module(symbol, 1, writer);
- if((data_pattern[loopey] == '2') || (data_pattern[loopey] == '0'))
- {
- set_module(symbol, 2, writer);
- }
- writer += 2;
- }
-
- symbol->row_height[0] = 3;
- symbol->row_height[1] = 2;
- symbol->row_height[2] = 3;
-
- symbol->rows = 3;
- symbol->width = writer - 1;
-
- return error_number;
-}
-
diff --git a/3rdparty/zint-2.4.4/backend/aztec.c b/3rdparty/zint-2.4.4/backend/aztec.c
deleted file mode 100644
index a93eba7..0000000
--- a/3rdparty/zint-2.4.4/backend/aztec.c
+++ /dev/null
@@ -1,1352 +0,0 @@
-/* aztec.c - Handles Aztec 2D Symbols */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include
-#include
-#include
-#ifdef _MSC_VER
-#include
-#endif
-#include "common.h"
-#include "aztec.h"
-#include "reedsol.h"
-
-void mapshorten(int *charmap, int *typemap, int start, int length)
-{ /* Shorten the string by one character */
-
- memmove(charmap + start + 1 , charmap + start + 2, (length - 1) * sizeof(int));
- memmove(typemap + start + 1 , typemap + start + 2, (length - 1) * sizeof(int));
-}
-
-void insert(char binary_string[], int posn, char newbit)
-{ /* Insert a character into the middle of a string at position posn */
- int i, end;
-
- end = strlen(binary_string);
- for(i = end; i > posn; i--) {
- binary_string[i] = binary_string[i - 1];
- }
- binary_string[posn] = newbit;
-}
-
-int aztec_text_process(unsigned char source[], const unsigned int src_len, char binary_string[], int gs1)
-{ /* Encode input data into a binary string */
- int i, j, k, bytes;
- int curtable, newtable, lasttable, chartype, maplength, blocks, debug;
-#ifndef _MSC_VER
- int charmap[src_len * 2], typemap[src_len * 2];
- int blockmap[2][src_len];
-#else
- int* charmap = (int*)_alloca(src_len * 2 * sizeof(int));
- int* typemap = (int*)_alloca(src_len * 2 * sizeof(int));
- int* blockmap[2];
- blockmap[0] = (int*)_alloca(src_len * sizeof(int));
- blockmap[1] = (int*)_alloca(src_len * sizeof(int));
-#endif
- /* Lookup input string in encoding table */
- maplength = 0;
- debug = 0;
-
- for(i = 0; i < (int)src_len; i++) {
- if(gs1 && (i == 0)) {
- /* Add FNC1 to beginning of GS1 messages */
- charmap[maplength] = 0;
- typemap[maplength++] = PUNC;
- charmap[maplength] = 400;
- typemap[maplength++] = PUNC;
- }
- if((gs1) && (source[i] == '[')) {
- /* FNC1 represented by FLG(0) */
- charmap[maplength] = 0;
- typemap[maplength++] = PUNC;
- charmap[maplength] = 400;
- typemap[maplength++] = PUNC;
- } else {
- if(source[i] > 127) {
- charmap[maplength] = source[i];
- typemap[maplength++] = BINARY;
- } else {
- charmap[maplength] = AztecSymbolChar[source[i]];
- typemap[maplength++] = AztecCodeSet[source[i]];
- }
- }
- }
-
- /* Look for double character encoding possibilities */
- i = 0;
- do{
- if(((charmap[i] == 300) && (charmap[i + 1] == 11)) && ((typemap[i] == PUNC) && (typemap[i + 1] == PUNC))) {
- /* CR LF combination */
- charmap[i] = 2;
- typemap[i] = PUNC;
- mapshorten(charmap, typemap, i, maplength);
- maplength--;
- }
-
- if(((charmap[i] == 302) && (charmap[i + 1] == 1)) && ((typemap[i] == 24) && (typemap[i + 1] == 23))) {
- /* . SP combination */
- charmap[i] = 3;
- typemap[i] = PUNC;
- mapshorten(charmap, typemap, i, maplength);
- maplength--;
- }
-
- if(((charmap[i] == 301) && (charmap[i + 1] == 1)) && ((typemap[i] == 24) && (typemap[i + 1] == 23))) {
- /* , SP combination */
- charmap[i] = 4;
- typemap[i] = PUNC;
- mapshorten(charmap, typemap, i, maplength);
- maplength--;
- }
-
- if(((charmap[i] == 21) && (charmap[i + 1] == 1)) && ((typemap[i] == PUNC) && (typemap[i + 1] == 23))) {
- /* : SP combination */
- charmap[i] = 5;
- typemap[i] = PUNC;
- mapshorten(charmap, typemap, i, maplength);
- maplength--;
- }
-
- i++;
- }while(i < (maplength - 1));
-
- /* look for blocks of characters which use the same table */
- blocks = 1;
- blockmap[0][0] = typemap[0];
- blockmap[1][0] = 1;
- for(i = 1; i < maplength; i++) {
- if(typemap[i] == typemap[i - 1]) {
- blockmap[1][blocks - 1]++;
- } else {
- blocks++;
- blockmap[0][blocks - 1] = typemap[i];
- blockmap[1][blocks - 1] = 1;
- }
- }
-
- if(blockmap[0][0] & 1) { blockmap[0][0] = 1; }
- if(blockmap[0][0] & 2) { blockmap[0][0] = 2; }
- if(blockmap[0][0] & 4) { blockmap[0][0] = 4; }
- if(blockmap[0][0] & 8) { blockmap[0][0] = 8; }
-
- if(blocks > 1) {
-
- /* look for adjacent blocks which can use the same table (left to right search) */
- for(i = 1; i < blocks; i++) {
- if(blockmap[0][i] & blockmap[0][i - 1]) {
- blockmap[0][i] = (blockmap[0][i] & blockmap[0][i - 1]);
- }
- }
-
- if(blockmap[0][blocks - 1] & 1) { blockmap[0][blocks - 1] = 1; }
- if(blockmap[0][blocks - 1] & 2) { blockmap[0][blocks - 1] = 2; }
- if(blockmap[0][blocks - 1] & 4) { blockmap[0][blocks - 1] = 4; }
- if(blockmap[0][blocks - 1] & 8) { blockmap[0][blocks - 1] = 8; }
-
- /* look for adjacent blocks which can use the same table (right to left search) */
- for(i = blocks - 1; i > 0; i--) {
- if(blockmap[0][i] & blockmap[0][i + 1]) {
- blockmap[0][i] = (blockmap[0][i] & blockmap[0][i + 1]);
- }
- }
-
- /* determine the encoding table for characters which do not fit with adjacent blocks */
- for(i = 1; i < blocks; i++) {
- if(blockmap[0][i] & 8) { blockmap[0][i] = 8; }
- if(blockmap[0][i] & 4) { blockmap[0][i] = 4; }
- if(blockmap[0][i] & 2) { blockmap[0][i] = 2; }
- if(blockmap[0][i] & 1) { blockmap[0][i] = 1; }
- }
-
- /* Combine blocks of the same type */
- i = 0;
- do{
- if(blockmap[0][i] == blockmap[0][i + 1]) {
- blockmap[1][i] += blockmap[1][i + 1];
- for(j = i + 1; j < blocks; j++) {
- blockmap[0][j] = blockmap[0][j + 1];
- blockmap[1][j] = blockmap[1][j + 1];
- }
- blocks--;
- } else {
- i++;
- }
- } while (i < blocks);
- }
-
- /* Put the adjusted block data back into typemap */
- j = 0;
- for(i = 0; i < blocks; i++) {
- if((blockmap[1][i] < 3) && (blockmap[0][i] != 32)) { /* Shift character(s) needed */
- for(k = 0; k < blockmap[1][i]; k++) {
- typemap[j + k] = blockmap[0][i] + 64;
- }
- } else { /* Latch character (or byte mode) needed */
- for(k = 0; k < blockmap[1][i]; k++) {
- typemap[j + k] = blockmap[0][i];
- }
- }
- j += blockmap[1][i];
- }
-
- /* Don't shift an initial capital letter */
- if(typemap[0] == 65) { typemap[0] = 1; };
-
- /* Problem characters (those that appear in different tables with different values) can now be resolved into their tables */
- for(i = 0; i < maplength; i++) {
- if((charmap[i] >= 300) && (charmap[i] < 400)) {
- curtable = typemap[i];
- if(curtable > 64) {
- curtable -= 64;
- }
- switch(charmap[i]) {
- case 300: /* Carriage Return */
- switch(curtable) {
- case PUNC: charmap[i] = 1; break;
- case MIXED: charmap[i] = 14; break;
- }
- break;
- case 301: /* Comma */
- switch(curtable) {
- case PUNC: charmap[i] = 17; break;
- case DIGIT: charmap[i] = 12; break;
- }
- break;
- case 302: /* Full Stop */
- switch(curtable) {
- case PUNC: charmap[i] = 19; break;
- case DIGIT: charmap[i] = 13; break;
- }
- break;
- }
- }
- }
- *binary_string = '\0';
-
- curtable = UPPER; /* start with UPPER table */
- lasttable = UPPER;
- for(i = 0; i < maplength; i++) {
- newtable = curtable;
- if((typemap[i] != curtable) && (charmap[i] < 400)) {
- /* Change table */
- if(curtable == BINARY) {
- /* If ending binary mode the current table is the same as when entering binary mode */
- curtable = lasttable;
- newtable = lasttable;
- }
- if(typemap[i] > 64) {
- /* Shift character */
- switch(typemap[i]) {
- case (64 + UPPER): /* To UPPER */
- switch(curtable) {
- case LOWER: /* US */
- concat(binary_string, hexbit[28]);
- if(debug) printf("US ");
- break;
- case MIXED: /* UL */
- concat(binary_string, hexbit[29]);
- if(debug) printf("UL ");
- newtable = UPPER;
- break;
- case PUNC: /* UL */
- concat(binary_string, hexbit[31]);
- if(debug) printf("UL ");
- newtable = UPPER;
- break;
- case DIGIT: /* US */
- concat(binary_string, pentbit[15]);
- if(debug) printf("US ");
- break;
- }
- break;
- case (64 + LOWER): /* To LOWER */
- switch(curtable) {
- case UPPER: /* LL */
- concat(binary_string, hexbit[28]);
- if(debug) printf("LL ");
- newtable = LOWER;
- break;
- case MIXED: /* LL */
- concat(binary_string, hexbit[28]);
- if(debug) printf("LL ");
- newtable = LOWER;
- break;
- case PUNC: /* UL LL */
- concat(binary_string, hexbit[31]);
- if(debug) printf("UL ");
- concat(binary_string, hexbit[28]);
- if(debug) printf("LL ");
- newtable = LOWER;
- break;
- case DIGIT: /* UL LL */
- concat(binary_string, pentbit[14]);
- if(debug) printf("UL ");
- concat(binary_string, hexbit[28]);
- if(debug) printf("LL ");
- newtable = LOWER;
- break;
- }
- break;
- case (64 + MIXED): /* To MIXED */
- switch(curtable) {
- case UPPER: /* ML */
- concat(binary_string, hexbit[29]);
- if(debug) printf("ML ");
- newtable = MIXED;
- break;
- case LOWER: /* ML */
- concat(binary_string, hexbit[29]);
- if(debug) printf("ML ");
- newtable = MIXED;
- break;
- case PUNC: /* UL ML */
- concat(binary_string, hexbit[31]);
- if(debug) printf("UL ");
- concat(binary_string, hexbit[29]);
- if(debug) printf("ML ");
- newtable = MIXED;
- break;
- case DIGIT: /* UL ML */
- concat(binary_string, pentbit[14]);
- if(debug) printf("UL ");
- concat(binary_string, hexbit[29]);
- if(debug) printf("ML ");
- newtable = MIXED;
- break;
- }
- break;
- case (64 + PUNC): /* To PUNC */
- switch(curtable) {
- case UPPER: /* PS */
- concat(binary_string, hexbit[0]);
- if(debug) printf("PS ");
- break;
- case LOWER: /* PS */
- concat(binary_string, hexbit[0]);
- if(debug) printf("PS ");
- break;
- case MIXED: /* PS */
- concat(binary_string, hexbit[0]);
- if(debug) printf("PS ");
- break;
- case DIGIT: /* PS */
- concat(binary_string, pentbit[0]);
- if(debug) printf("PS ");
- break;
- }
- break;
- case (64 + DIGIT): /* To DIGIT */
- switch(curtable) {
- case UPPER: /* DL */
- concat(binary_string, hexbit[30]);
- if(debug) printf("DL ");
- newtable = DIGIT;
- break;
- case LOWER: /* DL */
- concat(binary_string, hexbit[30]);
- if(debug) printf("DL ");
- newtable = DIGIT;
- break;
- case MIXED: /* UL DL */
- concat(binary_string, hexbit[29]);
- if(debug) printf("UL ");
- concat(binary_string, hexbit[30]);
- if(debug) printf("DL ");
- newtable = DIGIT;
- break;
- case PUNC: /* UL DL */
- concat(binary_string, hexbit[31]);
- if(debug) printf("UL ");
- concat(binary_string, hexbit[30]);
- if(debug) printf("DL ");
- newtable = DIGIT;
- break;
- }
- break;
- }
- } else {
- /* Latch character */
- switch(typemap[i]) {
- case UPPER: /* To UPPER */
- switch(curtable) {
- case LOWER: /* ML UL */
- concat(binary_string, hexbit[29]);
- if(debug) printf("ML ");
- concat(binary_string, hexbit[29]);
- if(debug) printf("UL ");
- newtable = UPPER;
- break;
- case MIXED: /* UL */
- concat(binary_string, hexbit[29]);
- if(debug) printf("UL ");
- newtable = UPPER;
- break;
- case PUNC: /* UL */
- concat(binary_string, hexbit[31]);
- if(debug) printf("UL ");
- newtable = UPPER;
- break;
- case DIGIT: /* UL */
- concat(binary_string, pentbit[14]);
- if(debug) printf("UL ");
- newtable = UPPER;
- break;
- }
- break;
- case LOWER: /* To LOWER */
- switch(curtable) {
- case UPPER: /* LL */
- concat(binary_string, hexbit[28]);
- if(debug) printf("LL ");
- newtable = LOWER;
- break;
- case MIXED: /* LL */
- concat(binary_string, hexbit[28]);
- if(debug) printf("LL ");
- newtable = LOWER;
- break;
- case PUNC: /* UL LL */
- concat(binary_string, hexbit[31]);
- if(debug) printf("UL ");
- concat(binary_string, hexbit[28]);
- if(debug) printf("LL ");
- newtable = LOWER;
- break;
- case DIGIT: /* UL LL */
- concat(binary_string, pentbit[14]);
- if(debug) printf("UL ");
- concat(binary_string, hexbit[28]);
- if(debug) printf("LL ");
- newtable = LOWER;
- break;
- }
- break;
- case MIXED: /* To MIXED */
- switch(curtable) {
- case UPPER: /* ML */
- concat(binary_string, hexbit[29]);
- if(debug) printf("ML ");
- newtable = MIXED;
- break;
- case LOWER: /* ML */
- concat(binary_string, hexbit[29]);
- if(debug) printf("ML ");
- newtable = MIXED;
- break;
- case PUNC: /* UL ML */
- concat(binary_string, hexbit[31]);
- if(debug) printf("UL ");
- concat(binary_string, hexbit[29]);
- if(debug) printf("ML ");
- newtable = MIXED;
- break;
- case DIGIT: /* UL ML */
- concat(binary_string, pentbit[14]);
- if(debug) printf("UL ");
- concat(binary_string, hexbit[29]);
- if(debug) printf("ML ");
- newtable = MIXED;
- break;
- }
- break;
- case PUNC: /* To PUNC */
- switch(curtable) {
- case UPPER: /* ML PL */
- concat(binary_string, hexbit[29]);
- if(debug) printf("ML ");
- concat(binary_string, hexbit[30]);
- if(debug) printf("PL ");
- newtable = PUNC;
- break;
- case LOWER: /* ML PL */
- concat(binary_string, hexbit[29]);
- if(debug) printf("ML ");
- concat(binary_string, hexbit[30]);
- if(debug) printf("PL ");
- newtable = PUNC;
- break;
- case MIXED: /* PL */
- concat(binary_string, hexbit[30]);
- if(debug) printf("PL ");
- newtable = PUNC;
- break;
- case DIGIT: /* UL ML PL */
- concat(binary_string, pentbit[14]);
- if(debug) printf("UL ");
- concat(binary_string, hexbit[29]);
- if(debug) printf("ML ");
- concat(binary_string, hexbit[30]);
- if(debug) printf("PL ");
- newtable = PUNC;
- break;
- }
- break;
- case DIGIT: /* To DIGIT */
- switch(curtable) {
- case UPPER: /* DL */
- concat(binary_string, hexbit[30]);
- if(debug) printf("DL ");
- newtable = DIGIT;
- break;
- case LOWER: /* DL */
- concat(binary_string, hexbit[30]);
- if(debug) printf("DL ");
- newtable = DIGIT;
- break;
- case MIXED: /* UL DL */
- concat(binary_string, hexbit[29]);
- if(debug) printf("UL ");
- concat(binary_string, hexbit[30]);
- if(debug) printf("DL ");
- newtable = DIGIT;
- break;
- case PUNC: /* UL DL */
- concat(binary_string, hexbit[31]);
- if(debug) printf("UL ");
- concat(binary_string, hexbit[30]);
- if(debug) printf("DL ");
- newtable = DIGIT;
- break;
- }
- break;
- case BINARY: /* To BINARY */
- lasttable = curtable;
- switch(curtable) {
- case UPPER: /* BS */
- concat(binary_string, hexbit[31]);
- if(debug) printf("BS ");
- newtable = BINARY;
- break;
- case LOWER: /* BS */
- concat(binary_string, hexbit[31]);
- if(debug) printf("BS ");
- newtable = BINARY;
- break;
- case MIXED: /* BS */
- concat(binary_string, hexbit[31]);
- if(debug) printf("BS ");
- newtable = BINARY;
- break;
- case PUNC: /* UL BS */
- concat(binary_string, hexbit[31]);
- if(debug) printf("UL ");
- concat(binary_string, hexbit[31]);
- if(debug) printf("BS ");
- newtable = BINARY;
- break;
- case DIGIT: /* UL BS */
- concat(binary_string, pentbit[14]);
- if(debug) printf("UL ");
- concat(binary_string, hexbit[31]);
- if(debug) printf("BS ");
- newtable = BINARY;
- break;
- }
-
- bytes = 0;
- do{
- bytes++;
- }while(typemap[i + (bytes - 1)] == BINARY);
- bytes--;
-
- if(bytes > 2079) {
- return ERROR_TOO_LONG;
- }
-
- if(bytes > 31) { /* Put 00000 followed by 11-bit number of bytes less 31 */
- int adjusted;
-
- adjusted = bytes - 31;
- concat(binary_string, "00000");
- if(adjusted & 0x400) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(adjusted & 0x200) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(adjusted & 0x100) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(adjusted & 0x80) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(adjusted & 0x40) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(adjusted & 0x20) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(adjusted & 0x10) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(adjusted & 0x08) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(adjusted & 0x04) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(adjusted & 0x02) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(adjusted & 0x01) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- } else { /* Put 5-bit number of bytes */
- if(bytes & 0x10) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(bytes & 0x08) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(bytes & 0x04) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(bytes & 0x02) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(bytes & 0x01) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- }
- if(debug) printf("(%d bytes) ", bytes);
-
- break;
- }
- }
- }
- /* Add data to the binary string */
- curtable = newtable;
- chartype = typemap[i];
- if(chartype > 64) { chartype -= 64; }
- switch(chartype) {
- case UPPER:
- case LOWER:
- case MIXED:
- case PUNC:
- if(charmap[i] >= 400) {
- concat(binary_string, tribit[charmap[i] - 400]);
- if(debug) printf("FLG(%d) ",charmap[i] - 400);
- } else {
- concat(binary_string, hexbit[charmap[i]]);
- if(!((chartype == PUNC) && (charmap[i] == 0)))
- if(debug) printf("%d ",charmap[i]);
- }
- break;
- case DIGIT:
- concat(binary_string, pentbit[charmap[i]]);
- if(debug) printf("%d ",charmap[i]);
- break;
- case BINARY:
- if(charmap[i] & 0x80) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(charmap[i] & 0x40) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(charmap[i] & 0x20) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(charmap[i] & 0x10) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(charmap[i] & 0x08) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(charmap[i] & 0x04) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(charmap[i] & 0x02) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(charmap[i] & 0x01) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(debug) printf("%d ",charmap[i]);
- break;
- }
-
- }
-
- if(debug) printf("\n");
-
- if(strlen(binary_string) > 14970) {
- return ERROR_TOO_LONG;
- }
-
- return 0;
-}
-
-int aztec(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- int x, y, i, j, data_blocks, ecc_blocks, layers, total_bits;
- char binary_string[20000], bit_pattern[20045], descriptor[42];
- char adjusted_string[20000];
- unsigned char desc_data[4], desc_ecc[6];
- int err_code, ecc_level, compact, data_length, data_maxsize, codeword_size, adjusted_length;
- int remainder, padbits, count, gs1, adjustment_size;
- int debug = 0, reader = 0;
- int comp_loop = 4;
-
-#ifndef _MSC_VER
- unsigned char local_source[length + 1];
-#else
- unsigned int* data_part;
- unsigned int* ecc_part;
- unsigned char* local_source = (unsigned char*)_alloca(length + 1);
-#endif
-
- memset(binary_string,0,20000);
- memset(adjusted_string,0,20000);
-
- if(symbol->input_mode == GS1_MODE) { gs1 = 1; } else { gs1 = 0; }
- if(symbol->output_options & READER_INIT) { reader = 1; comp_loop = 1; }
- if((gs1 == 1) && (reader == 1)) {
- strcpy(symbol->errtxt, "Cannot encode in GS1 and Reader Initialisation mode at the same time");
- return ERROR_INVALID_OPTION;
- }
-
- switch(symbol->input_mode) {
- case DATA_MODE:
- case GS1_MODE:
- memcpy(local_source, source, length);
- local_source[length] = '\0';
- break;
- case UNICODE_MODE:
- err_code = latin1_process(symbol, source, local_source, &length);
- if(err_code != 0) { return err_code; }
- break;
- }
-
- /* Aztec code can't handle NULL characters */
- for(i = 0; i < length; i++) {
- if(local_source[i] == '\0') {
- strcpy(symbol->errtxt, "Invalid character (NULL) in input data");
- return ERROR_INVALID_DATA1;
- }
- }
-
- err_code = aztec_text_process(local_source, length, binary_string, gs1);
-
-
- if(err_code != 0) {
- strcpy(symbol->errtxt, "Input too long or too many extended ASCII characters");
- return err_code;
- }
-
- if(!((symbol->option_1 >= -1) && (symbol->option_1 <= 4))) {
- strcpy(symbol->errtxt, "Invalid error correction level - using default instead");
- err_code = WARN_INVALID_OPTION;
- symbol->option_1 = -1;
- }
-
- ecc_level = symbol->option_1;
-
- if((ecc_level == -1) || (ecc_level == 0)) {
- ecc_level = 2;
- }
-
- data_length = strlen(binary_string);
-
- layers = 0; /* Keep compiler happy! */
- data_maxsize = 0; /* Keep compiler happy! */
- adjustment_size = 0;
- if(symbol->option_2 == 0) { /* The size of the symbol can be determined by Zint */
- do {
- /* Decide what size symbol to use - the smallest that fits the data */
- compact = 0; /* 1 = Aztec Compact, 0 = Normal Aztec */
- layers = 0;
-
- switch(ecc_level) {
- /* For each level of error correction work out the smallest symbol which
- the data will fit in */
- case 1: for(i = 32; i > 0; i--) {
- if((data_length + adjustment_size) < Aztec10DataSizes[i - 1]) {
- layers = i;
- compact = 0;
- data_maxsize = Aztec10DataSizes[i - 1];
- }
- }
- for(i = comp_loop; i > 0; i--) {
- if((data_length + adjustment_size) < AztecCompact10DataSizes[i - 1]) {
- layers = i;
- compact = 1;
- data_maxsize = AztecCompact10DataSizes[i - 1];
- }
- }
- break;
- case 2: for(i = 32; i > 0; i--) {
- if((data_length + adjustment_size) < Aztec23DataSizes[i - 1]) {
- layers = i;
- compact = 0;
- data_maxsize = Aztec23DataSizes[i - 1];
- }
- }
- for(i = comp_loop; i > 0; i--) {
- if((data_length + adjustment_size) < AztecCompact23DataSizes[i - 1]) {
- layers = i;
- compact = 1;
- data_maxsize = AztecCompact23DataSizes[i - 1];
- }
- }
- break;
- case 3: for(i = 32; i > 0; i--) {
- if((data_length + adjustment_size) < Aztec36DataSizes[i - 1]) {
- layers = i;
- compact = 0;
- data_maxsize = Aztec36DataSizes[i - 1];
- }
- }
- for(i = comp_loop; i > 0; i--) {
- if((data_length + adjustment_size) < AztecCompact36DataSizes[i - 1]) {
- layers = i;
- compact = 1;
- data_maxsize = AztecCompact36DataSizes[i - 1];
- }
- }
- break;
- case 4: for(i = 32; i > 0; i--) {
- if((data_length + adjustment_size) < Aztec50DataSizes[i - 1]) {
- layers = i;
- compact = 0;
- data_maxsize = Aztec50DataSizes[i - 1];
- }
- }
- for(i = comp_loop; i > 0; i--) {
- if((data_length + adjustment_size) < AztecCompact50DataSizes[i - 1]) {
- layers = i;
- compact = 1;
- data_maxsize = AztecCompact50DataSizes[i - 1];
- }
- }
- break;
- }
-
- if(layers == 0) { /* Couldn't find a symbol which fits the data */
- strcpy(symbol->errtxt, "Input too long (too many bits for selected ECC)");
- return ERROR_TOO_LONG;
- }
-
- /* Determine codeword bitlength - Table 3 */
- codeword_size = 6; /* if (layers <= 2) */
- if((layers >= 3) && (layers <= 8)) { codeword_size = 8; }
- if((layers >= 9) && (layers <= 22)) { codeword_size = 10; }
- if(layers >= 23) { codeword_size = 12; }
-
- j = 0; i = 0;
- do {
- if((j + 1) % codeword_size == 0) {
- /* Last bit of codeword */
- int t, done = 0;
- count = 0;
-
- /* Discover how many '1's in current codeword */
- for(t = 0; t < (codeword_size - 1); t++) {
- if(binary_string[(i - (codeword_size - 1)) + t] == '1') count++;
- }
-
- if(count == (codeword_size - 1)) {
- adjusted_string[j] = '0';
- j++;
- done = 1;
- }
-
- if(count == 0) {
- adjusted_string[j] = '1';
- j++;
- done = 1;
- }
-
- if(done == 0) {
- adjusted_string[j] = binary_string[i];
- j++;
- i++;
- }
- }
- adjusted_string[j] = binary_string[i];
- j++;
- i++;
- } while (i <= (data_length + 1));
- adjusted_string[j] = '\0';
- adjusted_length = strlen(adjusted_string);
- adjustment_size = adjusted_length - data_length;
-
- /* Add padding */
- remainder = adjusted_length % codeword_size;
-
- padbits = codeword_size - remainder;
- if(padbits == codeword_size) { padbits = 0; }
-
- for(i = 0; i < padbits; i++) {
- concat(adjusted_string, "1");
- }
- adjusted_length = strlen(adjusted_string);
-
- count = 0;
- for(i = (adjusted_length - codeword_size); i < adjusted_length; i++) {
- if(adjusted_string[i] == '1') { count++; }
- }
- if(count == codeword_size) { adjusted_string[adjusted_length - 1] = '0'; }
-
- if(debug) {
- printf("Codewords:\n");
- for(i = 0; i < (adjusted_length / codeword_size); i++) {
- for(j = 0; j < codeword_size; j++) {
- printf("%c", adjusted_string[(i * codeword_size) + j]);
- }
- printf("\n");
- }
- }
-
- } while(adjusted_length > data_maxsize);
- /* This loop will only repeat on the rare occasions when the rule about not having all 1s or all 0s
- means that the binary string has had to be lengthened beyond the maximum number of bits that can
- be encoded in a symbol of the selected size */
-
- } else { /* The size of the symbol has been specified by the user */
- if((reader == 1) && ((symbol->option_2 >= 2) && (symbol->option_2 <= 4))) {
- symbol->option_2 = 5;
- }
- if((symbol->option_2 >= 1) && (symbol->option_2 <= 4)) {
- compact = 1;
- layers = symbol->option_2;
- }
- if((symbol->option_2 >= 5) && (symbol->option_2 <= 36)) {
- compact = 0;
- layers = symbol->option_2 - 4;
- }
- if((symbol->option_2 < 0) || (symbol->option_2 > 36)) {
- strcpy(symbol->errtxt, "Invalid Aztec Code size");
- return ERROR_INVALID_OPTION;
- }
-
- /* Determine codeword bitlength - Table 3 */
- if((layers >= 0) && (layers <= 2)) { codeword_size = 6; }
- if((layers >= 3) && (layers <= 8)) { codeword_size = 8; }
- if((layers >= 9) && (layers <= 22)) { codeword_size = 10; }
- if(layers >= 23) { codeword_size = 12; }
-
- j = 0; i = 0;
- do {
- if((j + 1) % codeword_size == 0) {
- /* Last bit of codeword */
- int t, done = 0;
- count = 0;
-
- /* Discover how many '1's in current codeword */
- for(t = 0; t < (codeword_size - 1); t++) {
- if(binary_string[(i - (codeword_size - 1)) + t] == '1') count++;
- }
-
- if(count == (codeword_size - 1)) {
- adjusted_string[j] = '0';
- j++;
- done = 1;
- }
-
- if(count == 0) {
- adjusted_string[j] = '1';
- j++;
- done = 1;
- }
-
- if(done == 0) {
- adjusted_string[j] = binary_string[i];
- j++;
- i++;
- }
- }
- adjusted_string[j] = binary_string[i];
- j++;
- i++;
- } while (i <= (data_length + 1));
- adjusted_string[j] = '\0';
- adjusted_length = strlen(adjusted_string);
-
- remainder = adjusted_length % codeword_size;
-
- padbits = codeword_size - remainder;
- if(padbits == codeword_size) { padbits = 0; }
-
- for(i = 0; i < padbits; i++) {
- concat(adjusted_string, "1");
- }
- adjusted_length = strlen(adjusted_string);
-
- count = 0;
- for(i = (adjusted_length - codeword_size); i < adjusted_length; i++) {
- if(adjusted_string[i] == '1') { count++; }
- }
- if(count == codeword_size) { adjusted_string[adjusted_length - 1] = '0'; }
-
- /* Check if the data actually fits into the selected symbol size */
- if (compact) {
- data_maxsize = codeword_size * (AztecCompactSizes[layers - 1] - 3);
- } else {
- data_maxsize = codeword_size * (AztecSizes[layers - 1] - 3);
- }
-
- if(adjusted_length > data_maxsize) {
- strcpy(symbol->errtxt, "Data too long for specified Aztec Code symbol size");
- return ERROR_TOO_LONG;
- }
-
- if(debug) {
- printf("Codewords:\n");
- for(i = 0; i < (adjusted_length / codeword_size); i++) {
- for(j = 0; j < codeword_size; j++) {
- printf("%c", adjusted_string[(i * codeword_size) + j]);
- }
- printf("\n");
- }
- }
-
- }
-
- if(reader && (layers > 22)) {
- strcpy(symbol->errtxt, "Data too long for reader initialisation symbol");
- return ERROR_TOO_LONG;
- }
-
- data_blocks = adjusted_length / codeword_size;
-
- if(compact) {
- ecc_blocks = AztecCompactSizes[layers - 1] - data_blocks;
- } else {
- ecc_blocks = AztecSizes[layers - 1] - data_blocks;
- }
-
- if(debug) {
- printf("Generating a ");
- if(compact) { printf("compact"); } else { printf("full-size"); }
- printf(" symbol with %d layers\n", layers);
- printf("Requires ");
- if(compact) { printf("%d", AztecCompactSizes[layers - 1]); } else { printf("%d", AztecSizes[layers - 1]); }
- printf(" codewords of %d-bits\n", codeword_size);
- printf(" (%d data words, %d ecc words)\n", data_blocks, ecc_blocks);
- }
-
-#ifndef _MSC_VER
- unsigned int data_part[data_blocks + 3], ecc_part[ecc_blocks + 3];
-#else
- data_part = (unsigned int*)_alloca((data_blocks + 3) * sizeof(unsigned int));
- ecc_part = (unsigned int*)_alloca((ecc_blocks + 3) * sizeof(unsigned int));
-#endif
- /* Copy across data into separate integers */
- memset(data_part,0,(data_blocks + 2)*sizeof(int));
- memset(ecc_part,0,(ecc_blocks + 2)*sizeof(int));
-
- /* Split into codewords and calculate reed-colomon error correction codes */
- switch(codeword_size) {
- case 6:
- for(i = 0; i < data_blocks; i++) {
- if(adjusted_string[i * codeword_size] == '1') { data_part[i] += 32; }
- if(adjusted_string[(i * codeword_size) + 1] == '1') { data_part[i] += 16; }
- if(adjusted_string[(i * codeword_size) + 2] == '1') { data_part[i] += 8; }
- if(adjusted_string[(i * codeword_size) + 3] == '1') { data_part[i] += 4; }
- if(adjusted_string[(i * codeword_size) + 4] == '1') { data_part[i] += 2; }
- if(adjusted_string[(i * codeword_size) + 5] == '1') { data_part[i] += 1; }
- }
- rs_init_gf(0x43);
- rs_init_code(ecc_blocks, 1);
- rs_encode_long(data_blocks, data_part, ecc_part);
- for(i = (ecc_blocks - 1); i >= 0; i--) {
- if(ecc_part[i] & 0x20) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x10) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x08) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x04) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x02) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x01) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- }
- rs_free();
- break;
- case 8:
- for(i = 0; i < data_blocks; i++) {
- if(adjusted_string[i * codeword_size] == '1') { data_part[i] += 128; }
- if(adjusted_string[(i * codeword_size) + 1] == '1') { data_part[i] += 64; }
- if(adjusted_string[(i * codeword_size) + 2] == '1') { data_part[i] += 32; }
- if(adjusted_string[(i * codeword_size) + 3] == '1') { data_part[i] += 16; }
- if(adjusted_string[(i * codeword_size) + 4] == '1') { data_part[i] += 8; }
- if(adjusted_string[(i * codeword_size) + 5] == '1') { data_part[i] += 4; }
- if(adjusted_string[(i * codeword_size) + 6] == '1') { data_part[i] += 2; }
- if(adjusted_string[(i * codeword_size) + 7] == '1') { data_part[i] += 1; }
- }
- rs_init_gf(0x12d);
- rs_init_code(ecc_blocks, 1);
- rs_encode_long(data_blocks, data_part, ecc_part);
- for(i = (ecc_blocks - 1); i >= 0; i--) {
- if(ecc_part[i] & 0x80) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x40) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x20) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x10) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x08) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x04) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x02) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x01) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- }
- rs_free();
- break;
- case 10:
- for(i = 0; i < data_blocks; i++) {
- if(adjusted_string[i * codeword_size] == '1') { data_part[i] += 512; }
- if(adjusted_string[(i * codeword_size) + 1] == '1') { data_part[i] += 256; }
- if(adjusted_string[(i * codeword_size) + 2] == '1') { data_part[i] += 128; }
- if(adjusted_string[(i * codeword_size) + 3] == '1') { data_part[i] += 64; }
- if(adjusted_string[(i * codeword_size) + 4] == '1') { data_part[i] += 32; }
- if(adjusted_string[(i * codeword_size) + 5] == '1') { data_part[i] += 16; }
- if(adjusted_string[(i * codeword_size) + 6] == '1') { data_part[i] += 8; }
- if(adjusted_string[(i * codeword_size) + 7] == '1') { data_part[i] += 4; }
- if(adjusted_string[(i * codeword_size) + 8] == '1') { data_part[i] += 2; }
- if(adjusted_string[(i * codeword_size) + 9] == '1') { data_part[i] += 1; }
- }
- rs_init_gf(0x409);
- rs_init_code(ecc_blocks, 1);
- rs_encode_long(data_blocks, data_part, ecc_part);
- for(i = (ecc_blocks - 1); i >= 0; i--) {
- if(ecc_part[i] & 0x200) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x100) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x80) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x40) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x20) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x10) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x08) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x04) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x02) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x01) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- }
- rs_free();
- break;
- case 12:
- for(i = 0; i < data_blocks; i++) {
- if(adjusted_string[i * codeword_size] == '1') { data_part[i] += 2048; }
- if(adjusted_string[(i * codeword_size) + 1] == '1') { data_part[i] += 1024; }
- if(adjusted_string[(i * codeword_size) + 2] == '1') { data_part[i] += 512; }
- if(adjusted_string[(i * codeword_size) + 3] == '1') { data_part[i] += 256; }
- if(adjusted_string[(i * codeword_size) + 4] == '1') { data_part[i] += 128; }
- if(adjusted_string[(i * codeword_size) + 5] == '1') { data_part[i] += 64; }
- if(adjusted_string[(i * codeword_size) + 6] == '1') { data_part[i] += 32; }
- if(adjusted_string[(i * codeword_size) + 7] == '1') { data_part[i] += 16; }
- if(adjusted_string[(i * codeword_size) + 8] == '1') { data_part[i] += 8; }
- if(adjusted_string[(i * codeword_size) + 9] == '1') { data_part[i] += 4; }
- if(adjusted_string[(i * codeword_size) + 10] == '1') { data_part[i] += 2; }
- if(adjusted_string[(i * codeword_size) + 11] == '1') { data_part[i] += 1; }
- }
- rs_init_gf(0x1069);
- rs_init_code(ecc_blocks, 1);
- rs_encode_long(data_blocks, data_part, ecc_part);
- for(i = (ecc_blocks - 1); i >= 0; i--) {
- if(ecc_part[i] & 0x800) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x400) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x200) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x100) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x80) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x40) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x20) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x10) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x08) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x04) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x02) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- if(ecc_part[i] & 0x01) { concat(adjusted_string, "1"); } else { concat(adjusted_string, "0"); }
- }
- rs_free();
- break;
- }
-
- /* Invert the data so that actual data is on the outside and reed-solomon on the inside */
- memset(bit_pattern,'0',20045);
-
- total_bits = (data_blocks + ecc_blocks) * codeword_size;
- for(i = 0; i < total_bits; i++) {
- bit_pattern[i] = adjusted_string[total_bits - i - 1];
- }
-
- /* Now add the symbol descriptor */
- memset(desc_data,0,4);
- memset(desc_ecc,0,6);
- memset(descriptor,0,42);
-
- if(compact) {
- /* The first 2 bits represent the number of layers minus 1 */
- if((layers - 1) & 0x02) { descriptor[0] = '1'; } else { descriptor[0] = '0'; }
- if((layers - 1) & 0x01) { descriptor[1] = '1'; } else { descriptor[1] = '0'; }
- /* The next 6 bits represent the number of data blocks minus 1 */
- if(reader) {
- descriptor[2] = '1';
- } else {
- if((data_blocks - 1) & 0x20) { descriptor[2] = '1'; } else { descriptor[2] = '0'; }
- }
- if((data_blocks - 1) & 0x10) { descriptor[3] = '1'; } else { descriptor[3] = '0'; }
- if((data_blocks - 1) & 0x08) { descriptor[4] = '1'; } else { descriptor[4] = '0'; }
- if((data_blocks - 1) & 0x04) { descriptor[5] = '1'; } else { descriptor[5] = '0'; }
- if((data_blocks - 1) & 0x02) { descriptor[6] = '1'; } else { descriptor[6] = '0'; }
- if((data_blocks - 1) & 0x01) { descriptor[7] = '1'; } else { descriptor[7] = '0'; }
- descriptor[8] = '\0';
- if(debug) printf("Mode Message = %s\n", descriptor);
- } else {
- /* The first 5 bits represent the number of layers minus 1 */
- if((layers - 1) & 0x10) { descriptor[0] = '1'; } else { descriptor[0] = '0'; }
- if((layers - 1) & 0x08) { descriptor[1] = '1'; } else { descriptor[1] = '0'; }
- if((layers - 1) & 0x04) { descriptor[2] = '1'; } else { descriptor[2] = '0'; }
- if((layers - 1) & 0x02) { descriptor[3] = '1'; } else { descriptor[3] = '0'; }
- if((layers - 1) & 0x01) { descriptor[4] = '1'; } else { descriptor[4] = '0'; }
- /* The next 11 bits represent the number of data blocks minus 1 */
- if(reader) {
- descriptor[5] = '1';
- } else {
- if((data_blocks - 1) & 0x400) { descriptor[5] = '1'; } else { descriptor[5] = '0'; }
- }
- if((data_blocks - 1) & 0x200) { descriptor[6] = '1'; } else { descriptor[6] = '0'; }
- if((data_blocks - 1) & 0x100) { descriptor[7] = '1'; } else { descriptor[7] = '0'; }
- if((data_blocks - 1) & 0x80) { descriptor[8] = '1'; } else { descriptor[8] = '0'; }
- if((data_blocks - 1) & 0x40) { descriptor[9] = '1'; } else { descriptor[9] = '0'; }
- if((data_blocks - 1) & 0x20) { descriptor[10] = '1'; } else { descriptor[10] = '0'; }
- if((data_blocks - 1) & 0x10) { descriptor[11] = '1'; } else { descriptor[11] = '0'; }
- if((data_blocks - 1) & 0x08) { descriptor[12] = '1'; } else { descriptor[12] = '0'; }
- if((data_blocks - 1) & 0x04) { descriptor[13] = '1'; } else { descriptor[13] = '0'; }
- if((data_blocks - 1) & 0x02) { descriptor[14] = '1'; } else { descriptor[14] = '0'; }
- if((data_blocks - 1) & 0x01) { descriptor[15] = '1'; } else { descriptor[15] = '0'; }
- descriptor[16] = '\0';
- if(debug) printf("Mode Message = %s\n", descriptor);
- }
-
- /* Split into 4-bit codewords */
- for(i = 0; i < 4; i++) {
- if(descriptor[i * 4] == '1') { desc_data[i] += 8; }
- if(descriptor[(i * 4) + 1] == '1') { desc_data[i] += 4; }
- if(descriptor[(i * 4) + 2] == '1') { desc_data[i] += 2; }
- if(descriptor[(i * 4) + 3] == '1') { desc_data[i] += 1; }
- }
-
- /* Add reed-solomon error correction with Galois field GF(16) and prime modulus
- x^4 + x + 1 (section 7.2.3)*/
-
- rs_init_gf(0x13);
- if(compact) {
- rs_init_code(5, 1);
- rs_encode(2, desc_data, desc_ecc);
- for(i = 0; i < 5; i++) {
- if(desc_ecc[4 - i] & 0x08) { descriptor[(i * 4) + 8] = '1'; } else { descriptor[(i * 4) + 8] = '0'; }
- if(desc_ecc[4 - i] & 0x04) { descriptor[(i * 4) + 9] = '1'; } else { descriptor[(i * 4) + 9] = '0'; }
- if(desc_ecc[4 - i] & 0x02) { descriptor[(i * 4) + 10] = '1'; } else { descriptor[(i * 4) + 10] = '0'; }
- if(desc_ecc[4 - i] & 0x01) { descriptor[(i * 4) + 11] = '1'; } else { descriptor[(i * 4) + 11] = '0'; }
- }
- } else {
- rs_init_code(6, 1);
- rs_encode(4, desc_data, desc_ecc);
- for(i = 0; i < 6; i++) {
- if(desc_ecc[5 - i] & 0x08) { descriptor[(i * 4) + 16] = '1'; } else { descriptor[(i * 4) + 16] = '0'; }
- if(desc_ecc[5 - i] & 0x04) { descriptor[(i * 4) + 17] = '1'; } else { descriptor[(i * 4) + 17] = '0'; }
- if(desc_ecc[5 - i] & 0x02) { descriptor[(i * 4) + 18] = '1'; } else { descriptor[(i * 4) + 18] = '0'; }
- if(desc_ecc[5 - i] & 0x01) { descriptor[(i * 4) + 19] = '1'; } else { descriptor[(i * 4) + 19] = '0'; }
- }
- }
- rs_free();
-
- /* Merge descriptor with the rest of the symbol */
- for(i = 0; i < 40; i++) {
- if(compact) {
- bit_pattern[2000 + i - 2] = descriptor[i];
- } else {
- bit_pattern[20000 + i - 2] = descriptor[i];
- }
- }
-
- /* Plot all of the data into the symbol in pre-defined spiral pattern */
- if(compact) {
-
- for(y = AztecCompactOffset[layers - 1]; y < (27 - AztecCompactOffset[layers - 1]); y++) {
- for(x = AztecCompactOffset[layers - 1]; x < (27 - AztecCompactOffset[layers - 1]); x++) {
- if(CompactAztecMap[(y * 27) + x] == 1) {
- set_module(symbol, y - AztecCompactOffset[layers - 1], x - AztecCompactOffset[layers - 1]);
- }
- if(CompactAztecMap[(y * 27) + x] >= 2) {
- if(bit_pattern[CompactAztecMap[(y * 27) + x] - 2] == '1') {
- set_module(symbol, y - AztecCompactOffset[layers - 1], x - AztecCompactOffset[layers - 1]);
- }
- }
- }
- symbol->row_height[y - AztecCompactOffset[layers - 1]] = 1;
- }
- symbol->rows = 27 - (2 * AztecCompactOffset[layers - 1]);
- symbol->width = 27 - (2 * AztecCompactOffset[layers - 1]);
- } else {
-
- for(y = AztecOffset[layers - 1]; y < (151 - AztecOffset[layers - 1]); y++) {
- for(x = AztecOffset[layers - 1]; x < (151 - AztecOffset[layers - 1]); x++) {
- if(AztecMap[(y * 151) + x] == 1) {
- set_module(symbol, y - AztecOffset[layers - 1], x - AztecOffset[layers - 1]);
- }
- if(AztecMap[(y * 151) + x] >= 2) {
- if(bit_pattern[AztecMap[(y * 151) + x] - 2] == '1') {
- set_module(symbol, y - AztecOffset[layers - 1], x - AztecOffset[layers - 1]);
- }
- }
- }
- symbol->row_height[y - AztecOffset[layers - 1]] = 1;
- }
- symbol->rows = 151 - (2 * AztecOffset[layers - 1]);
- symbol->width = 151 - (2 * AztecOffset[layers - 1]);
- }
-
- return err_code;
-}
-
-int aztec_runes(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- int input_value, error_number, i, y, x;
- char binary_string[28];
- unsigned char data_codewords[3], ecc_codewords[6];
-
- error_number = 0;
- input_value = 0;
- if(length > 3) {
- strcpy(symbol->errtxt, "Input too large");
- return ERROR_INVALID_DATA1;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number != 0) {
- strcpy(symbol->errtxt, "Invalid characters in input");
- return ERROR_INVALID_DATA1;
- }
- switch(length) {
- case 3: input_value = 100 * ctoi(source[0]);
- input_value += 10 * ctoi(source[1]);
- input_value += ctoi(source[2]);
- break;
- case 2: input_value = 10 * ctoi(source[0]);
- input_value += ctoi(source[1]);
- break;
- case 1: input_value = ctoi(source[0]);
- break;
- }
-
- if(input_value > 255) {
- strcpy(symbol->errtxt, "Input too large");
- return ERROR_INVALID_DATA1;
- }
-
- strcpy(binary_string, "");
- if(input_value & 0x80) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(input_value & 0x40) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(input_value & 0x20) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(input_value & 0x10) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(input_value & 0x08) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(input_value & 0x04) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(input_value & 0x02) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
- if(input_value & 0x01) { concat(binary_string, "1"); } else { concat(binary_string, "0"); }
-
- data_codewords[0] = 0;
- data_codewords[1] = 0;
-
- for(i = 0; i < 2; i++) {
- if(binary_string[i * 4] == '1') { data_codewords[i] += 8; }
- if(binary_string[(i * 4) + 1] == '1') { data_codewords[i] += 4; }
- if(binary_string[(i * 4) + 2] == '1') { data_codewords[i] += 2; }
- if(binary_string[(i * 4) + 3] == '1') { data_codewords[i] += 1; }
- }
-
- rs_init_gf(0x13);
- rs_init_code(5, 1);
- rs_encode(2, data_codewords, ecc_codewords);
- rs_free();
-
- strcpy(binary_string, "");
-
- for(i = 0; i < 5; i++) {
- if(ecc_codewords[4 - i] & 0x08) { binary_string[(i * 4) + 8] = '1'; } else { binary_string[(i * 4) + 8] = '0'; }
- if(ecc_codewords[4 - i] & 0x04) { binary_string[(i * 4) + 9] = '1'; } else { binary_string[(i * 4) + 9] = '0'; }
- if(ecc_codewords[4 - i] & 0x02) { binary_string[(i * 4) + 10] = '1'; } else { binary_string[(i * 4) + 10] = '0'; }
- if(ecc_codewords[4 - i] & 0x01) { binary_string[(i * 4) + 11] = '1'; } else { binary_string[(i * 4) + 11] = '0'; }
- }
-
- for(i = 0; i < 28; i += 2) {
- if(binary_string[i] == '1') { binary_string[i] = '0'; } else { binary_string[i] = '1'; }
- }
-
- for(y = 8; y < 19; y++) {
- for(x = 8; x < 19; x++) {
- if(CompactAztecMap[(y * 27) + x] == 1) {
- set_module(symbol, y - 8, x - 8);
- }
- if(CompactAztecMap[(y * 27) + x] >= 2) {
- if(binary_string[CompactAztecMap[(y * 27) + x] - 2000] == '1') {
- set_module(symbol, y - 8, x - 8);
- }
- }
- }
- symbol->row_height[y - 8] = 1;
- }
- symbol->rows = 11;
- symbol->width = 11;
-
- return 0;
-}
diff --git a/3rdparty/zint-2.4.4/backend/aztec.h b/3rdparty/zint-2.4.4/backend/aztec.h
deleted file mode 100644
index 93e0e27..0000000
--- a/3rdparty/zint-2.4.4/backend/aztec.h
+++ /dev/null
@@ -1,291 +0,0 @@
-/* aztec.c - Handles Aztec Mesa 2D Symbols */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#define UPPER 1
-#define LOWER 2
-#define MIXED 4
-#define PUNC 8
-#define DIGIT 16
-#define BINARY 32
-
-static int AztecMap[] = { /* 151 x 151 data grid */
- 19969,19968,18851,18853,18855,18857,18859,18861,18863,18865,18867,0,18869,18871,18873,18875,18877,18879,18881,18883,18885,18887,18889,18891,18893,18895,18897,0,18899,18901,18903,18905,18907,18909,18911,18913,18915,18917,18919,18921,18923,18925,18927,0,18929,18931,18933,18935,18937,18939,18941,18943,18945,18947,18949,18951,18953,18955,18957,0,18959,18961,18963,18965,18967,18969,18971,18973,18975,18977,18979,18981,18983,18985,18987,0,18989,18991,18993,18995,18997,18999,19001,19003,19005,19007,19009,19011,19013,19015,19017,0,19019,19021,19023,19025,19027,19029,19031,19033,19035,19037,19039,19041,19043,19045,19047,0,19049,19051,19053,19055,19057,19059,19061,19063,19065,19067,19069,19071,19073,19075,19077,0,19079,19081,19083,19085,19087,19089,19091,19093,19095,19097,19099,19101,19103,19105,19107,0,19109,19111,19113,19115,19117,19119,19121,19123,19125,19127,19129,
- 19967,19966,18850,18852,18854,18856,18858,18860,18862,18864,18866,1,18868,18870,18872,18874,18876,18878,18880,18882,18884,18886,18888,18890,18892,18894,18896,1,18898,18900,18902,18904,18906,18908,18910,18912,18914,18916,18918,18920,18922,18924,18926,1,18928,18930,18932,18934,18936,18938,18940,18942,18944,18946,18948,18950,18952,18954,18956,1,18958,18960,18962,18964,18966,18968,18970,18972,18974,18976,18978,18980,18982,18984,18986,1,18988,18990,18992,18994,18996,18998,19000,19002,19004,19006,19008,19010,19012,19014,19016,1,19018,19020,19022,19024,19026,19028,19030,19032,19034,19036,19038,19040,19042,19044,19046,1,19048,19050,19052,19054,19056,19058,19060,19062,19064,19066,19068,19070,19072,19074,19076,1,19078,19080,19082,19084,19086,19088,19090,19092,19094,19096,19098,19100,19102,19104,19106,1,19108,19110,19112,19114,19116,19118,19120,19122,19124,19126,19128,
- 19965,19964,18849,18848,17763,17765,17767,17769,17771,17773,17775,0,17777,17779,17781,17783,17785,17787,17789,17791,17793,17795,17797,17799,17801,17803,17805,0,17807,17809,17811,17813,17815,17817,17819,17821,17823,17825,17827,17829,17831,17833,17835,0,17837,17839,17841,17843,17845,17847,17849,17851,17853,17855,17857,17859,17861,17863,17865,0,17867,17869,17871,17873,17875,17877,17879,17881,17883,17885,17887,17889,17891,17893,17895,0,17897,17899,17901,17903,17905,17907,17909,17911,17913,17915,17917,17919,17921,17923,17925,0,17927,17929,17931,17933,17935,17937,17939,17941,17943,17945,17947,17949,17951,17953,17955,0,17957,17959,17961,17963,17965,17967,17969,17971,17973,17975,17977,17979,17981,17983,17985,0,17987,17989,17991,17993,17995,17997,17999,18001,18003,18005,18007,18009,18011,18013,18015,0,18017,18019,18021,18023,18025,18027,18029,18031,18033,19130,19131,
- 19963,19962,18847,18846,17762,17764,17766,17768,17770,17772,17774,1,17776,17778,17780,17782,17784,17786,17788,17790,17792,17794,17796,17798,17800,17802,17804,1,17806,17808,17810,17812,17814,17816,17818,17820,17822,17824,17826,17828,17830,17832,17834,1,17836,17838,17840,17842,17844,17846,17848,17850,17852,17854,17856,17858,17860,17862,17864,1,17866,17868,17870,17872,17874,17876,17878,17880,17882,17884,17886,17888,17890,17892,17894,1,17896,17898,17900,17902,17904,17906,17908,17910,17912,17914,17916,17918,17920,17922,17924,1,17926,17928,17930,17932,17934,17936,17938,17940,17942,17944,17946,17948,17950,17952,17954,1,17956,17958,17960,17962,17964,17966,17968,17970,17972,17974,17976,17978,17980,17982,17984,1,17986,17988,17990,17992,17994,17996,17998,18000,18002,18004,18006,18008,18010,18012,18014,1,18016,18018,18020,18022,18024,18026,18028,18030,18032,19132,19133,
- 19961,19960,18845,18844,17761,17760,16707,16709,16711,16713,16715,0,16717,16719,16721,16723,16725,16727,16729,16731,16733,16735,16737,16739,16741,16743,16745,0,16747,16749,16751,16753,16755,16757,16759,16761,16763,16765,16767,16769,16771,16773,16775,0,16777,16779,16781,16783,16785,16787,16789,16791,16793,16795,16797,16799,16801,16803,16805,0,16807,16809,16811,16813,16815,16817,16819,16821,16823,16825,16827,16829,16831,16833,16835,0,16837,16839,16841,16843,16845,16847,16849,16851,16853,16855,16857,16859,16861,16863,16865,0,16867,16869,16871,16873,16875,16877,16879,16881,16883,16885,16887,16889,16891,16893,16895,0,16897,16899,16901,16903,16905,16907,16909,16911,16913,16915,16917,16919,16921,16923,16925,0,16927,16929,16931,16933,16935,16937,16939,16941,16943,16945,16947,16949,16951,16953,16955,0,16957,16959,16961,16963,16965,16967,16969,18034,18035,19134,19135,
- 19959,19958,18843,18842,17759,17758,16706,16708,16710,16712,16714,1,16716,16718,16720,16722,16724,16726,16728,16730,16732,16734,16736,16738,16740,16742,16744,1,16746,16748,16750,16752,16754,16756,16758,16760,16762,16764,16766,16768,16770,16772,16774,1,16776,16778,16780,16782,16784,16786,16788,16790,16792,16794,16796,16798,16800,16802,16804,1,16806,16808,16810,16812,16814,16816,16818,16820,16822,16824,16826,16828,16830,16832,16834,1,16836,16838,16840,16842,16844,16846,16848,16850,16852,16854,16856,16858,16860,16862,16864,1,16866,16868,16870,16872,16874,16876,16878,16880,16882,16884,16886,16888,16890,16892,16894,1,16896,16898,16900,16902,16904,16906,16908,16910,16912,16914,16916,16918,16920,16922,16924,1,16926,16928,16930,16932,16934,16936,16938,16940,16942,16944,16946,16948,16950,16952,16954,1,16956,16958,16960,16962,16964,16966,16968,18036,18037,19136,19137,
- 19957,19956,18841,18840,17757,17756,16705,16704,15683,15685,15687,0,15689,15691,15693,15695,15697,15699,15701,15703,15705,15707,15709,15711,15713,15715,15717,0,15719,15721,15723,15725,15727,15729,15731,15733,15735,15737,15739,15741,15743,15745,15747,0,15749,15751,15753,15755,15757,15759,15761,15763,15765,15767,15769,15771,15773,15775,15777,0,15779,15781,15783,15785,15787,15789,15791,15793,15795,15797,15799,15801,15803,15805,15807,0,15809,15811,15813,15815,15817,15819,15821,15823,15825,15827,15829,15831,15833,15835,15837,0,15839,15841,15843,15845,15847,15849,15851,15853,15855,15857,15859,15861,15863,15865,15867,0,15869,15871,15873,15875,15877,15879,15881,15883,15885,15887,15889,15891,15893,15895,15897,0,15899,15901,15903,15905,15907,15909,15911,15913,15915,15917,15919,15921,15923,15925,15927,0,15929,15931,15933,15935,15937,16970,16971,18038,18039,19138,19139,
- 19955,19954,18839,18838,17755,17754,16703,16702,15682,15684,15686,1,15688,15690,15692,15694,15696,15698,15700,15702,15704,15706,15708,15710,15712,15714,15716,1,15718,15720,15722,15724,15726,15728,15730,15732,15734,15736,15738,15740,15742,15744,15746,1,15748,15750,15752,15754,15756,15758,15760,15762,15764,15766,15768,15770,15772,15774,15776,1,15778,15780,15782,15784,15786,15788,15790,15792,15794,15796,15798,15800,15802,15804,15806,1,15808,15810,15812,15814,15816,15818,15820,15822,15824,15826,15828,15830,15832,15834,15836,1,15838,15840,15842,15844,15846,15848,15850,15852,15854,15856,15858,15860,15862,15864,15866,1,15868,15870,15872,15874,15876,15878,15880,15882,15884,15886,15888,15890,15892,15894,15896,1,15898,15900,15902,15904,15906,15908,15910,15912,15914,15916,15918,15920,15922,15924,15926,1,15928,15930,15932,15934,15936,16972,16973,18040,18041,19140,19141,
- 19953,19952,18837,18836,17753,17752,16701,16700,15681,15680,14691,0,14693,14695,14697,14699,14701,14703,14705,14707,14709,14711,14713,14715,14717,14719,14721,0,14723,14725,14727,14729,14731,14733,14735,14737,14739,14741,14743,14745,14747,14749,14751,0,14753,14755,14757,14759,14761,14763,14765,14767,14769,14771,14773,14775,14777,14779,14781,0,14783,14785,14787,14789,14791,14793,14795,14797,14799,14801,14803,14805,14807,14809,14811,0,14813,14815,14817,14819,14821,14823,14825,14827,14829,14831,14833,14835,14837,14839,14841,0,14843,14845,14847,14849,14851,14853,14855,14857,14859,14861,14863,14865,14867,14869,14871,0,14873,14875,14877,14879,14881,14883,14885,14887,14889,14891,14893,14895,14897,14899,14901,0,14903,14905,14907,14909,14911,14913,14915,14917,14919,14921,14923,14925,14927,14929,14931,0,14933,14935,14937,15938,15939,16974,16975,18042,18043,19142,19143,
- 19951,19950,18835,18834,17751,17750,16699,16698,15679,15678,14690,1,14692,14694,14696,14698,14700,14702,14704,14706,14708,14710,14712,14714,14716,14718,14720,1,14722,14724,14726,14728,14730,14732,14734,14736,14738,14740,14742,14744,14746,14748,14750,1,14752,14754,14756,14758,14760,14762,14764,14766,14768,14770,14772,14774,14776,14778,14780,1,14782,14784,14786,14788,14790,14792,14794,14796,14798,14800,14802,14804,14806,14808,14810,1,14812,14814,14816,14818,14820,14822,14824,14826,14828,14830,14832,14834,14836,14838,14840,1,14842,14844,14846,14848,14850,14852,14854,14856,14858,14860,14862,14864,14866,14868,14870,1,14872,14874,14876,14878,14880,14882,14884,14886,14888,14890,14892,14894,14896,14898,14900,1,14902,14904,14906,14908,14910,14912,14914,14916,14918,14920,14922,14924,14926,14928,14930,1,14932,14934,14936,15940,15941,16976,16977,18044,18045,19144,19145,
- 19949,19948,18833,18832,17749,17748,16697,16696,15677,15676,14689,0,14688,13731,13733,13735,13737,13739,13741,13743,13745,13747,13749,13751,13753,13755,13757,0,13759,13761,13763,13765,13767,13769,13771,13773,13775,13777,13779,13781,13783,13785,13787,0,13789,13791,13793,13795,13797,13799,13801,13803,13805,13807,13809,13811,13813,13815,13817,0,13819,13821,13823,13825,13827,13829,13831,13833,13835,13837,13839,13841,13843,13845,13847,0,13849,13851,13853,13855,13857,13859,13861,13863,13865,13867,13869,13871,13873,13875,13877,0,13879,13881,13883,13885,13887,13889,13891,13893,13895,13897,13899,13901,13903,13905,13907,0,13909,13911,13913,13915,13917,13919,13921,13923,13925,13927,13929,13931,13933,13935,13937,0,13939,13941,13943,13945,13947,13949,13951,13953,13955,13957,13959,13961,13963,13965,13967,0,13969,14938,14939,15942,15943,16978,16979,18046,18047,19146,19147,
- 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
- 19947,19946,18831,18830,17747,17746,16695,16694,15675,15674,14687,0,14686,13730,13732,13734,13736,13738,13740,13742,13744,13746,13748,13750,13752,13754,13756,0,13758,13760,13762,13764,13766,13768,13770,13772,13774,13776,13778,13780,13782,13784,13786,0,13788,13790,13792,13794,13796,13798,13800,13802,13804,13806,13808,13810,13812,13814,13816,0,13818,13820,13822,13824,13826,13828,13830,13832,13834,13836,13838,13840,13842,13844,13846,0,13848,13850,13852,13854,13856,13858,13860,13862,13864,13866,13868,13870,13872,13874,13876,0,13878,13880,13882,13884,13886,13888,13890,13892,13894,13896,13898,13900,13902,13904,13906,0,13908,13910,13912,13914,13916,13918,13920,13922,13924,13926,13928,13930,13932,13934,13936,0,13938,13940,13942,13944,13946,13948,13950,13952,13954,13956,13958,13960,13962,13964,13966,0,13968,14940,14941,15944,15945,16980,16981,18048,18049,19148,19149,
- 19945,19944,18829,18828,17745,17744,16693,16692,15673,15672,14685,1,14684,13729,13728,12803,12805,12807,12809,12811,12813,12815,12817,12819,12821,12823,12825,1,12827,12829,12831,12833,12835,12837,12839,12841,12843,12845,12847,12849,12851,12853,12855,1,12857,12859,12861,12863,12865,12867,12869,12871,12873,12875,12877,12879,12881,12883,12885,1,12887,12889,12891,12893,12895,12897,12899,12901,12903,12905,12907,12909,12911,12913,12915,1,12917,12919,12921,12923,12925,12927,12929,12931,12933,12935,12937,12939,12941,12943,12945,1,12947,12949,12951,12953,12955,12957,12959,12961,12963,12965,12967,12969,12971,12973,12975,1,12977,12979,12981,12983,12985,12987,12989,12991,12993,12995,12997,12999,13001,13003,13005,1,13007,13009,13011,13013,13015,13017,13019,13021,13023,13025,13027,13029,13031,13033,13970,1,13971,14942,14943,15946,15947,16982,16983,18050,18051,19150,19151,
- 19943,19942,18827,18826,17743,17742,16691,16690,15671,15670,14683,0,14682,13727,13726,12802,12804,12806,12808,12810,12812,12814,12816,12818,12820,12822,12824,0,12826,12828,12830,12832,12834,12836,12838,12840,12842,12844,12846,12848,12850,12852,12854,0,12856,12858,12860,12862,12864,12866,12868,12870,12872,12874,12876,12878,12880,12882,12884,0,12886,12888,12890,12892,12894,12896,12898,12900,12902,12904,12906,12908,12910,12912,12914,0,12916,12918,12920,12922,12924,12926,12928,12930,12932,12934,12936,12938,12940,12942,12944,0,12946,12948,12950,12952,12954,12956,12958,12960,12962,12964,12966,12968,12970,12972,12974,0,12976,12978,12980,12982,12984,12986,12988,12990,12992,12994,12996,12998,13000,13002,13004,0,13006,13008,13010,13012,13014,13016,13018,13020,13022,13024,13026,13028,13030,13032,13972,0,13973,14944,14945,15948,15949,16984,16985,18052,18053,19152,19153,
- 19941,19940,18825,18824,17741,17740,16689,16688,15669,15668,14681,1,14680,13725,13724,12801,12800,11907,11909,11911,11913,11915,11917,11919,11921,11923,11925,1,11927,11929,11931,11933,11935,11937,11939,11941,11943,11945,11947,11949,11951,11953,11955,1,11957,11959,11961,11963,11965,11967,11969,11971,11973,11975,11977,11979,11981,11983,11985,1,11987,11989,11991,11993,11995,11997,11999,12001,12003,12005,12007,12009,12011,12013,12015,1,12017,12019,12021,12023,12025,12027,12029,12031,12033,12035,12037,12039,12041,12043,12045,1,12047,12049,12051,12053,12055,12057,12059,12061,12063,12065,12067,12069,12071,12073,12075,1,12077,12079,12081,12083,12085,12087,12089,12091,12093,12095,12097,12099,12101,12103,12105,1,12107,12109,12111,12113,12115,12117,12119,12121,12123,12125,12127,12129,13034,13035,13974,1,13975,14946,14947,15950,15951,16986,16987,18054,18055,19154,19155,
- 19939,19938,18823,18822,17739,17738,16687,16686,15667,15666,14679,0,14678,13723,13722,12799,12798,11906,11908,11910,11912,11914,11916,11918,11920,11922,11924,0,11926,11928,11930,11932,11934,11936,11938,11940,11942,11944,11946,11948,11950,11952,11954,0,11956,11958,11960,11962,11964,11966,11968,11970,11972,11974,11976,11978,11980,11982,11984,0,11986,11988,11990,11992,11994,11996,11998,12000,12002,12004,12006,12008,12010,12012,12014,0,12016,12018,12020,12022,12024,12026,12028,12030,12032,12034,12036,12038,12040,12042,12044,0,12046,12048,12050,12052,12054,12056,12058,12060,12062,12064,12066,12068,12070,12072,12074,0,12076,12078,12080,12082,12084,12086,12088,12090,12092,12094,12096,12098,12100,12102,12104,0,12106,12108,12110,12112,12114,12116,12118,12120,12122,12124,12126,12128,13036,13037,13976,0,13977,14948,14949,15952,15953,16988,16989,18056,18057,19156,19157,
- 19937,19936,18821,18820,17737,17736,16685,16684,15665,15664,14677,1,14676,13721,13720,12797,12796,11905,11904,11043,11045,11047,11049,11051,11053,11055,11057,1,11059,11061,11063,11065,11067,11069,11071,11073,11075,11077,11079,11081,11083,11085,11087,1,11089,11091,11093,11095,11097,11099,11101,11103,11105,11107,11109,11111,11113,11115,11117,1,11119,11121,11123,11125,11127,11129,11131,11133,11135,11137,11139,11141,11143,11145,11147,1,11149,11151,11153,11155,11157,11159,11161,11163,11165,11167,11169,11171,11173,11175,11177,1,11179,11181,11183,11185,11187,11189,11191,11193,11195,11197,11199,11201,11203,11205,11207,1,11209,11211,11213,11215,11217,11219,11221,11223,11225,11227,11229,11231,11233,11235,11237,1,11239,11241,11243,11245,11247,11249,11251,11253,11255,11257,12130,12131,13038,13039,13978,1,13979,14950,14951,15954,15955,16990,16991,18058,18059,19158,19159,
- 19935,19934,18819,18818,17735,17734,16683,16682,15663,15662,14675,0,14674,13719,13718,12795,12794,11903,11902,11042,11044,11046,11048,11050,11052,11054,11056,0,11058,11060,11062,11064,11066,11068,11070,11072,11074,11076,11078,11080,11082,11084,11086,0,11088,11090,11092,11094,11096,11098,11100,11102,11104,11106,11108,11110,11112,11114,11116,0,11118,11120,11122,11124,11126,11128,11130,11132,11134,11136,11138,11140,11142,11144,11146,0,11148,11150,11152,11154,11156,11158,11160,11162,11164,11166,11168,11170,11172,11174,11176,0,11178,11180,11182,11184,11186,11188,11190,11192,11194,11196,11198,11200,11202,11204,11206,0,11208,11210,11212,11214,11216,11218,11220,11222,11224,11226,11228,11230,11232,11234,11236,0,11238,11240,11242,11244,11246,11248,11250,11252,11254,11256,12132,12133,13040,13041,13980,0,13981,14952,14953,15956,15957,16992,16993,18060,18061,19160,19161,
- 19933,19932,18817,18816,17733,17732,16681,16680,15661,15660,14673,1,14672,13717,13716,12793,12792,11901,11900,11041,11040,10211,10213,10215,10217,10219,10221,1,10223,10225,10227,10229,10231,10233,10235,10237,10239,10241,10243,10245,10247,10249,10251,1,10253,10255,10257,10259,10261,10263,10265,10267,10269,10271,10273,10275,10277,10279,10281,1,10283,10285,10287,10289,10291,10293,10295,10297,10299,10301,10303,10305,10307,10309,10311,1,10313,10315,10317,10319,10321,10323,10325,10327,10329,10331,10333,10335,10337,10339,10341,1,10343,10345,10347,10349,10351,10353,10355,10357,10359,10361,10363,10365,10367,10369,10371,1,10373,10375,10377,10379,10381,10383,10385,10387,10389,10391,10393,10395,10397,10399,10401,1,10403,10405,10407,10409,10411,10413,10415,10417,11258,11259,12134,12135,13042,13043,13982,1,13983,14954,14955,15958,15959,16994,16995,18062,18063,19162,19163,
- 19931,19930,18815,18814,17731,17730,16679,16678,15659,15658,14671,0,14670,13715,13714,12791,12790,11899,11898,11039,11038,10210,10212,10214,10216,10218,10220,0,10222,10224,10226,10228,10230,10232,10234,10236,10238,10240,10242,10244,10246,10248,10250,0,10252,10254,10256,10258,10260,10262,10264,10266,10268,10270,10272,10274,10276,10278,10280,0,10282,10284,10286,10288,10290,10292,10294,10296,10298,10300,10302,10304,10306,10308,10310,0,10312,10314,10316,10318,10320,10322,10324,10326,10328,10330,10332,10334,10336,10338,10340,0,10342,10344,10346,10348,10350,10352,10354,10356,10358,10360,10362,10364,10366,10368,10370,0,10372,10374,10376,10378,10380,10382,10384,10386,10388,10390,10392,10394,10396,10398,10400,0,10402,10404,10406,10408,10410,10412,10414,10416,11260,11261,12136,12137,13044,13045,13984,0,13985,14956,14957,15960,15961,16996,16997,18064,18065,19164,19165,
- 19929,19928,18813,18812,17729,17728,16677,16676,15657,15656,14669,1,14668,13713,13712,12789,12788,11897,11896,11037,11036,10209,10208,9411,9413,9415,9417,1,9419,9421,9423,9425,9427,9429,9431,9433,9435,9437,9439,9441,9443,9445,9447,1,9449,9451,9453,9455,9457,9459,9461,9463,9465,9467,9469,9471,9473,9475,9477,1,9479,9481,9483,9485,9487,9489,9491,9493,9495,9497,9499,9501,9503,9505,9507,1,9509,9511,9513,9515,9517,9519,9521,9523,9525,9527,9529,9531,9533,9535,9537,1,9539,9541,9543,9545,9547,9549,9551,9553,9555,9557,9559,9561,9563,9565,9567,1,9569,9571,9573,9575,9577,9579,9581,9583,9585,9587,9589,9591,9593,9595,9597,1,9599,9601,9603,9605,9607,9609,10418,10419,11262,11263,12138,12139,13046,13047,13986,1,13987,14958,14959,15962,15963,16998,16999,18066,18067,19166,19167,
- 19927,19926,18811,18810,17727,17726,16675,16674,15655,15654,14667,0,14666,13711,13710,12787,12786,11895,11894,11035,11034,10207,10206,9410,9412,9414,9416,0,9418,9420,9422,9424,9426,9428,9430,9432,9434,9436,9438,9440,9442,9444,9446,0,9448,9450,9452,9454,9456,9458,9460,9462,9464,9466,9468,9470,9472,9474,9476,0,9478,9480,9482,9484,9486,9488,9490,9492,9494,9496,9498,9500,9502,9504,9506,0,9508,9510,9512,9514,9516,9518,9520,9522,9524,9526,9528,9530,9532,9534,9536,0,9538,9540,9542,9544,9546,9548,9550,9552,9554,9556,9558,9560,9562,9564,9566,0,9568,9570,9572,9574,9576,9578,9580,9582,9584,9586,9588,9590,9592,9594,9596,0,9598,9600,9602,9604,9606,9608,10420,10421,11264,11265,12140,12141,13048,13049,13988,0,13989,14960,14961,15964,15965,17000,17001,18068,18069,19168,19169,
- 19925,19924,18809,18808,17725,17724,16673,16672,15653,15652,14665,1,14664,13709,13708,12785,12784,11893,11892,11033,11032,10205,10204,9409,9408,8643,8645,1,8647,8649,8651,8653,8655,8657,8659,8661,8663,8665,8667,8669,8671,8673,8675,1,8677,8679,8681,8683,8685,8687,8689,8691,8693,8695,8697,8699,8701,8703,8705,1,8707,8709,8711,8713,8715,8717,8719,8721,8723,8725,8727,8729,8731,8733,8735,1,8737,8739,8741,8743,8745,8747,8749,8751,8753,8755,8757,8759,8761,8763,8765,1,8767,8769,8771,8773,8775,8777,8779,8781,8783,8785,8787,8789,8791,8793,8795,1,8797,8799,8801,8803,8805,8807,8809,8811,8813,8815,8817,8819,8821,8823,8825,1,8827,8829,8831,8833,9610,9611,10422,10423,11266,11267,12142,12143,13050,13051,13990,1,13991,14962,14963,15966,15967,17002,17003,18070,18071,19170,19171,
- 19923,19922,18807,18806,17723,17722,16671,16670,15651,15650,14663,0,14662,13707,13706,12783,12782,11891,11890,11031,11030,10203,10202,9407,9406,8642,8644,0,8646,8648,8650,8652,8654,8656,8658,8660,8662,8664,8666,8668,8670,8672,8674,0,8676,8678,8680,8682,8684,8686,8688,8690,8692,8694,8696,8698,8700,8702,8704,0,8706,8708,8710,8712,8714,8716,8718,8720,8722,8724,8726,8728,8730,8732,8734,0,8736,8738,8740,8742,8744,8746,8748,8750,8752,8754,8756,8758,8760,8762,8764,0,8766,8768,8770,8772,8774,8776,8778,8780,8782,8784,8786,8788,8790,8792,8794,0,8796,8798,8800,8802,8804,8806,8808,8810,8812,8814,8816,8818,8820,8822,8824,0,8826,8828,8830,8832,9612,9613,10424,10425,11268,11269,12144,12145,13052,13053,13992,0,13993,14964,14965,15968,15969,17004,17005,18072,18073,19172,19173,
- 19921,19920,18805,18804,17721,17720,16669,16668,15649,15648,14661,1,14660,13705,13704,12781,12780,11889,11888,11029,11028,10201,10200,9405,9404,8641,8640,1,7907,7909,7911,7913,7915,7917,7919,7921,7923,7925,7927,7929,7931,7933,7935,1,7937,7939,7941,7943,7945,7947,7949,7951,7953,7955,7957,7959,7961,7963,7965,1,7967,7969,7971,7973,7975,7977,7979,7981,7983,7985,7987,7989,7991,7993,7995,1,7997,7999,8001,8003,8005,8007,8009,8011,8013,8015,8017,8019,8021,8023,8025,1,8027,8029,8031,8033,8035,8037,8039,8041,8043,8045,8047,8049,8051,8053,8055,1,8057,8059,8061,8063,8065,8067,8069,8071,8073,8075,8077,8079,8081,8083,8085,1,8087,8089,8834,8835,9614,9615,10426,10427,11270,11271,12146,12147,13054,13055,13994,1,13995,14966,14967,15970,15971,17006,17007,18074,18075,19174,19175,
- 19919,19918,18803,18802,17719,17718,16667,16666,15647,15646,14659,0,14658,13703,13702,12779,12778,11887,11886,11027,11026,10199,10198,9403,9402,8639,8638,0,7906,7908,7910,7912,7914,7916,7918,7920,7922,7924,7926,7928,7930,7932,7934,0,7936,7938,7940,7942,7944,7946,7948,7950,7952,7954,7956,7958,7960,7962,7964,0,7966,7968,7970,7972,7974,7976,7978,7980,7982,7984,7986,7988,7990,7992,7994,0,7996,7998,8000,8002,8004,8006,8008,8010,8012,8014,8016,8018,8020,8022,8024,0,8026,8028,8030,8032,8034,8036,8038,8040,8042,8044,8046,8048,8050,8052,8054,0,8056,8058,8060,8062,8064,8066,8068,8070,8072,8074,8076,8078,8080,8082,8084,0,8086,8088,8836,8837,9616,9617,10428,10429,11272,11273,12148,12149,13056,13057,13996,0,13997,14968,14969,15972,15973,17008,17009,18076,18077,19176,19177,
- 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
- 19917,19916,18801,18800,17717,17716,16665,16664,15645,15644,14657,0,14656,13701,13700,12777,12776,11885,11884,11025,11024,10197,10196,9401,9400,8637,8636,0,7905,7904,7203,7205,7207,7209,7211,7213,7215,7217,7219,7221,7223,7225,7227,0,7229,7231,7233,7235,7237,7239,7241,7243,7245,7247,7249,7251,7253,7255,7257,0,7259,7261,7263,7265,7267,7269,7271,7273,7275,7277,7279,7281,7283,7285,7287,0,7289,7291,7293,7295,7297,7299,7301,7303,7305,7307,7309,7311,7313,7315,7317,0,7319,7321,7323,7325,7327,7329,7331,7333,7335,7337,7339,7341,7343,7345,7347,0,7349,7351,7353,7355,7357,7359,7361,7363,7365,7367,7369,7371,7373,7375,7377,0,8090,8091,8838,8839,9618,9619,10430,10431,11274,11275,12150,12151,13058,13059,13998,0,13999,14970,14971,15974,15975,17010,17011,18078,18079,19178,19179,
- 19915,19914,18799,18798,17715,17714,16663,16662,15643,15642,14655,1,14654,13699,13698,12775,12774,11883,11882,11023,11022,10195,10194,9399,9398,8635,8634,1,7903,7902,7202,7204,7206,7208,7210,7212,7214,7216,7218,7220,7222,7224,7226,1,7228,7230,7232,7234,7236,7238,7240,7242,7244,7246,7248,7250,7252,7254,7256,1,7258,7260,7262,7264,7266,7268,7270,7272,7274,7276,7278,7280,7282,7284,7286,1,7288,7290,7292,7294,7296,7298,7300,7302,7304,7306,7308,7310,7312,7314,7316,1,7318,7320,7322,7324,7326,7328,7330,7332,7334,7336,7338,7340,7342,7344,7346,1,7348,7350,7352,7354,7356,7358,7360,7362,7364,7366,7368,7370,7372,7374,7376,1,8092,8093,8840,8841,9620,9621,10432,10433,11276,11277,12152,12153,13060,13061,14000,1,14001,14972,14973,15976,15977,17012,17013,18080,18081,19180,19181,
- 19913,19912,18797,18796,17713,17712,16661,16660,15641,15640,14653,0,14652,13697,13696,12773,12772,11881,11880,11021,11020,10193,10192,9397,9396,8633,8632,0,7901,7900,7201,7200,6531,6533,6535,6537,6539,6541,6543,6545,6547,6549,6551,0,6553,6555,6557,6559,6561,6563,6565,6567,6569,6571,6573,6575,6577,6579,6581,0,6583,6585,6587,6589,6591,6593,6595,6597,6599,6601,6603,6605,6607,6609,6611,0,6613,6615,6617,6619,6621,6623,6625,6627,6629,6631,6633,6635,6637,6639,6641,0,6643,6645,6647,6649,6651,6653,6655,6657,6659,6661,6663,6665,6667,6669,6671,0,6673,6675,6677,6679,6681,6683,6685,6687,6689,6691,6693,6695,6697,7378,7379,0,8094,8095,8842,8843,9622,9623,10434,10435,11278,11279,12154,12155,13062,13063,14002,0,14003,14974,14975,15978,15979,17014,17015,18082,18083,19182,19183,
- 19911,19910,18795,18794,17711,17710,16659,16658,15639,15638,14651,1,14650,13695,13694,12771,12770,11879,11878,11019,11018,10191,10190,9395,9394,8631,8630,1,7899,7898,7199,7198,6530,6532,6534,6536,6538,6540,6542,6544,6546,6548,6550,1,6552,6554,6556,6558,6560,6562,6564,6566,6568,6570,6572,6574,6576,6578,6580,1,6582,6584,6586,6588,6590,6592,6594,6596,6598,6600,6602,6604,6606,6608,6610,1,6612,6614,6616,6618,6620,6622,6624,6626,6628,6630,6632,6634,6636,6638,6640,1,6642,6644,6646,6648,6650,6652,6654,6656,6658,6660,6662,6664,6666,6668,6670,1,6672,6674,6676,6678,6680,6682,6684,6686,6688,6690,6692,6694,6696,7380,7381,1,8096,8097,8844,8845,9624,9625,10436,10437,11280,11281,12156,12157,13064,13065,14004,1,14005,14976,14977,15980,15981,17016,17017,18084,18085,19184,19185,
- 19909,19908,18793,18792,17709,17708,16657,16656,15637,15636,14649,0,14648,13693,13692,12769,12768,11877,11876,11017,11016,10189,10188,9393,9392,8629,8628,0,7897,7896,7197,7196,6529,6528,5891,5893,5895,5897,5899,5901,5903,5905,5907,0,5909,5911,5913,5915,5917,5919,5921,5923,5925,5927,5929,5931,5933,5935,5937,0,5939,5941,5943,5945,5947,5949,5951,5953,5955,5957,5959,5961,5963,5965,5967,0,5969,5971,5973,5975,5977,5979,5981,5983,5985,5987,5989,5991,5993,5995,5997,0,5999,6001,6003,6005,6007,6009,6011,6013,6015,6017,6019,6021,6023,6025,6027,0,6029,6031,6033,6035,6037,6039,6041,6043,6045,6047,6049,6698,6699,7382,7383,0,8098,8099,8846,8847,9626,9627,10438,10439,11282,11283,12158,12159,13066,13067,14006,0,14007,14978,14979,15982,15983,17018,17019,18086,18087,19186,19187,
- 19907,19906,18791,18790,17707,17706,16655,16654,15635,15634,14647,1,14646,13691,13690,12767,12766,11875,11874,11015,11014,10187,10186,9391,9390,8627,8626,1,7895,7894,7195,7194,6527,6526,5890,5892,5894,5896,5898,5900,5902,5904,5906,1,5908,5910,5912,5914,5916,5918,5920,5922,5924,5926,5928,5930,5932,5934,5936,1,5938,5940,5942,5944,5946,5948,5950,5952,5954,5956,5958,5960,5962,5964,5966,1,5968,5970,5972,5974,5976,5978,5980,5982,5984,5986,5988,5990,5992,5994,5996,1,5998,6000,6002,6004,6006,6008,6010,6012,6014,6016,6018,6020,6022,6024,6026,1,6028,6030,6032,6034,6036,6038,6040,6042,6044,6046,6048,6700,6701,7384,7385,1,8100,8101,8848,8849,9628,9629,10440,10441,11284,11285,12160,12161,13068,13069,14008,1,14009,14980,14981,15984,15985,17020,17021,18088,18089,19188,19189,
- 19905,19904,18789,18788,17705,17704,16653,16652,15633,15632,14645,0,14644,13689,13688,12765,12764,11873,11872,11013,11012,10185,10184,9389,9388,8625,8624,0,7893,7892,7193,7192,6525,6524,5889,5888,5283,5285,5287,5289,5291,5293,5295,0,5297,5299,5301,5303,5305,5307,5309,5311,5313,5315,5317,5319,5321,5323,5325,0,5327,5329,5331,5333,5335,5337,5339,5341,5343,5345,5347,5349,5351,5353,5355,0,5357,5359,5361,5363,5365,5367,5369,5371,5373,5375,5377,5379,5381,5383,5385,0,5387,5389,5391,5393,5395,5397,5399,5401,5403,5405,5407,5409,5411,5413,5415,0,5417,5419,5421,5423,5425,5427,5429,5431,5433,6050,6051,6702,6703,7386,7387,0,8102,8103,8850,8851,9630,9631,10442,10443,11286,11287,12162,12163,13070,13071,14010,0,14011,14982,14983,15986,15987,17022,17023,18090,18091,19190,19191,
- 19903,19902,18787,18786,17703,17702,16651,16650,15631,15630,14643,1,14642,13687,13686,12763,12762,11871,11870,11011,11010,10183,10182,9387,9386,8623,8622,1,7891,7890,7191,7190,6523,6522,5887,5886,5282,5284,5286,5288,5290,5292,5294,1,5296,5298,5300,5302,5304,5306,5308,5310,5312,5314,5316,5318,5320,5322,5324,1,5326,5328,5330,5332,5334,5336,5338,5340,5342,5344,5346,5348,5350,5352,5354,1,5356,5358,5360,5362,5364,5366,5368,5370,5372,5374,5376,5378,5380,5382,5384,1,5386,5388,5390,5392,5394,5396,5398,5400,5402,5404,5406,5408,5410,5412,5414,1,5416,5418,5420,5422,5424,5426,5428,5430,5432,6052,6053,6704,6705,7388,7389,1,8104,8105,8852,8853,9632,9633,10444,10445,11288,11289,12164,12165,13072,13073,14012,1,14013,14984,14985,15988,15989,17024,17025,18092,18093,19192,19193,
- 19901,19900,18785,18784,17701,17700,16649,16648,15629,15628,14641,0,14640,13685,13684,12761,12760,11869,11868,11009,11008,10181,10180,9385,9384,8621,8620,0,7889,7888,7189,7188,6521,6520,5885,5884,5281,5280,4707,4709,4711,4713,4715,0,4717,4719,4721,4723,4725,4727,4729,4731,4733,4735,4737,4739,4741,4743,4745,0,4747,4749,4751,4753,4755,4757,4759,4761,4763,4765,4767,4769,4771,4773,4775,0,4777,4779,4781,4783,4785,4787,4789,4791,4793,4795,4797,4799,4801,4803,4805,0,4807,4809,4811,4813,4815,4817,4819,4821,4823,4825,4827,4829,4831,4833,4835,0,4837,4839,4841,4843,4845,4847,4849,5434,5435,6054,6055,6706,6707,7390,7391,0,8106,8107,8854,8855,9634,9635,10446,10447,11290,11291,12166,12167,13074,13075,14014,0,14015,14986,14987,15990,15991,17026,17027,18094,18095,19194,19195,
- 19899,19898,18783,18782,17699,17698,16647,16646,15627,15626,14639,1,14638,13683,13682,12759,12758,11867,11866,11007,11006,10179,10178,9383,9382,8619,8618,1,7887,7886,7187,7186,6519,6518,5883,5882,5279,5278,4706,4708,4710,4712,4714,1,4716,4718,4720,4722,4724,4726,4728,4730,4732,4734,4736,4738,4740,4742,4744,1,4746,4748,4750,4752,4754,4756,4758,4760,4762,4764,4766,4768,4770,4772,4774,1,4776,4778,4780,4782,4784,4786,4788,4790,4792,4794,4796,4798,4800,4802,4804,1,4806,4808,4810,4812,4814,4816,4818,4820,4822,4824,4826,4828,4830,4832,4834,1,4836,4838,4840,4842,4844,4846,4848,5436,5437,6056,6057,6708,6709,7392,7393,1,8108,8109,8856,8857,9636,9637,10448,10449,11292,11293,12168,12169,13076,13077,14016,1,14017,14988,14989,15992,15993,17028,17029,18096,18097,19196,19197,
- 19897,19896,18781,18780,17697,17696,16645,16644,15625,15624,14637,0,14636,13681,13680,12757,12756,11865,11864,11005,11004,10177,10176,9381,9380,8617,8616,0,7885,7884,7185,7184,6517,6516,5881,5880,5277,5276,4705,4704,4163,4165,4167,0,4169,4171,4173,4175,4177,4179,4181,4183,4185,4187,4189,4191,4193,4195,4197,0,4199,4201,4203,4205,4207,4209,4211,4213,4215,4217,4219,4221,4223,4225,4227,0,4229,4231,4233,4235,4237,4239,4241,4243,4245,4247,4249,4251,4253,4255,4257,0,4259,4261,4263,4265,4267,4269,4271,4273,4275,4277,4279,4281,4283,4285,4287,0,4289,4291,4293,4295,4297,4850,4851,5438,5439,6058,6059,6710,6711,7394,7395,0,8110,8111,8858,8859,9638,9639,10450,10451,11294,11295,12170,12171,13078,13079,14018,0,14019,14990,14991,15994,15995,17030,17031,18098,18099,19198,19199,
- 19895,19894,18779,18778,17695,17694,16643,16642,15623,15622,14635,1,14634,13679,13678,12755,12754,11863,11862,11003,11002,10175,10174,9379,9378,8615,8614,1,7883,7882,7183,7182,6515,6514,5879,5878,5275,5274,4703,4702,4162,4164,4166,1,4168,4170,4172,4174,4176,4178,4180,4182,4184,4186,4188,4190,4192,4194,4196,1,4198,4200,4202,4204,4206,4208,4210,4212,4214,4216,4218,4220,4222,4224,4226,1,4228,4230,4232,4234,4236,4238,4240,4242,4244,4246,4248,4250,4252,4254,4256,1,4258,4260,4262,4264,4266,4268,4270,4272,4274,4276,4278,4280,4282,4284,4286,1,4288,4290,4292,4294,4296,4852,4853,5440,5441,6060,6061,6712,6713,7396,7397,1,8112,8113,8860,8861,9640,9641,10452,10453,11296,11297,12172,12173,13080,13081,14020,1,14021,14992,14993,15996,15997,17032,17033,18100,18101,19200,19201,
- 19893,19892,18777,18776,17693,17692,16641,16640,15621,15620,14633,0,14632,13677,13676,12753,12752,11861,11860,11001,11000,10173,10172,9377,9376,8613,8612,0,7881,7880,7181,7180,6513,6512,5877,5876,5273,5272,4701,4700,4161,4160,3651,0,3653,3655,3657,3659,3661,3663,3665,3667,3669,3671,3673,3675,3677,3679,3681,0,3683,3685,3687,3689,3691,3693,3695,3697,3699,3701,3703,3705,3707,3709,3711,0,3713,3715,3717,3719,3721,3723,3725,3727,3729,3731,3733,3735,3737,3739,3741,0,3743,3745,3747,3749,3751,3753,3755,3757,3759,3761,3763,3765,3767,3769,3771,0,3773,3775,3777,4298,4299,4854,4855,5442,5443,6062,6063,6714,6715,7398,7399,0,8114,8115,8862,8863,9642,9643,10454,10455,11298,11299,12174,12175,13082,13083,14022,0,14023,14994,14995,15998,15999,17034,17035,18102,18103,19202,19203,
- 19891,19890,18775,18774,17691,17690,16639,16638,15619,15618,14631,1,14630,13675,13674,12751,12750,11859,11858,10999,10998,10171,10170,9375,9374,8611,8610,1,7879,7878,7179,7178,6511,6510,5875,5874,5271,5270,4699,4698,4159,4158,3650,1,3652,3654,3656,3658,3660,3662,3664,3666,3668,3670,3672,3674,3676,3678,3680,1,3682,3684,3686,3688,3690,3692,3694,3696,3698,3700,3702,3704,3706,3708,3710,1,3712,3714,3716,3718,3720,3722,3724,3726,3728,3730,3732,3734,3736,3738,3740,1,3742,3744,3746,3748,3750,3752,3754,3756,3758,3760,3762,3764,3766,3768,3770,1,3772,3774,3776,4300,4301,4856,4857,5444,5445,6064,6065,6716,6717,7400,7401,1,8116,8117,8864,8865,9644,9645,10456,10457,11300,11301,12176,12177,13084,13085,14024,1,14025,14996,14997,16000,16001,17036,17037,18104,18105,19204,19205,
- 19889,19888,18773,18772,17689,17688,16637,16636,15617,15616,14629,0,14628,13673,13672,12749,12748,11857,11856,10997,10996,10169,10168,9373,9372,8609,8608,0,7877,7876,7177,7176,6509,6508,5873,5872,5269,5268,4697,4696,4157,4156,3649,0,3648,3171,3173,3175,3177,3179,3181,3183,3185,3187,3189,3191,3193,3195,3197,0,3199,3201,3203,3205,3207,3209,3211,3213,3215,3217,3219,3221,3223,3225,3227,0,3229,3231,3233,3235,3237,3239,3241,3243,3245,3247,3249,3251,3253,3255,3257,0,3259,3261,3263,3265,3267,3269,3271,3273,3275,3277,3279,3281,3283,3285,3287,0,3289,3778,3779,4302,4303,4858,4859,5446,5447,6066,6067,6718,6719,7402,7403,0,8118,8119,8866,8867,9646,9647,10458,10459,11302,11303,12178,12179,13086,13087,14026,0,14027,14998,14999,16002,16003,17038,17039,18106,18107,19206,19207,
- 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
- 19887,19886,18771,18770,17687,17686,16635,16634,15615,15614,14627,0,14626,13671,13670,12747,12746,11855,11854,10995,10994,10167,10166,9371,9370,8607,8606,0,7875,7874,7175,7174,6507,6506,5871,5870,5267,5266,4695,4694,4155,4154,3647,0,3646,3170,3172,3174,3176,3178,3180,3182,3184,3186,3188,3190,3192,3194,3196,0,3198,3200,3202,3204,3206,3208,3210,3212,3214,3216,3218,3220,3222,3224,3226,0,3228,3230,3232,3234,3236,3238,3240,3242,3244,3246,3248,3250,3252,3254,3256,0,3258,3260,3262,3264,3266,3268,3270,3272,3274,3276,3278,3280,3282,3284,3286,0,3288,3780,3781,4304,4305,4860,4861,5448,5449,6068,6069,6720,6721,7404,7405,0,8120,8121,8868,8869,9648,9649,10460,10461,11304,11305,12180,12181,13088,13089,14028,0,14029,15000,15001,16004,16005,17040,17041,18108,18109,19208,19209,
- 19885,19884,18769,18768,17685,17684,16633,16632,15613,15612,14625,1,14624,13669,13668,12745,12744,11853,11852,10993,10992,10165,10164,9369,9368,8605,8604,1,7873,7872,7173,7172,6505,6504,5869,5868,5265,5264,4693,4692,4153,4152,3645,1,3644,3169,3168,2723,2725,2727,2729,2731,2733,2735,2737,2739,2741,2743,2745,1,2747,2749,2751,2753,2755,2757,2759,2761,2763,2765,2767,2769,2771,2773,2775,1,2777,2779,2781,2783,2785,2787,2789,2791,2793,2795,2797,2799,2801,2803,2805,1,2807,2809,2811,2813,2815,2817,2819,2821,2823,2825,2827,2829,2831,2833,3290,1,3291,3782,3783,4306,4307,4862,4863,5450,5451,6070,6071,6722,6723,7406,7407,1,8122,8123,8870,8871,9650,9651,10462,10463,11306,11307,12182,12183,13090,13091,14030,1,14031,15002,15003,16006,16007,17042,17043,18110,18111,19210,19211,
- 19883,19882,18767,18766,17683,17682,16631,16630,15611,15610,14623,0,14622,13667,13666,12743,12742,11851,11850,10991,10990,10163,10162,9367,9366,8603,8602,0,7871,7870,7171,7170,6503,6502,5867,5866,5263,5262,4691,4690,4151,4150,3643,0,3642,3167,3166,2722,2724,2726,2728,2730,2732,2734,2736,2738,2740,2742,2744,0,2746,2748,2750,2752,2754,2756,2758,2760,2762,2764,2766,2768,2770,2772,2774,0,2776,2778,2780,2782,2784,2786,2788,2790,2792,2794,2796,2798,2800,2802,2804,0,2806,2808,2810,2812,2814,2816,2818,2820,2822,2824,2826,2828,2830,2832,3292,0,3293,3784,3785,4308,4309,4864,4865,5452,5453,6072,6073,6724,6725,7408,7409,0,8124,8125,8872,8873,9652,9653,10464,10465,11308,11309,12184,12185,13092,13093,14032,0,14033,15004,15005,16008,16009,17044,17045,18112,18113,19212,19213,
- 19881,19880,18765,18764,17681,17680,16629,16628,15609,15608,14621,1,14620,13665,13664,12741,12740,11849,11848,10989,10988,10161,10160,9365,9364,8601,8600,1,7869,7868,7169,7168,6501,6500,5865,5864,5261,5260,4689,4688,4149,4148,3641,1,3640,3165,3164,2721,2720,2307,2309,2311,2313,2315,2317,2319,2321,2323,2325,1,2327,2329,2331,2333,2335,2337,2339,2341,2343,2345,2347,2349,2351,2353,2355,1,2357,2359,2361,2363,2365,2367,2369,2371,2373,2375,2377,2379,2381,2383,2385,1,2387,2389,2391,2393,2395,2397,2399,2401,2403,2405,2407,2409,2834,2835,3294,1,3295,3786,3787,4310,4311,4866,4867,5454,5455,6074,6075,6726,6727,7410,7411,1,8126,8127,8874,8875,9654,9655,10466,10467,11310,11311,12186,12187,13094,13095,14034,1,14035,15006,15007,16010,16011,17046,17047,18114,18115,19214,19215,
- 19879,19878,18763,18762,17679,17678,16627,16626,15607,15606,14619,0,14618,13663,13662,12739,12738,11847,11846,10987,10986,10159,10158,9363,9362,8599,8598,0,7867,7866,7167,7166,6499,6498,5863,5862,5259,5258,4687,4686,4147,4146,3639,0,3638,3163,3162,2719,2718,2306,2308,2310,2312,2314,2316,2318,2320,2322,2324,0,2326,2328,2330,2332,2334,2336,2338,2340,2342,2344,2346,2348,2350,2352,2354,0,2356,2358,2360,2362,2364,2366,2368,2370,2372,2374,2376,2378,2380,2382,2384,0,2386,2388,2390,2392,2394,2396,2398,2400,2402,2404,2406,2408,2836,2837,3296,0,3297,3788,3789,4312,4313,4868,4869,5456,5457,6076,6077,6728,6729,7412,7413,0,8128,8129,8876,8877,9656,9657,10468,10469,11312,11313,12188,12189,13096,13097,14036,0,14037,15008,15009,16012,16013,17048,17049,18116,18117,19216,19217,
- 19877,19876,18761,18760,17677,17676,16625,16624,15605,15604,14617,1,14616,13661,13660,12737,12736,11845,11844,10985,10984,10157,10156,9361,9360,8597,8596,1,7865,7864,7165,7164,6497,6496,5861,5860,5257,5256,4685,4684,4145,4144,3637,1,3636,3161,3160,2717,2716,2305,2304,1923,1925,1927,1929,1931,1933,1935,1937,1,1939,1941,1943,1945,1947,1949,1951,1953,1955,1957,1959,1961,1963,1965,1967,1,1969,1971,1973,1975,1977,1979,1981,1983,1985,1987,1989,1991,1993,1995,1997,1,1999,2001,2003,2005,2007,2009,2011,2013,2015,2017,2410,2411,2838,2839,3298,1,3299,3790,3791,4314,4315,4870,4871,5458,5459,6078,6079,6730,6731,7414,7415,1,8130,8131,8878,8879,9658,9659,10470,10471,11314,11315,12190,12191,13098,13099,14038,1,14039,15010,15011,16014,16015,17050,17051,18118,18119,19218,19219,
- 19875,19874,18759,18758,17675,17674,16623,16622,15603,15602,14615,0,14614,13659,13658,12735,12734,11843,11842,10983,10982,10155,10154,9359,9358,8595,8594,0,7863,7862,7163,7162,6495,6494,5859,5858,5255,5254,4683,4682,4143,4142,3635,0,3634,3159,3158,2715,2714,2303,2302,1922,1924,1926,1928,1930,1932,1934,1936,0,1938,1940,1942,1944,1946,1948,1950,1952,1954,1956,1958,1960,1962,1964,1966,0,1968,1970,1972,1974,1976,1978,1980,1982,1984,1986,1988,1990,1992,1994,1996,0,1998,2000,2002,2004,2006,2008,2010,2012,2014,2016,2412,2413,2840,2841,3300,0,3301,3792,3793,4316,4317,4872,4873,5460,5461,6080,6081,6732,6733,7416,7417,0,8132,8133,8880,8881,9660,9661,10472,10473,11316,11317,12192,12193,13100,13101,14040,0,14041,15012,15013,16016,16017,17052,17053,18120,18121,19220,19221,
- 19873,19872,18757,18756,17673,17672,16621,16620,15601,15600,14613,1,14612,13657,13656,12733,12732,11841,11840,10981,10980,10153,10152,9357,9356,8593,8592,1,7861,7860,7161,7160,6493,6492,5857,5856,5253,5252,4681,4680,4141,4140,3633,1,3632,3157,3156,2713,2712,2301,2300,1921,1920,1571,1573,1575,1577,1579,1581,1,1583,1585,1587,1589,1591,1593,1595,1597,1599,1601,1603,1605,1607,1609,1611,1,1613,1615,1617,1619,1621,1623,1625,1627,1629,1631,1633,1635,1637,1639,1641,1,1643,1645,1647,1649,1651,1653,1655,1657,2018,2019,2414,2415,2842,2843,3302,1,3303,3794,3795,4318,4319,4874,4875,5462,5463,6082,6083,6734,6735,7418,7419,1,8134,8135,8882,8883,9662,9663,10474,10475,11318,11319,12194,12195,13102,13103,14042,1,14043,15014,15015,16018,16019,17054,17055,18122,18123,19222,19223,
- 19871,19870,18755,18754,17671,17670,16619,16618,15599,15598,14611,0,14610,13655,13654,12731,12730,11839,11838,10979,10978,10151,10150,9355,9354,8591,8590,0,7859,7858,7159,7158,6491,6490,5855,5854,5251,5250,4679,4678,4139,4138,3631,0,3630,3155,3154,2711,2710,2299,2298,1919,1918,1570,1572,1574,1576,1578,1580,0,1582,1584,1586,1588,1590,1592,1594,1596,1598,1600,1602,1604,1606,1608,1610,0,1612,1614,1616,1618,1620,1622,1624,1626,1628,1630,1632,1634,1636,1638,1640,0,1642,1644,1646,1648,1650,1652,1654,1656,2020,2021,2416,2417,2844,2845,3304,0,3305,3796,3797,4320,4321,4876,4877,5464,5465,6084,6085,6736,6737,7420,7421,0,8136,8137,8884,8885,9664,9665,10476,10477,11320,11321,12196,12197,13104,13105,14044,0,14045,15016,15017,16020,16021,17056,17057,18124,18125,19224,19225,
- 19869,19868,18753,18752,17669,17668,16617,16616,15597,15596,14609,1,14608,13653,13652,12729,12728,11837,11836,10977,10976,10149,10148,9353,9352,8589,8588,1,7857,7856,7157,7156,6489,6488,5853,5852,5249,5248,4677,4676,4137,4136,3629,1,3628,3153,3152,2709,2708,2297,2296,1917,1916,1569,1568,1251,1253,1255,1257,1,1259,1261,1263,1265,1267,1269,1271,1273,1275,1277,1279,1281,1283,1285,1287,1,1289,1291,1293,1295,1297,1299,1301,1303,1305,1307,1309,1311,1313,1315,1317,1,1319,1321,1323,1325,1327,1329,1658,1659,2022,2023,2418,2419,2846,2847,3306,1,3307,3798,3799,4322,4323,4878,4879,5466,5467,6086,6087,6738,6739,7422,7423,1,8138,8139,8886,8887,9666,9667,10478,10479,11322,11323,12198,12199,13106,13107,14046,1,14047,15018,15019,16022,16023,17058,17059,18126,18127,19226,19227,
- 19867,19866,18751,18750,17667,17666,16615,16614,15595,15594,14607,0,14606,13651,13650,12727,12726,11835,11834,10975,10974,10147,10146,9351,9350,8587,8586,0,7855,7854,7155,7154,6487,6486,5851,5850,5247,5246,4675,4674,4135,4134,3627,0,3626,3151,3150,2707,2706,2295,2294,1915,1914,1567,1566,1250,1252,1254,1256,0,1258,1260,1262,1264,1266,1268,1270,1272,1274,1276,1278,1280,1282,1284,1286,0,1288,1290,1292,1294,1296,1298,1300,1302,1304,1306,1308,1310,1312,1314,1316,0,1318,1320,1322,1324,1326,1328,1660,1661,2024,2025,2420,2421,2848,2849,3308,0,3309,3800,3801,4324,4325,4880,4881,5468,5469,6088,6089,6740,6741,7424,7425,0,8140,8141,8888,8889,9668,9669,10480,10481,11324,11325,12200,12201,13108,13109,14048,0,14049,15020,15021,16024,16025,17060,17061,18128,18129,19228,19229,
- 19865,19864,18749,18748,17665,17664,16613,16612,15593,15592,14605,1,14604,13649,13648,12725,12724,11833,11832,10973,10972,10145,10144,9349,9348,8585,8584,1,7853,7852,7153,7152,6485,6484,5849,5848,5245,5244,4673,4672,4133,4132,3625,1,3624,3149,3148,2705,2704,2293,2292,1913,1912,1565,1564,1249,1248,963,965,1,967,969,971,973,975,977,979,981,983,985,987,989,991,993,995,1,997,999,1001,1003,1005,1007,1009,1011,1013,1015,1017,1019,1021,1023,1025,1,1027,1029,1031,1033,1330,1331,1662,1663,2026,2027,2422,2423,2850,2851,3310,1,3311,3802,3803,4326,4327,4882,4883,5470,5471,6090,6091,6742,6743,7426,7427,1,8142,8143,8890,8891,9670,9671,10482,10483,11326,11327,12202,12203,13110,13111,14050,1,14051,15022,15023,16026,16027,17062,17063,18130,18131,19230,19231,
- 19863,19862,18747,18746,17663,17662,16611,16610,15591,15590,14603,0,14602,13647,13646,12723,12722,11831,11830,10971,10970,10143,10142,9347,9346,8583,8582,0,7851,7850,7151,7150,6483,6482,5847,5846,5243,5242,4671,4670,4131,4130,3623,0,3622,3147,3146,2703,2702,2291,2290,1911,1910,1563,1562,1247,1246,962,964,0,966,968,970,972,974,976,978,980,982,984,986,988,990,992,994,0,996,998,1000,1002,1004,1006,1008,1010,1012,1014,1016,1018,1020,1022,1024,0,1026,1028,1030,1032,1332,1333,1664,1665,2028,2029,2424,2425,2852,2853,3312,0,3313,3804,3805,4328,4329,4884,4885,5472,5473,6092,6093,6744,6745,7428,7429,0,8144,8145,8892,8893,9672,9673,10484,10485,11328,11329,12204,12205,13112,13113,14052,0,14053,15024,15025,16028,16029,17064,17065,18132,18133,19232,19233,
- 19861,19860,18745,18744,17661,17660,16609,16608,15589,15588,14601,1,14600,13645,13644,12721,12720,11829,11828,10969,10968,10141,10140,9345,9344,8581,8580,1,7849,7848,7149,7148,6481,6480,5845,5844,5241,5240,4669,4668,4129,4128,3621,1,3620,3145,3144,2701,2700,2289,2288,1909,1908,1561,1560,1245,1244,961,960,1,707,709,711,713,715,717,719,721,723,725,727,729,731,733,735,1,737,739,741,743,745,747,749,751,753,755,757,759,761,763,765,1,767,769,1034,1035,1334,1335,1666,1667,2030,2031,2426,2427,2854,2855,3314,1,3315,3806,3807,4330,4331,4886,4887,5474,5475,6094,6095,6746,6747,7430,7431,1,8146,8147,8894,8895,9674,9675,10486,10487,11330,11331,12206,12207,13114,13115,14054,1,14055,15026,15027,16030,16031,17066,17067,18134,18135,19234,19235,
- 19859,19858,18743,18742,17659,17658,16607,16606,15587,15586,14599,0,14598,13643,13642,12719,12718,11827,11826,10967,10966,10139,10138,9343,9342,8579,8578,0,7847,7846,7147,7146,6479,6478,5843,5842,5239,5238,4667,4666,4127,4126,3619,0,3618,3143,3142,2699,2698,2287,2286,1907,1906,1559,1558,1243,1242,959,958,0,706,708,710,712,714,716,718,720,722,724,726,728,730,732,734,0,736,738,740,742,744,746,748,750,752,754,756,758,760,762,764,0,766,768,1036,1037,1336,1337,1668,1669,2032,2033,2428,2429,2856,2857,3316,0,3317,3808,3809,4332,4333,4888,4889,5476,5477,6096,6097,6748,6749,7432,7433,0,8148,8149,8896,8897,9676,9677,10488,10489,11332,11333,12208,12209,13116,13117,14056,0,14057,15028,15029,16032,16033,17068,17069,18136,18137,19236,19237,
- 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
- 19857,19856,18741,18740,17657,17656,16605,16604,15585,15584,14597,0,14596,13641,13640,12717,12716,11825,11824,10965,10964,10137,10136,9341,9340,8577,8576,0,7845,7844,7145,7144,6477,6476,5841,5840,5237,5236,4665,4664,4125,4124,3617,0,3616,3141,3140,2697,2696,2285,2284,1905,1904,1557,1556,1241,1240,957,956,0,705,704,483,485,487,489,491,493,495,497,499,501,503,505,507,0,509,511,513,515,517,519,521,523,525,527,529,531,533,535,537,0,770,771,1038,1039,1338,1339,1670,1671,2034,2035,2430,2431,2858,2859,3318,0,3319,3810,3811,4334,4335,4890,4891,5478,5479,6098,6099,6750,6751,7434,7435,0,8150,8151,8898,8899,9678,9679,10490,10491,11334,11335,12210,12211,13118,13119,14058,0,14059,15030,15031,16034,16035,17070,17071,18138,18139,19238,19239,
- 19855,19854,18739,18738,17655,17654,16603,16602,15583,15582,14595,1,14594,13639,13638,12715,12714,11823,11822,10963,10962,10135,10134,9339,9338,8575,8574,1,7843,7842,7143,7142,6475,6474,5839,5838,5235,5234,4663,4662,4123,4122,3615,1,3614,3139,3138,2695,2694,2283,2282,1903,1902,1555,1554,1239,1238,955,954,1,703,702,482,484,486,488,490,492,494,496,498,500,502,504,506,1,508,510,512,514,516,518,520,522,524,526,528,530,532,534,536,1,772,773,1040,1041,1340,1341,1672,1673,2036,2037,2432,2433,2860,2861,3320,1,3321,3812,3813,4336,4337,4892,4893,5480,5481,6100,6101,6752,6753,7436,7437,1,8152,8153,8900,8901,9680,9681,10492,10493,11336,11337,12212,12213,13120,13121,14060,1,14061,15032,15033,16036,16037,17072,17073,18140,18141,19240,19241,
- 19853,19852,18737,18736,17653,17652,16601,16600,15581,15580,14593,0,14592,13637,13636,12713,12712,11821,11820,10961,10960,10133,10132,9337,9336,8573,8572,0,7841,7840,7141,7140,6473,6472,5837,5836,5233,5232,4661,4660,4121,4120,3613,0,3612,3137,3136,2693,2692,2281,2280,1901,1900,1553,1552,1237,1236,953,952,0,701,700,481,480,291,293,295,297,299,301,303,305,307,309,311,0,313,315,317,319,321,323,325,327,329,331,333,335,337,538,539,0,774,775,1042,1043,1342,1343,1674,1675,2038,2039,2434,2435,2862,2863,3322,0,3323,3814,3815,4338,4339,4894,4895,5482,5483,6102,6103,6754,6755,7438,7439,0,8154,8155,8902,8903,9682,9683,10494,10495,11338,11339,12214,12215,13122,13123,14062,0,14063,15034,15035,16038,16039,17074,17075,18142,18143,19242,19243,
- 19851,19850,18735,18734,17651,17650,16599,16598,15579,15578,14591,1,14590,13635,13634,12711,12710,11819,11818,10959,10958,10131,10130,9335,9334,8571,8570,1,7839,7838,7139,7138,6471,6470,5835,5834,5231,5230,4659,4658,4119,4118,3611,1,3610,3135,3134,2691,2690,2279,2278,1899,1898,1551,1550,1235,1234,951,950,1,699,698,479,478,290,292,294,296,298,300,302,304,306,308,310,1,312,314,316,318,320,322,324,326,328,330,332,334,336,540,541,1,776,777,1044,1045,1344,1345,1676,1677,2040,2041,2436,2437,2864,2865,3324,1,3325,3816,3817,4340,4341,4896,4897,5484,5485,6104,6105,6756,6757,7440,7441,1,8156,8157,8904,8905,9684,9685,10496,10497,11340,11341,12216,12217,13124,13125,14064,1,14065,15036,15037,16040,16041,17076,17077,18144,18145,19244,19245,
- 19849,19848,18733,18732,17649,17648,16597,16596,15577,15576,14589,0,14588,13633,13632,12709,12708,11817,11816,10957,10956,10129,10128,9333,9332,8569,8568,0,7837,7836,7137,7136,6469,6468,5833,5832,5229,5228,4657,4656,4117,4116,3609,0,3608,3133,3132,2689,2688,2277,2276,1897,1896,1549,1548,1233,1232,949,948,0,697,696,477,476,289,288,131,133,135,137,139,141,143,145,147,0,149,151,153,155,157,159,161,163,165,167,169,338,339,542,543,0,778,779,1046,1047,1346,1347,1678,1679,2042,2043,2438,2439,2866,2867,3326,0,3327,3818,3819,4342,4343,4898,4899,5486,5487,6106,6107,6758,6759,7442,7443,0,8158,8159,8906,8907,9686,9687,10498,10499,11342,11343,12218,12219,13126,13127,14066,0,14067,15038,15039,16042,16043,17078,17079,18146,18147,19246,19247,
- 19847,19846,18731,18730,17647,17646,16595,16594,15575,15574,14587,1,14586,13631,13630,12707,12706,11815,11814,10955,10954,10127,10126,9331,9330,8567,8566,1,7835,7834,7135,7134,6467,6466,5831,5830,5227,5226,4655,4654,4115,4114,3607,1,3606,3131,3130,2687,2686,2275,2274,1895,1894,1547,1546,1231,1230,947,946,1,695,694,475,474,287,286,130,132,134,136,138,140,142,144,146,1,148,150,152,154,156,158,160,162,164,166,168,340,341,544,545,1,780,781,1048,1049,1348,1349,1680,1681,2044,2045,2440,2441,2868,2869,3328,1,3329,3820,3821,4344,4345,4900,4901,5488,5489,6108,6109,6760,6761,7444,7445,1,8160,8161,8908,8909,9688,9689,10500,10501,11344,11345,12220,12221,13128,13129,14068,1,14069,15040,15041,16044,16045,17080,17081,18148,18149,19248,19249,
- 19845,19844,18729,18728,17645,17644,16593,16592,15573,15572,14585,0,14584,13629,13628,12705,12704,11813,11812,10953,10952,10125,10124,9329,9328,8565,8564,0,7833,7832,7133,7132,6465,6464,5829,5828,5225,5224,4653,4652,4113,4112,3605,0,3604,3129,3128,2685,2684,2273,2272,1893,1892,1545,1544,1229,1228,945,944,0,693,692,473,472,285,284,129,128,3,5,7,9,11,13,15,0,17,19,21,23,25,27,29,31,33,170,171,342,343,546,547,0,782,783,1050,1051,1350,1351,1682,1683,2046,2047,2442,2443,2870,2871,3330,0,3331,3822,3823,4346,4347,4902,4903,5490,5491,6110,6111,6762,6763,7446,7447,0,8162,8163,8910,8911,9690,9691,10502,10503,11346,11347,12222,12223,13130,13131,14070,0,14071,15042,15043,16046,16047,17082,17083,18150,18151,19250,19251,
- 19843,19842,18727,18726,17643,17642,16591,16590,15571,15570,14583,1,14582,13627,13626,12703,12702,11811,11810,10951,10950,10123,10122,9327,9326,8563,8562,1,7831,7830,7131,7130,6463,6462,5827,5826,5223,5222,4651,4650,4111,4110,3603,1,3602,3127,3126,2683,2682,2271,2270,1891,1890,1543,1542,1227,1226,943,942,1,691,690,471,470,283,282,127,126,2,4,6,8,10,12,14,1,16,18,20,22,24,26,28,30,32,172,173,344,345,548,549,1,784,785,1052,1053,1352,1353,1684,1685,2048,2049,2444,2445,2872,2873,3332,1,3333,3824,3825,4348,4349,4904,4905,5492,5493,6112,6113,6764,6765,7448,7449,1,8164,8165,8912,8913,9692,9693,10504,10505,11348,11349,12224,12225,13132,13133,14072,1,14073,15044,15045,16048,16049,17084,17085,18152,18153,19252,19253,
- 19841,19840,18725,18724,17641,17640,16589,16588,15569,15568,14581,0,14580,13625,13624,12701,12700,11809,11808,10949,10948,10121,10120,9325,9324,8561,8560,0,7829,7828,7129,7128,6461,6460,5825,5824,5221,5220,4649,4648,4109,4108,3601,0,3600,3125,3124,2681,2680,2269,2268,1889,1888,1541,1540,1225,1224,941,940,0,689,688,469,468,281,280,125,124,1,1,20000,20001,20002,20003,20004,0,20005,20006,20007,20008,20009,0,1,34,35,174,175,346,347,550,551,0,786,787,1054,1055,1354,1355,1686,1687,2050,2051,2446,2447,2874,2875,3334,0,3335,3826,3827,4350,4351,4906,4907,5494,5495,6114,6115,6766,6767,7450,7451,0,8166,8167,8914,8915,9694,9695,10506,10507,11350,11351,12226,12227,13134,13135,14074,0,14075,15046,15047,16050,16051,17086,17087,18154,18155,19254,19255,
- 19839,19838,18723,18722,17639,17638,16587,16586,15567,15566,14579,1,14578,13623,13622,12699,12698,11807,11806,10947,10946,10119,10118,9323,9322,8559,8558,1,7827,7826,7127,7126,6459,6458,5823,5822,5219,5218,4647,4646,4107,4106,3599,1,3598,3123,3122,2679,2678,2267,2266,1887,1886,1539,1538,1223,1222,939,938,1,687,686,467,466,279,278,123,122,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,36,37,176,177,348,349,552,553,1,788,789,1056,1057,1356,1357,1688,1689,2052,2053,2448,2449,2876,2877,3336,1,3337,3828,3829,4352,4353,4908,4909,5496,5497,6116,6117,6768,6769,7452,7453,1,8168,8169,8916,8917,9696,9697,10508,10509,11352,11353,12228,12229,13136,13137,14076,1,14077,15048,15049,16052,16053,17088,17089,18156,18157,19256,19257,
- 19837,19836,18721,18720,17637,17636,16585,16584,15565,15564,14577,0,14576,13621,13620,12697,12696,11805,11804,10945,10944,10117,10116,9321,9320,8557,8556,0,7825,7824,7125,7124,6457,6456,5821,5820,5217,5216,4645,4644,4105,4104,3597,0,3596,3121,3120,2677,2676,2265,2264,1885,1884,1537,1536,1221,1220,937,936,0,685,684,465,464,277,276,121,120,20039,1,0,0,0,0,0,0,0,0,0,0,0,1,20010,38,39,178,179,350,351,554,555,0,790,791,1058,1059,1358,1359,1690,1691,2054,2055,2450,2451,2878,2879,3338,0,3339,3830,3831,4354,4355,4910,4911,5498,5499,6118,6119,6770,6771,7454,7455,0,8170,8171,8918,8919,9698,9699,10510,10511,11354,11355,12230,12231,13138,13139,14078,0,14079,15050,15051,16054,16055,17090,17091,18158,18159,19258,19259,
- 19835,19834,18719,18718,17635,17634,16583,16582,15563,15562,14575,1,14574,13619,13618,12695,12694,11803,11802,10943,10942,10115,10114,9319,9318,8555,8554,1,7823,7822,7123,7122,6455,6454,5819,5818,5215,5214,4643,4642,4103,4102,3595,1,3594,3119,3118,2675,2674,2263,2262,1883,1882,1535,1534,1219,1218,935,934,1,683,682,463,462,275,274,119,118,20038,1,0,1,1,1,1,1,1,1,1,1,0,1,20011,40,41,180,181,352,353,556,557,1,792,793,1060,1061,1360,1361,1692,1693,2056,2057,2452,2453,2880,2881,3340,1,3341,3832,3833,4356,4357,4912,4913,5500,5501,6120,6121,6772,6773,7456,7457,1,8172,8173,8920,8921,9700,9701,10512,10513,11356,11357,12232,12233,13140,13141,14080,1,14081,15052,15053,16056,16057,17092,17093,18160,18161,19260,19261,
- 19833,19832,18717,18716,17633,17632,16581,16580,15561,15560,14573,0,14572,13617,13616,12693,12692,11801,11800,10941,10940,10113,10112,9317,9316,8553,8552,0,7821,7820,7121,7120,6453,6452,5817,5816,5213,5212,4641,4640,4101,4100,3593,0,3592,3117,3116,2673,2672,2261,2260,1881,1880,1533,1532,1217,1216,933,932,0,681,680,461,460,273,272,117,116,20037,1,0,1,0,0,0,0,0,0,0,1,0,1,20012,42,43,182,183,354,355,558,559,0,794,795,1062,1063,1362,1363,1694,1695,2058,2059,2454,2455,2882,2883,3342,0,3343,3834,3835,4358,4359,4914,4915,5502,5503,6122,6123,6774,6775,7458,7459,0,8174,8175,8922,8923,9702,9703,10514,10515,11358,11359,12234,12235,13142,13143,14082,0,14083,15054,15055,16058,16059,17094,17095,18162,18163,19262,19263,
- 19831,19830,18715,18714,17631,17630,16579,16578,15559,15558,14571,1,14570,13615,13614,12691,12690,11799,11798,10939,10938,10111,10110,9315,9314,8551,8550,1,7819,7818,7119,7118,6451,6450,5815,5814,5211,5210,4639,4638,4099,4098,3591,1,3590,3115,3114,2671,2670,2259,2258,1879,1878,1531,1530,1215,1214,931,930,1,679,678,459,458,271,270,115,114,20036,1,0,1,0,1,1,1,1,1,0,1,0,1,20013,44,45,184,185,356,357,560,561,1,796,797,1064,1065,1364,1365,1696,1697,2060,2061,2456,2457,2884,2885,3344,1,3345,3836,3837,4360,4361,4916,4917,5504,5505,6124,6125,6776,6777,7460,7461,1,8176,8177,8924,8925,9704,9705,10516,10517,11360,11361,12236,12237,13144,13145,14084,1,14085,15056,15057,16060,16061,17096,17097,18164,18165,19264,19265,
- 19829,19828,18713,18712,17629,17628,16577,16576,15557,15556,14569,0,14568,13613,13612,12689,12688,11797,11796,10937,10936,10109,10108,9313,9312,8549,8548,0,7817,7816,7117,7116,6449,6448,5813,5812,5209,5208,4637,4636,4097,4096,3589,0,3588,3113,3112,2669,2668,2257,2256,1877,1876,1529,1528,1213,1212,929,928,0,677,676,457,456,269,268,113,112,20035,1,0,1,0,1,0,0,0,1,0,1,0,1,20014,46,47,186,187,358,359,562,563,0,798,799,1066,1067,1366,1367,1698,1699,2062,2063,2458,2459,2886,2887,3346,0,3347,3838,3839,4362,4363,4918,4919,5506,5507,6126,6127,6778,6779,7462,7463,0,8178,8179,8926,8927,9706,9707,10518,10519,11362,11363,12238,12239,13146,13147,14086,0,14087,15058,15059,16062,16063,17098,17099,18166,18167,19266,19267,
- 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
- 19827,19826,18711,18710,17627,17626,16575,16574,15555,15554,14567,0,14566,13611,13610,12687,12686,11795,11794,10935,10934,10107,10106,9311,9310,8547,8546,0,7815,7814,7115,7114,6447,6446,5811,5810,5207,5206,4635,4634,4095,4094,3587,0,3586,3111,3110,2667,2666,2255,2254,1875,1874,1527,1526,1211,1210,927,926,0,675,674,455,454,267,266,111,110,20034,1,0,1,0,1,0,0,0,1,0,1,0,1,20015,48,49,188,189,360,361,564,565,0,800,801,1068,1069,1368,1369,1700,1701,2064,2065,2460,2461,2888,2889,3348,0,3349,3840,3841,4364,4365,4920,4921,5508,5509,6128,6129,6780,6781,7464,7465,0,8180,8181,8928,8929,9708,9709,10520,10521,11364,11365,12240,12241,13148,13149,14088,0,14089,15060,15061,16064,16065,17100,17101,18168,18169,19268,19269,
- 19825,19824,18709,18708,17625,17624,16573,16572,15553,15552,14565,1,14564,13609,13608,12685,12684,11793,11792,10933,10932,10105,10104,9309,9308,8545,8544,1,7813,7812,7113,7112,6445,6444,5809,5808,5205,5204,4633,4632,4093,4092,3585,1,3584,3109,3108,2665,2664,2253,2252,1873,1872,1525,1524,1209,1208,925,924,1,673,672,453,452,265,264,109,108,20033,1,0,1,0,1,1,1,1,1,0,1,0,1,20016,50,51,190,191,362,363,566,567,1,802,803,1070,1071,1370,1371,1702,1703,2066,2067,2462,2463,2890,2891,3350,1,3351,3842,3843,4366,4367,4922,4923,5510,5511,6130,6131,6782,6783,7466,7467,1,8182,8183,8930,8931,9710,9711,10522,10523,11366,11367,12242,12243,13150,13151,14090,1,14091,15062,15063,16066,16067,17102,17103,18170,18171,19270,19271,
- 19823,19822,18707,18706,17623,17622,16571,16570,15551,15550,14563,0,14562,13607,13606,12683,12682,11791,11790,10931,10930,10103,10102,9307,9306,8543,8542,0,7811,7810,7111,7110,6443,6442,5807,5806,5203,5202,4631,4630,4091,4090,3583,0,3582,3107,3106,2663,2662,2251,2250,1871,1870,1523,1522,1207,1206,923,922,0,671,670,451,450,263,262,107,106,20032,1,0,1,0,0,0,0,0,0,0,1,0,1,20017,52,53,192,193,364,365,568,569,0,804,805,1072,1073,1372,1373,1704,1705,2068,2069,2464,2465,2892,2893,3352,0,3353,3844,3845,4368,4369,4924,4925,5512,5513,6132,6133,6784,6785,7468,7469,0,8184,8185,8932,8933,9712,9713,10524,10525,11368,11369,12244,12245,13152,13153,14092,0,14093,15064,15065,16068,16069,17104,17105,18172,18173,19272,19273,
- 19821,19820,18705,18704,17621,17620,16569,16568,15549,15548,14561,1,14560,13605,13604,12681,12680,11789,11788,10929,10928,10101,10100,9305,9304,8541,8540,1,7809,7808,7109,7108,6441,6440,5805,5804,5201,5200,4629,4628,4089,4088,3581,1,3580,3105,3104,2661,2660,2249,2248,1869,1868,1521,1520,1205,1204,921,920,1,669,668,449,448,261,260,105,104,20031,1,0,1,1,1,1,1,1,1,1,1,0,1,20018,54,55,194,195,366,367,570,571,1,806,807,1074,1075,1374,1375,1706,1707,2070,2071,2466,2467,2894,2895,3354,1,3355,3846,3847,4370,4371,4926,4927,5514,5515,6134,6135,6786,6787,7470,7471,1,8186,8187,8934,8935,9714,9715,10526,10527,11370,11371,12246,12247,13154,13155,14094,1,14095,15066,15067,16070,16071,17106,17107,18174,18175,19274,19275,
- 19819,19818,18703,18702,17619,17618,16567,16566,15547,15546,14559,0,14558,13603,13602,12679,12678,11787,11786,10927,10926,10099,10098,9303,9302,8539,8538,0,7807,7806,7107,7106,6439,6438,5803,5802,5199,5198,4627,4626,4087,4086,3579,0,3578,3103,3102,2659,2658,2247,2246,1867,1866,1519,1518,1203,1202,919,918,0,667,666,447,446,259,258,103,102,20030,1,0,0,0,0,0,0,0,0,0,0,0,1,20019,56,57,196,197,368,369,572,573,0,808,809,1076,1077,1376,1377,1708,1709,2072,2073,2468,2469,2896,2897,3356,0,3357,3848,3849,4372,4373,4928,4929,5516,5517,6136,6137,6788,6789,7472,7473,0,8188,8189,8936,8937,9716,9717,10528,10529,11372,11373,12248,12249,13156,13157,14096,0,14097,15068,15069,16072,16073,17108,17109,18176,18177,19276,19277,
- 19817,19816,18701,18700,17617,17616,16565,16564,15545,15544,14557,1,14556,13601,13600,12677,12676,11785,11784,10925,10924,10097,10096,9301,9300,8537,8536,1,7805,7804,7105,7104,6437,6436,5801,5800,5197,5196,4625,4624,4085,4084,3577,1,3576,3101,3100,2657,2656,2245,2244,1865,1864,1517,1516,1201,1200,917,916,1,665,664,445,444,257,256,101,100,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,58,59,198,199,370,371,574,575,1,810,811,1078,1079,1378,1379,1710,1711,2074,2075,2470,2471,2898,2899,3358,1,3359,3850,3851,4374,4375,4930,4931,5518,5519,6138,6139,6790,6791,7474,7475,1,8190,8191,8938,8939,9718,9719,10530,10531,11374,11375,12250,12251,13158,13159,14098,1,14099,15070,15071,16074,16075,17110,17111,18178,18179,19278,19279,
- 19815,19814,18699,18698,17615,17614,16563,16562,15543,15542,14555,0,14554,13599,13598,12675,12674,11783,11782,10923,10922,10095,10094,9299,9298,8535,8534,0,7803,7802,7103,7102,6435,6434,5799,5798,5195,5194,4623,4622,4083,4082,3575,0,3574,3099,3098,2655,2654,2243,2242,1863,1862,1515,1514,1199,1198,915,914,0,663,662,443,442,255,254,99,98,0,0,20029,20028,20027,20026,20025,0,20024,20023,20022,20021,20020,0,0,60,61,200,201,372,373,576,577,0,812,813,1080,1081,1380,1381,1712,1713,2076,2077,2472,2473,2900,2901,3360,0,3361,3852,3853,4376,4377,4932,4933,5520,5521,6140,6141,6792,6793,7476,7477,0,8192,8193,8940,8941,9720,9721,10532,10533,11376,11377,12252,12253,13160,13161,14100,0,14101,15072,15073,16076,16077,17112,17113,18180,18181,19280,19281,
- 19813,19812,18697,18696,17613,17612,16561,16560,15541,15540,14553,1,14552,13597,13596,12673,12672,11781,11780,10921,10920,10093,10092,9297,9296,8533,8532,1,7801,7800,7101,7100,6433,6432,5797,5796,5193,5192,4621,4620,4081,4080,3573,1,3572,3097,3096,2653,2652,2241,2240,1861,1860,1513,1512,1197,1196,913,912,1,661,660,441,440,253,252,96,94,92,90,88,86,84,82,80,1,78,76,74,72,70,68,66,62,63,202,203,374,375,578,579,1,814,815,1082,1083,1382,1383,1714,1715,2078,2079,2474,2475,2902,2903,3362,1,3363,3854,3855,4378,4379,4934,4935,5522,5523,6142,6143,6794,6795,7478,7479,1,8194,8195,8942,8943,9722,9723,10534,10535,11378,11379,12254,12255,13162,13163,14102,1,14103,15074,15075,16078,16079,17114,17115,18182,18183,19282,19283,
- 19811,19810,18695,18694,17611,17610,16559,16558,15539,15538,14551,0,14550,13595,13594,12671,12670,11779,11778,10919,10918,10091,10090,9295,9294,8531,8530,0,7799,7798,7099,7098,6431,6430,5795,5794,5191,5190,4619,4618,4079,4078,3571,0,3570,3095,3094,2651,2650,2239,2238,1859,1858,1511,1510,1195,1194,911,910,0,659,658,439,438,251,250,97,95,93,91,89,87,85,83,81,0,79,77,75,73,71,69,67,64,65,204,205,376,377,580,581,0,816,817,1084,1085,1384,1385,1716,1717,2080,2081,2476,2477,2904,2905,3364,0,3365,3856,3857,4380,4381,4936,4937,5524,5525,6144,6145,6796,6797,7480,7481,0,8196,8197,8944,8945,9724,9725,10536,10537,11380,11381,12256,12257,13164,13165,14104,0,14105,15076,15077,16080,16081,17116,17117,18184,18185,19284,19285,
- 19809,19808,18693,18692,17609,17608,16557,16556,15537,15536,14549,1,14548,13593,13592,12669,12668,11777,11776,10917,10916,10089,10088,9293,9292,8529,8528,1,7797,7796,7097,7096,6429,6428,5793,5792,5189,5188,4617,4616,4077,4076,3569,1,3568,3093,3092,2649,2648,2237,2236,1857,1856,1509,1508,1193,1192,909,908,1,657,656,437,436,248,246,244,242,240,238,236,234,232,230,228,1,226,224,222,220,218,216,214,212,210,206,207,378,379,582,583,1,818,819,1086,1087,1386,1387,1718,1719,2082,2083,2478,2479,2906,2907,3366,1,3367,3858,3859,4382,4383,4938,4939,5526,5527,6146,6147,6798,6799,7482,7483,1,8198,8199,8946,8947,9726,9727,10538,10539,11382,11383,12258,12259,13166,13167,14106,1,14107,15078,15079,16082,16083,17118,17119,18186,18187,19286,19287,
- 19807,19806,18691,18690,17607,17606,16555,16554,15535,15534,14547,0,14546,13591,13590,12667,12666,11775,11774,10915,10914,10087,10086,9291,9290,8527,8526,0,7795,7794,7095,7094,6427,6426,5791,5790,5187,5186,4615,4614,4075,4074,3567,0,3566,3091,3090,2647,2646,2235,2234,1855,1854,1507,1506,1191,1190,907,906,0,655,654,435,434,249,247,245,243,241,239,237,235,233,231,229,0,227,225,223,221,219,217,215,213,211,208,209,380,381,584,585,0,820,821,1088,1089,1388,1389,1720,1721,2084,2085,2480,2481,2908,2909,3368,0,3369,3860,3861,4384,4385,4940,4941,5528,5529,6148,6149,6800,6801,7484,7485,0,8200,8201,8948,8949,9728,9729,10540,10541,11384,11385,12260,12261,13168,13169,14108,0,14109,15080,15081,16084,16085,17120,17121,18188,18189,19288,19289,
- 19805,19804,18689,18688,17605,17604,16553,16552,15533,15532,14545,1,14544,13589,13588,12665,12664,11773,11772,10913,10912,10085,10084,9289,9288,8525,8524,1,7793,7792,7093,7092,6425,6424,5789,5788,5185,5184,4613,4612,4073,4072,3565,1,3564,3089,3088,2645,2644,2233,2232,1853,1852,1505,1504,1189,1188,905,904,1,653,652,432,430,428,426,424,422,420,418,416,414,412,410,408,1,406,404,402,400,398,396,394,392,390,388,386,382,383,586,587,1,822,823,1090,1091,1390,1391,1722,1723,2086,2087,2482,2483,2910,2911,3370,1,3371,3862,3863,4386,4387,4942,4943,5530,5531,6150,6151,6802,6803,7486,7487,1,8202,8203,8950,8951,9730,9731,10542,10543,11386,11387,12262,12263,13170,13171,14110,1,14111,15082,15083,16086,16087,17122,17123,18190,18191,19290,19291,
- 19803,19802,18687,18686,17603,17602,16551,16550,15531,15530,14543,0,14542,13587,13586,12663,12662,11771,11770,10911,10910,10083,10082,9287,9286,8523,8522,0,7791,7790,7091,7090,6423,6422,5787,5786,5183,5182,4611,4610,4071,4070,3563,0,3562,3087,3086,2643,2642,2231,2230,1851,1850,1503,1502,1187,1186,903,902,0,651,650,433,431,429,427,425,423,421,419,417,415,413,411,409,0,407,405,403,401,399,397,395,393,391,389,387,384,385,588,589,0,824,825,1092,1093,1392,1393,1724,1725,2088,2089,2484,2485,2912,2913,3372,0,3373,3864,3865,4388,4389,4944,4945,5532,5533,6152,6153,6804,6805,7488,7489,0,8204,8205,8952,8953,9732,9733,10544,10545,11388,11389,12264,12265,13172,13173,14112,0,14113,15084,15085,16088,16089,17124,17125,18192,18193,19292,19293,
- 19801,19800,18685,18684,17601,17600,16549,16548,15529,15528,14541,1,14540,13585,13584,12661,12660,11769,11768,10909,10908,10081,10080,9285,9284,8521,8520,1,7789,7788,7089,7088,6421,6420,5785,5784,5181,5180,4609,4608,4069,4068,3561,1,3560,3085,3084,2641,2640,2229,2228,1849,1848,1501,1500,1185,1184,901,900,1,648,646,644,642,640,638,636,634,632,630,628,626,624,622,620,1,618,616,614,612,610,608,606,604,602,600,598,596,594,590,591,1,826,827,1094,1095,1394,1395,1726,1727,2090,2091,2486,2487,2914,2915,3374,1,3375,3866,3867,4390,4391,4946,4947,5534,5535,6154,6155,6806,6807,7490,7491,1,8206,8207,8954,8955,9734,9735,10546,10547,11390,11391,12266,12267,13174,13175,14114,1,14115,15086,15087,16090,16091,17126,17127,18194,18195,19294,19295,
- 19799,19798,18683,18682,17599,17598,16547,16546,15527,15526,14539,0,14538,13583,13582,12659,12658,11767,11766,10907,10906,10079,10078,9283,9282,8519,8518,0,7787,7786,7087,7086,6419,6418,5783,5782,5179,5178,4607,4606,4067,4066,3559,0,3558,3083,3082,2639,2638,2227,2226,1847,1846,1499,1498,1183,1182,899,898,0,649,647,645,643,641,639,637,635,633,631,629,627,625,623,621,0,619,617,615,613,611,609,607,605,603,601,599,597,595,592,593,0,828,829,1096,1097,1396,1397,1728,1729,2092,2093,2488,2489,2916,2917,3376,0,3377,3868,3869,4392,4393,4948,4949,5536,5537,6156,6157,6808,6809,7492,7493,0,8208,8209,8956,8957,9736,9737,10548,10549,11392,11393,12268,12269,13176,13177,14116,0,14117,15088,15089,16092,16093,17128,17129,18196,18197,19296,19297,
- 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
- 19797,19796,18681,18680,17597,17596,16545,16544,15525,15524,14537,0,14536,13581,13580,12657,12656,11765,11764,10905,10904,10077,10076,9281,9280,8517,8516,0,7785,7784,7085,7084,6417,6416,5781,5780,5177,5176,4605,4604,4065,4064,3557,0,3556,3081,3080,2637,2636,2225,2224,1845,1844,1497,1496,1181,1180,896,894,0,892,890,888,886,884,882,880,878,876,874,872,870,868,866,864,0,862,860,858,856,854,852,850,848,846,844,842,840,838,836,834,0,830,831,1098,1099,1398,1399,1730,1731,2094,2095,2490,2491,2918,2919,3378,0,3379,3870,3871,4394,4395,4950,4951,5538,5539,6158,6159,6810,6811,7494,7495,0,8210,8211,8958,8959,9738,9739,10550,10551,11394,11395,12270,12271,13178,13179,14118,0,14119,15090,15091,16094,16095,17130,17131,18198,18199,19298,19299,
- 19795,19794,18679,18678,17595,17594,16543,16542,15523,15522,14535,1,14534,13579,13578,12655,12654,11763,11762,10903,10902,10075,10074,9279,9278,8515,8514,1,7783,7782,7083,7082,6415,6414,5779,5778,5175,5174,4603,4602,4063,4062,3555,1,3554,3079,3078,2635,2634,2223,2222,1843,1842,1495,1494,1179,1178,897,895,1,893,891,889,887,885,883,881,879,877,875,873,871,869,867,865,1,863,861,859,857,855,853,851,849,847,845,843,841,839,837,835,1,832,833,1100,1101,1400,1401,1732,1733,2096,2097,2492,2493,2920,2921,3380,1,3381,3872,3873,4396,4397,4952,4953,5540,5541,6160,6161,6812,6813,7496,7497,1,8212,8213,8960,8961,9740,9741,10552,10553,11396,11397,12272,12273,13180,13181,14120,1,14121,15092,15093,16096,16097,17132,17133,18200,18201,19300,19301,
- 19793,19792,18677,18676,17593,17592,16541,16540,15521,15520,14533,0,14532,13577,13576,12653,12652,11761,11760,10901,10900,10073,10072,9277,9276,8513,8512,0,7781,7780,7081,7080,6413,6412,5777,5776,5173,5172,4601,4600,4061,4060,3553,0,3552,3077,3076,2633,2632,2221,2220,1841,1840,1493,1492,1176,1174,1172,1170,0,1168,1166,1164,1162,1160,1158,1156,1154,1152,1150,1148,1146,1144,1142,1140,0,1138,1136,1134,1132,1130,1128,1126,1124,1122,1120,1118,1116,1114,1112,1110,0,1108,1106,1102,1103,1402,1403,1734,1735,2098,2099,2494,2495,2922,2923,3382,0,3383,3874,3875,4398,4399,4954,4955,5542,5543,6162,6163,6814,6815,7498,7499,0,8214,8215,8962,8963,9742,9743,10554,10555,11398,11399,12274,12275,13182,13183,14122,0,14123,15094,15095,16098,16099,17134,17135,18202,18203,19302,19303,
- 19791,19790,18675,18674,17591,17590,16539,16538,15519,15518,14531,1,14530,13575,13574,12651,12650,11759,11758,10899,10898,10071,10070,9275,9274,8511,8510,1,7779,7778,7079,7078,6411,6410,5775,5774,5171,5170,4599,4598,4059,4058,3551,1,3550,3075,3074,2631,2630,2219,2218,1839,1838,1491,1490,1177,1175,1173,1171,1,1169,1167,1165,1163,1161,1159,1157,1155,1153,1151,1149,1147,1145,1143,1141,1,1139,1137,1135,1133,1131,1129,1127,1125,1123,1121,1119,1117,1115,1113,1111,1,1109,1107,1104,1105,1404,1405,1736,1737,2100,2101,2496,2497,2924,2925,3384,1,3385,3876,3877,4400,4401,4956,4957,5544,5545,6164,6165,6816,6817,7500,7501,1,8216,8217,8964,8965,9744,9745,10556,10557,11400,11401,12276,12277,13184,13185,14124,1,14125,15096,15097,16100,16101,17136,17137,18204,18205,19304,19305,
- 19789,19788,18673,18672,17589,17588,16537,16536,15517,15516,14529,0,14528,13573,13572,12649,12648,11757,11756,10897,10896,10069,10068,9273,9272,8509,8508,0,7777,7776,7077,7076,6409,6408,5773,5772,5169,5168,4597,4596,4057,4056,3549,0,3548,3073,3072,2629,2628,2217,2216,1837,1836,1488,1486,1484,1482,1480,1478,0,1476,1474,1472,1470,1468,1466,1464,1462,1460,1458,1456,1454,1452,1450,1448,0,1446,1444,1442,1440,1438,1436,1434,1432,1430,1428,1426,1424,1422,1420,1418,0,1416,1414,1412,1410,1406,1407,1738,1739,2102,2103,2498,2499,2926,2927,3386,0,3387,3878,3879,4402,4403,4958,4959,5546,5547,6166,6167,6818,6819,7502,7503,0,8218,8219,8966,8967,9746,9747,10558,10559,11402,11403,12278,12279,13186,13187,14126,0,14127,15098,15099,16102,16103,17138,17139,18206,18207,19306,19307,
- 19787,19786,18671,18670,17587,17586,16535,16534,15515,15514,14527,1,14526,13571,13570,12647,12646,11755,11754,10895,10894,10067,10066,9271,9270,8507,8506,1,7775,7774,7075,7074,6407,6406,5771,5770,5167,5166,4595,4594,4055,4054,3547,1,3546,3071,3070,2627,2626,2215,2214,1835,1834,1489,1487,1485,1483,1481,1479,1,1477,1475,1473,1471,1469,1467,1465,1463,1461,1459,1457,1455,1453,1451,1449,1,1447,1445,1443,1441,1439,1437,1435,1433,1431,1429,1427,1425,1423,1421,1419,1,1417,1415,1413,1411,1408,1409,1740,1741,2104,2105,2500,2501,2928,2929,3388,1,3389,3880,3881,4404,4405,4960,4961,5548,5549,6168,6169,6820,6821,7504,7505,1,8220,8221,8968,8969,9748,9749,10560,10561,11404,11405,12280,12281,13188,13189,14128,1,14129,15100,15101,16104,16105,17140,17141,18208,18209,19308,19309,
- 19785,19784,18669,18668,17585,17584,16533,16532,15513,15512,14525,0,14524,13569,13568,12645,12644,11753,11752,10893,10892,10065,10064,9269,9268,8505,8504,0,7773,7772,7073,7072,6405,6404,5769,5768,5165,5164,4593,4592,4053,4052,3545,0,3544,3069,3068,2625,2624,2213,2212,1832,1830,1828,1826,1824,1822,1820,1818,0,1816,1814,1812,1810,1808,1806,1804,1802,1800,1798,1796,1794,1792,1790,1788,0,1786,1784,1782,1780,1778,1776,1774,1772,1770,1768,1766,1764,1762,1760,1758,0,1756,1754,1752,1750,1748,1746,1742,1743,2106,2107,2502,2503,2930,2931,3390,0,3391,3882,3883,4406,4407,4962,4963,5550,5551,6170,6171,6822,6823,7506,7507,0,8222,8223,8970,8971,9750,9751,10562,10563,11406,11407,12282,12283,13190,13191,14130,0,14131,15102,15103,16106,16107,17142,17143,18210,18211,19310,19311,
- 19783,19782,18667,18666,17583,17582,16531,16530,15511,15510,14523,1,14522,13567,13566,12643,12642,11751,11750,10891,10890,10063,10062,9267,9266,8503,8502,1,7771,7770,7071,7070,6403,6402,5767,5766,5163,5162,4591,4590,4051,4050,3543,1,3542,3067,3066,2623,2622,2211,2210,1833,1831,1829,1827,1825,1823,1821,1819,1,1817,1815,1813,1811,1809,1807,1805,1803,1801,1799,1797,1795,1793,1791,1789,1,1787,1785,1783,1781,1779,1777,1775,1773,1771,1769,1767,1765,1763,1761,1759,1,1757,1755,1753,1751,1749,1747,1744,1745,2108,2109,2504,2505,2932,2933,3392,1,3393,3884,3885,4408,4409,4964,4965,5552,5553,6172,6173,6824,6825,7508,7509,1,8224,8225,8972,8973,9752,9753,10564,10565,11408,11409,12284,12285,13192,13193,14132,1,14133,15104,15105,16108,16109,17144,17145,18212,18213,19312,19313,
- 19781,19780,18665,18664,17581,17580,16529,16528,15509,15508,14521,0,14520,13565,13564,12641,12640,11749,11748,10889,10888,10061,10060,9265,9264,8501,8500,0,7769,7768,7069,7068,6401,6400,5765,5764,5161,5160,4589,4588,4049,4048,3541,0,3540,3065,3064,2621,2620,2208,2206,2204,2202,2200,2198,2196,2194,2192,2190,0,2188,2186,2184,2182,2180,2178,2176,2174,2172,2170,2168,2166,2164,2162,2160,0,2158,2156,2154,2152,2150,2148,2146,2144,2142,2140,2138,2136,2134,2132,2130,0,2128,2126,2124,2122,2120,2118,2116,2114,2110,2111,2506,2507,2934,2935,3394,0,3395,3886,3887,4410,4411,4966,4967,5554,5555,6174,6175,6826,6827,7510,7511,0,8226,8227,8974,8975,9754,9755,10566,10567,11410,11411,12286,12287,13194,13195,14134,0,14135,15106,15107,16110,16111,17146,17147,18214,18215,19314,19315,
- 19779,19778,18663,18662,17579,17578,16527,16526,15507,15506,14519,1,14518,13563,13562,12639,12638,11747,11746,10887,10886,10059,10058,9263,9262,8499,8498,1,7767,7766,7067,7066,6399,6398,5763,5762,5159,5158,4587,4586,4047,4046,3539,1,3538,3063,3062,2619,2618,2209,2207,2205,2203,2201,2199,2197,2195,2193,2191,1,2189,2187,2185,2183,2181,2179,2177,2175,2173,2171,2169,2167,2165,2163,2161,1,2159,2157,2155,2153,2151,2149,2147,2145,2143,2141,2139,2137,2135,2133,2131,1,2129,2127,2125,2123,2121,2119,2117,2115,2112,2113,2508,2509,2936,2937,3396,1,3397,3888,3889,4412,4413,4968,4969,5556,5557,6176,6177,6828,6829,7512,7513,1,8228,8229,8976,8977,9756,9757,10568,10569,11412,11413,12288,12289,13196,13197,14136,1,14137,15108,15109,16112,16113,17148,17149,18216,18217,19316,19317,
- 19777,19776,18661,18660,17577,17576,16525,16524,15505,15504,14517,0,14516,13561,13560,12637,12636,11745,11744,10885,10884,10057,10056,9261,9260,8497,8496,0,7765,7764,7065,7064,6397,6396,5761,5760,5157,5156,4585,4584,4045,4044,3537,0,3536,3061,3060,2616,2614,2612,2610,2608,2606,2604,2602,2600,2598,2596,2594,0,2592,2590,2588,2586,2584,2582,2580,2578,2576,2574,2572,2570,2568,2566,2564,0,2562,2560,2558,2556,2554,2552,2550,2548,2546,2544,2542,2540,2538,2536,2534,0,2532,2530,2528,2526,2524,2522,2520,2518,2516,2514,2510,2511,2938,2939,3398,0,3399,3890,3891,4414,4415,4970,4971,5558,5559,6178,6179,6830,6831,7514,7515,0,8230,8231,8978,8979,9758,9759,10570,10571,11414,11415,12290,12291,13198,13199,14138,0,14139,15110,15111,16114,16115,17150,17151,18218,18219,19318,19319,
- 19775,19774,18659,18658,17575,17574,16523,16522,15503,15502,14515,1,14514,13559,13558,12635,12634,11743,11742,10883,10882,10055,10054,9259,9258,8495,8494,1,7763,7762,7063,7062,6395,6394,5759,5758,5155,5154,4583,4582,4043,4042,3535,1,3534,3059,3058,2617,2615,2613,2611,2609,2607,2605,2603,2601,2599,2597,2595,1,2593,2591,2589,2587,2585,2583,2581,2579,2577,2575,2573,2571,2569,2567,2565,1,2563,2561,2559,2557,2555,2553,2551,2549,2547,2545,2543,2541,2539,2537,2535,1,2533,2531,2529,2527,2525,2523,2521,2519,2517,2515,2512,2513,2940,2941,3400,1,3401,3892,3893,4416,4417,4972,4973,5560,5561,6180,6181,6832,6833,7516,7517,1,8232,8233,8980,8981,9760,9761,10572,10573,11416,11417,12292,12293,13200,13201,14140,1,14141,15112,15113,16116,16117,17152,17153,18220,18221,19320,19321,
- 19773,19772,18657,18656,17573,17572,16521,16520,15501,15500,14513,0,14512,13557,13556,12633,12632,11741,11740,10881,10880,10053,10052,9257,9256,8493,8492,0,7761,7760,7061,7060,6393,6392,5757,5756,5153,5152,4581,4580,4041,4040,3533,0,3532,3056,3054,3052,3050,3048,3046,3044,3042,3040,3038,3036,3034,3032,3030,0,3028,3026,3024,3022,3020,3018,3016,3014,3012,3010,3008,3006,3004,3002,3000,0,2998,2996,2994,2992,2990,2988,2986,2984,2982,2980,2978,2976,2974,2972,2970,0,2968,2966,2964,2962,2960,2958,2956,2954,2952,2950,2948,2946,2942,2943,3402,0,3403,3894,3895,4418,4419,4974,4975,5562,5563,6182,6183,6834,6835,7518,7519,0,8234,8235,8982,8983,9762,9763,10574,10575,11418,11419,12294,12295,13202,13203,14142,0,14143,15114,15115,16118,16119,17154,17155,18222,18223,19322,19323,
- 19771,19770,18655,18654,17571,17570,16519,16518,15499,15498,14511,1,14510,13555,13554,12631,12630,11739,11738,10879,10878,10051,10050,9255,9254,8491,8490,1,7759,7758,7059,7058,6391,6390,5755,5754,5151,5150,4579,4578,4039,4038,3531,1,3530,3057,3055,3053,3051,3049,3047,3045,3043,3041,3039,3037,3035,3033,3031,1,3029,3027,3025,3023,3021,3019,3017,3015,3013,3011,3009,3007,3005,3003,3001,1,2999,2997,2995,2993,2991,2989,2987,2985,2983,2981,2979,2977,2975,2973,2971,1,2969,2967,2965,2963,2961,2959,2957,2955,2953,2951,2949,2947,2944,2945,3404,1,3405,3896,3897,4420,4421,4976,4977,5564,5565,6184,6185,6836,6837,7520,7521,1,8236,8237,8984,8985,9764,9765,10576,10577,11420,11421,12296,12297,13204,13205,14144,1,14145,15116,15117,16120,16121,17156,17157,18224,18225,19324,19325,
- 19769,19768,18653,18652,17569,17568,16517,16516,15497,15496,14509,0,14508,13553,13552,12629,12628,11737,11736,10877,10876,10049,10048,9253,9252,8489,8488,0,7757,7756,7057,7056,6389,6388,5753,5752,5149,5148,4577,4576,4037,4036,3528,0,3526,3524,3522,3520,3518,3516,3514,3512,3510,3508,3506,3504,3502,3500,3498,0,3496,3494,3492,3490,3488,3486,3484,3482,3480,3478,3476,3474,3472,3470,3468,0,3466,3464,3462,3460,3458,3456,3454,3452,3450,3448,3446,3444,3442,3440,3438,0,3436,3434,3432,3430,3428,3426,3424,3422,3420,3418,3416,3414,3412,3410,3406,0,3407,3898,3899,4422,4423,4978,4979,5566,5567,6186,6187,6838,6839,7522,7523,0,8238,8239,8986,8987,9766,9767,10578,10579,11422,11423,12298,12299,13206,13207,14146,0,14147,15118,15119,16122,16123,17158,17159,18226,18227,19326,19327,
- 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
- 19767,19766,18651,18650,17567,17566,16515,16514,15495,15494,14507,0,14506,13551,13550,12627,12626,11735,11734,10875,10874,10047,10046,9251,9250,8487,8486,0,7755,7754,7055,7054,6387,6386,5751,5750,5147,5146,4575,4574,4035,4034,3529,0,3527,3525,3523,3521,3519,3517,3515,3513,3511,3509,3507,3505,3503,3501,3499,0,3497,3495,3493,3491,3489,3487,3485,3483,3481,3479,3477,3475,3473,3471,3469,0,3467,3465,3463,3461,3459,3457,3455,3453,3451,3449,3447,3445,3443,3441,3439,0,3437,3435,3433,3431,3429,3427,3425,3423,3421,3419,3417,3415,3413,3411,3408,0,3409,3900,3901,4424,4425,4980,4981,5568,5569,6188,6189,6840,6841,7524,7525,0,8240,8241,8988,8989,9768,9769,10580,10581,11424,11425,12300,12301,13208,13209,14148,0,14149,15120,15121,16124,16125,17160,17161,18228,18229,19328,19329,
- 19765,19764,18649,18648,17565,17564,16513,16512,15493,15492,14505,1,14504,13549,13548,12625,12624,11733,11732,10873,10872,10045,10044,9249,9248,8485,8484,1,7753,7752,7053,7052,6385,6384,5749,5748,5145,5144,4573,4572,4032,4030,4028,1,4026,4024,4022,4020,4018,4016,4014,4012,4010,4008,4006,4004,4002,4000,3998,1,3996,3994,3992,3990,3988,3986,3984,3982,3980,3978,3976,3974,3972,3970,3968,1,3966,3964,3962,3960,3958,3956,3954,3952,3950,3948,3946,3944,3942,3940,3938,1,3936,3934,3932,3930,3928,3926,3924,3922,3920,3918,3916,3914,3912,3910,3908,1,3906,3902,3903,4426,4427,4982,4983,5570,5571,6190,6191,6842,6843,7526,7527,1,8242,8243,8990,8991,9770,9771,10582,10583,11426,11427,12302,12303,13210,13211,14150,1,14151,15122,15123,16126,16127,17162,17163,18230,18231,19330,19331,
- 19763,19762,18647,18646,17563,17562,16511,16510,15491,15490,14503,0,14502,13547,13546,12623,12622,11731,11730,10871,10870,10043,10042,9247,9246,8483,8482,0,7751,7750,7051,7050,6383,6382,5747,5746,5143,5142,4571,4570,4033,4031,4029,0,4027,4025,4023,4021,4019,4017,4015,4013,4011,4009,4007,4005,4003,4001,3999,0,3997,3995,3993,3991,3989,3987,3985,3983,3981,3979,3977,3975,3973,3971,3969,0,3967,3965,3963,3961,3959,3957,3955,3953,3951,3949,3947,3945,3943,3941,3939,0,3937,3935,3933,3931,3929,3927,3925,3923,3921,3919,3917,3915,3913,3911,3909,0,3907,3904,3905,4428,4429,4984,4985,5572,5573,6192,6193,6844,6845,7528,7529,0,8244,8245,8992,8993,9772,9773,10584,10585,11428,11429,12304,12305,13212,13213,14152,0,14153,15124,15125,16128,16129,17164,17165,18232,18233,19332,19333,
- 19761,19760,18645,18644,17561,17560,16509,16508,15489,15488,14501,1,14500,13545,13544,12621,12620,11729,11728,10869,10868,10041,10040,9245,9244,8481,8480,1,7749,7748,7049,7048,6381,6380,5745,5744,5141,5140,4568,4566,4564,4562,4560,1,4558,4556,4554,4552,4550,4548,4546,4544,4542,4540,4538,4536,4534,4532,4530,1,4528,4526,4524,4522,4520,4518,4516,4514,4512,4510,4508,4506,4504,4502,4500,1,4498,4496,4494,4492,4490,4488,4486,4484,4482,4480,4478,4476,4474,4472,4470,1,4468,4466,4464,4462,4460,4458,4456,4454,4452,4450,4448,4446,4444,4442,4440,1,4438,4436,4434,4430,4431,4986,4987,5574,5575,6194,6195,6846,6847,7530,7531,1,8246,8247,8994,8995,9774,9775,10586,10587,11430,11431,12306,12307,13214,13215,14154,1,14155,15126,15127,16130,16131,17166,17167,18234,18235,19334,19335,
- 19759,19758,18643,18642,17559,17558,16507,16506,15487,15486,14499,0,14498,13543,13542,12619,12618,11727,11726,10867,10866,10039,10038,9243,9242,8479,8478,0,7747,7746,7047,7046,6379,6378,5743,5742,5139,5138,4569,4567,4565,4563,4561,0,4559,4557,4555,4553,4551,4549,4547,4545,4543,4541,4539,4537,4535,4533,4531,0,4529,4527,4525,4523,4521,4519,4517,4515,4513,4511,4509,4507,4505,4503,4501,0,4499,4497,4495,4493,4491,4489,4487,4485,4483,4481,4479,4477,4475,4473,4471,0,4469,4467,4465,4463,4461,4459,4457,4455,4453,4451,4449,4447,4445,4443,4441,0,4439,4437,4435,4432,4433,4988,4989,5576,5577,6196,6197,6848,6849,7532,7533,0,8248,8249,8996,8997,9776,9777,10588,10589,11432,11433,12308,12309,13216,13217,14156,0,14157,15128,15129,16132,16133,17168,17169,18236,18237,19336,19337,
- 19757,19756,18641,18640,17557,17556,16505,16504,15485,15484,14497,1,14496,13541,13540,12617,12616,11725,11724,10865,10864,10037,10036,9241,9240,8477,8476,1,7745,7744,7045,7044,6377,6376,5741,5740,5136,5134,5132,5130,5128,5126,5124,1,5122,5120,5118,5116,5114,5112,5110,5108,5106,5104,5102,5100,5098,5096,5094,1,5092,5090,5088,5086,5084,5082,5080,5078,5076,5074,5072,5070,5068,5066,5064,1,5062,5060,5058,5056,5054,5052,5050,5048,5046,5044,5042,5040,5038,5036,5034,1,5032,5030,5028,5026,5024,5022,5020,5018,5016,5014,5012,5010,5008,5006,5004,1,5002,5000,4998,4996,4994,4990,4991,5578,5579,6198,6199,6850,6851,7534,7535,1,8250,8251,8998,8999,9778,9779,10590,10591,11434,11435,12310,12311,13218,13219,14158,1,14159,15130,15131,16134,16135,17170,17171,18238,18239,19338,19339,
- 19755,19754,18639,18638,17555,17554,16503,16502,15483,15482,14495,0,14494,13539,13538,12615,12614,11723,11722,10863,10862,10035,10034,9239,9238,8475,8474,0,7743,7742,7043,7042,6375,6374,5739,5738,5137,5135,5133,5131,5129,5127,5125,0,5123,5121,5119,5117,5115,5113,5111,5109,5107,5105,5103,5101,5099,5097,5095,0,5093,5091,5089,5087,5085,5083,5081,5079,5077,5075,5073,5071,5069,5067,5065,0,5063,5061,5059,5057,5055,5053,5051,5049,5047,5045,5043,5041,5039,5037,5035,0,5033,5031,5029,5027,5025,5023,5021,5019,5017,5015,5013,5011,5009,5007,5005,0,5003,5001,4999,4997,4995,4992,4993,5580,5581,6200,6201,6852,6853,7536,7537,0,8252,8253,9000,9001,9780,9781,10592,10593,11436,11437,12312,12313,13220,13221,14160,0,14161,15132,15133,16136,16137,17172,17173,18240,18241,19340,19341,
- 19753,19752,18637,18636,17553,17552,16501,16500,15481,15480,14493,1,14492,13537,13536,12613,12612,11721,11720,10861,10860,10033,10032,9237,9236,8473,8472,1,7741,7740,7041,7040,6373,6372,5736,5734,5732,5730,5728,5726,5724,5722,5720,1,5718,5716,5714,5712,5710,5708,5706,5704,5702,5700,5698,5696,5694,5692,5690,1,5688,5686,5684,5682,5680,5678,5676,5674,5672,5670,5668,5666,5664,5662,5660,1,5658,5656,5654,5652,5650,5648,5646,5644,5642,5640,5638,5636,5634,5632,5630,1,5628,5626,5624,5622,5620,5618,5616,5614,5612,5610,5608,5606,5604,5602,5600,1,5598,5596,5594,5592,5590,5588,5586,5582,5583,6202,6203,6854,6855,7538,7539,1,8254,8255,9002,9003,9782,9783,10594,10595,11438,11439,12314,12315,13222,13223,14162,1,14163,15134,15135,16138,16139,17174,17175,18242,18243,19342,19343,
- 19751,19750,18635,18634,17551,17550,16499,16498,15479,15478,14491,0,14490,13535,13534,12611,12610,11719,11718,10859,10858,10031,10030,9235,9234,8471,8470,0,7739,7738,7039,7038,6371,6370,5737,5735,5733,5731,5729,5727,5725,5723,5721,0,5719,5717,5715,5713,5711,5709,5707,5705,5703,5701,5699,5697,5695,5693,5691,0,5689,5687,5685,5683,5681,5679,5677,5675,5673,5671,5669,5667,5665,5663,5661,0,5659,5657,5655,5653,5651,5649,5647,5645,5643,5641,5639,5637,5635,5633,5631,0,5629,5627,5625,5623,5621,5619,5617,5615,5613,5611,5609,5607,5605,5603,5601,0,5599,5597,5595,5593,5591,5589,5587,5584,5585,6204,6205,6856,6857,7540,7541,0,8256,8257,9004,9005,9784,9785,10596,10597,11440,11441,12316,12317,13224,13225,14164,0,14165,15136,15137,16140,16141,17176,17177,18244,18245,19344,19345,
- 19749,19748,18633,18632,17549,17548,16497,16496,15477,15476,14489,1,14488,13533,13532,12609,12608,11717,11716,10857,10856,10029,10028,9233,9232,8469,8468,1,7737,7736,7037,7036,6368,6366,6364,6362,6360,6358,6356,6354,6352,6350,6348,1,6346,6344,6342,6340,6338,6336,6334,6332,6330,6328,6326,6324,6322,6320,6318,1,6316,6314,6312,6310,6308,6306,6304,6302,6300,6298,6296,6294,6292,6290,6288,1,6286,6284,6282,6280,6278,6276,6274,6272,6270,6268,6266,6264,6262,6260,6258,1,6256,6254,6252,6250,6248,6246,6244,6242,6240,6238,6236,6234,6232,6230,6228,1,6226,6224,6222,6220,6218,6216,6214,6212,6210,6206,6207,6858,6859,7542,7543,1,8258,8259,9006,9007,9786,9787,10598,10599,11442,11443,12318,12319,13226,13227,14166,1,14167,15138,15139,16142,16143,17178,17179,18246,18247,19346,19347,
- 19747,19746,18631,18630,17547,17546,16495,16494,15475,15474,14487,0,14486,13531,13530,12607,12606,11715,11714,10855,10854,10027,10026,9231,9230,8467,8466,0,7735,7734,7035,7034,6369,6367,6365,6363,6361,6359,6357,6355,6353,6351,6349,0,6347,6345,6343,6341,6339,6337,6335,6333,6331,6329,6327,6325,6323,6321,6319,0,6317,6315,6313,6311,6309,6307,6305,6303,6301,6299,6297,6295,6293,6291,6289,0,6287,6285,6283,6281,6279,6277,6275,6273,6271,6269,6267,6265,6263,6261,6259,0,6257,6255,6253,6251,6249,6247,6245,6243,6241,6239,6237,6235,6233,6231,6229,0,6227,6225,6223,6221,6219,6217,6215,6213,6211,6208,6209,6860,6861,7544,7545,0,8260,8261,9008,9009,9788,9789,10600,10601,11444,11445,12320,12321,13228,13229,14168,0,14169,15140,15141,16144,16145,17180,17181,18248,18249,19348,19349,
- 19745,19744,18629,18628,17545,17544,16493,16492,15473,15472,14485,1,14484,13529,13528,12605,12604,11713,11712,10853,10852,10025,10024,9229,9228,8465,8464,1,7733,7732,7032,7030,7028,7026,7024,7022,7020,7018,7016,7014,7012,7010,7008,1,7006,7004,7002,7000,6998,6996,6994,6992,6990,6988,6986,6984,6982,6980,6978,1,6976,6974,6972,6970,6968,6966,6964,6962,6960,6958,6956,6954,6952,6950,6948,1,6946,6944,6942,6940,6938,6936,6934,6932,6930,6928,6926,6924,6922,6920,6918,1,6916,6914,6912,6910,6908,6906,6904,6902,6900,6898,6896,6894,6892,6890,6888,1,6886,6884,6882,6880,6878,6876,6874,6872,6870,6868,6866,6862,6863,7546,7547,1,8262,8263,9010,9011,9790,9791,10602,10603,11446,11447,12322,12323,13230,13231,14170,1,14171,15142,15143,16146,16147,17182,17183,18250,18251,19350,19351,
- 19743,19742,18627,18626,17543,17542,16491,16490,15471,15470,14483,0,14482,13527,13526,12603,12602,11711,11710,10851,10850,10023,10022,9227,9226,8463,8462,0,7731,7730,7033,7031,7029,7027,7025,7023,7021,7019,7017,7015,7013,7011,7009,0,7007,7005,7003,7001,6999,6997,6995,6993,6991,6989,6987,6985,6983,6981,6979,0,6977,6975,6973,6971,6969,6967,6965,6963,6961,6959,6957,6955,6953,6951,6949,0,6947,6945,6943,6941,6939,6937,6935,6933,6931,6929,6927,6925,6923,6921,6919,0,6917,6915,6913,6911,6909,6907,6905,6903,6901,6899,6897,6895,6893,6891,6889,0,6887,6885,6883,6881,6879,6877,6875,6873,6871,6869,6867,6864,6865,7548,7549,0,8264,8265,9012,9013,9792,9793,10604,10605,11448,11449,12324,12325,13232,13233,14172,0,14173,15144,15145,16148,16149,17184,17185,18252,18253,19352,19353,
- 19741,19740,18625,18624,17541,17540,16489,16488,15469,15468,14481,1,14480,13525,13524,12601,12600,11709,11708,10849,10848,10021,10020,9225,9224,8461,8460,1,7728,7726,7724,7722,7720,7718,7716,7714,7712,7710,7708,7706,7704,7702,7700,1,7698,7696,7694,7692,7690,7688,7686,7684,7682,7680,7678,7676,7674,7672,7670,1,7668,7666,7664,7662,7660,7658,7656,7654,7652,7650,7648,7646,7644,7642,7640,1,7638,7636,7634,7632,7630,7628,7626,7624,7622,7620,7618,7616,7614,7612,7610,1,7608,7606,7604,7602,7600,7598,7596,7594,7592,7590,7588,7586,7584,7582,7580,1,7578,7576,7574,7572,7570,7568,7566,7564,7562,7560,7558,7556,7554,7550,7551,1,8266,8267,9014,9015,9794,9795,10606,10607,11450,11451,12326,12327,13234,13235,14174,1,14175,15146,15147,16150,16151,17186,17187,18254,18255,19354,19355,
- 19739,19738,18623,18622,17539,17538,16487,16486,15467,15466,14479,0,14478,13523,13522,12599,12598,11707,11706,10847,10846,10019,10018,9223,9222,8459,8458,0,7729,7727,7725,7723,7721,7719,7717,7715,7713,7711,7709,7707,7705,7703,7701,0,7699,7697,7695,7693,7691,7689,7687,7685,7683,7681,7679,7677,7675,7673,7671,0,7669,7667,7665,7663,7661,7659,7657,7655,7653,7651,7649,7647,7645,7643,7641,0,7639,7637,7635,7633,7631,7629,7627,7625,7623,7621,7619,7617,7615,7613,7611,0,7609,7607,7605,7603,7601,7599,7597,7595,7593,7591,7589,7587,7585,7583,7581,0,7579,7577,7575,7573,7571,7569,7567,7565,7563,7561,7559,7557,7555,7552,7553,0,8268,8269,9016,9017,9796,9797,10608,10609,11452,11453,12328,12329,13236,13237,14176,0,14177,15148,15149,16152,16153,17188,17189,18256,18257,19356,19357,
- 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
- 19737,19736,18621,18620,17537,17536,16485,16484,15465,15464,14477,0,14476,13521,13520,12597,12596,11705,11704,10845,10844,10017,10016,9221,9220,8456,8454,0,8452,8450,8448,8446,8444,8442,8440,8438,8436,8434,8432,8430,8428,8426,8424,0,8422,8420,8418,8416,8414,8412,8410,8408,8406,8404,8402,8400,8398,8396,8394,0,8392,8390,8388,8386,8384,8382,8380,8378,8376,8374,8372,8370,8368,8366,8364,0,8362,8360,8358,8356,8354,8352,8350,8348,8346,8344,8342,8340,8338,8336,8334,0,8332,8330,8328,8326,8324,8322,8320,8318,8316,8314,8312,8310,8308,8306,8304,0,8302,8300,8298,8296,8294,8292,8290,8288,8286,8284,8282,8280,8278,8276,8274,0,8270,8271,9018,9019,9798,9799,10610,10611,11454,11455,12330,12331,13238,13239,14178,0,14179,15150,15151,16154,16155,17190,17191,18258,18259,19358,19359,
- 19735,19734,18619,18618,17535,17534,16483,16482,15463,15462,14475,1,14474,13519,13518,12595,12594,11703,11702,10843,10842,10015,10014,9219,9218,8457,8455,1,8453,8451,8449,8447,8445,8443,8441,8439,8437,8435,8433,8431,8429,8427,8425,1,8423,8421,8419,8417,8415,8413,8411,8409,8407,8405,8403,8401,8399,8397,8395,1,8393,8391,8389,8387,8385,8383,8381,8379,8377,8375,8373,8371,8369,8367,8365,1,8363,8361,8359,8357,8355,8353,8351,8349,8347,8345,8343,8341,8339,8337,8335,1,8333,8331,8329,8327,8325,8323,8321,8319,8317,8315,8313,8311,8309,8307,8305,1,8303,8301,8299,8297,8295,8293,8291,8289,8287,8285,8283,8281,8279,8277,8275,1,8272,8273,9020,9021,9800,9801,10612,10613,11456,11457,12332,12333,13240,13241,14180,1,14181,15152,15153,16156,16157,17192,17193,18260,18261,19360,19361,
- 19733,19732,18617,18616,17533,17532,16481,16480,15461,15460,14473,0,14472,13517,13516,12593,12592,11701,11700,10841,10840,10013,10012,9216,9214,9212,9210,0,9208,9206,9204,9202,9200,9198,9196,9194,9192,9190,9188,9186,9184,9182,9180,0,9178,9176,9174,9172,9170,9168,9166,9164,9162,9160,9158,9156,9154,9152,9150,0,9148,9146,9144,9142,9140,9138,9136,9134,9132,9130,9128,9126,9124,9122,9120,0,9118,9116,9114,9112,9110,9108,9106,9104,9102,9100,9098,9096,9094,9092,9090,0,9088,9086,9084,9082,9080,9078,9076,9074,9072,9070,9068,9066,9064,9062,9060,0,9058,9056,9054,9052,9050,9048,9046,9044,9042,9040,9038,9036,9034,9032,9030,0,9028,9026,9022,9023,9802,9803,10614,10615,11458,11459,12334,12335,13242,13243,14182,0,14183,15154,15155,16158,16159,17194,17195,18262,18263,19362,19363,
- 19731,19730,18615,18614,17531,17530,16479,16478,15459,15458,14471,1,14470,13515,13514,12591,12590,11699,11698,10839,10838,10011,10010,9217,9215,9213,9211,1,9209,9207,9205,9203,9201,9199,9197,9195,9193,9191,9189,9187,9185,9183,9181,1,9179,9177,9175,9173,9171,9169,9167,9165,9163,9161,9159,9157,9155,9153,9151,1,9149,9147,9145,9143,9141,9139,9137,9135,9133,9131,9129,9127,9125,9123,9121,1,9119,9117,9115,9113,9111,9109,9107,9105,9103,9101,9099,9097,9095,9093,9091,1,9089,9087,9085,9083,9081,9079,9077,9075,9073,9071,9069,9067,9065,9063,9061,1,9059,9057,9055,9053,9051,9049,9047,9045,9043,9041,9039,9037,9035,9033,9031,1,9029,9027,9024,9025,9804,9805,10616,10617,11460,11461,12336,12337,13244,13245,14184,1,14185,15156,15157,16160,16161,17196,17197,18264,18265,19364,19365,
- 19729,19728,18613,18612,17529,17528,16477,16476,15457,15456,14469,0,14468,13513,13512,12589,12588,11697,11696,10837,10836,10008,10006,10004,10002,10000,9998,0,9996,9994,9992,9990,9988,9986,9984,9982,9980,9978,9976,9974,9972,9970,9968,0,9966,9964,9962,9960,9958,9956,9954,9952,9950,9948,9946,9944,9942,9940,9938,0,9936,9934,9932,9930,9928,9926,9924,9922,9920,9918,9916,9914,9912,9910,9908,0,9906,9904,9902,9900,9898,9896,9894,9892,9890,9888,9886,9884,9882,9880,9878,0,9876,9874,9872,9870,9868,9866,9864,9862,9860,9858,9856,9854,9852,9850,9848,0,9846,9844,9842,9840,9838,9836,9834,9832,9830,9828,9826,9824,9822,9820,9818,0,9816,9814,9812,9810,9806,9807,10618,10619,11462,11463,12338,12339,13246,13247,14186,0,14187,15158,15159,16162,16163,17198,17199,18266,18267,19366,19367,
- 19727,19726,18611,18610,17527,17526,16475,16474,15455,15454,14467,1,14466,13511,13510,12587,12586,11695,11694,10835,10834,10009,10007,10005,10003,10001,9999,1,9997,9995,9993,9991,9989,9987,9985,9983,9981,9979,9977,9975,9973,9971,9969,1,9967,9965,9963,9961,9959,9957,9955,9953,9951,9949,9947,9945,9943,9941,9939,1,9937,9935,9933,9931,9929,9927,9925,9923,9921,9919,9917,9915,9913,9911,9909,1,9907,9905,9903,9901,9899,9897,9895,9893,9891,9889,9887,9885,9883,9881,9879,1,9877,9875,9873,9871,9869,9867,9865,9863,9861,9859,9857,9855,9853,9851,9849,1,9847,9845,9843,9841,9839,9837,9835,9833,9831,9829,9827,9825,9823,9821,9819,1,9817,9815,9813,9811,9808,9809,10620,10621,11464,11465,12340,12341,13248,13249,14188,1,14189,15160,15161,16164,16165,17200,17201,18268,18269,19368,19369,
- 19725,19724,18609,18608,17525,17524,16473,16472,15453,15452,14465,0,14464,13509,13508,12585,12584,11693,11692,10832,10830,10828,10826,10824,10822,10820,10818,0,10816,10814,10812,10810,10808,10806,10804,10802,10800,10798,10796,10794,10792,10790,10788,0,10786,10784,10782,10780,10778,10776,10774,10772,10770,10768,10766,10764,10762,10760,10758,0,10756,10754,10752,10750,10748,10746,10744,10742,10740,10738,10736,10734,10732,10730,10728,0,10726,10724,10722,10720,10718,10716,10714,10712,10710,10708,10706,10704,10702,10700,10698,0,10696,10694,10692,10690,10688,10686,10684,10682,10680,10678,10676,10674,10672,10670,10668,0,10666,10664,10662,10660,10658,10656,10654,10652,10650,10648,10646,10644,10642,10640,10638,0,10636,10634,10632,10630,10628,10626,10622,10623,11466,11467,12342,12343,13250,13251,14190,0,14191,15162,15163,16166,16167,17202,17203,18270,18271,19370,19371,
- 19723,19722,18607,18606,17523,17522,16471,16470,15451,15450,14463,1,14462,13507,13506,12583,12582,11691,11690,10833,10831,10829,10827,10825,10823,10821,10819,1,10817,10815,10813,10811,10809,10807,10805,10803,10801,10799,10797,10795,10793,10791,10789,1,10787,10785,10783,10781,10779,10777,10775,10773,10771,10769,10767,10765,10763,10761,10759,1,10757,10755,10753,10751,10749,10747,10745,10743,10741,10739,10737,10735,10733,10731,10729,1,10727,10725,10723,10721,10719,10717,10715,10713,10711,10709,10707,10705,10703,10701,10699,1,10697,10695,10693,10691,10689,10687,10685,10683,10681,10679,10677,10675,10673,10671,10669,1,10667,10665,10663,10661,10659,10657,10655,10653,10651,10649,10647,10645,10643,10641,10639,1,10637,10635,10633,10631,10629,10627,10624,10625,11468,11469,12344,12345,13252,13253,14192,1,14193,15164,15165,16168,16169,17204,17205,18272,18273,19372,19373,
- 19721,19720,18605,18604,17521,17520,16469,16468,15449,15448,14461,0,14460,13505,13504,12581,12580,11688,11686,11684,11682,11680,11678,11676,11674,11672,11670,0,11668,11666,11664,11662,11660,11658,11656,11654,11652,11650,11648,11646,11644,11642,11640,0,11638,11636,11634,11632,11630,11628,11626,11624,11622,11620,11618,11616,11614,11612,11610,0,11608,11606,11604,11602,11600,11598,11596,11594,11592,11590,11588,11586,11584,11582,11580,0,11578,11576,11574,11572,11570,11568,11566,11564,11562,11560,11558,11556,11554,11552,11550,0,11548,11546,11544,11542,11540,11538,11536,11534,11532,11530,11528,11526,11524,11522,11520,0,11518,11516,11514,11512,11510,11508,11506,11504,11502,11500,11498,11496,11494,11492,11490,0,11488,11486,11484,11482,11480,11478,11476,11474,11470,11471,12346,12347,13254,13255,14194,0,14195,15166,15167,16170,16171,17206,17207,18274,18275,19374,19375,
- 19719,19718,18603,18602,17519,17518,16467,16466,15447,15446,14459,1,14458,13503,13502,12579,12578,11689,11687,11685,11683,11681,11679,11677,11675,11673,11671,1,11669,11667,11665,11663,11661,11659,11657,11655,11653,11651,11649,11647,11645,11643,11641,1,11639,11637,11635,11633,11631,11629,11627,11625,11623,11621,11619,11617,11615,11613,11611,1,11609,11607,11605,11603,11601,11599,11597,11595,11593,11591,11589,11587,11585,11583,11581,1,11579,11577,11575,11573,11571,11569,11567,11565,11563,11561,11559,11557,11555,11553,11551,1,11549,11547,11545,11543,11541,11539,11537,11535,11533,11531,11529,11527,11525,11523,11521,1,11519,11517,11515,11513,11511,11509,11507,11505,11503,11501,11499,11497,11495,11493,11491,1,11489,11487,11485,11483,11481,11479,11477,11475,11472,11473,12348,12349,13256,13257,14196,1,14197,15168,15169,16172,16173,17208,17209,18276,18277,19376,19377,
- 19717,19716,18601,18600,17517,17516,16465,16464,15445,15444,14457,0,14456,13501,13500,12576,12574,12572,12570,12568,12566,12564,12562,12560,12558,12556,12554,0,12552,12550,12548,12546,12544,12542,12540,12538,12536,12534,12532,12530,12528,12526,12524,0,12522,12520,12518,12516,12514,12512,12510,12508,12506,12504,12502,12500,12498,12496,12494,0,12492,12490,12488,12486,12484,12482,12480,12478,12476,12474,12472,12470,12468,12466,12464,0,12462,12460,12458,12456,12454,12452,12450,12448,12446,12444,12442,12440,12438,12436,12434,0,12432,12430,12428,12426,12424,12422,12420,12418,12416,12414,12412,12410,12408,12406,12404,0,12402,12400,12398,12396,12394,12392,12390,12388,12386,12384,12382,12380,12378,12376,12374,0,12372,12370,12368,12366,12364,12362,12360,12358,12356,12354,12350,12351,13258,13259,14198,0,14199,15170,15171,16174,16175,17210,17211,18278,18279,19378,19379,
- 19715,19714,18599,18598,17515,17514,16463,16462,15443,15442,14455,1,14454,13499,13498,12577,12575,12573,12571,12569,12567,12565,12563,12561,12559,12557,12555,1,12553,12551,12549,12547,12545,12543,12541,12539,12537,12535,12533,12531,12529,12527,12525,1,12523,12521,12519,12517,12515,12513,12511,12509,12507,12505,12503,12501,12499,12497,12495,1,12493,12491,12489,12487,12485,12483,12481,12479,12477,12475,12473,12471,12469,12467,12465,1,12463,12461,12459,12457,12455,12453,12451,12449,12447,12445,12443,12441,12439,12437,12435,1,12433,12431,12429,12427,12425,12423,12421,12419,12417,12415,12413,12411,12409,12407,12405,1,12403,12401,12399,12397,12395,12393,12391,12389,12387,12385,12383,12381,12379,12377,12375,1,12373,12371,12369,12367,12365,12363,12361,12359,12357,12355,12352,12353,13260,13261,14200,1,14201,15172,15173,16176,16177,17212,17213,18280,18281,19380,19381,
- 19713,19712,18597,18596,17513,17512,16461,16460,15441,15440,14453,0,14452,13496,13494,13492,13490,13488,13486,13484,13482,13480,13478,13476,13474,13472,13470,0,13468,13466,13464,13462,13460,13458,13456,13454,13452,13450,13448,13446,13444,13442,13440,0,13438,13436,13434,13432,13430,13428,13426,13424,13422,13420,13418,13416,13414,13412,13410,0,13408,13406,13404,13402,13400,13398,13396,13394,13392,13390,13388,13386,13384,13382,13380,0,13378,13376,13374,13372,13370,13368,13366,13364,13362,13360,13358,13356,13354,13352,13350,0,13348,13346,13344,13342,13340,13338,13336,13334,13332,13330,13328,13326,13324,13322,13320,0,13318,13316,13314,13312,13310,13308,13306,13304,13302,13300,13298,13296,13294,13292,13290,0,13288,13286,13284,13282,13280,13278,13276,13274,13272,13270,13268,13266,13262,13263,14202,0,14203,15174,15175,16178,16179,17214,17215,18282,18283,19382,19383,
- 19711,19710,18595,18594,17511,17510,16459,16458,15439,15438,14451,1,14450,13497,13495,13493,13491,13489,13487,13485,13483,13481,13479,13477,13475,13473,13471,1,13469,13467,13465,13463,13461,13459,13457,13455,13453,13451,13449,13447,13445,13443,13441,1,13439,13437,13435,13433,13431,13429,13427,13425,13423,13421,13419,13417,13415,13413,13411,1,13409,13407,13405,13403,13401,13399,13397,13395,13393,13391,13389,13387,13385,13383,13381,1,13379,13377,13375,13373,13371,13369,13367,13365,13363,13361,13359,13357,13355,13353,13351,1,13349,13347,13345,13343,13341,13339,13337,13335,13333,13331,13329,13327,13325,13323,13321,1,13319,13317,13315,13313,13311,13309,13307,13305,13303,13301,13299,13297,13295,13293,13291,1,13289,13287,13285,13283,13281,13279,13277,13275,13273,13271,13269,13267,13264,13265,14204,1,14205,15176,15177,16180,16181,17216,17217,18284,18285,19384,19385,
- 19709,19708,18593,18592,17509,17508,16457,16456,15437,15436,14448,0,14446,14444,14442,14440,14438,14436,14434,14432,14430,14428,14426,14424,14422,14420,14418,0,14416,14414,14412,14410,14408,14406,14404,14402,14400,14398,14396,14394,14392,14390,14388,0,14386,14384,14382,14380,14378,14376,14374,14372,14370,14368,14366,14364,14362,14360,14358,0,14356,14354,14352,14350,14348,14346,14344,14342,14340,14338,14336,14334,14332,14330,14328,0,14326,14324,14322,14320,14318,14316,14314,14312,14310,14308,14306,14304,14302,14300,14298,0,14296,14294,14292,14290,14288,14286,14284,14282,14280,14278,14276,14274,14272,14270,14268,0,14266,14264,14262,14260,14258,14256,14254,14252,14250,14248,14246,14244,14242,14240,14238,0,14236,14234,14232,14230,14228,14226,14224,14222,14220,14218,14216,14214,14212,14210,14206,0,14207,15178,15179,16182,16183,17218,17219,18286,18287,19386,19387,
- 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,
- 19707,19706,18591,18590,17507,17506,16455,16454,15435,15434,14449,0,14447,14445,14443,14441,14439,14437,14435,14433,14431,14429,14427,14425,14423,14421,14419,0,14417,14415,14413,14411,14409,14407,14405,14403,14401,14399,14397,14395,14393,14391,14389,0,14387,14385,14383,14381,14379,14377,14375,14373,14371,14369,14367,14365,14363,14361,14359,0,14357,14355,14353,14351,14349,14347,14345,14343,14341,14339,14337,14335,14333,14331,14329,0,14327,14325,14323,14321,14319,14317,14315,14313,14311,14309,14307,14305,14303,14301,14299,0,14297,14295,14293,14291,14289,14287,14285,14283,14281,14279,14277,14275,14273,14271,14269,0,14267,14265,14263,14261,14259,14257,14255,14253,14251,14249,14247,14245,14243,14241,14239,0,14237,14235,14233,14231,14229,14227,14225,14223,14221,14219,14217,14215,14213,14211,14208,0,14209,15180,15181,16184,16185,17220,17221,18288,18289,19388,19389,
- 19705,19704,18589,18588,17505,17504,16453,16452,15432,15430,15428,1,15426,15424,15422,15420,15418,15416,15414,15412,15410,15408,15406,15404,15402,15400,15398,1,15396,15394,15392,15390,15388,15386,15384,15382,15380,15378,15376,15374,15372,15370,15368,1,15366,15364,15362,15360,15358,15356,15354,15352,15350,15348,15346,15344,15342,15340,15338,1,15336,15334,15332,15330,15328,15326,15324,15322,15320,15318,15316,15314,15312,15310,15308,1,15306,15304,15302,15300,15298,15296,15294,15292,15290,15288,15286,15284,15282,15280,15278,1,15276,15274,15272,15270,15268,15266,15264,15262,15260,15258,15256,15254,15252,15250,15248,1,15246,15244,15242,15240,15238,15236,15234,15232,15230,15228,15226,15224,15222,15220,15218,1,15216,15214,15212,15210,15208,15206,15204,15202,15200,15198,15196,15194,15192,15190,15188,1,15186,15182,15183,16186,16187,17222,17223,18290,18291,19390,19391,
- 19703,19702,18587,18586,17503,17502,16451,16450,15433,15431,15429,0,15427,15425,15423,15421,15419,15417,15415,15413,15411,15409,15407,15405,15403,15401,15399,0,15397,15395,15393,15391,15389,15387,15385,15383,15381,15379,15377,15375,15373,15371,15369,0,15367,15365,15363,15361,15359,15357,15355,15353,15351,15349,15347,15345,15343,15341,15339,0,15337,15335,15333,15331,15329,15327,15325,15323,15321,15319,15317,15315,15313,15311,15309,0,15307,15305,15303,15301,15299,15297,15295,15293,15291,15289,15287,15285,15283,15281,15279,0,15277,15275,15273,15271,15269,15267,15265,15263,15261,15259,15257,15255,15253,15251,15249,0,15247,15245,15243,15241,15239,15237,15235,15233,15231,15229,15227,15225,15223,15221,15219,0,15217,15215,15213,15211,15209,15207,15205,15203,15201,15199,15197,15195,15193,15191,15189,0,15187,15184,15185,16188,16189,17224,17225,18292,18293,19392,19393,
- 19701,19700,18585,18584,17501,17500,16448,16446,16444,16442,16440,1,16438,16436,16434,16432,16430,16428,16426,16424,16422,16420,16418,16416,16414,16412,16410,1,16408,16406,16404,16402,16400,16398,16396,16394,16392,16390,16388,16386,16384,16382,16380,1,16378,16376,16374,16372,16370,16368,16366,16364,16362,16360,16358,16356,16354,16352,16350,1,16348,16346,16344,16342,16340,16338,16336,16334,16332,16330,16328,16326,16324,16322,16320,1,16318,16316,16314,16312,16310,16308,16306,16304,16302,16300,16298,16296,16294,16292,16290,1,16288,16286,16284,16282,16280,16278,16276,16274,16272,16270,16268,16266,16264,16262,16260,1,16258,16256,16254,16252,16250,16248,16246,16244,16242,16240,16238,16236,16234,16232,16230,1,16228,16226,16224,16222,16220,16218,16216,16214,16212,16210,16208,16206,16204,16202,16200,1,16198,16196,16194,16190,16191,17226,17227,18294,18295,19394,19395,
- 19699,19698,18583,18582,17499,17498,16449,16447,16445,16443,16441,0,16439,16437,16435,16433,16431,16429,16427,16425,16423,16421,16419,16417,16415,16413,16411,0,16409,16407,16405,16403,16401,16399,16397,16395,16393,16391,16389,16387,16385,16383,16381,0,16379,16377,16375,16373,16371,16369,16367,16365,16363,16361,16359,16357,16355,16353,16351,0,16349,16347,16345,16343,16341,16339,16337,16335,16333,16331,16329,16327,16325,16323,16321,0,16319,16317,16315,16313,16311,16309,16307,16305,16303,16301,16299,16297,16295,16293,16291,0,16289,16287,16285,16283,16281,16279,16277,16275,16273,16271,16269,16267,16265,16263,16261,0,16259,16257,16255,16253,16251,16249,16247,16245,16243,16241,16239,16237,16235,16233,16231,0,16229,16227,16225,16223,16221,16219,16217,16215,16213,16211,16209,16207,16205,16203,16201,0,16199,16197,16195,16192,16193,17228,17229,18296,18297,19396,19397,
- 19697,19696,18581,18580,17496,17494,17492,17490,17488,17486,17484,1,17482,17480,17478,17476,17474,17472,17470,17468,17466,17464,17462,17460,17458,17456,17454,1,17452,17450,17448,17446,17444,17442,17440,17438,17436,17434,17432,17430,17428,17426,17424,1,17422,17420,17418,17416,17414,17412,17410,17408,17406,17404,17402,17400,17398,17396,17394,1,17392,17390,17388,17386,17384,17382,17380,17378,17376,17374,17372,17370,17368,17366,17364,1,17362,17360,17358,17356,17354,17352,17350,17348,17346,17344,17342,17340,17338,17336,17334,1,17332,17330,17328,17326,17324,17322,17320,17318,17316,17314,17312,17310,17308,17306,17304,1,17302,17300,17298,17296,17294,17292,17290,17288,17286,17284,17282,17280,17278,17276,17274,1,17272,17270,17268,17266,17264,17262,17260,17258,17256,17254,17252,17250,17248,17246,17244,1,17242,17240,17238,17236,17234,17230,17231,18298,18299,19398,19399,
- 19695,19694,18579,18578,17497,17495,17493,17491,17489,17487,17485,0,17483,17481,17479,17477,17475,17473,17471,17469,17467,17465,17463,17461,17459,17457,17455,0,17453,17451,17449,17447,17445,17443,17441,17439,17437,17435,17433,17431,17429,17427,17425,0,17423,17421,17419,17417,17415,17413,17411,17409,17407,17405,17403,17401,17399,17397,17395,0,17393,17391,17389,17387,17385,17383,17381,17379,17377,17375,17373,17371,17369,17367,17365,0,17363,17361,17359,17357,17355,17353,17351,17349,17347,17345,17343,17341,17339,17337,17335,0,17333,17331,17329,17327,17325,17323,17321,17319,17317,17315,17313,17311,17309,17307,17305,0,17303,17301,17299,17297,17295,17293,17291,17289,17287,17285,17283,17281,17279,17277,17275,0,17273,17271,17269,17267,17265,17263,17261,17259,17257,17255,17253,17251,17249,17247,17245,0,17243,17241,17239,17237,17235,17232,17233,18300,18301,19400,19401,
- 19693,19692,18576,18574,18572,18570,18568,18566,18564,18562,18560,1,18558,18556,18554,18552,18550,18548,18546,18544,18542,18540,18538,18536,18534,18532,18530,1,18528,18526,18524,18522,18520,18518,18516,18514,18512,18510,18508,18506,18504,18502,18500,1,18498,18496,18494,18492,18490,18488,18486,18484,18482,18480,18478,18476,18474,18472,18470,1,18468,18466,18464,18462,18460,18458,18456,18454,18452,18450,18448,18446,18444,18442,18440,1,18438,18436,18434,18432,18430,18428,18426,18424,18422,18420,18418,18416,18414,18412,18410,1,18408,18406,18404,18402,18400,18398,18396,18394,18392,18390,18388,18386,18384,18382,18380,1,18378,18376,18374,18372,18370,18368,18366,18364,18362,18360,18358,18356,18354,18352,18350,1,18348,18346,18344,18342,18340,18338,18336,18334,18332,18330,18328,18326,18324,18322,18320,1,18318,18316,18314,18312,18310,18308,18306,18302,18303,19402,19403,
- 19691,19690,18577,18575,18573,18571,18569,18567,18565,18563,18561,0,18559,18557,18555,18553,18551,18549,18547,18545,18543,18541,18539,18537,18535,18533,18531,0,18529,18527,18525,18523,18521,18519,18517,18515,18513,18511,18509,18507,18505,18503,18501,0,18499,18497,18495,18493,18491,18489,18487,18485,18483,18481,18479,18477,18475,18473,18471,0,18469,18467,18465,18463,18461,18459,18457,18455,18453,18451,18449,18447,18445,18443,18441,0,18439,18437,18435,18433,18431,18429,18427,18425,18423,18421,18419,18417,18415,18413,18411,0,18409,18407,18405,18403,18401,18399,18397,18395,18393,18391,18389,18387,18385,18383,18381,0,18379,18377,18375,18373,18371,18369,18367,18365,18363,18361,18359,18357,18355,18353,18351,0,18349,18347,18345,18343,18341,18339,18337,18335,18333,18331,18329,18327,18325,18323,18321,0,18319,18317,18315,18313,18311,18309,18307,18304,18305,19404,19405,
- 19688,19686,19684,19682,19680,19678,19676,19674,19672,19670,19668,1,19666,19664,19662,19660,19658,19656,19654,19652,19650,19648,19646,19644,19642,19640,19638,1,19636,19634,19632,19630,19628,19626,19624,19622,19620,19618,19616,19614,19612,19610,19608,1,19606,19604,19602,19600,19598,19596,19594,19592,19590,19588,19586,19584,19582,19580,19578,1,19576,19574,19572,19570,19568,19566,19564,19562,19560,19558,19556,19554,19552,19550,19548,1,19546,19544,19542,19540,19538,19536,19534,19532,19530,19528,19526,19524,19522,19520,19518,1,19516,19514,19512,19510,19508,19506,19504,19502,19500,19498,19496,19494,19492,19490,19488,1,19486,19484,19482,19480,19478,19476,19474,19472,19470,19468,19466,19464,19462,19460,19458,1,19456,19454,19452,19450,19448,19446,19444,19442,19440,19438,19436,19434,19432,19430,19428,1,19426,19424,19422,19420,19418,19416,19414,19412,19410,19406,19407,
- 19689,19687,19685,19683,19681,19679,19677,19675,19673,19671,19669,0,19667,19665,19663,19661,19659,19657,19655,19653,19651,19649,19647,19645,19643,19641,19639,0,19637,19635,19633,19631,19629,19627,19625,19623,19621,19619,19617,19615,19613,19611,19609,0,19607,19605,19603,19601,19599,19597,19595,19593,19591,19589,19587,19585,19583,19581,19579,0,19577,19575,19573,19571,19569,19567,19565,19563,19561,19559,19557,19555,19553,19551,19549,0,19547,19545,19543,19541,19539,19537,19535,19533,19531,19529,19527,19525,19523,19521,19519,0,19517,19515,19513,19511,19509,19507,19505,19503,19501,19499,19497,19495,19493,19491,19489,0,19487,19485,19483,19481,19479,19477,19475,19473,19471,19469,19467,19465,19463,19461,19459,0,19457,19455,19453,19451,19449,19447,19445,19443,19441,19439,19437,19435,19433,19431,19429,0,19427,19425,19423,19421,19419,19417,19415,19413,19411,19408,19409
-};
-
-static int CompactAztecMap[] = { /* 27 x 27 data grid */
- 609,608,411,413,415,417,419,421,423,425,427,429,431,433,435,437,439,441,443,445,447,449,451,453,455,457,459,
- 607,606,410,412,414,416,418,420,422,424,426,428,430,432,434,436,438,440,442,444,446,448,450,452,454,456,458,
- 605,604,409,408,243,245,247,249,251,253,255,257,259,261,263,265,267,269,271,273,275,277,279,281,283,460,461,
- 603,602,407,406,242,244,246,248,250,252,254,256,258,260,262,264,266,268,270,272,274,276,278,280,282,462,463,
- 601,600,405,404,241,240,107,109,111,113,115,117,119,121,123,125,127,129,131,133,135,137,139,284,285,464,465,
- 599,598,403,402,239,238,106,108,110,112,114,116,118,120,122,124,126,128,130,132,134,136,138,286,287,466,467,
- 597,596,401,400,237,236,105,104,3,5,7,9,11,13,15,17,19,21,23,25,27,140,141,288,289,468,469,
- 595,594,399,398,235,234,103,102,2,4,6,8,10,12,14,16,18,20,22,24,26,142,143,290,291,470,471,
- 593,592,397,396,233,232,101,100,1,1,2000,2001,2002,2003,2004,2005,2006,0,1,28,29,144,145,292,293,472,473,
- 591,590,395,394,231,230,99,98,1,1,1,1,1,1,1,1,1,1,1,30,31,146,147,294,295,474,475,
- 589,588,393,392,229,228,97,96,2027,1,0,0,0,0,0,0,0,1,2007,32,33,148,149,296,297,476,477,
- 587,586,391,390,227,226,95,94,2026,1,0,1,1,1,1,1,0,1,2008,34,35,150,151,298,299,478,479,
- 585,584,389,388,225,224,93,92,2025,1,0,1,0,0,0,1,0,1,2009,36,37,152,153,300,301,480,481,
- 583,582,387,386,223,222,91,90,2024,1,0,1,0,1,0,1,0,1,2010,38,39,154,155,302,303,482,483,
- 581,580,385,384,221,220,89,88,2023,1,0,1,0,0,0,1,0,1,2011,40,41,156,157,304,305,484,485,
- 579,578,383,382,219,218,87,86,2022,1,0,1,1,1,1,1,0,1,2012,42,43,158,159,306,307,486,487,
- 577,576,381,380,217,216,85,84,2021,1,0,0,0,0,0,0,0,1,2013,44,45,160,161,308,309,488,489,
- 575,574,379,378,215,214,83,82,0,1,1,1,1,1,1,1,1,1,1,46,47,162,163,310,311,490,491,
- 573,572,377,376,213,212,81,80,0,0,2020,2019,2018,2017,2016,2015,2014,0,0,48,49,164,165,312,313,492,493,
- 571,570,375,374,211,210,78,76,74,72,70,68,66,64,62,60,58,56,54,50,51,166,167,314,315,494,495,
- 569,568,373,372,209,208,79,77,75,73,71,69,67,65,63,61,59,57,55,52,53,168,169,316,317,496,497,
- 567,566,371,370,206,204,202,200,198,196,194,192,190,188,186,184,182,180,178,176,174,170,171,318,319,498,499,
- 565,564,369,368,207,205,203,201,199,197,195,193,191,189,187,185,183,181,179,177,175,172,173,320,321,500,501,
- 563,562,366,364,362,360,358,356,354,352,350,348,346,344,342,340,338,336,334,332,330,328,326,322,323,502,503,
- 561,560,367,365,363,361,359,357,355,353,351,349,347,345,343,341,339,337,335,333,331,329,327,324,325,504,505,
- 558,556,554,552,550,548,546,544,542,540,538,536,534,532,530,528,526,524,522,520,518,516,514,512,510,506,507,
- 559,557,555,553,551,549,547,545,543,541,539,537,535,533,531,529,527,525,523,521,519,517,515,513,511,508,509
-};
-
-int AztecCodeSet[128] = { /* From Table 2 */
- 32, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 12, 32, 32, 32, 32, 32, 32,
- 32, 32, 32, 32, 32, 32, 32, 4, 4, 4, 4, 4, 23, 8, 8, 8, 8, 8, 8, 8,
- 8, 8, 8, 8, 24, 8, 24, 8, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 8, 8,
- 8, 8, 8, 8, 4, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 4, 8, 4, 4, 4, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 8, 4, 8, 4, 4
-};
-
-int AztecSymbolChar[128] = { /* From Table 2 */
- 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 300, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 15, 16, 17, 18, 19, 1, 6, 7, 8, 9, 10, 11, 12,
- 13, 14, 15, 16, 301, 18, 302, 20, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 21, 22,
- 23, 24, 25, 26, 20, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
- 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 27, 21, 28, 22, 23, 24, 2, 3, 4,
- 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 29, 25, 30, 26, 27
-};
-
-/* Problem characters are:
- 300: Carriage Return (ASCII 13)
- 301: Comma (ASCII 44)
- 302: Full Stop (ASCII 46)
-*/
-
-static char *hexbit[32] = {"00000", "00001", "00010", "00011", "00100", "00101", "00110", "00111", "01000", "01001",
- "01010", "01011", "01100", "01101", "01110", "01111", "10000", "10001", "10010", "10011", "10100", "10101",
- "10110", "10111", "11000", "11001", "11010", "11011", "11100", "11101", "11110", "11111"
-};
-
-static char *pentbit[16] = {"0000", "0001", "0010", "0011", "0100", "0101", "0110", "0111", "1000", "1001",
- "1010", "1011", "1100", "1101", "1110", "1111"
-};
-
-static char *tribit[8] = {"000", "001", "010", "011", "100", "101", "110", "111"};
-
-static int AztecSizes[32] = { /* Codewords per symbol */
- 21, 48, 60, 88, 120, 156, 196, 240, 230, 272, 316, 364, 416, 470, 528, 588, 652, 720, 790,
- 864, 940, 1020, 920, 992, 1066, 1144, 1224, 1306, 1392, 1480, 1570, 1664
-};
-
-static int AztecCompactSizes[4] = { 17, 40, 51, 76 };
-
-static int Aztec10DataSizes[32] = { /* Data bits per symbol maximum with 10% error correction */
- 96, 246, 408, 616, 840, 1104, 1392, 1704, 2040, 2420, 2820, 3250, 3720, 4200, 4730,
- 5270, 5840, 6450, 7080, 7750, 8430, 9150, 9900, 10680, 11484, 12324, 13188, 14076,
- 15000, 15948, 16920, 17940
-};
-
-static int Aztec23DataSizes[32] = { /* Data bits per symbol maximum with 23% error correction */
- 84, 204, 352, 520, 720, 944, 1184, 1456, 1750, 2070, 2410, 2780, 3180, 3590, 4040,
- 4500, 5000, 5520, 6060, 6630, 7210, 7830, 8472, 9132, 9816, 10536, 11280, 12036,
- 12828, 13644, 14472, 15348
-};
-
-static int Aztec36DataSizes[32] = { /* Data bits per symbol maximum with 36% error correction */
- 66, 168, 288, 432, 592, 776, 984, 1208, 1450, 1720, 2000, 2300, 2640, 2980, 3350,
- 3740, 4150, 4580, 5030, 5500, 5990, 6500, 7032, 7584, 8160, 8760, 9372, 9996, 10656,
- 11340, 12024, 12744
-};
-
-static int Aztec50DataSizes[32] = { /* Data bits per symbol maximum with 50% error correction */
- 48, 126, 216, 328, 456, 600, 760, 936, 1120, 1330, 1550, 1790, 2050, 2320, 2610,
- 2910, 3230, 3570, 3920, 4290, 4670, 5070, 5484, 5916, 6360, 6828, 7308, 7800, 8316,
- 8844, 9384, 9948
-};
-
-static int AztecCompact10DataSizes [4] = { 78, 198, 336, 520 };
-static int AztecCompact23DataSizes [4] = { 66, 168, 288, 440 };
-static int AztecCompact36DataSizes [4] = { 48, 138, 232, 360 };
-static int AztecCompact50DataSizes [4] = { 36, 102, 176, 280 };
-
-static int AztecOffset[32] = {
- 66, 64, 62, 60, 57, 55, 53, 51, 49, 47, 45, 42, 40, 38, 36, 34, 32, 30, 28, 25, 23, 21,
- 19, 17, 15, 13, 10, 8, 6, 4, 2, 0
-};
-
-static int AztecCompactOffset[4] = { 6, 4, 2, 0 };
diff --git a/3rdparty/zint-2.4.4/backend/code.c b/3rdparty/zint-2.4.4/backend/code.c
deleted file mode 100644
index 553b972..0000000
--- a/3rdparty/zint-2.4.4/backend/code.c
+++ /dev/null
@@ -1,537 +0,0 @@
-/* code.c - Handles Code 11, 39, 39+ and 93 */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-/* In version 0.5 this file was 1,553 lines long! */
-
-#include
-#include
-#include
-#include "common.h"
-
-#define SODIUM "0123456789-"
-#define SILVER "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%abcd"
-
-static char *C11Table[11] = {"111121", "211121", "121121", "221111", "112121", "212111", "122111",
- "111221", "211211", "211111", "112111"};
-
-
-/* Code 39 tables checked against ISO/IEC 16388:2007 */
-
-/* Incorporates Table A1 */
-
-static char *C39Table[43] = { "1112212111", "2112111121", "1122111121", "2122111111", "1112211121",
- "2112211111", "1122211111", "1112112121", "2112112111", "1122112111", "2111121121",
- "1121121121", "2121121111", "1111221121", "2111221111", "1121221111", "1111122121",
- "2111122111", "1121122111", "1111222111", "2111111221", "1121111221", "2121111211",
- "1111211221", "2111211211", "1121211211", "1111112221", "2111112211", "1121112211",
- "1111212211", "2211111121", "1221111121", "2221111111", "1211211121", "2211211111",
- "1221211111", "1211112121", "2211112111", "1221112111", "1212121111", "1212111211",
- "1211121211", "1112121211"};
-/* Code 39 character assignments (Table 1) */
-
-static char *EC39Ctrl[128] = {"%U", "$A", "$B", "$C", "$D", "$E", "$F", "$G", "$H", "$I", "$J", "$K",
- "$L", "$M", "$N", "$O", "$P", "$Q", "$R", "$S", "$T", "$U", "$V", "$W", "$X", "$Y", "$Z",
- "%A", "%B", "%C", "%D", "%E", " ", "/A", "/B", "/C", "/D", "/E", "/F", "/G", "/H", "/I", "/J",
- "/K", "/L", "-", ".", "/O", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "/Z", "%F",
- "%G", "%H", "%I", "%J", "%V", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
- "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "%K", "%L", "%M", "%N", "%O",
- "%W", "+A", "+B", "+C", "+D", "+E", "+F", "+G", "+H", "+I", "+J", "+K", "+L", "+M", "+N", "+O",
- "+P", "+Q", "+R", "+S", "+T", "+U", "+V", "+W", "+X", "+Y", "+Z", "%P", "%Q", "%R", "%S", "%T"};
-/* Encoding the full ASCII character set in Code 39 (Table A2) */
-
-static char *C93Ctrl[128] = {"bU", "aA", "aB", "aC", "aD", "aE", "aF", "aG", "aH", "aI", "aJ", "aK",
- "aL", "aM", "aN", "aO", "aP", "aQ", "aR", "aS", "aT", "aU", "aV", "aW", "aX", "aY", "aZ",
- "bA", "bB", "bC", "bD", "bE", " ", "cA", "cB", "cC", "cD", "cE", "cF", "cG", "cH", "cI", "cJ",
- "cK", "cL", "cM", "cN", "cO", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "cZ", "bF",
- "bG", "bH", "bI", "bJ", "bV", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M",
- "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bK", "bL", "bM", "bN", "bO",
- "bW", "dA", "dB", "dC", "dD", "dE", "dF", "dG", "dH", "dI", "dJ", "dK", "dL", "dM", "dN", "dO",
- "dP", "dQ", "dR", "dS", "dT", "dU", "dV", "dW", "dX", "dY", "dZ", "bP", "bQ", "bR", "bS", "bT"};
-
-static char *C93Table[47] = {"131112", "111213", "111312", "111411", "121113", "121212", "121311",
- "111114", "131211", "141111", "211113", "211212", "211311", "221112", "221211", "231111",
- "112113", "112212", "112311", "122112", "132111", "111123", "111222", "111321", "121122",
- "131121", "212112", "212211", "211122", "211221", "221121", "222111", "112122", "112221",
- "122121", "123111", "121131", "311112", "311211", "321111", "112131", "113121", "211131",
- "121221", "312111", "311121", "122211"};
-
-/* Global Variables for Channel Code */
-int S[11], B[11];
-long value;
-long target_value;
-char pattern[30];
-
-/* Function Prototypes */
-void NextS(int Chan, int i, int MaxS, int MaxB);
-void NextB(int Chan, int i, int MaxB, int MaxS);
-
-/* *********************** CODE 11 ******************** */
-
-int code_11(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Code 11 */
-
- int i;
- int h, c_digit, c_weight, c_count, k_digit, k_weight, k_count;
- int weight[128], error_number;
- char dest[1024]; /* 6 + 121 * 6 + 2 * 6 + 5 + 1 ~ 1024*/
- char checkstr[3];
-
- error_number = 0;
-
- if(length > 121) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(SODIUM, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
- c_weight = 1;
- c_count = 0;
- k_weight = 1;
- k_count = 0;
-
- /* start character */
- strcpy(dest, "112211");
-
- /* Draw main body of barcode */
- for(i = 0; i < length; i++) {
- lookup(SODIUM, C11Table, source[i], dest);
- if(source[i] == '-')
- weight[i] = 10;
- else
- weight[i] = ctoi(source[i]);
- }
-
- /* Calculate C checksum */
- for(h = length - 1; h >= 0; h--) {
- c_count += (c_weight * weight[h]);
- c_weight++;
-
- if(c_weight > 10) {
- c_weight = 1;
- }
- }
- c_digit = c_count % 11;
-
- weight[length] = c_digit;
-
- /* Calculate K checksum */
- for(h = length; h >= 0; h--) {
- k_count += (k_weight * weight[h]);
- k_weight++;
-
- if(k_weight > 9) {
- k_weight = 1;
- }
- }
- k_digit = k_count % 11;
-
- checkstr[0] = itoc(c_digit);
- checkstr[1] = itoc(k_digit);
- if(checkstr[0] == 'A') { checkstr[0] = '-'; }
- if(checkstr[1] == 'A') { checkstr[1] = '-'; }
- checkstr[2] = '\0';
- lookup(SODIUM, C11Table, checkstr[0], dest);
- lookup(SODIUM, C11Table, checkstr[1], dest);
-
- /* Stop character */
- concat (dest, "11221");
-
- expand(symbol, dest);
-
- ustrcpy(symbol->text, source);
- uconcat(symbol->text, (unsigned char*)checkstr);
- return error_number;
-}
-
-int c39(struct zint_symbol *symbol, unsigned char source[], unsigned int length)
-{ /* Code 39 */
- unsigned int i;
- unsigned int counter = 0;
- char check_digit;
- int error_number = 0;
- char dest[775];
- char localstr[2] = { 0 };
-
- if((symbol->option_2 < 0) || (symbol->option_2 > 1)) {
- symbol->option_2 = 0;
- }
-
- if((symbol->symbology == BARCODE_LOGMARS) && (length > 59)) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- } else if(length > 74) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- to_upper(source);
- error_number = is_sane(SILVER , source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- /* Start character */
- strcpy(dest, "1211212111");
-
- for(i = 0; i < length; i++) {
- lookup(SILVER, C39Table, source[i], dest);
- counter += posn(SILVER, source[i]);
- }
-
- if((symbol->symbology == BARCODE_LOGMARS) || (symbol->option_2 == 1)) {
-
- counter = counter % 43;
- if(counter < 10) {
- check_digit = itoc(counter);
- } else {
- if(counter < 36) {
- check_digit = (counter - 10) + 'A';
- } else {
- switch(counter) {
- case 36: check_digit = '-'; break;
- case 37: check_digit = '.'; break;
- case 38: check_digit = ' '; break;
- case 39: check_digit = '$'; break;
- case 40: check_digit = '/'; break;
- case 41: check_digit = '+'; break;
- case 42: check_digit = 37; break;
- default: check_digit = ' '; break; /* Keep compiler happy */
- }
- }
- }
- lookup(SILVER, C39Table, check_digit, dest);
-
- /* Display a space check digit as _, otherwise it looks like an error */
- if(check_digit == ' ') {
- check_digit = '_';
- }
-
- localstr[0] = check_digit;
- localstr[1] = '\0';
- }
-
- /* Stop character */
- concat (dest, "121121211");
-
- if((symbol->symbology == BARCODE_LOGMARS) || (symbol->symbology == BARCODE_HIBC_39)) {
- /* LOGMARS uses wider 'wide' bars than normal Code 39 */
- counter = strlen(dest);
- for(i = 0; i < counter; i++) {
- if(dest[i] == '2') {
- dest[i] = '3';
- }
- }
- }
-
- expand(symbol, dest);
-
- if(symbol->symbology == BARCODE_CODE39) {
- ustrcpy(symbol->text, (unsigned char*)"*");
- uconcat(symbol->text, source);
- uconcat(symbol->text, (unsigned char*)localstr);
- uconcat(symbol->text, (unsigned char*)"*");
- } else {
- ustrcpy(symbol->text, source);
- uconcat(symbol->text, (unsigned char*)localstr);
- }
- return error_number;
-}
-
-int pharmazentral(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Pharmazentral Nummer (PZN) */
-
- int i, error_number, zeroes;
- unsigned int count, check_digit;
- char localstr[10];
-
- error_number = 0;
-
- count = 0;
- if(length > 6) {
- strcpy(symbol->errtxt, "Input wrong length");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- localstr[0] = '-';
- zeroes = 6 - length + 1;
- for(i = 1; i < zeroes; i++)
- localstr[i] = '0';
- strcpy(localstr + zeroes, (char *)source);
-
- for (i = 1; i < 7; i++) {
- count += (i + 1) * ctoi(localstr[i]);
- }
-
- check_digit = count%11;
- if (check_digit == 11) { check_digit = 0; }
- localstr[7] = itoc(check_digit);
- localstr[8] = '\0';
- if(localstr[7] == 'A') {
- strcpy(symbol->errtxt, "Invalid PZN Data");
- return ERROR_INVALID_DATA1;
- }
- error_number = c39(symbol, (unsigned char *)localstr, strlen(localstr));
- ustrcpy(symbol->text, (unsigned char *)"PZN");
- uconcat(symbol->text, (unsigned char *)localstr);
- return error_number;
-}
-
-
-/* ************** EXTENDED CODE 39 *************** */
-
-int ec39(struct zint_symbol *symbol, unsigned char source[], unsigned int length)
-{ /* Extended Code 39 - ISO/IEC 16388:2007 Annex A */
-
- unsigned char buffer[150] = { 0 };
- unsigned int i;
- int error_number = 0;
-
- if(length > 74) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- /* Creates a buffer string and places control characters into it */
- for(i = 0; i < length; i++) {
- if(source[i] > 127) {
- /* Cannot encode extended ASCII */
- strcpy(symbol->errtxt, "Invalid characters in input data");
- return ERROR_INVALID_DATA1;
- }
- concat((char*)buffer, EC39Ctrl[source[i]]);
- }
-
- /* Then sends the buffer to the C39 function */
- error_number = c39(symbol, buffer, ustrlen(buffer));
-
- for(i = 0; i < length; i++)
- symbol->text[i] = source[i] ? source[i] : ' ';
- symbol->text[length] = '\0';
-
- return error_number;
-}
-
-/* ******************** CODE 93 ******************* */
-
-int c93(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Code 93 is an advancement on Code 39 and the definition is a lot tighter */
-
- /* SILVER includes the extra characters a, b, c and d to represent Code 93 specific
- shift characters 1, 2, 3 and 4 respectively. These characters are never used by
- c39() and ec39() */
-
- int i;
- int h, weight, c, k, values[128], error_number;
- char buffer[220];
- char dest[670];
- char set_copy[] = SILVER;
-
- error_number = 0;
- strcpy(buffer, "");
-
- if(length > 107) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- /* Message Content */
- for (i = 0; i < length; i++) {
- if (source[i] > 127) {
- /* Cannot encode extended ASCII */
- strcpy(symbol->errtxt, "Invalid characters in input data");
- return ERROR_INVALID_DATA1;
- }
- concat(buffer, C93Ctrl[source[i]]);
- symbol->text[i] = source[i] ? source[i] : ' ';
- }
-
- /* Now we can check the true length of the barcode */
- h = strlen(buffer);
- if (h > 107) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- for (i = 0; i < h; i++) {
- values[i] = posn(SILVER, buffer[i]);
- }
-
- /* Putting the data into dest[] is not done until after check digits are calculated */
-
- /* Check digit C */
- c = 0;
- weight = 1;
- for (i = h - 1; i >= 0; i--) {
- c += values[i] * weight;
- weight++;
- if (weight == 21)
- weight = 1;
- }
- c = c % 47;
- values[h] = c;
- buffer[h] = set_copy[c];
-
- /* Check digit K */
- k = 0;
- weight = 1;
- for (i = h; i >= 0; i--) {
- k += values[i] * weight;
- weight++;
- if(weight == 16)
- weight = 1;
- }
- k = k % 47;
- buffer[++h] = set_copy[k];
- buffer[++h] = '\0';
-
- /* Start character */
- strcpy(dest, "111141");
-
- for(i = 0; i < h; i++) {
- lookup(SILVER, C93Table, buffer[i], dest);
- }
-
- /* Stop character */
- concat(dest, "1111411");
- expand(symbol, dest);
-
- symbol->text[length] = set_copy[c];
- symbol->text[length + 1] = set_copy[k];
- symbol->text[length + 2] = '\0';
-
- return error_number;
-}
-
-/* NextS() and NextB() are from ANSI/AIM BC12-1998 and are Copyright (c) AIM 1997 */
-/* Their are used here on the understanding that they form part of the specification
- for Channel Code and therefore their use is permitted under the following terms
- set out in that document:
-
- "It is the intent and understanding of AIM [t]hat the symbology presented in this
- specification is entirely in the public domain and free of all use restrictions,
- licenses and fees. AIM USA, its memer companies, or individual officers
- assume no liability for the use of this document." */
-
-void CheckCharacter() {
- int i;
- char part[3];
-
- if(value == target_value) {
- /* Target reached - save the generated pattern */
- strcpy(pattern, "11110");
- for(i = 0; i < 11; i++) {
- part[0] = itoc(S[i]);
- part[1] = itoc(B[i]);
- part[2] = '\0';
- concat(pattern, part);
- }
- }
-}
-
-void NextB(int Chan, int i, int MaxB, int MaxS) {
- int b;
-
- b = (S[i]+B[i-1]+S[i-1]+B[i-2] > 4)? 1:2;
- if (i < Chan+2) {
- for (; b <= MaxB; b++) {
- B[i] = b;
- NextS(Chan,i+1,MaxS,MaxB+1-b);
- }
- } else if (b <= MaxB) {
- B[i] = MaxB;
- CheckCharacter();
- value++;
- }
-}
-
-void NextS(int Chan, int i, int MaxS, int MaxB) {
- int s;
-
- for (s = (i 7) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- if((symbol->option_2 < 3) || (symbol->option_2 > 8)) { channels = 0; } else { channels = symbol->option_2; }
- if(channels == 0) { channels = length + 1; }
- if(channels == 2) { channels = 3; }
-
- for(i = 0; i < length; i++) {
- target_value *= 10;
- target_value += ctoi((char) source[i]);
- }
-
- switch(channels) {
- case 3: if(target_value > 26) { range = 1; } break;
- case 4: if(target_value > 292) { range = 1; } break;
- case 5: if(target_value > 3493) { range = 1; } break;
- case 6: if(target_value > 44072) { range = 1; } break;
- case 7: if(target_value > 576688) { range = 1; } break;
- case 8: if(target_value > 7742862) { range = 1; } break;
- }
- if(range) {
- strcpy(symbol->errtxt, "Value out of range");
- return ERROR_INVALID_DATA1;
- }
-
- for(i = 0; i < 11; i++) { B[i] = 0; S[i] = 0; }
-
- B[0] = S[1] = B[1] = S[2] = B[2] = 1;
- value = 0;
- NextS(channels,3,channels,channels);
-
- zeroes = channels - 1 - length;
- memset(hrt, '0', zeroes);
- strcpy(hrt + zeroes, (char *)source);
- ustrcpy(symbol->text, (unsigned char *)hrt);
-
- expand(symbol, pattern);
-
- return error_number;
-}
diff --git a/3rdparty/zint-2.4.4/backend/code1.c b/3rdparty/zint-2.4.4/backend/code1.c
deleted file mode 100644
index 70f32d0..0000000
--- a/3rdparty/zint-2.4.4/backend/code1.c
+++ /dev/null
@@ -1,1515 +0,0 @@
-/* code1.c - USS Code One */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include "common.h"
-#include "code1.h"
-#include "reedsol.h"
-#include "large.h"
-#include
-#include
-#ifdef __APPLE__
-#include
-#else
-#include
-#endif
-
-void horiz(struct zint_symbol *symbol, int row_no, int full)
-{
- int i;
-
- if(full) {
- for(i = 0; i < symbol->width; i++) {
- set_module(symbol, row_no, i);
- }
- } else {
- for(i = 1; i < symbol->width - 1; i++) {
- set_module(symbol, row_no, i);
- }
- }
-}
-
-void central_finder(struct zint_symbol *symbol, int start_row, int row_count, int full_rows)
-{
- int i;
-
- for(i = 0; i < row_count; i++) {
- if(i < full_rows) {
- horiz(symbol, start_row + (i * 2), 1);
- } else {
- horiz(symbol, start_row + (i * 2), 0);
- if(i != row_count - 1) {
- set_module(symbol, start_row + (i * 2) + 1, 1);
- set_module(symbol, start_row + (i * 2) + 1, symbol->width - 2);
- }
- }
- }
-}
-
-void vert(struct zint_symbol *symbol, int column, int height, int top)
-{
- int i;
-
- if(top) {
- for (i = 0; i < height; i++) {
- set_module(symbol, i, column);
- }
- } else {
- for (i = 0; i < height; i++) {
- set_module(symbol, symbol->rows - i - 1, column);
- }
- }
-}
-
-void spigot(struct zint_symbol *symbol, int row_no)
-{
- int i;
-
- for(i = symbol->width - 1; i > 0; i--) {
- if(module_is_set(symbol, row_no, i - 1)) {
- set_module(symbol, row_no, i);
- }
- }
-}
-
-int isedi(unsigned char input)
-{
- int result = 0;
-
- if(input == 13) { result = 1; }
- if(input == '*') { result = 1; }
- if(input == '>') { result = 1; }
- if(input == ' ') { result = 1; }
- if((input >= '0') && (input <= '9')) { result = 1; }
- if((input >= 'A') && (input <= 'Z')) { result = 1; }
-
- return result;
-}
-
-int dq4bi(unsigned char source[], int sourcelen, int position)
-{
- int i;
-
- for(i = position; isedi(source[position + i]) && ((position + i) < sourcelen); i++);
-
- if((position + i) == sourcelen) {
- /* Reached end of input */
- return 0;
- }
-
- if (source[position + i - 1] == 13) { return 1; }
- if (source[position + i - 1] == '*') { return 1; }
- if (source[position + i - 1] == '>') { return 1; }
-
- return 0;
-}
-
-int c1_look_ahead_test(unsigned char source[], int sourcelen, int position, int current_mode, int gs1)
-{
- float ascii_count, c40_count, text_count, edi_count, byte_count;
- char reduced_char;
- int done, best_scheme, best_count, sp;
-
- /* Step J */
- if(current_mode == C1_ASCII) {
- ascii_count = 0.0;
- c40_count = 1.0;
- text_count = 1.0;
- edi_count = 1.0;
- byte_count = 2.0;
- } else {
- ascii_count = 1.0;
- c40_count = 2.0;
- text_count = 2.0;
- edi_count = 2.0;
- byte_count = 3.0;
- }
-
- switch(current_mode) {
- case C1_C40: c40_count = 0.0; break;
- case C1_TEXT: text_count = 0.0; break;
- case C1_BYTE: byte_count = 0.0; break;
- case C1_EDI: edi_count = 0.0; break;
- }
-
- for(sp = position; (sp < sourcelen) && (sp <= (position + 8)); sp++) {
-
- if(source[sp] <= 127) { reduced_char = source[sp]; } else { reduced_char = source[sp] - 127; }
-
- /* Step L */
- if((source[sp] >= '0') && (source[sp] <= '9')) {
- ascii_count += 0.5;
- } else {
- ascii_count = froundup(ascii_count);
- if(source[sp] > 127) {
- ascii_count += 2.0;
- } else {
- ascii_count += 1.0;
- }
- }
-
- /* Step M */
- done = 0;
- if(reduced_char == ' ') { c40_count += (2.0 / 3.0); done = 1; }
- if((reduced_char >= '0') && (reduced_char <= '9')) { c40_count += (2.0 / 3.0); done = 1; }
- if((reduced_char >= 'A') && (reduced_char <= 'Z')) { c40_count += (2.0 / 3.0); done = 1; }
- if(source[sp] > 127) { c40_count += (4.0 / 3.0); }
- if(done == 0) { c40_count += (4.0 / 3.0); }
-
- /* Step N */
- done = 0;
- if(reduced_char == ' ') { text_count += (2.0 / 3.0); done = 1; }
- if((reduced_char >= '0') && (reduced_char <= '9')) { text_count += (2.0 / 3.0); done = 1; }
- if((reduced_char >= 'a') && (reduced_char <= 'z')) { text_count += (2.0 / 3.0); done = 1; }
- if(source[sp] > 127) { text_count += (4.0 / 3.0); }
- if(done == 0) { text_count += (4.0 / 3.0); }
-
- /* Step O */
- done = 0;
- if(source[sp] == 13) { edi_count += (2.0 / 3.0); done = 1; }
- if(source[sp] == '*') { edi_count += (2.0 / 3.0); done = 1; }
- if(source[sp] == '>') { edi_count += (2.0 / 3.0); done = 1; }
- if(source[sp] == ' ') { edi_count += (2.0 / 3.0); done = 1; }
- if((source[sp] >= '0') && (source[sp] <= '9')) { edi_count += (2.0 / 3.0); done = 1; }
- if((source[sp] >= 'A') && (source[sp] <= 'Z')) { edi_count += (2.0 / 3.0); done = 1; }
- if(source[sp] > 127) {
- edi_count += (13.0 / 3.0);
- } else {
- if(done == 0) {
- edi_count += (10.0 / 3.0);
- }
- }
-
- /* Step P */
- if(gs1 && (source[sp] == '[')) { byte_count += 3.0; } else { byte_count += 1.0; }
-
- }
-
- ascii_count = froundup(ascii_count);
- c40_count = froundup(c40_count);
- text_count = froundup(text_count);
- edi_count = froundup(edi_count);
- byte_count = froundup(byte_count);
- best_scheme = C1_ASCII;
-
- if(sp == sourcelen) {
- /* Step K */
- best_count = edi_count;
-
- if(text_count <= best_count) {
- best_count = text_count;
- best_scheme = C1_TEXT;
- }
-
- if(c40_count <= best_count) {
- best_count = c40_count;
- best_scheme = C1_C40;
- }
-
- if(ascii_count <= best_count) {
- best_count = ascii_count;
- best_scheme = C1_ASCII;
- }
-
- if(byte_count <= best_count) {
- best_count = byte_count;
- best_scheme = C1_BYTE;
- }
- } else {
- /* Step Q */
-
- if(((edi_count + 1.0 <= ascii_count) && (edi_count + 1.0 <= c40_count)) &&
- ((edi_count + 1.0 <= byte_count) && (edi_count + 1.0 <= text_count))) {
- best_scheme = C1_EDI;
- }
-
- if((c40_count + 1.0 <= ascii_count) && (c40_count + 1.0 <= text_count)) {
-
- if(c40_count < edi_count) {
- best_scheme = C1_C40;
- } else {
- done = 0;
- if(c40_count == edi_count) {
- if(dq4bi(source, sourcelen, position)) {
- best_scheme = C1_EDI;
- } else {
- best_scheme = C1_C40;
- }
- }
- }
- }
-
- if(((text_count + 1.0 <= ascii_count) && (text_count + 1.0 <= c40_count)) &&
- ((text_count + 1.0 <= byte_count) && (text_count + 1.0 <= edi_count))) {
- best_scheme = C1_TEXT;
- }
-
- if(((ascii_count + 1.0 <= byte_count) && (ascii_count + 1.0 <= c40_count)) &&
- ((ascii_count + 1.0 <= text_count) && (ascii_count + 1.0 <= edi_count))) {
- best_scheme = C1_ASCII;
- }
-
- if(((byte_count + 1.0 <= ascii_count) && (byte_count + 1.0 <= c40_count)) &&
- ((byte_count + 1.0 <= text_count) && (byte_count + 1.0 <= edi_count))) {
- best_scheme = C1_BYTE;
- }
- }
-
- //printf("\n> scores: ASCII %.2f C40 %.2f TEXT %.2f EDI %.2f BYTE %.2f\n", ascii_count, c40_count, text_count, edi_count, byte_count);
-
- return best_scheme;
-}
-
-int c1_encode(struct zint_symbol *symbol, unsigned char source[], unsigned int target[], int length)
-{
- int current_mode, next_mode;
- int sp, tp, gs1, i, j, latch;
- int c40_buffer[6], c40_p;
- int text_buffer[6], text_p;
- int edi_buffer[6], edi_p;
- char decimal_binary[40];
- int byte_start = 0;
-
- sp = 0;
- tp = 0;
- latch = 0;
- memset(c40_buffer, 0, 6);
- c40_p = 0;
- memset(text_buffer, 0, 6);
- text_p = 0;
- memset(edi_buffer, 0, 6);
- edi_p = 0;
- strcpy(decimal_binary, "");
-
- if(symbol->input_mode == GS1_MODE) { gs1 = 1; } else { gs1 = 0; }
- if(gs1) { target[tp] = 232; tp++; } /* FNC1 */
-
- /* Step A */
- current_mode = C1_ASCII;
- next_mode = C1_ASCII;
-
- do {
- if(current_mode != next_mode) {
- /* Change mode */
- switch(next_mode) {
- case C1_C40: target[tp] = 230; tp++; break;
- case C1_TEXT: target[tp] = 239; tp++; break;
- case C1_EDI: target[tp] = 238; tp++; break;
- case C1_BYTE: target[tp] = 231; tp++; break;
- }
- }
-
- if((current_mode != C1_BYTE) && (next_mode == C1_BYTE)) { byte_start = tp; }
- current_mode = next_mode;
-
- if(current_mode == C1_ASCII) { /* Step B - ASCII encodation */
- next_mode = C1_ASCII;
-
- if((length - sp) >= 21) { /* Step B1 */
- j = 0;
-
- for(i = 0; i < 21; i++) {
- if((source[sp + i] >= '0') && (source[sp + i] <= '9')) { j++; }
- }
-
- if (j == 21) {
- next_mode = C1_DECIMAL;
- strcpy(decimal_binary, "1111");
- }
- }
-
- if((next_mode == C1_ASCII) && ((length - sp) >= 13)) { /* Step B2 */
- j = 0;
-
- for(i = 0; i < 13; i++) {
- if((source[sp + i] >= '0') && (source[sp + i] <= '9')) { j++; }
- }
-
- if (j == 13) {
- latch = 0;
- for(i = sp + 13; i < length; i++) {
- if(!((source[sp + i] >= '0') && (source[sp + i] <= '9'))) { latch = 1; }
- }
-
- if(!(latch)) {
- next_mode = C1_DECIMAL;
- strcpy(decimal_binary, "1111");
- }
- }
- }
-
- if(next_mode == C1_ASCII) { /* Step B3 */
- if(istwodigits(source, sp) && ((sp + 1) != length)) {
- target[tp] = (10 * ctoi(source[sp])) + ctoi(source[sp + 1]) + 130;
- tp++;
- sp += 2;
- } else {
- if((gs1) && (source[sp] == '[')) {
- if((length - sp) >= 15) { /* Step B4 */
- j = 0;
-
- for(i = 0; i < 15; i++) {
- if((source[sp + i] >= '0') && (source[sp + i] <= '9')) { j++; }
- }
-
- if (j == 15) {
- target[tp] = 236; /* FNC1 and change to Decimal */
- tp++; sp++;
- next_mode = C1_DECIMAL;
- }
- }
-
- if((length - sp) >= 7) { /* Step B5 */
- j = 0;
-
- for(i = 0; i < 7; i++) {
- if((source[sp + i] >= '0') && (source[sp + i] <= '9')) { j++; }
- }
-
- if (j == 7) {
- latch = 0;
- for(i = sp + 7; i < length; i++) {
- if(!((source[sp + i] >= '0') && (source[sp + i] <= '9'))) { latch = 1; }
- }
-
- if(!(latch)) {
- target[tp] = 236; /* FNC1 and change to Decimal */
- tp++; sp++;
- next_mode = C1_DECIMAL;
- }
- }
- }
- }
-
- if(next_mode == C1_ASCII) {
-
- /* Step B6 */
- next_mode = c1_look_ahead_test(source, length, sp, current_mode, gs1);
-
- if(next_mode == C1_ASCII) {
- if(source[sp] > 127) {
- /* Step B7 */
- target[tp] = 235; tp++; /* FNC4 */
- target[tp] = (source[sp] - 128) + 1; tp++; sp++;
- } else {
- /* Step B8 */
- if((gs1) && (source[sp] == '[')) {
- target[tp] = 232; tp++; sp++; /* FNC1 */
- } else {
- target[tp] = source[sp] + 1; tp++; sp++;
- }
- }
- }
- }
- }
- }
- }
-
- if(current_mode == C1_C40) { /* Step C - C40 encodation */
- int shift_set, value, done = 0, latch = 0;
-
- next_mode = C1_C40;
- if(c40_p == 0) {
- if((length - sp) >= 12) {
- j = 0;
-
- for(i = 0; i < 12; i++) {
- if((source[sp + i] >= '0') && (source[sp + i] <= '9')) { j++; }
- }
-
- if (j == 12) {
- next_mode = C1_ASCII; done = 1;
- }
- }
-
- if((length - sp) >= 8) {
- j = 0;
-
- for(i = 0; i < 8; i++) {
- if((source[sp + i] >= '0') && (source[sp + i] <= '9')) { j++; }
- }
-
- if((length - sp) == 8) {
- latch = 1;
- } else {
- latch = 1;
- for(j = sp + 8; j < length; j++) {
- if((source[j] <= '0') || (source[j] >= '9')) { latch = 0; }
- }
- }
-
- if ((j == 8) && latch) {
- next_mode = C1_ASCII; done = 1;
- }
- }
-
- if(!(done)) {
- next_mode = c1_look_ahead_test(source, length, sp, current_mode, gs1);
- }
- }
-
- if(next_mode != C1_C40) {
- target[tp] = 255; tp++; /* Unlatch */
- } else {
- if(source[sp] > 127) {
- c40_buffer[c40_p] = 1; c40_p++;
- c40_buffer[c40_p] = 30; c40_p++; /* Upper Shift */
- shift_set = c40_shift[source[sp] - 128];
- value = c40_value[source[sp] - 128];
- } else {
- shift_set = c40_shift[source[sp]];
- value = c40_value[source[sp]];
- }
-
- if(gs1 && (source[sp] == '[')) {
- shift_set = 2;
- value = 27; /* FNC1 */
- }
-
- if(shift_set != 0) {
- c40_buffer[c40_p] = shift_set - 1; c40_p++;
- }
- c40_buffer[c40_p] = value; c40_p++;
-
- if(c40_p >= 3) {
- int iv;
-
- iv = (1600 * c40_buffer[0]) + (40 * c40_buffer[1]) + (c40_buffer[2]) + 1;
- target[tp] = iv / 256; tp++;
- target[tp] = iv % 256; tp++;
-
- c40_buffer[0] = c40_buffer[3];
- c40_buffer[1] = c40_buffer[4];
- c40_buffer[2] = c40_buffer[5];
- c40_buffer[3] = 0;
- c40_buffer[4] = 0;
- c40_buffer[5] = 0;
- c40_p -= 3;
- }
- sp++;
- }
- }
-
- if(current_mode == C1_TEXT) { /* Step D - Text encodation */
- int shift_set, value, done = 0, latch = 0;
-
- next_mode = C1_TEXT;
- if(text_p == 0) {
- if((length - sp) >= 12) {
- j = 0;
-
- for(i = 0; i < 12; i++) {
- if((source[sp + i] >= '0') && (source[sp + i] <= '9')) { j++; }
- }
-
- if (j == 12) {
- next_mode = C1_ASCII; done = 1;
- }
- }
-
- if((length - sp) >= 8) {
- j = 0;
-
- for(i = 0; i < 8; i++) {
- if((source[sp + i] >= '0') && (source[sp + i] <= '9')) { j++; }
- }
-
- if((length - sp) == 8) {
- latch = 1;
- } else {
- latch = 1;
- for(j = sp + 8; j < length; j++) {
- if((source[j] <= '0') || (source[j] >= '9')) { latch = 0; }
- }
- }
-
- if ((j == 8) && latch) {
- next_mode = C1_ASCII; done = 1;
- }
- }
-
- if(!(done)) {
- next_mode = c1_look_ahead_test(source, length, sp, current_mode, gs1);
- }
- }
-
- if(next_mode != C1_TEXT) {
- target[tp] = 255; tp++; /* Unlatch */
- } else {
- if(source[sp] > 127) {
- text_buffer[text_p] = 1; text_p++;
- text_buffer[text_p] = 30; text_p++; /* Upper Shift */
- shift_set = text_shift[source[sp] - 128];
- value = text_value[source[sp] - 128];
- } else {
- shift_set = text_shift[source[sp]];
- value = text_value[source[sp]];
- }
-
- if(gs1 && (source[sp] == '[')) {
- shift_set = 2;
- value = 27; /* FNC1 */
- }
-
- if(shift_set != 0) {
- text_buffer[text_p] = shift_set - 1; text_p++;
- }
- text_buffer[text_p] = value; text_p++;
-
- if(text_p >= 3) {
- int iv;
-
- iv = (1600 * text_buffer[0]) + (40 * text_buffer[1]) + (text_buffer[2]) + 1;
- target[tp] = iv / 256; tp++;
- target[tp] = iv % 256; tp++;
-
- text_buffer[0] = text_buffer[3];
- text_buffer[1] = text_buffer[4];
- text_buffer[2] = text_buffer[5];
- text_buffer[3] = 0;
- text_buffer[4] = 0;
- text_buffer[5] = 0;
- text_p -= 3;
- }
- sp++;
- }
- }
-
- if(current_mode == C1_EDI) { /* Step E - EDI Encodation */
- int value = 0, done = 0, latch = 0;
-
- next_mode = C1_EDI;
- if(edi_p == 0) {
- if((length - sp) >= 12) {
- j = 0;
-
- for(i = 0; i < 12; i++) {
- if((source[sp + i] >= '0') && (source[sp + i] <= '9')) { j++; }
- }
-
- if (j == 12) {
- next_mode = C1_ASCII; done = 1;
- }
- }
-
- if((length - sp) >= 8) {
- j = 0;
-
- for(i = 0; i < 8; i++) {
- if((source[sp + i] >= '0') && (source[sp + i] <= '9')) { j++; }
- }
-
- if((length - sp) == 8) {
- latch = 1;
- } else {
- latch = 1;
- for(j = sp + 8; j < length; j++) {
- if((source[j] <= '0') || (source[j] >= '9')) { latch = 0; }
- }
- }
-
- if ((j == 8) && latch) {
- next_mode = C1_ASCII; done = 1;
- }
- }
-
- if(!((isedi(source[sp]) && isedi(source[sp + 1])) && isedi(source[sp + 2]))) {
- next_mode = C1_ASCII;
- }
- }
-
- if(next_mode != C1_EDI) {
- target[tp] = 255; tp++; /* Unlatch */
- } else {
- if(source[sp] == 13) { value = 0; }
- if(source[sp] == '*') { value = 1; }
- if(source[sp] == '>') { value = 2; }
- if(source[sp] == ' ') { value = 3; }
- if((source[sp] >= '0') && (source[sp] <= '9')) { value = source[sp] - '0' + 4; }
- if((source[sp] >= 'A') && (source[sp] <= 'Z')) { value = source[sp] - 'A' + 14; }
-
- edi_buffer[edi_p] = value; edi_p++;
-
- if(edi_p >= 3) {
- int iv;
-
- iv = (1600 * edi_buffer[0]) + (40 * edi_buffer[1]) + (edi_buffer[2]) + 1;
- target[tp] = iv / 256; tp++;
- target[tp] = iv % 256; tp++;
-
- edi_buffer[0] = edi_buffer[3];
- edi_buffer[1] = edi_buffer[4];
- edi_buffer[2] = edi_buffer[5];
- edi_buffer[3] = 0;
- edi_buffer[4] = 0;
- edi_buffer[5] = 0;
- edi_p -= 3;
- }
- sp++;
- }
- }
-
- if(current_mode == C1_DECIMAL) { /* Step F - Decimal encodation */
- int value, decimal_count, data_left;
-
- next_mode = C1_DECIMAL;
-
- data_left = length - sp;
- decimal_count = 0;
-
- if(data_left >= 1) {
- if((source[sp] >= '0') && (source[sp] <= '9')) { decimal_count = 1; }
- }
- if(data_left >= 2) {
- if((decimal_count == 1) && ((source[sp + 1] >= '0') && (source[sp + 1] <= '9'))) { decimal_count = 2; }
- }
- if(data_left >= 3) {
- if((decimal_count == 2) && ((source[sp + 2] >= '0') && (source[sp + 2] <= '9'))) { decimal_count = 3; }
- }
-
- if(decimal_count != 3) {
- int bits_left_in_byte, target_count;
- int sub_target;
- /* Finish Decimal mode and go back to ASCII */
-
- concat(decimal_binary, "111111"); /* Unlatch */
-
- target_count = 3;
- if(strlen(decimal_binary) <= 16) { target_count = 2; }
- if(strlen(decimal_binary) <= 8) { target_count = 1; }
- bits_left_in_byte = (8 * target_count) - strlen(decimal_binary);
- if(bits_left_in_byte == 8) { bits_left_in_byte = 0; }
-
- if(bits_left_in_byte == 2) {
- concat(decimal_binary, "01");
- }
-
- if((bits_left_in_byte == 4) || (bits_left_in_byte == 6)) {
- if(decimal_count >= 1) {
- int sub_value = ctoi(source[sp]) + 1;
-
- if(sub_value & 0x08) { concat(decimal_binary, "1"); } else { concat(decimal_binary, "0"); }
- if(sub_value & 0x04) { concat(decimal_binary, "1"); } else { concat(decimal_binary, "0"); }
- if(sub_value & 0x02) { concat(decimal_binary, "1"); } else { concat(decimal_binary, "0"); }
- if(sub_value & 0x01) { concat(decimal_binary, "1"); } else { concat(decimal_binary, "0"); }
- sp++;
- } else {
- concat(decimal_binary, "1111");
- }
- }
-
- if(bits_left_in_byte == 6) {
- concat(decimal_binary, "01");
- }
-
- /* Binary buffer is full - transfer to target */
- if(target_count >= 1) {
- sub_target = 0;
- if(decimal_binary[0] == '1') { sub_target += 128; }
- if(decimal_binary[1] == '1') { sub_target += 64; }
- if(decimal_binary[2] == '1') { sub_target += 32; }
- if(decimal_binary[3] == '1') { sub_target += 16; }
- if(decimal_binary[4] == '1') { sub_target += 8; }
- if(decimal_binary[5] == '1') { sub_target += 4; }
- if(decimal_binary[6] == '1') { sub_target += 2; }
- if(decimal_binary[7] == '1') { sub_target += 1; }
- target[tp] = sub_target; tp++;
- }
- if(target_count >= 2) {
- sub_target = 0;
- if(decimal_binary[8] == '1') { sub_target += 128; }
- if(decimal_binary[9] == '1') { sub_target += 64; }
- if(decimal_binary[10] == '1') { sub_target += 32; }
- if(decimal_binary[11] == '1') { sub_target += 16; }
- if(decimal_binary[12] == '1') { sub_target += 8; }
- if(decimal_binary[13] == '1') { sub_target += 4; }
- if(decimal_binary[14] == '1') { sub_target += 2; }
- if(decimal_binary[15] == '1') { sub_target += 1; }
- target[tp] = sub_target; tp++;
- }
- if(target_count == 3) {
- sub_target = 0;
- if(decimal_binary[16] == '1') { sub_target += 128; }
- if(decimal_binary[17] == '1') { sub_target += 64; }
- if(decimal_binary[18] == '1') { sub_target += 32; }
- if(decimal_binary[19] == '1') { sub_target += 16; }
- if(decimal_binary[20] == '1') { sub_target += 8; }
- if(decimal_binary[21] == '1') { sub_target += 4; }
- if(decimal_binary[22] == '1') { sub_target += 2; }
- if(decimal_binary[23] == '1') { sub_target += 1; }
- target[tp] = sub_target; tp++;
- }
-
- next_mode = C1_ASCII;
- } else {
- /* There are three digits - convert the value to binary */
- value = (100 * ctoi(source[sp])) + (10 * ctoi(source[sp + 1])) + ctoi(source[sp + 2]) + 1;
-
- if(value & 0x200) { concat(decimal_binary, "1"); } else { concat(decimal_binary, "0"); }
- if(value & 0x100) { concat(decimal_binary, "1"); } else { concat(decimal_binary, "0"); }
- if(value & 0x80) { concat(decimal_binary, "1"); } else { concat(decimal_binary, "0"); }
- if(value & 0x40) { concat(decimal_binary, "1"); } else { concat(decimal_binary, "0"); }
- if(value & 0x20) { concat(decimal_binary, "1"); } else { concat(decimal_binary, "0"); }
- if(value & 0x10) { concat(decimal_binary, "1"); } else { concat(decimal_binary, "0"); }
- if(value & 0x08) { concat(decimal_binary, "1"); } else { concat(decimal_binary, "0"); }
- if(value & 0x04) { concat(decimal_binary, "1"); } else { concat(decimal_binary, "0"); }
- if(value & 0x02) { concat(decimal_binary, "1"); } else { concat(decimal_binary, "0"); }
- if(value & 0x01) { concat(decimal_binary, "1"); } else { concat(decimal_binary, "0"); }
-
- sp+= 3;
- }
-
- if(strlen(decimal_binary) >= 24) {
- int target1 = 0, target2 = 0, target3 = 0;
- char temp_binary[40];
-
- /* Binary buffer is full - transfer to target */
- if(decimal_binary[0] == '1') { target1 += 128; }
- if(decimal_binary[1] == '1') { target1 += 64; }
- if(decimal_binary[2] == '1') { target1 += 32; }
- if(decimal_binary[3] == '1') { target1 += 16; }
- if(decimal_binary[4] == '1') { target1 += 8; }
- if(decimal_binary[5] == '1') { target1 += 4; }
- if(decimal_binary[6] == '1') { target1 += 2; }
- if(decimal_binary[7] == '1') { target1 += 1; }
- if(decimal_binary[8] == '1') { target2 += 128; }
- if(decimal_binary[9] == '1') { target2 += 64; }
- if(decimal_binary[10] == '1') { target2 += 32; }
- if(decimal_binary[11] == '1') { target2 += 16; }
- if(decimal_binary[12] == '1') { target2 += 8; }
- if(decimal_binary[13] == '1') { target2 += 4; }
- if(decimal_binary[14] == '1') { target2 += 2; }
- if(decimal_binary[15] == '1') { target2 += 1; }
- if(decimal_binary[16] == '1') { target3 += 128; }
- if(decimal_binary[17] == '1') { target3 += 64; }
- if(decimal_binary[18] == '1') { target3 += 32; }
- if(decimal_binary[19] == '1') { target3 += 16; }
- if(decimal_binary[20] == '1') { target3 += 8; }
- if(decimal_binary[21] == '1') { target3 += 4; }
- if(decimal_binary[22] == '1') { target3 += 2; }
- if(decimal_binary[23] == '1') { target3 += 1; }
- target[tp] = target1; tp++;
- target[tp] = target2; tp++;
- target[tp] = target3; tp++;
-
- strcpy(temp_binary, "");
- if(strlen(decimal_binary) > 24) {
- for(i = 0; i <= (strlen(decimal_binary) - 24); i++) {
- temp_binary[i] = decimal_binary[i + 24];
- }
- strcpy(decimal_binary, temp_binary);
- }
- }
- }
-
- if(current_mode == C1_BYTE) {
- next_mode = C1_BYTE;
-
- if(gs1 && (source[sp] == '[')) {
- next_mode = C1_ASCII;
- } else {
- if(source[sp] <= 127) {
- next_mode = c1_look_ahead_test(source, length, sp, current_mode, gs1);
- }
- }
-
- if(next_mode != C1_BYTE) {
- /* Insert byte field length */
- if((tp - byte_start) <= 249) {
- for(i = tp; i >= byte_start; i--) {
- target[i + 1] = target[i];
- }
- target[byte_start] = (tp - byte_start);
- tp++;
- } else {
- for(i = tp; i >= byte_start; i--) {
- target[i + 2] = target[i];
- }
- target[byte_start] = 249 + ((tp - byte_start) / 250);
- target[byte_start + 1] = ((tp - byte_start) % 250);
- tp += 2;
- }
- } else {
- target[tp] = source[sp];
- tp++;
- sp++;
- }
- }
-
- if(tp > 1480) {
- /* Data is too large for symbol */
- strcpy(symbol->errtxt, "Input data too long");
- return 0;
- }
- } while (sp < length);
-
- /* Empty buffers */
- if(c40_p == 2) {
- int iv;
-
- c40_buffer[2] = 1;
- iv = (1600 * c40_buffer[0]) + (40 * c40_buffer[1]) + (c40_buffer[2]) + 1;
- target[tp] = iv / 256; tp++;
- target[tp] = iv % 256; tp++;
- target[tp] = 255; tp++; /* Unlatch */
- }
- if(c40_p == 1) {
- int iv;
-
- c40_buffer[1] = 1;
- c40_buffer[2] = 31; /* Pad */
- iv = (1600 * c40_buffer[0]) + (40 * c40_buffer[1]) + (c40_buffer[2]) + 1;
- target[tp] = iv / 256; tp++;
- target[tp] = iv % 256; tp++;
- target[tp] = 255; tp++; /* Unlatch */
- }
- if(text_p == 2) {
- int iv;
-
- text_buffer[2] = 1;
- iv = (1600 * text_buffer[0]) + (40 * text_buffer[1]) + (text_buffer[2]) + 1;
- target[tp] = iv / 256; tp++;
- target[tp] = iv % 256; tp++;
- target[tp] = 255; tp++; /* Unlatch */
- }
- if(text_p == 1) {
- int iv;
-
- text_buffer[1] = 1;
- text_buffer[2] = 31; /* Pad */
- iv = (1600 * text_buffer[0]) + (40 * text_buffer[1]) + (text_buffer[2]) + 1;
- target[tp] = iv / 256; tp++;
- target[tp] = iv % 256; tp++;
- target[tp] = 255; tp++; /* Unlatch */
- }
-
- if(current_mode == C1_DECIMAL) {
- int bits_left_in_byte, target_count;
- int sub_target;
- /* Finish Decimal mode and go back to ASCII */
-
- concat(decimal_binary, "111111"); /* Unlatch */
-
- target_count = 3;
- if(strlen(decimal_binary) <= 16) { target_count = 2; }
- if(strlen(decimal_binary) <= 8) { target_count = 1; }
- bits_left_in_byte = (8 * target_count) - strlen(decimal_binary);
- if(bits_left_in_byte == 8) { bits_left_in_byte = 0; }
-
- if(bits_left_in_byte == 2) {
- concat(decimal_binary, "01");
- }
-
- if((bits_left_in_byte == 4) || (bits_left_in_byte == 6)) {
- concat(decimal_binary, "1111");
- }
-
- if(bits_left_in_byte == 6) {
- concat(decimal_binary, "01");
- }
-
- /* Binary buffer is full - transfer to target */
- if(target_count >= 1) {
- sub_target = 0;
- if(decimal_binary[0] == '1') { sub_target += 128; }
- if(decimal_binary[1] == '1') { sub_target += 64; }
- if(decimal_binary[2] == '1') { sub_target += 32; }
- if(decimal_binary[3] == '1') { sub_target += 16; }
- if(decimal_binary[4] == '1') { sub_target += 8; }
- if(decimal_binary[5] == '1') { sub_target += 4; }
- if(decimal_binary[6] == '1') { sub_target += 2; }
- if(decimal_binary[7] == '1') { sub_target += 1; }
- target[tp] = sub_target; tp++;
- }
- if(target_count >= 2) {
- sub_target = 0;
- if(decimal_binary[8] == '1') { sub_target += 128; }
- if(decimal_binary[9] == '1') { sub_target += 64; }
- if(decimal_binary[10] == '1') { sub_target += 32; }
- if(decimal_binary[11] == '1') { sub_target += 16; }
- if(decimal_binary[12] == '1') { sub_target += 8; }
- if(decimal_binary[13] == '1') { sub_target += 4; }
- if(decimal_binary[14] == '1') { sub_target += 2; }
- if(decimal_binary[15] == '1') { sub_target += 1; }
- target[tp] = sub_target; tp++;
- }
- if(target_count == 3) {
- sub_target = 0;
- if(decimal_binary[16] == '1') { sub_target += 128; }
- if(decimal_binary[17] == '1') { sub_target += 64; }
- if(decimal_binary[18] == '1') { sub_target += 32; }
- if(decimal_binary[19] == '1') { sub_target += 16; }
- if(decimal_binary[20] == '1') { sub_target += 8; }
- if(decimal_binary[21] == '1') { sub_target += 4; }
- if(decimal_binary[22] == '1') { sub_target += 2; }
- if(decimal_binary[23] == '1') { sub_target += 1; }
- target[tp] = sub_target; tp++;
- }
- }
-
- if(current_mode == C1_BYTE) {
- /* Insert byte field length */
- if((tp - byte_start) <= 249) {
- for(i = tp; i >= byte_start; i--) {
- target[i + 1] = target[i];
- }
- target[byte_start] = (tp - byte_start);
- tp++;
- } else {
- for(i = tp; i >= byte_start; i--) {
- target[i + 2] = target[i];
- }
- target[byte_start] = 249 + ((tp - byte_start) / 250);
- target[byte_start + 1] = ((tp - byte_start) % 250);
- tp += 2;
- }
- }
-
- /* Re-check length of data */
- if(tp > 1480) {
- /* Data is too large for symbol */
- strcpy(symbol->errtxt, "Input data too long");
- return 0;
- }
- /*
- printf("targets:\n");
- for(i = 0; i < tp; i++) {
- printf("[%d]", target[i]);
- }
- printf("\n");
- */
- return tp;
-}
-
-void block_copy(struct zint_symbol *symbol, char grid[][120], int start_row, int start_col, int height, int width, int row_offset, int col_offset) {
- int i, j;
-
- for(i = start_row; i < (start_row + height); i++) {
- for(j = start_col; j < (start_col + width); j++) {
- if(grid[i][j] == '1') {
- set_module(symbol, i + row_offset, j + col_offset);
- }
- }
- }
-}
-
-int code_one(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- int size = 1, i, j, data_blocks;
-
- char datagrid[136][120];
- int row, col;
- int sub_version = 0;
-
- if((symbol->option_2 < 0) || (symbol->option_2 > 10)) {
- strcpy(symbol->errtxt, "Invalid symbol size");
- return ERROR_INVALID_OPTION;
- }
-
- if(symbol->option_2 == 9) {
- /* Version S */
- int codewords;
- short int elreg[112];
- unsigned int data[15], ecc[15];
- int stream[30];
- int block_width;
-
- if(length > 18) {
- strcpy(symbol->errtxt, "Input data too long");
- return ERROR_TOO_LONG;
- }
- if(is_sane(NEON, source, length) == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid input data (Version S encodes numeric input only)");
- return ERROR_INVALID_DATA1;
- }
-
- sub_version = 3; codewords = 12; block_width = 6; /* Version S-30 */
- if(length <= 12) { sub_version = 2; codewords = 8; block_width = 4; } /* Version S-20 */
- if(length <= 6) { sub_version = 1; codewords = 4; block_width = 2; } /* Version S-10 */
-
- binary_load(elreg, (char *)source, length);
- hex_dump(elreg);
-
- for(i = 0; i < 15; i++) {
- data[i] = 0;
- ecc[i] = 0;
- }
-
- for(i = 0; i < codewords; i++) {
- data[codewords - i - 1] += 1 * elreg[(i * 5)];
- data[codewords - i - 1] += 2 * elreg[(i * 5) + 1];
- data[codewords - i - 1] += 4 * elreg[(i * 5) + 2];
- data[codewords - i - 1] += 8 * elreg[(i * 5) + 3];
- data[codewords - i - 1] += 16 * elreg[(i * 5) + 4];
- }
-
- rs_init_gf(0x25);
- rs_init_code(codewords, 1);
- rs_encode_long(codewords, data, ecc);
- rs_free();
-
- for(i = 0; i < codewords; i++) {
- stream[i] = data[i];
- stream[i + codewords] = ecc[codewords - i - 1];
- }
-
- for(i = 0; i < 136; i++) {
- for(j = 0; j < 120; j++) {
- datagrid[i][j] = '0';
- }
- }
-
- i = 0;
- for(row = 0; row < 2; row++) {
- for(col = 0; col < block_width; col++) {
- if(stream[i] & 0x10) { datagrid[row * 2][col * 5] = '1'; }
- if(stream[i] & 0x08) { datagrid[row * 2][(col * 5) + 1] = '1'; }
- if(stream[i] & 0x04) { datagrid[row * 2][(col * 5) + 2] = '1'; }
- if(stream[i] & 0x02) { datagrid[(row * 2) + 1][col * 5] = '1'; }
- if(stream[i] & 0x01) { datagrid[(row * 2) + 1][(col * 5) + 1] = '1'; }
- if(stream[i + 1] & 0x10) { datagrid[row * 2][(col * 5) + 3] = '1'; }
- if(stream[i + 1] & 0x08) { datagrid[row * 2][(col * 5) + 4] = '1'; }
- if(stream[i + 1] & 0x04) { datagrid[(row * 2) + 1][(col * 5) + 2] = '1'; }
- if(stream[i + 1] & 0x02) { datagrid[(row * 2) + 1][(col * 5) + 3] = '1'; }
- if(stream[i + 1] & 0x01) { datagrid[(row * 2) + 1][(col * 5) + 4] = '1'; }
- i += 2;
- }
- }
-
- size = 9;
- symbol->rows = 8;
- symbol->width = 10 * sub_version + 1;
- }
-
- if(symbol->option_2 == 10) {
- /* Version T */
- unsigned int data[40], ecc[25];
- unsigned int stream[65];
- int data_length;
- int data_cw, ecc_cw, block_width;
-
- for(i = 0; i < 40; i++) { data[i] = 0; }
- data_length = c1_encode(symbol, source, data, length);
-
- if(data_length == 0) {
- return ERROR_TOO_LONG;
- }
-
- if(data_length > 38) {
- strcpy(symbol->errtxt, "Input data too long");
- return ERROR_TOO_LONG;
- }
-
- size = 10;
- sub_version = 3; data_cw = 38; ecc_cw = 22; block_width = 12;
- if(data_length <= 24) { sub_version = 2; data_cw = 24; ecc_cw = 16; block_width = 8; }
- if(data_length <= 10) { sub_version = 1; data_cw = 10; ecc_cw = 10; block_width = 4; }
-
- for(i = data_length; i < data_cw; i++) {
- data[i] = 129; /* Pad */
- }
-
- /* Calculate error correction data */
- rs_init_gf(0x12d);
- rs_init_code(ecc_cw, 1);
- rs_encode_long(data_cw, data, ecc);
- rs_free();
-
- /* "Stream" combines data and error correction data */
- for(i = 0; i < data_cw; i++) {
- stream[i] = data[i];
- }
- for(i = 0; i < ecc_cw; i++) {
- stream[data_cw + i] = ecc[ecc_cw - i - 1];
- }
-
- for(i = 0; i < 136; i++) {
- for(j = 0; j < 120; j++) {
- datagrid[i][j] = '0';
- }
- }
-
- i = 0;
- for(row = 0; row < 5; row++) {
- for(col = 0; col < block_width; col++) {
- if(stream[i] & 0x80) { datagrid[row * 2][col * 4] = '1'; }
- if(stream[i] & 0x40) { datagrid[row * 2][(col * 4) + 1] = '1'; }
- if(stream[i] & 0x20) { datagrid[row * 2][(col * 4) + 2] = '1'; }
- if(stream[i] & 0x10) { datagrid[row * 2][(col * 4) + 3] = '1'; }
- if(stream[i] & 0x08) { datagrid[(row * 2) + 1][col * 4] = '1'; }
- if(stream[i] & 0x04) { datagrid[(row * 2) + 1][(col * 4) + 1] = '1'; }
- if(stream[i] & 0x02) { datagrid[(row * 2) + 1][(col * 4) + 2] = '1'; }
- if(stream[i] & 0x01) { datagrid[(row * 2) + 1][(col * 4) + 3] = '1'; }
- i++;
- }
- }
-
- symbol->rows = 16;
- symbol->width = (sub_version * 16) + 1;
- }
-
- if((symbol->option_2 != 9) && (symbol->option_2 != 10)) {
- /* Version A to H */
- unsigned int data[1500], ecc[600];
- unsigned int sub_data[190], sub_ecc[75];
- unsigned int stream[2100];
- int data_length;
-
- for(i = 0; i < 1500; i++) { data[i] = 0; }
- data_length = c1_encode(symbol, source, data, length);
-
- if(data_length == 0) {
- return ERROR_TOO_LONG;
- }
-
- for(i = 7; i >= 0; i--) {
- if(c1_data_length[i] >= data_length) {
- size = i + 1;
- }
- }
-
- if(symbol->option_2 > size) {
- size = symbol->option_2;
- }
-
- for(i = data_length; i < c1_data_length[size - 1]; i++) {
- data[i] = 129; /* Pad */
- }
-
- /* Calculate error correction data */
- data_length = c1_data_length[size - 1];
- for(i = 0; i < 190; i++) { sub_data[i] = 0; }
- for(i = 0; i < 75; i++) { sub_ecc[i] = 0; }
-
- data_blocks = c1_blocks[size - 1];
-
- rs_init_gf(0x12d);
- rs_init_code(c1_ecc_blocks[size - 1], 0);
- for(i = 0; i < data_blocks; i++) {
- for(j = 0; j < c1_data_blocks[size - 1]; j++) {
-
- sub_data[j] = data[j * data_blocks + i];
- }
- rs_encode_long(c1_data_blocks[size - 1], sub_data, sub_ecc);
- for(j = 0; j < c1_ecc_blocks[size - 1]; j++) {
- ecc[c1_ecc_length[size - 1] - (j * data_blocks + i) - 1] = sub_ecc[j];
- }
- }
- rs_free();
-
- /* "Stream" combines data and error correction data */
- for(i = 0; i < data_length; i++) {
- stream[i] = data[i];
- }
- for(i = 0; i < c1_ecc_length[size - 1]; i++) {
- stream[data_length + i] = ecc[i];
- }
-
- for(i = 0; i < 136; i++) {
- for(j = 0; j < 120; j++) {
- datagrid[i][j] = '0';
- }
- }
-
- i = 0;
- for(row = 0; row < c1_grid_height[size - 1]; row++) {
- for(col = 0; col < c1_grid_width[size - 1]; col++) {
- if(stream[i] & 0x80) { datagrid[row * 2][col * 4] = '1'; }
- if(stream[i] & 0x40) { datagrid[row * 2][(col * 4) + 1] = '1'; }
- if(stream[i] & 0x20) { datagrid[row * 2][(col * 4) + 2] = '1'; }
- if(stream[i] & 0x10) { datagrid[row * 2][(col * 4) + 3] = '1'; }
- if(stream[i] & 0x08) { datagrid[(row * 2) + 1][col * 4] = '1'; }
- if(stream[i] & 0x04) { datagrid[(row * 2) + 1][(col * 4) + 1] = '1'; }
- if(stream[i] & 0x02) { datagrid[(row * 2) + 1][(col * 4) + 2] = '1'; }
- if(stream[i] & 0x01) { datagrid[(row * 2) + 1][(col * 4) + 3] = '1'; }
- i++;
- }
- }
-
- /* for(i = 0; i < (c1_grid_height[size - 1] * 2); i++) {
- for(j = 0; j < (c1_grid_width[size - 1] * 4); j++) {
- printf("%c", datagrid[i][j]);
- }
- printf("\n");
- } */
-
- symbol->rows = c1_height[size - 1];
- symbol->width = c1_width[size - 1];
- }
-
- switch(size) {
- case 1: /* Version A */
- central_finder(symbol, 6, 3, 1);
- vert(symbol, 4, 6, 1);
- vert(symbol, 12, 5, 0);
- set_module(symbol, 5, 12);
- spigot(symbol, 0);
- spigot(symbol, 15);
- block_copy(symbol, datagrid, 0, 0, 5, 4, 0, 0);
- block_copy(symbol, datagrid, 0, 4, 5, 12, 0, 2);
- block_copy(symbol, datagrid, 5, 0, 5, 12, 6, 0);
- block_copy(symbol, datagrid, 5, 12, 5, 4, 6, 2);
- break;
- case 2: /* Version B */
- central_finder(symbol, 8, 4, 1);
- vert(symbol, 4, 8, 1);
- vert(symbol, 16, 7, 0);
- set_module(symbol, 7, 16);
- spigot(symbol, 0);
- spigot(symbol, 21);
- block_copy(symbol, datagrid, 0, 0, 7, 4, 0, 0);
- block_copy(symbol, datagrid, 0, 4, 7, 16, 0, 2);
- block_copy(symbol, datagrid, 7, 0, 7, 16, 8, 0);
- block_copy(symbol, datagrid, 7, 16, 7, 4, 8, 2);
- break;
- case 3: /* Version C */
- central_finder(symbol, 11, 4, 2);
- vert(symbol, 4, 11, 1);
- vert(symbol, 26, 13, 1);
- vert(symbol, 4, 10, 0);
- vert(symbol, 26, 10, 0);
- spigot(symbol, 0);
- spigot(symbol, 27);
- block_copy(symbol, datagrid, 0, 0, 10, 4, 0, 0);
- block_copy(symbol, datagrid, 0, 4, 10, 20, 0, 2);
- block_copy(symbol, datagrid, 0, 24, 10, 4, 0, 4);
- block_copy(symbol, datagrid, 10, 0, 10, 4, 8, 0);
- block_copy(symbol, datagrid, 10, 4, 10, 20, 8, 2);
- block_copy(symbol, datagrid, 10, 24, 10, 4, 8, 4);
- break;
- case 4: /* Version D */
- central_finder(symbol, 16, 5, 1);
- vert(symbol, 4, 16, 1);
- vert(symbol, 20, 16, 1);
- vert(symbol, 36, 16, 1);
- vert(symbol, 4, 15, 0);
- vert(symbol, 20, 15, 0);
- vert(symbol, 36, 15, 0);
- spigot(symbol, 0);
- spigot(symbol, 12);
- spigot(symbol, 27);
- spigot(symbol, 39);
- block_copy(symbol, datagrid, 0, 0, 15, 4, 0, 0);
- block_copy(symbol, datagrid, 0, 4, 15, 14, 0, 2);
- block_copy(symbol, datagrid, 0, 18, 15, 14, 0, 4);
- block_copy(symbol, datagrid, 0, 32, 15, 4, 0, 6);
- block_copy(symbol, datagrid, 15, 0, 15, 4, 10, 0);
- block_copy(symbol, datagrid, 15, 4, 15, 14, 10, 2);
- block_copy(symbol, datagrid, 15, 18, 15, 14, 10, 4);
- block_copy(symbol, datagrid, 15, 32, 15, 4, 10, 6);
- break;
- case 5: /* Version E */
- central_finder(symbol, 22, 5, 2);
- vert(symbol, 4, 22, 1);
- vert(symbol, 26, 24, 1);
- vert(symbol, 48, 22, 1);
- vert(symbol, 4, 21, 0);
- vert(symbol, 26, 21, 0);
- vert(symbol, 48, 21, 0);
- spigot(symbol, 0);
- spigot(symbol, 12);
- spigot(symbol, 39);
- spigot(symbol, 51);
- block_copy(symbol, datagrid, 0, 0, 21, 4, 0, 0);
- block_copy(symbol, datagrid, 0, 4, 21, 20, 0, 2);
- block_copy(symbol, datagrid, 0, 24, 21, 20, 0, 4);
- block_copy(symbol, datagrid, 0, 44, 21, 4, 0, 6);
- block_copy(symbol, datagrid, 21, 0, 21, 4, 10, 0);
- block_copy(symbol, datagrid, 21, 4, 21, 20, 10, 2);
- block_copy(symbol, datagrid, 21, 24, 21, 20, 10, 4);
- block_copy(symbol, datagrid, 21, 44, 21, 4, 10, 6);
- break;
- case 6: /* Version F */
- central_finder(symbol, 31, 5, 3);
- vert(symbol, 4, 31, 1);
- vert(symbol, 26, 35, 1);
- vert(symbol, 48, 31, 1);
- vert(symbol, 70, 35, 1);
- vert(symbol, 4, 30, 0);
- vert(symbol, 26, 30, 0);
- vert(symbol, 48, 30, 0);
- vert(symbol, 70, 30, 0);
- spigot(symbol, 0);
- spigot(symbol, 12);
- spigot(symbol, 24);
- spigot(symbol, 45);
- spigot(symbol, 57);
- spigot(symbol, 69);
- block_copy(symbol, datagrid, 0, 0, 30, 4, 0, 0);
- block_copy(symbol, datagrid, 0, 4, 30, 20, 0, 2);
- block_copy(symbol, datagrid, 0, 24, 30, 20, 0, 4);
- block_copy(symbol, datagrid, 0, 44, 30, 20, 0, 6);
- block_copy(symbol, datagrid, 0, 64, 30, 4, 0, 8);
- block_copy(symbol, datagrid, 30, 0, 30, 4, 10, 0);
- block_copy(symbol, datagrid, 30, 4, 30, 20, 10, 2);
- block_copy(symbol, datagrid, 30, 24, 30, 20, 10, 4);
- block_copy(symbol, datagrid, 30, 44, 30, 20, 10, 6);
- block_copy(symbol, datagrid, 30, 64, 30, 4, 10, 8);
- break;
- case 7: /* Version G */
- central_finder(symbol, 47, 6, 2);
- vert(symbol, 6, 47, 1);
- vert(symbol, 27, 49, 1);
- vert(symbol, 48, 47, 1);
- vert(symbol, 69, 49, 1);
- vert(symbol, 90, 47, 1);
- vert(symbol, 6, 46, 0);
- vert(symbol, 27, 46, 0);
- vert(symbol, 48, 46, 0);
- vert(symbol, 69, 46, 0);
- vert(symbol, 90, 46, 0);
- spigot(symbol, 0);
- spigot(symbol, 12);
- spigot(symbol, 24);
- spigot(symbol, 36);
- spigot(symbol, 67);
- spigot(symbol, 79);
- spigot(symbol, 91);
- spigot(symbol, 103);
- block_copy(symbol, datagrid, 0, 0, 46, 6, 0, 0);
- block_copy(symbol, datagrid, 0, 6, 46, 19, 0, 2);
- block_copy(symbol, datagrid, 0, 25, 46, 19, 0, 4);
- block_copy(symbol, datagrid, 0, 44, 46, 19, 0, 6);
- block_copy(symbol, datagrid, 0, 63, 46, 19, 0, 8);
- block_copy(symbol, datagrid, 0, 82, 46, 6, 0, 10);
- block_copy(symbol, datagrid, 46, 0, 46, 6, 12, 0);
- block_copy(symbol, datagrid, 46, 6, 46, 19, 12, 2);
- block_copy(symbol, datagrid, 46, 25, 46, 19, 12, 4);
- block_copy(symbol, datagrid, 46, 44, 46, 19, 12, 6);
- block_copy(symbol, datagrid, 46, 63, 46, 19, 12, 8);
- block_copy(symbol, datagrid, 46, 82, 46, 6, 12, 10);
- break;
- case 8: /* Version H */
- central_finder(symbol, 69, 6, 3);
- vert(symbol, 6, 69, 1);
- vert(symbol, 26, 73, 1);
- vert(symbol, 46, 69, 1);
- vert(symbol, 66, 73, 1);
- vert(symbol, 86, 69, 1);
- vert(symbol, 106, 73, 1);
- vert(symbol, 126, 69, 1);
- vert(symbol, 6, 68, 0);
- vert(symbol, 26, 68, 0);
- vert(symbol, 46, 68, 0);
- vert(symbol, 66, 68, 0);
- vert(symbol, 86, 68, 0);
- vert(symbol, 106, 68, 0);
- vert(symbol, 126, 68, 0);
- spigot(symbol, 0);
- spigot(symbol, 12);
- spigot(symbol, 24);
- spigot(symbol, 36);
- spigot(symbol, 48);
- spigot(symbol, 60);
- spigot(symbol, 87);
- spigot(symbol, 99);
- spigot(symbol, 111);
- spigot(symbol, 123);
- spigot(symbol, 135);
- spigot(symbol, 147);
- block_copy(symbol, datagrid, 0, 0, 68, 6, 0, 0);
- block_copy(symbol, datagrid, 0, 6, 68, 18, 0, 2);
- block_copy(symbol, datagrid, 0, 24, 68, 18, 0, 4);
- block_copy(symbol, datagrid, 0, 42, 68, 18, 0, 6);
- block_copy(symbol, datagrid, 0, 60, 68, 18, 0, 8);
- block_copy(symbol, datagrid, 0, 78, 68, 18, 0, 10);
- block_copy(symbol, datagrid, 0, 96, 68, 18, 0, 12);
- block_copy(symbol, datagrid, 0, 114, 68, 6, 0, 14);
- block_copy(symbol, datagrid, 68, 0, 68, 6, 12, 0);
- block_copy(symbol, datagrid, 68, 6, 68, 18, 12, 2);
- block_copy(symbol, datagrid, 68, 24, 68, 18, 12, 4);
- block_copy(symbol, datagrid, 68, 42, 68, 18, 12, 6);
- block_copy(symbol, datagrid, 68, 60, 68, 18, 12, 8);
- block_copy(symbol, datagrid, 68, 78, 68, 18, 12, 10);
- block_copy(symbol, datagrid, 68, 96, 68, 18, 12, 12);
- block_copy(symbol, datagrid, 68, 114, 68, 6, 12, 14);
- break;
- case 9: /* Version S */
- horiz(symbol, 5, 1);
- horiz(symbol, 7, 1);
- set_module(symbol, 6, 0);
- set_module(symbol, 6, symbol->width - 1);
- unset_module(symbol, 7, 1);
- unset_module(symbol, 7, symbol->width - 2);
- switch(sub_version) {
- case 1: /* Version S-10 */
- set_module(symbol, 0, 5);
- block_copy(symbol, datagrid, 0, 0, 4, 5, 0, 0);
- block_copy(symbol, datagrid, 0, 5, 4, 5, 0, 1);
- break;
- case 2: /* Version S-20 */
- set_module(symbol, 0, 10);
- set_module(symbol, 4, 10);
- block_copy(symbol, datagrid, 0, 0, 4, 10, 0, 0);
- block_copy(symbol, datagrid, 0, 10, 4, 10, 0, 1);
- break;
- case 3: /* Version S-30 */
- set_module(symbol, 0, 15);
- set_module(symbol, 4, 15);
- set_module(symbol, 6, 15);
- block_copy(symbol, datagrid, 0, 0, 4, 15, 0, 0);
- block_copy(symbol, datagrid, 0, 15, 4, 15, 0, 1);
- break;
- }
- break;
- case 10: /* Version T */
- horiz(symbol, 11, 1);
- horiz(symbol, 13, 1);
- horiz(symbol, 15, 1);
- set_module(symbol, 12, 0);
- set_module(symbol, 12, symbol->width - 1);
- set_module(symbol, 14, 0);
- set_module(symbol, 14, symbol->width - 1);
- unset_module(symbol, 13, 1);
- unset_module(symbol, 13, symbol->width - 2);
- unset_module(symbol, 15, 1);
- unset_module(symbol, 15, symbol->width - 2);
- switch(sub_version) {
- case 1: /* Version T-16 */
- set_module(symbol, 0, 8);
- set_module(symbol, 10, 8);
- block_copy(symbol, datagrid, 0, 0, 10, 8, 0, 0);
- block_copy(symbol, datagrid, 0, 8, 10, 8, 0, 1);
- break;
- case 2: /* Version T-32 */
- set_module(symbol, 0, 16);
- set_module(symbol, 10, 16);
- set_module(symbol, 12, 16);
- block_copy(symbol, datagrid, 0, 0, 10, 16, 0, 0);
- block_copy(symbol, datagrid, 0, 16, 10, 16, 0, 1);
- break;
- case 3: /* Verion T-48 */
- set_module(symbol, 0, 24);
- set_module(symbol, 10, 24);
- set_module(symbol, 12, 24);
- set_module(symbol, 14, 24);
- block_copy(symbol, datagrid, 0, 0, 10, 24, 0, 0);
- block_copy(symbol, datagrid, 0, 24, 10, 24, 0, 1);
- break;
- }
- break;
- }
-
- for(i = 0; i < symbol->rows; i++) {
- symbol->row_height[i] = 1;
- }
-
- return 0;
-}
diff --git a/3rdparty/zint-2.4.4/backend/code1.h b/3rdparty/zint-2.4.4/backend/code1.h
deleted file mode 100644
index 532dc77..0000000
--- a/3rdparty/zint-2.4.4/backend/code1.h
+++ /dev/null
@@ -1,61 +0,0 @@
-/* code1.h - Lookup info for USS Code One */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-static int c40_shift[] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 };
-
-static int c40_value[] = {
- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
- 3,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,4,5,6,7,8,9,10,11,12,13,
- 15,16,17,18,19,20,21,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,
- 22,23,24,25,26,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 };
-
-static int text_shift[] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 2, 2, 2, 2, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3 };
-
-static int text_value[] = {
- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
- 3,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,4,5,6,7,8,9,10,11,12,13,
- 15,16,17,18,19,20,21,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,
- 22,23,24,25,26,0,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,27,28,29,30,31 };
-
-static int c1_height[] = { 16, 22, 28, 40, 52, 70, 104, 148 };
-static int c1_width[] = { 18, 22, 32, 42, 54, 76, 98, 134 };
-static int c1_data_length[] = { 10, 19, 44, 91, 182, 370, 732, 1480 };
-static int c1_ecc_length[] = { 10, 16, 26, 44, 70, 140, 280, 560 };
-static int c1_blocks[] = { 1, 1, 1, 1, 1, 2, 4, 8 };
-static int c1_data_blocks[] = { 10, 19, 44, 91, 182, 185, 183, 185 };
-static int c1_ecc_blocks[] = { 10, 16, 26, 44, 70, 70, 70, 70 };
-static int c1_grid_width[] = { 4, 5, 7, 9, 12, 17, 22, 30 };
-static int c1_grid_height[] = { 5, 7, 10, 15, 21, 30, 46, 68 };
-
-#define C1_ASCII 1
-#define C1_C40 2
-#define C1_DECIMAL 3
-#define C1_TEXT 4
-#define C1_EDI 5
-#define C1_BYTE 6
\ No newline at end of file
diff --git a/3rdparty/zint-2.4.4/backend/code128.c b/3rdparty/zint-2.4.4/backend/code128.c
deleted file mode 100644
index fc74c8e..0000000
--- a/3rdparty/zint-2.4.4/backend/code128.c
+++ /dev/null
@@ -1,997 +0,0 @@
-/* code128.c - Handles Code 128 and derivatives */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
- Bugfixes thanks to Christian Sakowski and BogDan Vatra
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include
-#include
-#include
-#ifdef _MSC_VER
-#include
-#endif
-#include "common.h"
-#include "gs1.h"
-
-#define TRUE 1
-#define FALSE 0
-#define SHIFTA 90
-#define LATCHA 91
-#define SHIFTB 92
-#define LATCHB 93
-#define SHIFTC 94
-#define LATCHC 95
-#define AORB 96
-#define ABORC 97
-
-#define DPDSET "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ*"
-
-static int list[2][170];
-
-/* Code 128 tables checked against ISO/IEC 15417:2007 */
-
-static char *C128Table[107] = {"212222", "222122", "222221", "121223", "121322", "131222", "122213",
- "122312", "132212", "221213", "221312", "231212", "112232", "122132", "122231", "113222",
- "123122", "123221", "223211", "221132", "221231", "213212", "223112", "312131", "311222",
- "321122", "321221", "312212", "322112", "322211", "212123", "212321", "232121", "111323",
- "131123", "131321", "112313", "132113", "132311", "211313", "231113", "231311", "112133",
- "112331", "132131", "113123", "113321", "133121", "313121", "211331", "231131", "213113",
- "213311", "213131", "311123", "311321", "331121", "312113", "312311", "332111", "314111",
- "221411", "431111", "111224", "111422", "121124", "121421", "141122", "141221", "112214",
- "112412", "122114", "122411", "142112", "142211", "241211", "221114", "413111", "241112",
- "134111", "111242", "121142", "121241", "114212", "124112", "124211", "411212", "421112",
- "421211", "212141", "214121", "412121", "111143", "111341", "131141", "114113", "114311",
- "411113", "411311", "113141", "114131", "311141", "411131", "211412", "211214", "211232",
- "2331112"};
-/* Code 128 character encodation - Table 1 */
-
-int parunmodd(unsigned char llyth)
-{
- int modd;
- modd = 0;
-
- if(llyth <= 31) { modd = SHIFTA; }
- else if((llyth >= 48) && (llyth <= 57)) { modd = ABORC; }
- else if(llyth <= 95) { modd = AORB; }
- else if(llyth <= 127) { modd = SHIFTB; }
- else if(llyth <= 159) { modd = SHIFTA; }
- else if(llyth <= 223) { modd = AORB; }
- else { modd = SHIFTB; }
-
- return modd;
-}
-
-void grwp(int *indexliste)
-{
- int i, j;
-
- /* bring together same type blocks */
- if(*(indexliste) > 1) {
- i = 1;
- while(i < *(indexliste)) {
- if(list[1][i - 1] == list[1][i]) {
- /* bring together */
- list[0][i - 1] = list[0][i - 1] + list[0][i];
- j = i + 1;
-
- /* decreace the list */
- while(j < *(indexliste)) {
- list[0][j - 1] = list[0][j];
- list[1][j - 1] = list[1][j];
- j++;
- }
- *(indexliste) = *(indexliste) - 1;
- i--;
- }
- i++;
- }
- }
-}
-
-void dxsmooth(int *indexliste)
-{ /* Implements rules from ISO 15417 Annex E */
- int i, current, last, next, length;
-
- for(i = 0; i < *(indexliste); i++) {
- current = list[1][i];
- length = list[0][i];
- if(i != 0) { last = list[1][i - 1]; } else { last = FALSE; }
- if(i != *(indexliste) - 1) { next = list[1][i + 1]; } else { next = FALSE; }
-
- if(i == 0) { /* first block */
- if((*(indexliste) == 1) && ((length == 2) && (current == ABORC))) { /* Rule 1a */ list[1][i] = LATCHC; }
- if(current == ABORC) {
- if(length >= 4) {/* Rule 1b */ list[1][i] = LATCHC; } else { list[1][i] = AORB; current = AORB; }
- }
- if(current == SHIFTA) { /* Rule 1c */ list[1][i] = LATCHA; }
- if((current == AORB) && (next == SHIFTA)) { /* Rule 1c */ list[1][i] = LATCHA; current = LATCHA; }
- if(current == AORB) { /* Rule 1d */ list[1][i] = LATCHB; }
- } else {
- if((current == ABORC) && (length >= 4)) { /* Rule 3 */ list[1][i] = LATCHC; current = LATCHC; }
- if(current == ABORC) { list[1][i] = AORB; current = AORB; }
- if((current == AORB) && (last == LATCHA)) { list[1][i] = LATCHA; current = LATCHA; }
- if((current == AORB) && (last == LATCHB)) { list[1][i] = LATCHB; current = LATCHB; }
- if((current == AORB) && (next == SHIFTA)) { list[1][i] = LATCHA; current = LATCHA; }
- if((current == AORB) && (next == SHIFTB)) { list[1][i] = LATCHB; current = LATCHB; }
- if(current == AORB) { list[1][i] = LATCHB; current = LATCHB; }
- if((current == SHIFTA) && (length > 1)) { /* Rule 4 */ list[1][i] = LATCHA; current = LATCHA; }
- if((current == SHIFTB) && (length > 1)) { /* Rule 5 */ list[1][i] = LATCHB; current = LATCHB; }
- if((current == SHIFTA) && (last == LATCHA)) { list[1][i] = LATCHA; current = LATCHA; }
- if((current == SHIFTB) && (last == LATCHB)) { list[1][i] = LATCHB; current = LATCHB; }
- if((current == SHIFTA) && (last == LATCHC)) { list[1][i] = LATCHA; current = LATCHA; }
- if((current == SHIFTB) && (last == LATCHC)) { list[1][i] = LATCHB; current = LATCHB; }
- } /* Rule 2 is implimented elsewhere, Rule 6 is implied */
- }
- grwp(indexliste);
-
-}
-
-void c128_set_a(unsigned char source, char dest[], int values[], int *bar_chars)
-{ /* Translate Code 128 Set A characters into barcodes */
- /* This set handles all control characters NULL to US */
-
- if(source > 127) {
- if(source < 160) {
- concat(dest, C128Table[(source - 128) + 64]);
- values[(*bar_chars)] = (source - 128) + 64;
- } else {
- concat(dest, C128Table[(source - 128) - 32]);
- values[(*bar_chars)] = (source - 128) - 32;
- }
- } else {
- if(source < 32) {
- concat(dest, C128Table[source + 64]);
- values[(*bar_chars)] = source + 64;
- } else {
- concat(dest, C128Table[source - 32]);
- values[(*bar_chars)] = source - 32;
- }
- }
- (*bar_chars)++;
-}
-
-void c128_set_b(unsigned char source, char dest[], int values[], int *bar_chars)
-{ /* Translate Code 128 Set B characters into barcodes */
- /* This set handles all characters which are not part of long numbers and not control characters */
-
- if(source > 127) {
- concat(dest, C128Table[source - 32 - 128]);
- values[(*bar_chars)] = source - 32 - 128;
- } else {
- concat(dest, C128Table[source - 32]);
- values[(*bar_chars)] = source - 32;
- }
- (*bar_chars)++;
-}
-
-void c128_set_c(unsigned char source_a, unsigned char source_b, char dest[], int values[], int *bar_chars)
-{ /* Translate Code 128 Set C characters into barcodes */
- /* This set handles numbers in a compressed form */
- int weight;
-
- weight = (10 * ctoi(source_a)) + ctoi(source_b);
- concat(dest, C128Table[weight]);
- values[(*bar_chars)] = weight;
- (*bar_chars)++;
-}
-
-int code_128(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Handle Code 128 and NVE-18 */
- int i, j, k, e_count, values[170] = { 0 }, bar_characters, read, total_sum, nve_check;
- int error_number, indexchaine, indexliste, sourcelen, f_state;
- char set[170] = { ' ' }, fset[170] = { ' ' }, mode, last_set, last_fset, current_set = ' ';
- float glyph_count;
- char dest[1000];
-
- error_number = 0;
- strcpy(dest, "");
-
- sourcelen = length;
-
- j = 0;
- e_count = 0;
- bar_characters = 0;
- nve_check = 0;
- f_state = 0;
-
- if(sourcelen > 160) {
- /* This only blocks rediculously long input - the actual length of the
- resulting barcode depends on the type of data, so this is trapped later */
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- /* Detect extended ASCII characters */
- for(i = 0; i < sourcelen; i++) {
- if(source[i] >= 128)
- fset[i] = 'f';
- }
- fset[i] = '\0';
-
- /* Decide when to latch to extended mode - Annex E note 3 */
- j = 0;
- for(i = 0; i < sourcelen; i++) {
- if(fset[i] == 'f') {
- j++;
- } else {
- j = 0;
- }
-
- if(j >= 5) {
- for(k = i; k > (i - 5); k--) {
- fset[k] = 'F';
- }
- }
-
- if((j >= 3) && (i == (sourcelen - 1))) {
- for(k = i; k > (i - 3); k--) {
- fset[k] = 'F';
- }
- }
- }
-
- /* Decide if it is worth reverting to 646 encodation for a few characters as described in 4.3.4.2 (d) */
- for(i = 1; i < sourcelen; i++) {
- if((fset[i - 1] == 'F') && (fset[i] == ' ')) {
- /* Detected a change from 8859-1 to 646 - count how long for */
- for(j = 0; (fset[i + j] == ' ') && ((i + j) < sourcelen); j++);
- if((j < 5) || ((j < 3) && ((i + j) == (sourcelen - 1)))) {
- /* Uses the same figures recommended by Annex E note 3 */
- /* Change to shifting back rather than latching back */
- for(k = 0; k < j; k++) {
- fset[i + k] = 'n';
- }
- }
- }
- }
-
- /* Decide on mode using same system as PDF417 and rules of ISO 15417 Annex E */
- indexliste = 0;
- indexchaine = 0;
-
- mode = parunmodd(source[indexchaine]);
- if((symbol->symbology == BARCODE_CODE128B) && (mode == ABORC)) {
- mode = AORB;
- }
-
- for(i = 0; i < 170; i++) {
- list[0][i] = 0;
- }
-
- do {
- list[1][indexliste] = mode;
- while ((list[1][indexliste] == mode) && (indexchaine < sourcelen)) {
- list[0][indexliste]++;
- indexchaine++;
- mode = parunmodd(source[indexchaine]);
- if((symbol->symbology == BARCODE_CODE128B) && (mode == ABORC)) {
- mode = AORB;
- }
- }
- indexliste++;
- } while (indexchaine < sourcelen);
-
- dxsmooth(&indexliste);
-
- /* Resolve odd length LATCHC blocks */
- if((list[1][0] == LATCHC) && (list[0][0] & 1)) {
- /* Rule 2 */
- list[0][1]++;
- list[0][0]--;
- if(indexliste == 1) {
- list[0][1] = 1;
- list[1][1] = LATCHB;
- indexliste = 2;
- }
- }
- if(indexliste > 1) {
- for(i = 1; i < indexliste; i++) {
- if((list[1][i] == LATCHC) && (list[0][i] & 1)) {
- /* Rule 3b */
- list[0][i - 1]++;
- list[0][i]--;
- }
- }
- }
-
- /* Put set data into set[] */
-
- read = 0;
- for(i = 0; i < indexliste; i++) {
- for(j = 0; j < list[0][i]; j++) {
- switch(list[1][i]) {
- case SHIFTA: set[read] = 'a'; break;
- case LATCHA: set[read] = 'A'; break;
- case SHIFTB: set[read] = 'b'; break;
- case LATCHB: set[read] = 'B'; break;
- case LATCHC: set[read] = 'C'; break;
- }
- read++;
- }
- }
-
- /* Adjust for strings which start with shift characters - make them latch instead */
- if(set[0] == 'a') {
- i = 0;
- do {
- set[i] = 'A';
- i++;
- } while (set[i] == 'a');
- }
-
- if(set[0] == 'b') {
- i = 0;
- do {
- set[i] = 'B';
- i++;
- } while (set[i] == 'b');
- }
-
- /* Now we can calculate how long the barcode is going to be - and stop it from
- being too long */
- last_set = ' ';
- last_fset = ' ';
- glyph_count = 0.0;
- for(i = 0; i < sourcelen; i++) {
- if((set[i] == 'a') || (set[i] == 'b')) {
- glyph_count = glyph_count + 1.0;
- }
- if((fset[i] == 'f') || (fset[i] == 'n')) {
- glyph_count = glyph_count + 1.0;
- }
- if(((set[i] == 'A') || (set[i] == 'B')) || (set[i] == 'C')) {
- if(set[i] != last_set) {
- last_set = set[i];
- glyph_count = glyph_count + 1.0;
- }
- }
- if(i == 0) {
- if(fset[i] == 'F') {
- last_fset = 'F';
- glyph_count = glyph_count + 2.0;
- }
- } else {
- if((fset[i] == 'F') && (fset[i - 1] != 'F')) {
- last_fset = 'F';
- glyph_count = glyph_count + 2.0;
- }
- if((fset[i] != 'F') && (fset[i - 1] == 'F')) {
- last_fset = ' ';
- glyph_count = glyph_count + 2.0;
- }
- }
-
- if(set[i] == 'C') {
- glyph_count = glyph_count + 0.5;
- } else {
- glyph_count = glyph_count + 1.0;
- }
- }
- if(glyph_count > 80.0) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
-
- /* So now we know what start character to use - we can get on with it! */
- if(symbol->output_options & READER_INIT) {
- /* Reader Initialisation mode */
- switch(set[0]) {
- case 'A': /* Start A */
- concat(dest, C128Table[103]);
- values[0] = 103;
- current_set = 'A';
- concat(dest, C128Table[96]); /* FNC3 */
- values[1] = 96;
- bar_characters++;
- break;
- case 'B': /* Start B */
- concat(dest, C128Table[104]);
- values[0] = 104;
- current_set = 'B';
- concat(dest, C128Table[96]); /* FNC3 */
- values[1] = 96;
- bar_characters++;
- break;
- case 'C': /* Start C */
- concat(dest, C128Table[104]); /* Start B */
- values[0] = 105;
- concat(dest, C128Table[96]); /* FNC3 */
- values[1] = 96;
- concat(dest, C128Table[99]); /* Code C */
- values[2] = 99;
- bar_characters += 2;
- current_set = 'C';
- break;
- }
- } else {
- /* Normal mode */
- switch(set[0]) {
- case 'A': /* Start A */
- concat(dest, C128Table[103]);
- values[0] = 103;
- current_set = 'A';
- break;
- case 'B': /* Start B */
- concat(dest, C128Table[104]);
- values[0] = 104;
- current_set = 'B';
- break;
- case 'C': /* Start C */
- concat(dest, C128Table[105]);
- values[0] = 105;
- current_set = 'C';
- break;
- }
- }
- bar_characters++;
- last_set = set[0];
-
- if(fset[0] == 'F') {
- switch(current_set) {
- case 'A':
- concat(dest, C128Table[101]);
- concat(dest, C128Table[101]);
- values[bar_characters] = 101;
- values[bar_characters + 1] = 101;
- break;
- case 'B':
- concat(dest, C128Table[100]);
- concat(dest, C128Table[100]);
- values[bar_characters] = 100;
- values[bar_characters + 1] = 100;
- break;
- }
- bar_characters += 2;
- f_state = 1;
- }
-
- /* Encode the data */
- read = 0;
- do {
-
- if((read != 0) && (set[read] != current_set))
- { /* Latch different code set */
- switch(set[read])
- {
- case 'A': concat(dest, C128Table[101]);
- values[bar_characters] = 101;
- bar_characters++;
- current_set = 'A';
- break;
- case 'B': concat(dest, C128Table[100]);
- values[bar_characters] = 100;
- bar_characters++;
- current_set = 'B';
- break;
- case 'C': concat(dest, C128Table[99]);
- values[bar_characters] = 99;
- bar_characters++;
- current_set = 'C';
- break;
- }
- }
-
- if(read != 0) {
- if((fset[read] == 'F') && (f_state == 0)) {
- /* Latch beginning of extended mode */
- switch(current_set) {
- case 'A':
- concat(dest, C128Table[101]);
- concat(dest, C128Table[101]);
- values[bar_characters] = 101;
- values[bar_characters + 1] = 101;
- break;
- case 'B':
- concat(dest, C128Table[100]);
- concat(dest, C128Table[100]);
- values[bar_characters] = 100;
- values[bar_characters + 1] = 100;
- break;
- }
- bar_characters += 2;
- f_state = 1;
- }
- if((fset[read] == ' ') && (f_state == 1)) {
- /* Latch end of extended mode */
- switch(current_set) {
- case 'A':
- concat(dest, C128Table[101]);
- concat(dest, C128Table[101]);
- values[bar_characters] = 101;
- values[bar_characters + 1] = 101;
- break;
- case 'B':
- concat(dest, C128Table[100]);
- concat(dest, C128Table[100]);
- values[bar_characters] = 100;
- values[bar_characters + 1] = 100;
- break;
- }
- bar_characters += 2;
- f_state = 0;
- }
- }
-
- if((fset[read] == 'f') || (fset[read] == 'n')) {
- /* Shift to or from extended mode */
- switch(current_set) {
- case 'A':
- concat(dest, C128Table[101]); /* FNC 4 */
- values[bar_characters] = 101;
- break;
- case 'B':
- concat(dest, C128Table[100]); /* FNC 4 */
- values[bar_characters] = 100;
- break;
- }
- bar_characters++;
- }
-
- if((set[read] == 'a') || (set[read] == 'b')) {
- /* Insert shift character */
- concat(dest, C128Table[98]);
- values[bar_characters] = 98;
- bar_characters++;
- }
-
- switch(set[read])
- { /* Encode data characters */
- case 'a':
- case 'A': c128_set_a(source[read], dest, values, &bar_characters);
- read++;
- break;
- case 'b':
- case 'B': c128_set_b(source[read], dest, values, &bar_characters);
- read++;
- break;
- case 'C': c128_set_c(source[read], source[read + 1], dest, values, &bar_characters);
- read += 2;
- break;
- }
-
- } while (read < sourcelen);
-
- /* check digit calculation */
- total_sum = 0;
- /*for(i = 0; i < bar_characters; i++) {
- printf("%d\n", values[i]);
- }*/
-
- for(i = 0; i < bar_characters; i++)
- {
- if(i > 0)
- {
- values[i] *= i;
- }
- total_sum += values[i];
- }
- concat(dest, C128Table[total_sum%103]);
-
- /* Stop character */
- concat(dest, C128Table[106]);
- expand(symbol, dest);
- return error_number;
-}
-
-int ean_128(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Handle EAN-128 (Now known as GS1-128) */
- int i, j, e_count, values[170], bar_characters, read, total_sum;
- int error_number, indexchaine, indexliste;
- char set[170], mode, last_set;
- float glyph_count;
- char dest[1000];
- int separator_row, linkage_flag, c_count;
-#ifndef _MSC_VER
- char reduced[length + 1];
-#else
- char* reduced = (char*)_alloca(length + 1);
-#endif
- error_number = 0;
- strcpy(dest, "");
- linkage_flag = 0;
-
- j = 0;
- e_count = 0;
- bar_characters = 0;
- separator_row = 0;
-
- memset(values, 0, sizeof(values));
- memset(set, ' ', sizeof(set));
-
- if(length > 160) {
- /* This only blocks rediculously long input - the actual length of the
- resulting barcode depends on the type of data, so this is trapped later */
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- for(i = 0; i < length; i++) {
- if(source[i] == '\0') {
- /* Null characters not allowed! */
- strcpy(symbol->errtxt, "NULL character in input data");
- return ERROR_INVALID_DATA1;
- }
- }
-
- /* if part of a composite symbol make room for the separator pattern */
- if(symbol->symbology == BARCODE_EAN128_CC) {
- separator_row = symbol->rows;
- symbol->row_height[symbol->rows] = 1;
- symbol->rows += 1;
- }
-
- if(symbol->input_mode != GS1_MODE) {
- /* GS1 data has not been checked yet */
- error_number = gs1_verify(symbol, source, length, reduced);
- if(error_number != 0) { return error_number; }
- }
-
- /* Decide on mode using same system as PDF417 and rules of ISO 15417 Annex E */
- indexliste = 0;
- indexchaine = 0;
-
- mode = parunmodd(reduced[indexchaine]);
- if(reduced[indexchaine] == '[') {
- mode = ABORC;
- }
-
- for(i = 0; i < 170; i++) {
- list[0][i] = 0;
- }
-
- do {
- list[1][indexliste] = mode;
- while ((list[1][indexliste] == mode) && (indexchaine < strlen(reduced))) {
- list[0][indexliste]++;
- indexchaine++;
- mode = parunmodd(reduced[indexchaine]);
- if(reduced[indexchaine] == '[') { mode = ABORC; }
- }
- indexliste++;
- } while (indexchaine < strlen(reduced));
-
- dxsmooth(&indexliste);
-
- /* Put set data into set[] */
- read = 0;
- for(i = 0; i < indexliste; i++) {
- for(j = 0; j < list[0][i]; j++) {
- switch(list[1][i]) {
- case SHIFTA: set[read] = 'a'; break;
- case LATCHA: set[read] = 'A'; break;
- case SHIFTB: set[read] = 'b'; break;
- case LATCHB: set[read] = 'B'; break;
- case LATCHC: set[read] = 'C'; break;
- }
- read++;
- }
- }
-
- /* Watch out for odd-length Mode C blocks */
- c_count = 0;
- for(i = 0; i < read; i++) {
- if(set[i] == 'C') {
- if(reduced[i] == '[') {
- if(c_count & 1) {
- if((i - c_count) != 0) {
- set[i - c_count] = 'B';
- } else {
- set[i - 1] = 'B';
- }
- }
- c_count = 0;
- } else {
- c_count++;
- }
- } else {
- if(c_count & 1) {
- if((i - c_count) != 0) {
- set[i - c_count] = 'B';
- } else {
- set[i - 1] = 'B';
- }
- }
- c_count = 0;
- }
- }
- if(c_count & 1) {
- if((i - c_count) != 0) {
- set[i - c_count] = 'B';
- } else {
- set[i - 1] = 'B';
- }
- }
- for(i = 1; i < read - 1; i++) {
- if((set[i] == 'C') && ((set[i - 1] == 'B') && (set[i + 1] == 'B'))) {
- set[i] = 'B';
- }
- }
-
- /* for(i = 0; i < read; i++) {
- printf("char %c mode %c\n", reduced[i], set[i]);
- } */
-
- /* Now we can calculate how long the barcode is going to be - and stop it from
- being too long */
- last_set = ' ';
- glyph_count = 0.0;
- for(i = 0; i < strlen(reduced); i++) {
- if((set[i] == 'a') || (set[i] == 'b')) {
- glyph_count = glyph_count + 1.0;
- }
- if(((set[i] == 'A') || (set[i] == 'B')) || (set[i] == 'C')) {
- if(set[i] != last_set) {
- last_set = set[i];
- glyph_count = glyph_count + 1.0;
- }
- }
-
- if((set[i] == 'C') && (reduced[i] != '[')) {
- glyph_count = glyph_count + 0.5;
- } else {
- glyph_count = glyph_count + 1.0;
- }
- }
- if(glyph_count > 80.0) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- /* So now we know what start character to use - we can get on with it! */
- switch(set[0])
- {
- case 'A': /* Start A */
- concat(dest, C128Table[103]);
- values[0] = 103;
- break;
- case 'B': /* Start B */
- concat(dest, C128Table[104]);
- values[0] = 104;
- break;
- case 'C': /* Start C */
- concat(dest, C128Table[105]);
- values[0] = 105;
- break;
- }
- bar_characters++;
-
- concat(dest, C128Table[102]);
- values[1] = 102;
- bar_characters++;
-
- /* Encode the data */
- read = 0;
- do {
-
- if((read != 0) && (set[read] != set[read - 1]))
- { /* Latch different code set */
- switch(set[read])
- {
- case 'A': concat(dest, C128Table[101]);
- values[bar_characters] = 101;
- bar_characters++;
- break;
- case 'B': concat(dest, C128Table[100]);
- values[bar_characters] = 100;
- bar_characters++;
- break;
- case 'C': concat(dest, C128Table[99]);
- values[bar_characters] = 99;
- bar_characters++;
- break;
- }
- }
-
- if((set[read] == 'a') || (set[read] == 'b')) {
- /* Insert shift character */
- concat(dest, C128Table[98]);
- values[bar_characters] = 98;
- bar_characters++;
- }
-
- if(reduced[read] != '[') {
- switch(set[read])
- { /* Encode data characters */
- case 'A':
- case 'a':
- c128_set_a(reduced[read], dest, values, &bar_characters);
- read++;
- break;
- case 'B':
- case 'b':
- c128_set_b(reduced[read], dest, values, &bar_characters);
- read++;
- break;
- case 'C':
- c128_set_c(reduced[read], reduced[read + 1], dest, values, &bar_characters);
- read += 2;
- break;
- }
- } else {
- concat(dest, C128Table[102]);
- values[bar_characters] = 102;
- bar_characters++;
- read++;
- }
- } while (read < strlen(reduced));
-
- /* "...note that the linkage flag is an extra code set character between
- the last data character and the Symbol Check Character" (GS1 Specification) */
-
- /* Linkage flags in GS1-128 are determined by ISO/IEC 24723 section 7.4 */
-
- switch(symbol->option_1) {
- case 1:
- case 2:
- /* CC-A or CC-B 2D component */
- switch(set[strlen(reduced) - 1]) {
- case 'A': linkage_flag = 100; break;
- case 'B': linkage_flag = 99; break;
- case 'C': linkage_flag = 101; break;
- }
- break;
- case 3:
- /* CC-C 2D component */
- switch(set[strlen(reduced) - 1]) {
- case 'A': linkage_flag = 99; break;
- case 'B': linkage_flag = 101; break;
- case 'C': linkage_flag = 100; break;
- }
- break;
- }
-
- if(linkage_flag != 0) {
- concat(dest, C128Table[linkage_flag]);
- values[bar_characters] = linkage_flag;
- bar_characters++;
- }
-
- /*for(i = 0; i < bar_characters; i++) {
- printf("[%d] ", values[i]);
- }
- printf("\n");*/
-
- /* check digit calculation */
- total_sum = 0;
- for(i = 0; i < bar_characters; i++)
- {
- if(i > 0)
- {
- values[i] *= i;
-
- }
- total_sum += values[i];
- }
- concat(dest, C128Table[total_sum%103]);
- values[bar_characters] = total_sum % 103;
- bar_characters++;
-
- /* Stop character */
- concat(dest, C128Table[106]);
- values[bar_characters] = 106;
- bar_characters++;
- expand(symbol, dest);
-
- /* Add the separator pattern for composite symbols */
- if(symbol->symbology == BARCODE_EAN128_CC) {
- for(i = 0; i < symbol->width; i++) {
- if(!(module_is_set(symbol, separator_row + 1, i))) {
- set_module(symbol, separator_row, i);
- }
- }
- }
-
- for(i = 0; i < length; i++) {
- if((source[i] != '[') && (source[i] != ']')) {
- symbol->text[i] = source[i];
- }
- if(source[i] == '[') {
- symbol->text[i] = '(';
- }
- if(source[i] == ']') {
- symbol->text[i] = ')';
- }
- }
-
- return error_number;
-}
-
-int nve_18(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- /* Add check digit if encoding an NVE18 symbol */
- int error_number, zeroes, i, nve_check, total_sum, sourcelen;
- unsigned char ean128_equiv[25];
-
- memset(ean128_equiv, 0, 25);
- sourcelen = length;
-
- if(sourcelen > 17) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
- zeroes = 17 - sourcelen;
- strcpy((char *)ean128_equiv, "[00]");
- memset(ean128_equiv + 4, '0', zeroes);
- strcpy((char*)ean128_equiv + 4 + zeroes, (char*)source);
-
- total_sum = 0;
- for(i = sourcelen - 1; i >= 0; i--)
- {
- total_sum += ctoi(source[i]);
-
- if(!(i & 1)) {
- total_sum += 2 * ctoi(source[i]);
- }
- }
- nve_check = 10 - total_sum % 10;
- if(nve_check == 10) { nve_check = 0; }
- ean128_equiv[21] = itoc(nve_check);
- ean128_equiv[22] = '\0';
-
- error_number = ean_128(symbol, ean128_equiv, ustrlen(ean128_equiv));
-
- return error_number;
-}
-
-int ean_14(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- /* EAN-14 - A version of EAN-128 */
- int i, count, check_digit;
- int error_number, zeroes;
- unsigned char ean128_equiv[20];
-
- if(length > 13) {
- strcpy(symbol->errtxt, "Input wrong length");
- return ERROR_TOO_LONG;
- }
-
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid character in data");
- return error_number;
- }
-
- zeroes = 13 - length;
- strcpy((char*)ean128_equiv, "[01]");
- memset(ean128_equiv + 4, '0', zeroes);
- ustrcpy(ean128_equiv + 4 + zeroes, source);
-
- count = 0;
- for (i = length - 1; i >= 0; i--) {
- count += ctoi(source[i]);
-
- if (!(i & 1)) {
- count += 2 * ctoi(source[i]);
- }
- }
- check_digit = 10 - (count % 10);
- if (check_digit == 10) { check_digit = 0; }
- ean128_equiv[17] = itoc(check_digit);
- ean128_equiv[18] = '\0';
-
- error_number = ean_128(symbol, ean128_equiv, ustrlen(ean128_equiv));
-
- return error_number;
-}
diff --git a/3rdparty/zint-2.4.4/backend/code16k.c b/3rdparty/zint-2.4.4/backend/code16k.c
deleted file mode 100644
index 638d786..0000000
--- a/3rdparty/zint-2.4.4/backend/code16k.c
+++ /dev/null
@@ -1,622 +0,0 @@
-/* code16k.c - Handles Code 16k stacked symbology */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-/* Updated to comply with BS EN 12323:2005 */
-
-/* up to 77 characters or 154 numbers */
-
-#include
-#include
-#include
-#include "common.h"
-
-#define TRUE 1
-#define FALSE 0
-#define SHIFTA 90
-#define LATCHA 91
-#define SHIFTB 92
-#define LATCHB 93
-#define SHIFTC 94
-#define LATCHC 95
-#define AORB 96
-#define ABORC 97
-#define CANDB 98
-#define CANDBB 99
-
-static int list[2][170];
-
-/* EN 12323 Table 1 - "Code 16K" character encodations */
-static char *C16KTable[107] = {"212222", "222122", "222221", "121223", "121322", "131222", "122213",
- "122312", "132212", "221213", "221312", "231212", "112232", "122132", "122231", "113222",
- "123122", "123221", "223211", "221132", "221231", "213212", "223112", "312131", "311222",
- "321122", "321221", "312212", "322112", "322211", "212123", "212321", "232121", "111323",
- "131123", "131321", "112313", "132113", "132311", "211313", "231113", "231311", "112133",
- "112331", "132131", "113123", "113321", "133121", "313121", "211331", "231131", "213113",
- "213311", "213131", "311123", "311321", "331121", "312113", "312311", "332111", "314111",
- "221411", "431111", "111224", "111422", "121124", "121421", "141122", "141221", "112214",
- "112412", "122114", "122411", "142112", "142211", "241211", "221114", "413111", "241112",
- "134111", "111242", "121142", "121241", "114212", "124112", "124211", "411212", "421112",
- "421211", "212141", "214121", "412121", "111143", "111341", "131141", "114113", "114311",
- "411113", "411311", "113141", "114131", "311141", "411131", "211412", "211214", "211232",
- "211133"};
-
-/* EN 12323 Table 3 and Table 4 - Start patterns and stop patterns */
-static char *C16KStartStop[8] = {"3211", "2221", "2122", "1411", "1132", "1231", "1114", "3112"};
-
-/* EN 12323 Table 5 - Start and stop values defining row numbers */
-static int C16KStartValues[16] = {0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7};
-static int C16KStopValues[16] = {0, 1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, 0, 1, 2, 3};
-
-void grwp16(int *indexliste)
-{
- int i, j;
-
- /* bring together same type blocks */
- if(*(indexliste) > 1) {
- i = 1;
- while(i < *(indexliste)) {
- if(list[1][i - 1] == list[1][i]) {
- /* bring together */
- list[0][i - 1] = list[0][i - 1] + list[0][i];
- j = i + 1;
-
- /* decreace the list */
- while(j < *(indexliste)) {
- list[0][j - 1] = list[0][j];
- list[1][j - 1] = list[1][j];
- j++;
- }
- *(indexliste) = *(indexliste) - 1;
- i--;
- }
- i++;
- }
- }
-}
-
-void dxsmooth16(int *indexliste)
-{ /* Implements rules from ISO 15417 Annex E */
- int i, current, last, next, length;
-
- for(i = 0; i < *(indexliste); i++) {
- current = list[1][i];
- length = list[0][i];
- if(i != 0) { last = list[1][i - 1]; } else { last = FALSE; }
- if(i != *(indexliste) - 1) { next = list[1][i + 1]; } else { next = FALSE; }
-
- if(i == 0) { /* first block */
- if((*(indexliste) == 1) && ((length == 2) && (current == ABORC))) { /* Rule 1a */ list[1][i] = LATCHC; }
- if(current == ABORC) {
- if(length >= 4) {/* Rule 1b */ list[1][i] = LATCHC; } else { list[1][i] = AORB; current = AORB; }
- }
- if(current == SHIFTA) { /* Rule 1c */ list[1][i] = LATCHA; }
- if((current == AORB) && (next == SHIFTA)) { /* Rule 1c */ list[1][i] = LATCHA; current = LATCHA; }
- if(current == AORB) { /* Rule 1d */ list[1][i] = LATCHB; }
- } else {
- if((current == ABORC) && (length >= 4)) { /* Rule 3 */ list[1][i] = LATCHC; current = LATCHC; }
- if(current == ABORC) { list[1][i] = AORB; current = AORB; }
- if((current == AORB) && (last == LATCHA)) { list[1][i] = LATCHA; current = LATCHA; }
- if((current == AORB) && (last == LATCHB)) { list[1][i] = LATCHB; current = LATCHB; }
- if((current == AORB) && (next == SHIFTA)) { list[1][i] = LATCHA; current = LATCHA; }
- if((current == AORB) && (next == SHIFTB)) { list[1][i] = LATCHB; current = LATCHB; }
- if(current == AORB) { list[1][i] = LATCHB; current = LATCHB; }
- if((current == SHIFTA) && (length > 1)) { /* Rule 4 */ list[1][i] = LATCHA; current = LATCHA; }
- if((current == SHIFTB) && (length > 1)) { /* Rule 5 */ list[1][i] = LATCHB; current = LATCHB; }
- if((current == SHIFTA) && (last == LATCHA)) { list[1][i] = LATCHA; current = LATCHA; }
- if((current == SHIFTB) && (last == LATCHB)) { list[1][i] = LATCHB; current = LATCHB; }
- if((current == SHIFTA) && (last == LATCHC)) { list[1][i] = LATCHA; current = LATCHA; }
- if((current == SHIFTB) && (last == LATCHC)) { list[1][i] = LATCHB; current = LATCHB; }
- } /* Rule 2 is implimented elsewhere, Rule 6 is implied */
- }
- grwp16(indexliste);
-
-}
-
-void c16k_set_a(unsigned char source, unsigned int values[], unsigned int *bar_chars)
-{
- if(source > 127) {
- if(source < 160) {
- values[(*bar_chars)] = source + 64 - 128;
- } else {
- values[(*bar_chars)] = source - 32 - 128;
- }
- } else {
- if(source < 32) {
- values[(*bar_chars)] = source + 64;
- } else {
- values[(*bar_chars)] = source - 32;
- }
- }
- (*bar_chars)++;
-}
-
-void c16k_set_b(unsigned char source, unsigned int values[], unsigned int *bar_chars)
-{
- if(source > 127) {
- values[(*bar_chars)] = source - 32 - 128;
- } else {
- values[(*bar_chars)] = source - 32;
- }
- (*bar_chars)++;
-}
-
-void c16k_set_c(unsigned char source_a, unsigned char source_b, unsigned int values[], unsigned int *bar_chars)
-{
- int weight;
-
- weight = (10 * ctoi(source_a)) + ctoi(source_b);
- values[(*bar_chars)] = weight;
- (*bar_chars)++;
-}
-
-int code16k(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- char width_pattern[100];
- int current_row, rows_needed, flip_flop, looper, first_check, second_check;
- int indexliste, indexchaine, pads_needed, f_state;
- char set[160] = { ' ' }, fset[160] = { ' ' }, mode, last_set, last_fset, current_set;
- unsigned int i, j, k, m, e_count, read, mx_reader, writer;
- unsigned int values[160] = { 0 };
- unsigned int bar_characters;
- float glyph_count;
- int errornum, first_sum, second_sum;
- int input_length;
- int gs1, c_count;
-
- errornum = 0;
- strcpy(width_pattern, "");
- input_length = length;
-
- if(symbol->input_mode == GS1_MODE) { gs1 = 1; } else { gs1 = 0; }
-
- if(input_length > 157) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- e_count = 0;
- bar_characters = 0;
-
- /* Detect extended ASCII characters */
- for(i = 0; i < input_length; i++) {
- if(source[i] >=128) {
- fset[i] = 'f';
- }
- }
- fset[i] = '\0';
-
- /* Decide when to latch to extended mode */
- for(i = 0; i < input_length; i++) {
- j = 0;
- if(fset[i] == 'f') {
- do {
- j++;
- } while(fset[i + j] == 'f');
- if((j >= 5) || ((j >= 3) && ((i + j) == (input_length - 1)))) {
- for(k = 0; k <= j; k++) {
- fset[i + k] = 'F';
- }
- }
- }
- }
-
- /* Decide if it is worth reverting to 646 encodation for a few characters */
- if(input_length > 1) {
- for(i = 1; i < input_length; i++) {
- if((fset[i - 1] == 'F') && (fset[i] == ' ')) {
- /* Detected a change from 8859-1 to 646 - count how long for */
- for(j = 0; (fset[i + j] == ' ') && ((i + j) < input_length); j++);
- if((j < 5) || ((j < 3) && ((i + j) == (input_length - 1)))) {
- /* Change to shifting back rather than latching back */
- for(k = 0; k < j; k++) {
- fset[i + k] = 'n';
- }
- }
- }
- }
- }
- /* Detect mode A, B and C characters */
- indexliste = 0;
- indexchaine = 0;
-
- mode = parunmodd(source[indexchaine]);
- if((gs1) && (source[indexchaine] == '[')) { mode = ABORC; } /* FNC1 */
-
- for(i = 0; i < 160; i++) {
- list[0][i] = 0;
- }
-
- do {
- list[1][indexliste] = mode;
- while ((list[1][indexliste] == mode) && (indexchaine < input_length)) {
- list[0][indexliste]++;
- indexchaine++;
- mode = parunmodd(source[indexchaine]);
- if((gs1) && (source[indexchaine] == '[')) { mode = ABORC; } /* FNC1 */
- }
- indexliste++;
- } while (indexchaine < input_length);
-
- dxsmooth16(&indexliste);
-
- /* Put set data into set[] */
- read = 0;
- for(i = 0; i < indexliste; i++) {
- for(j = 0; j < list[0][i]; j++) {
- switch(list[1][i]) {
- case SHIFTA: set[read] = 'a'; break;
- case LATCHA: set[read] = 'A'; break;
- case SHIFTB: set[read] = 'b'; break;
- case LATCHB: set[read] = 'B'; break;
- case LATCHC: set[read] = 'C'; break;
- }
- read++;
- }
- }
-
- /* Adjust for strings which start with shift characters - make them latch instead */
- if(set[0] == 'a') {
- i = 0;
- do {
- set[i] = 'A';
- i++;
- } while (set[i] == 'a');
- }
-
- if(set[0] == 'b') {
- i = 0;
- do {
- set[i] = 'B';
- i++;
- } while (set[i] == 'b');
- }
-
- /* Watch out for odd-length Mode C blocks */
- c_count = 0;
- for(i = 0; i < read; i++) {
- if(set[i] == 'C') {
- if(source[i] == '[') {
- if(c_count & 1) {
- if((i - c_count) != 0) {
- set[i - c_count] = 'B';
- } else {
- set[i - 1] = 'B';
- }
- }
- c_count = 0;
- } else {
- c_count++;
- }
- } else {
- if(c_count & 1) {
- if((i - c_count) != 0) {
- set[i - c_count] = 'B';
- } else {
- set[i - 1] = 'B';
- }
- }
- c_count = 0;
- }
- }
- if(c_count & 1) {
- if((i - c_count) != 0) {
- set[i - c_count] = 'B';
- } else {
- set[i - 1] = 'B';
- }
- }
- for(i = 1; i < read - 1; i++) {
- if((set[i] == 'C') && ((set[i - 1] == 'B') && (set[i + 1] == 'B'))) {
- set[i] = 'B';
- }
- }
-
- /* Make sure the data will fit in the symbol */
- last_set = ' ';
- last_fset = ' ';
- glyph_count = 0.0;
- for(i = 0; i < input_length; i++) {
- if((set[i] == 'a') || (set[i] == 'b')) {
- glyph_count = glyph_count + 1.0;
- }
- if((fset[i] == 'f') || (fset[i] == 'n')) {
- glyph_count = glyph_count + 1.0;
- }
- if(((set[i] == 'A') || (set[i] == 'B')) || (set[i] == 'C')) {
- if(set[i] != last_set) {
- last_set = set[i];
- glyph_count = glyph_count + 1.0;
- }
- }
- if(i == 0) {
- if((set[i] == 'B') && (set[1] == 'C')) {
- glyph_count = glyph_count - 1.0;
- }
- if((set[i] == 'B') && (set[1] == 'B')) {
- if(set[2] == 'C') {
- glyph_count = glyph_count - 1.0;
- }
- }
- if(fset[i] == 'F') {
- last_fset = 'F';
- glyph_count = glyph_count + 2.0;
- }
- } else {
- if((fset[i] == 'F') && (fset[i - 1] != 'F')) {
- last_fset = 'F';
- glyph_count = glyph_count + 2.0;
- }
- if((fset[i] != 'F') && (fset[i - 1] == 'F')) {
- last_fset = ' ';
- glyph_count = glyph_count + 2.0;
- }
- }
-
- if((set[i] == 'C') && (!((gs1) && (source[i] == '[')))) {
- glyph_count = glyph_count + 0.5;
- } else {
- glyph_count = glyph_count + 1.0;
- }
- }
-
- if((gs1) && (set[0] != 'A')) {
- /* FNC1 can be integrated with mode character */
- glyph_count--;
- }
-
- if(glyph_count > 77.0) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- /* Calculate how tall the symbol will be */
- glyph_count = glyph_count + 2.0;
- i = glyph_count;
- rows_needed = (i/5);
- if(i%5 > 0) { rows_needed++; }
-
- if(rows_needed == 1) {
- rows_needed = 2;
- }
-
- /* start with the mode character - Table 2 */
- m = 0;
- switch(set[0]) {
- case 'A': m = 0; break;
- case 'B': m = 1; break;
- case 'C': m = 2; break;
- }
-
- if(symbol->output_options & READER_INIT) {
- if(m == 2) { m = 5; }
- if(gs1) {
- strcpy(symbol->errtxt, "Cannot use both GS1 mode and Reader Initialisation");
- return ERROR_INVALID_OPTION;
- } else {
- if((set[0] == 'B') && (set[1] == 'C')) { m = 6; }
- }
- values[bar_characters] = (7 * (rows_needed - 2)) + m; /* see 4.3.4.2 */
- values[bar_characters + 1] = 96; /* FNC3 */
- bar_characters += 2;
- } else {
- if(gs1) {
- /* Integrate FNC1 */
- switch(set[0]) {
- case 'B': m = 3; break;
- case 'C': m = 4; break;
- }
- } else {
- if((set[0] == 'B') && (set[1] == 'C')) { m = 5; }
- if(((set[0] == 'B') && (set[1] == 'B')) && (set[2] == 'C')) { m = 6; }
- }
- values[bar_characters] = (7 * (rows_needed - 2)) + m; /* see 4.3.4.2 */
- bar_characters++;
- }
-
- current_set = set[0];
- f_state = 0; /* f_state remembers if we are in Extended ASCII mode (value 1) or
- in ISO/IEC 646 mode (value 0) */
- if(fset[0] == 'F') {
- switch(current_set) {
- case 'A':
- values[bar_characters] = 101;
- values[bar_characters + 1] = 101;
- break;
- case 'B':
- values[bar_characters] = 100;
- values[bar_characters + 1] = 100;
- break;
- }
- bar_characters += 2;
- f_state = 1;
- }
-
- read = 0;
-
- /* Encode the data */
- do {
-
- if((read != 0) && (set[read] != set[read - 1]))
- { /* Latch different code set */
- switch(set[read])
- {
- case 'A':
- values[bar_characters] = 101;
- bar_characters++;
- current_set = 'A';
- break;
- case 'B':
- values[bar_characters] = 100;
- bar_characters++;
- current_set = 'B';
- break;
- case 'C':
- if(!((read == 1) && (set[0] == 'B'))) { /* Not Mode C/Shift B */
- if(!((read == 2) && ((set[0] == 'B') && (set[1] == 'B')))) {
- /* Not Mode C/Double Shift B */
- values[bar_characters] = 99;
- bar_characters++;
- }
- }
- current_set = 'C';
- break;
- }
- }
- /* printf("tp8\n"); */
- if(read != 0) {
- if((fset[read] == 'F') && (f_state == 0)) {
- /* Latch beginning of extended mode */
- switch(current_set) {
- case 'A':
- values[bar_characters] = 101;
- values[bar_characters + 1] = 101;
- break;
- case 'B':
- values[bar_characters] = 100;
- values[bar_characters + 1] = 100;
- break;
- }
- bar_characters += 2;
- f_state = 1;
- }
- if((fset[read] == ' ') && (f_state == 1)) {
- /* Latch end of extended mode */
- switch(current_set) {
- case 'A':
- values[bar_characters] = 101;
- values[bar_characters + 1] = 101;
- break;
- case 'B':
- values[bar_characters] = 100;
- values[bar_characters + 1] = 100;
- break;
- }
- bar_characters += 2;
- f_state = 0;
- }
- }
-
- if((fset[i] == 'f') || (fset[i] == 'n')) {
- /* Shift extended mode */
- switch(current_set) {
- case 'A':
- values[bar_characters] = 101; /* FNC 4 */
- break;
- case 'B':
- values[bar_characters] = 100; /* FNC 4 */
- break;
- }
- bar_characters++;
- }
-
- if((set[i] == 'a') || (set[i] == 'b')) {
- /* Insert shift character */
- values[bar_characters] = 98;
- bar_characters++;
- }
-
- if(!((gs1) && (source[read] == '['))) {
- switch(set[read])
- { /* Encode data characters */
- case 'A':
- case 'a':
- c16k_set_a(source[read], values, &bar_characters);
- read++;
- break;
- case 'B':
- case 'b':
- c16k_set_b(source[read], values, &bar_characters);
- read++;
- break;
- case 'C': c16k_set_c(source[read], source[read + 1], values, &bar_characters);
- read += 2;
- break;
- }
- } else {
- values[bar_characters] = 102;
- bar_characters++;
- read++;
- }
- /* printf("tp9 read=%d surrent set=%c\n", read, set[read]); */
- } while (read < ustrlen(source));
-
- pads_needed = 5 - ((bar_characters + 2) % 5);
- if(pads_needed == 5) {
- pads_needed = 0;
- }
- if((bar_characters + pads_needed) < 8) {
- pads_needed += 8 - (bar_characters + pads_needed);
- }
- for(i = 0; i < pads_needed; i++) {
- values[bar_characters] = 106;
- bar_characters++;
- }
-
- /* Calculate check digits */
- first_sum = 0;
- second_sum = 0;
- for(i = 0; i < bar_characters; i++)
- {
- first_sum += (i+2) * values[i];
- second_sum += (i+1) * values[i];
- }
- first_check = first_sum % 107;
- second_sum += first_check * (bar_characters + 1);
- second_check = second_sum % 107;
- values[bar_characters] = first_check;
- values[bar_characters + 1] = second_check;
- bar_characters += 2;
-
- for(current_row = 0; current_row < rows_needed; current_row++) {
-
- strcpy(width_pattern, "");
- concat(width_pattern, C16KStartStop[C16KStartValues[current_row]]);
- concat(width_pattern, "1");
- for(i = 0; i < 5; i++) {
- concat(width_pattern, C16KTable[values[(current_row * 5) + i]]);
- /* printf("[%d] ", values[(current_row * 5) + i]); */
-
- }
- concat(width_pattern, C16KStartStop[C16KStopValues[current_row]]);
- /* printf("\n"); */
-
- /* Write the information into the symbol */
- writer = 0;
- flip_flop = 1;
- for (mx_reader = 0; mx_reader < strlen(width_pattern); mx_reader++) {
- for(looper = 0; looper < ctoi(width_pattern[mx_reader]); looper++) {
- if(flip_flop == 1) {
- set_module(symbol, current_row, writer);
- writer++; }
- else {
- writer++; }
- }
- if(flip_flop == 0) { flip_flop = 1; } else { flip_flop = 0; }
- }
- symbol->row_height[current_row] = 10;
- }
-
- symbol->rows = rows_needed;
- symbol->width = 70;
- return errornum;
-}
-
-
diff --git a/3rdparty/zint-2.4.4/backend/code49.c b/3rdparty/zint-2.4.4/backend/code49.c
deleted file mode 100644
index c90fe10..0000000
--- a/3rdparty/zint-2.4.4/backend/code49.c
+++ /dev/null
@@ -1,315 +0,0 @@
-/* code49.c - Handles Code 49 */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include
-#include
-#include
-#include "common.h"
-#include "code49.h"
-
-#define INSET "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%!&*"
-/* "!" represents Shift 1 and "&" represents Shift 2, "*" represents FNC1 */
-
-int code_49(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- int i, j, rows, M, x_count, y_count, z_count, posn_val, local_value, h;
- char intermediate[170];
- int codewords[170], codeword_count;
- int c_grid[8][8]; /* Refers to table 3 */
- int w_grid[8][4]; /* Refets to table 2 */
- int pad_count = 0;
- char pattern[40];
- int gs1;
-
- if(length > 81) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- if(symbol->input_mode == GS1_MODE) { gs1 = 1; } else { gs1 = 0; }
-
- strcpy(intermediate, gs1 ? "*" : ""); /* FNC1 */
- for(i = 0; i < length; i++) {
- if(source[i] > 127) {
- strcpy(symbol->errtxt, "Invalid characters in input data");
- return ERROR_INVALID_DATA1;
- }
- if(gs1 && (source[i] == '['))
- concat(intermediate, "*"); /* FNC1 */
- else
- concat(intermediate, c49_table7[source[i]]);
- }
-
- codeword_count = 0;
- i = 0;
- h = strlen(intermediate);
- do {
- if((intermediate[i] >= '0') && (intermediate[i] <= '9')) {
- /* Numeric data */
- for(j = 0; (intermediate[i + j] >= '0') && (intermediate[i + j] <= '9'); j++);
- if(j >= 5) {
- /* Use Numeric Encodation Method */
- int block_count, c;
- int block_remain;
- int block_value;
-
- codewords[codeword_count] = 48; /* Numeric Shift */
- codeword_count++;
-
- block_count = j / 5;
- block_remain = j % 5;
-
- for(c = 0; c < block_count; c++) {
- if((c == block_count - 1) && (block_remain == 2)) {
- /* Rule (d) */
- block_value = 100000;
- block_value += ctoi(intermediate[i]) * 1000;
- block_value += ctoi(intermediate[i + 1]) * 100;
- block_value += ctoi(intermediate[i + 2]) * 10;
- block_value += ctoi(intermediate[i + 3]);
-
- codewords[codeword_count] = block_value / (48 * 48);
- block_value = block_value - (48 * 48) * codewords[codeword_count];
- codeword_count++;
- codewords[codeword_count] = block_value / 48;
- block_value = block_value - 48 * codewords[codeword_count];
- codeword_count++;
- codewords[codeword_count] = block_value;
- codeword_count++;
- i += 4;
- block_value = ctoi(intermediate[i]) * 100;
- block_value += ctoi(intermediate[i + 1]) * 10;
- block_value += ctoi(intermediate[i + 2]);
-
- codewords[codeword_count] = block_value / 48;
- block_value = block_value - 48 * codewords[codeword_count];
- codeword_count++;
- codewords[codeword_count] = block_value;
- codeword_count++;
- i += 3;
- } else {
- block_value = ctoi(intermediate[i]) * 10000;
- block_value += ctoi(intermediate[i + 1]) * 1000;
- block_value += ctoi(intermediate[i + 2]) * 100;
- block_value += ctoi(intermediate[i + 3]) * 10;
- block_value += ctoi(intermediate[i + 4]);
-
- codewords[codeword_count] = block_value / (48 * 48);
- block_value = block_value - (48 * 48) * codewords[codeword_count];
- codeword_count++;
- codewords[codeword_count] = block_value / 48;
- block_value = block_value - 48 * codewords[codeword_count];
- codeword_count++;
- codewords[codeword_count] = block_value;
- codeword_count++;
- i += 5;
- }
- }
-
- switch(block_remain) {
- case 1:
- /* Rule (a) */
- codewords[codeword_count] = posn(INSET, intermediate[i]);
- codeword_count++;
- i++;
- break;
- case 3:
- /* Rule (b) */
- block_value = ctoi(intermediate[i]) * 100;
- block_value += ctoi(intermediate[i + 1]) * 10;
- block_value += ctoi(intermediate[i + 2]);
-
- codewords[codeword_count] = block_value / 48;
- block_value = block_value - 48 * codewords[codeword_count];
- codeword_count++;
- codewords[codeword_count] = block_value;
- codeword_count++;
- i += 3;
- break;
- case 4:
- /* Rule (c) */
- block_value = 100000;
- block_value += ctoi(intermediate[i]) * 1000;
- block_value += ctoi(intermediate[i + 1]) * 100;
- block_value += ctoi(intermediate[i + 2]) * 10;
- block_value += ctoi(intermediate[i + 3]);
-
- codewords[codeword_count] = block_value / (48 * 48);
- block_value = block_value - (48 * 48) * codewords[codeword_count];
- codeword_count++;
- codewords[codeword_count] = block_value / 48;
- block_value = block_value - 48 * codewords[codeword_count];
- codeword_count++;
- codewords[codeword_count] = block_value;
- codeword_count++;
- i += 4;
- break;
- }
- if(i < h) {
- /* There is more to add */
- codewords[codeword_count] = 48; /* Numeric Shift */
- codeword_count++;
- }
- } else {
- codewords[codeword_count] = posn(INSET, intermediate[i]);
- codeword_count++;
- i++;
- }
- } else {
- codewords[codeword_count] = posn(INSET, intermediate[i]);
- codeword_count++;
- i++;
- }
- } while(i < h);
-
- switch(codewords[0]) { /* Set starting mode value */
- case 48: M = 2; break;
- case 43: M = 4; break;
- case 44: M = 5; break;
- default: M = 0; break;
- }
-
- if(M != 0) {
- for(i = 0; i < codeword_count; i++) {
- codewords[i] = codewords[i + 1];
- }
- codeword_count--;
- }
-
- if(codeword_count > 49) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- /* Place codewords in code character array (c grid) */
- rows = 0;
- do{
- for(i = 0; i < 7; i++) {
- if(((rows * 7) + i) < codeword_count) {
- c_grid[rows][i] = codewords[(rows * 7) + i];
- } else {
- c_grid[rows][i] = 48; /* Pad */
- pad_count++;
- }
- }
- rows++;
- } while ((rows * 7) < codeword_count);
-
- if((((rows <= 6) && (pad_count < 5))) || (rows > 6) || (rows == 1)) {
- /* Add a row */
- for(i = 0; i < 7; i++) {
- c_grid[rows][i] = 48; /* Pad */
- }
- rows++;
- }
-
- /* Add row count and mode character */
- c_grid[rows - 1][6] = (7 * (rows - 2)) + M;
-
- /* Add row check character */
- for(i = 0; i < rows - 1; i++) {
- int row_sum = 0;
-
- for(j = 0; j < 7; j++) {
- row_sum += c_grid[i][j];
- }
- c_grid[i][7] = row_sum % 49;
- }
-
- /* Calculate Symbol Check Characters */
- posn_val = 0;
- x_count = c_grid[rows - 1][6] * 20;
- y_count = c_grid[rows - 1][6] * 16;
- z_count = c_grid[rows - 1][6] * 38;
- for(i = 0; i < rows - 1; i++) {
- for(j = 0; j < 4; j++) {
- local_value = (c_grid[i][2 * j] * 49) + c_grid[i][(2 * j) + 1];
- x_count += c49_x_weight[posn_val] * local_value;
- y_count += c49_y_weight[posn_val] * local_value;
- z_count += c49_z_weight[posn_val] * local_value;
- posn_val++;
- }
- }
-
- if(rows > 6) {
- /* Add Z Symbol Check */
- c_grid[rows - 1][0] = (z_count % 2401) / 49;
- c_grid[rows - 1][1] = (z_count % 2401) % 49;
- }
-
- local_value = (c_grid[rows - 1][0] * 49) + c_grid[rows - 1][1];
- x_count += c49_x_weight[posn_val] * local_value;
- y_count += c49_y_weight[posn_val] * local_value;
- posn_val++;
-
- /* Add Y Symbol Check */
- c_grid[rows - 1][2] = (y_count % 2401) / 49;
- c_grid[rows - 1][3] = (y_count % 2401) % 49;
-
- local_value = (c_grid[rows - 1][2] * 49) + c_grid[rows - 1][3];
- x_count += c49_x_weight[posn_val] * local_value;
-
- /* Add X Symbol Check */
- c_grid[rows - 1][4] = (x_count % 2401) / 49;
- c_grid[rows - 1][5] = (x_count % 2401) % 49;
-
- /* Add last row check character */
- j = 0;
- for(i = 0; i < 7; i++) {
- j += c_grid[rows - 1][i];
- }
- c_grid[rows - 1][7] = j % 49;
-
- /* Transfer data to symbol character array (w grid) */
- for(i = 0; i < rows; i++) {
- for(j = 0; j < 4; j ++) {
- w_grid[i][j] = (c_grid[i][2 * j] * 49) + c_grid[i][(2 * j) + 1];
- }
- }
-
- for(i = 0; i < rows; i++) {
- strcpy(pattern, "11"); /* Start character */
- for(j = 0; j < 4; j++) {
- if(i != (rows - 1)) {
- if(c49_table4[i][j] == 'E') {
- /* Even Parity */
- concat(pattern, c49_appxe_even[w_grid[i][j]]);
- } else {
- /* Odd Parity */
- concat(pattern, c49_appxe_odd[w_grid[i][j]]);
- }
- } else {
- /* Last row uses all even parity */
- concat(pattern, c49_appxe_even[w_grid[i][j]]);
- }
- }
- concat(pattern, "4"); /* Stop character */
-
- /* Expand into symbol */
- symbol->row_height[i] = 10;
- expand(symbol, pattern);
- }
-
- symbol->whitespace_width = 10;
- symbol->output_options = BARCODE_BIND;
- symbol->border_width = 2;
-
- return 0;
-}
diff --git a/3rdparty/zint-2.4.4/backend/code49.h b/3rdparty/zint-2.4.4/backend/code49.h
deleted file mode 100644
index 2b27bc1..0000000
--- a/3rdparty/zint-2.4.4/backend/code49.h
+++ /dev/null
@@ -1,1175 +0,0 @@
-/* code49.h - Code 49 Tables */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-/* This data set taken from ANSI/AIM-BC6-2000, 4th April 2000 */
-
-static char *c49_table7[128] = {
- /* Table 7: Code 49 ASCII Chart */
- "! ", "!A", "!B", "!C", "!D", "!E", "!F", "!G", "!H", "!I", "!J", "!K", "!L",
- "!M", "!N", "!O", "!P", "!Q", "!R", "!S", "!T", "!U", "!V", "!W", "!X", "!Y",
- "!Z", "!1", "!2", "!3", "!4", "!5", " ", "!6", "!7", "!8", "$", "%", "!9", "!0",
- "!-", "!.", "!$", "+", "!/", "-", ".", "/", "0", "1", "2", "3", "4", "5", "6",
- "7", "8", "9", "!+", "&1", "&2", "&3", "&4", "&5", "&6", "A", "B", "C", "D", "E",
- "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U",
- "V", "W", "X", "Y", "Z", "&7", "&8", "&9", "&0", "&-", "&.", "&A", "&B", "&C",
- "&D", "&E", "&F", "&G", "&H", "&I", "&J", "&K", "&L", "&M", "&N", "&O", "&P",
- "&Q", "&R", "&S", "&T", "&U", "&V", "&W", "&X", "&Y", "&Z", "&$", "&/", "&+",
- "&%", "& "
-};
-
-/* Table 5: Check Character Weighting Values */
-int c49_x_weight[] = {
- 1, 9, 31, 26, 2, 12, 17, 23, 37, 18, 22, 6, 27, 44, 15, 43,
- 39, 11, 13, 5, 41, 33, 36, 8, 4, 32, 3, 19, 40, 25, 29, 10
-};
-
-int c49_y_weight[] = {
- 9, 31, 26, 2, 12, 17, 23, 37, 18, 22, 6, 27, 44, 15, 43, 39,
- 11, 13, 5, 41, 33, 36, 8, 4, 32, 3, 19, 40, 25, 29, 10, 24
-};
-
-int c49_z_weight[] = {
- 31, 26, 2, 12, 17, 23, 37, 18, 22, 6, 27, 44, 15, 43, 39, 11,
- 13, 5, 41, 33, 36, 8, 4, 32, 3, 19, 40, 25, 29, 10, 24, 30
-};
-
-static char *c49_table4[8] = {
- /* Table 4: Row Parity Pattern for Code 49 Symbols */
- "OEEO", "EOEO", "OOEE", "EEOO", "OEOE", "EOOE", "OOOO", "EEEE"
-};
-
-static char *c49_appxe_even[2401] = {
- /* Appendix E - Code 49 Encodation Patterns (Even Symbol Character Parity) */
- /* Column 1 */
- "11521132",
- "25112131", "14212132", "25121221", "14221222", "12412132",
- "23321221", "12421222", "21521221", "15112222", "15121312",
- "13312222", "24221311", "13321312", "11512222", "22421311",
- "11521312", "25112311", "14212312", "23312311", "12412312",
- "21512311", "16121131", "14321131", "12521131", "15212131",
- "15221221", "13412131", "13421221", "11612131", "16112221",
- "16121311", "14312221", "14321311", "12512221", "12521311",
- "15212311", "13412311", "11612311", "11131135", "31131133",
- "51131131", "21122134", "41122132", "21131224", "41131222",
- "11113135", "31113133", "51113131", "11122225", "31122223",
- "51122221", "11131315", "31131313", "51131311", "21113224",
- "41113222", "21122314",
- /* Column 2 */
- "41122312", "11113315", "31113313",
- "51113311", "12131134", "32131132", "21231133", "41231131",
- "22122133", "42122131", "11222134", "22131223", "42131221",
- "11231224", "31231222", "12113134", "32113132", "12122224",
- "32122222", "12131314", "32131312", "21231313", "41231311",
- "22113223", "42113221", "11213224", "22122313", "42122311",
- "11222314", "31222312", "12113314", "32113312", "21213313",
- "41213311", "13131133", "33131131", "22231132", "11331133",
- "31331131", "23122132", "12222133", "23131222", "12231223",
- "32231221", "21331222", "13113133", "33113131", "13122223",
- "33122221", "11313133", "13131313", "33131311", "11322223",
- "22231312", "11331313", "31331311", "23113222", "12213223",
- /* Column 3 */
- "23122312", "12222313", "32222311", "21322312", "13113313",
- "33113311", "22213312", "11313313", "31313311", "14131132",
- "23231131", "12331132", "21431131", "24122131", "13222132",
- "24131221", "13231222", "11422132", "22331221", "11431222",
- "14113132", "14122222", "12313132", "14131312", "12322222",
- "23231311", "12331312", "21431311", "24113221", "13213222",
- "24122311", "13222312", "11413222", "22322311", "11422312",
- "14113312", "23213311", "12313312", "21413311", "15131131",
- "13331131", "14222131", "14231221", "12422131", "12431221",
- "15113131", "15122221", "13313131", "15131311", "13322221",
- "11513131", "13331311", "11522221", "14213221", "14222311",
- "12413221", "12422311", "15113311",
- /* Column 4 */
- "13313311", "11513311",
- "11141134", "31141132", "21132133", "41132131", "21141223",
- "41141221", "11123134", "31123132", "11132224", "31132222",
- "11141314", "31141312", "21114133", "41114131", "21123223",
- "41123221", "21132313", "41132311", "11114224", "31114222",
- "11123314", "31123312", "21114313", "41114311", "12141133",
- "32141131", "21241132", "22132132", "11232133", "22141222",
- "11241223", "31241221", "12123133", "32123131", "12132223",
- "32132221", "12141313", "32141311", "21241312", "22114132",
- "11214133", "22123222", "11223223", "22132312", "11232313",
- "31232311", "12114223", "32114221", "12123313", "32123311",
- "21223312", "22114312", "11214313", "31214311", "13141132",
- "22241131",
- /* Column 5 */
- "11341132", "23132131", "12232132", "23141221",
- "12241222", "21341221", "13123132", "13132222", "11323132",
- "13141312", "11332222", "22241311", "11341312", "23114131",
- "12214132", "23123221", "12223222", "23132311", "12232312",
- "21332311", "13114222", "13123312", "11314222", "22223311",
- "11323312", "23114311", "12214312", "21314311", "14141131",
- "12341131", "13232131", "13241221", "11432131", "14123131",
- "14132221", "12323131", "14141311", "12332221", "12341311",
- "13214131", "13223221", "11414131", "13232311", "11423221",
- "11432311", "14114221", "14123311", "12314221", "12323311",
- "13214311", "11414311", "11151133", "31151131", "21142132",
- "21151222", "11133133", "31133131", "11142223",
- /* Column 6 */
- "31142221",
- "11151313", "31151311", "21124132", "21133222", "21142312",
- "11115133", "31115131", "11124223", "31124221", "11133313",
- "31133311", "21115222", "21124312", "12151132", "21251131",
- "22142131", "11242132", "22151221", "11251222", "12133132",
- "12142222", "12151312", "21251311", "22124131", "11224132",
- "22133221", "11233222", "22142311", "11242312", "12115132",
- "12124222", "12133312", "21233311", "22115221", "11215222",
- "22124311", "11224312", "13151131", "12242131", "12251221",
- "13133131", "13142221", "11333131", "13151311", "11342221",
- "12224131", "12233221", "12242311", "13115131", "13124221",
- "11315131", "13133311", "11324221", "11333311", "12215221",
- "12224311", "11161132",
- /* Column 7 */
- "21152131", "21161221", "11143132",
- "11152222", "11161312", "21134131", "21143221", "21152311",
- "11125132", "11134222", "11143312", "21116131", "21125221",
- "21134311", "12161131", "11252131", "12143131", "12152221",
- "12161311", "11234131", "11243221", "11252311", "12125131",
- "12134221", "12143311", "11216131", "11225221", "11234311",
- "11111236", "31111234", "51111232", "21111325", "41111323",
- "61111321", "11111416", "31111414", "51111412", "31211143",
- "51211141", "12111235", "32111233", "52111231", "21211234",
- "41211232", "22111324", "42111322", "11211325", "31211323",
- "51211321", "12111415", "32111413", "52111411", "21211414",
- "41211412", "12211144", "32211142", "21311143", "41311141",
- /* Column 8 */
- "13111234", "33111232", "22211233", "42211231", "11311234",
- "31311232", "23111323", "43111321", "12211324", "32211322",
- "21311323", "41311321", "13111414", "33111412", "22211413",
- "42211411", "11311414", "31311412", "13211143", "33211141",
- "22311142", "11411143", "31411141", "14111233", "34111231",
- "23211232", "12311233", "32311231", "21411232", "24111322",
- "13211323", "33211321", "22311322", "11411323", "31411321",
- "14111413", "34111411", "23211412", "12311413", "32311411",
- "21411412", "14211142", "23311141", "12411142", "21511141",
- "15111232", "24211231", "13311232", "22411231", "11511232",
- "25111321", "14211322", "23311321", "12411322", "21511321",
- "15111412", "24211411", "13311412",
- /* Column 9 */
- "22411411", "11511412",
- "15211141", "13411141", "11611141", "16111231", "14311231",
- "12511231", "15211321", "13411321", "11611321", "16111411",
- "14311411", "12511411", "21121144", "41121142", "11112145",
- "31112143", "51112141", "11121235", "31121233", "51121231",
- "21112234", "41112232", "21121324", "41121322", "11112325",
- "31112323", "51112321", "11121415", "31121413", "51121411",
- "21112414", "41112412", "22121143", "42121141", "11221144",
- "31221142", "12112144", "32112142", "12121234", "32121232",
- "21221233", "41221231", "22112233", "42112231", "11212234",
- "22121323", "42121321", "11221324", "31221322", "12112324",
- "32112322", "12121414", "32121412", "21221413", "41221411",
- "22112413",
- /* Column 10 */
- "42112411", "11212414", "31212412", "23121142",
- "12221143", "32221141", "21321142", "13112143", "33112141",
- "13121233", "33121231", "11312143", "22221232", "11321233",
- "31321231", "23112232", "12212233", "23121322", "12221323",
- "32221321", "21321322", "13112323", "33112321", "13121413",
- "33121411", "11312323", "22221412", "11321413", "31321411",
- "23112412", "12212413", "32212411", "21312412", "24121141",
- "13221142", "22321141", "11421142", "14112142", "14121232",
- "12312142", "23221231", "12321232", "21421231", "24112231",
- "13212232", "24121321", "13221322", "11412232", "22321321",
- "11421322", "14112322", "14121412", "12312322", "23221411",
- "12321412", "21421411", "24112411", "13212412",
- /* Column 11 */
- "22312411",
- "11412412", "14221141", "12421141", "15112141", "15121231",
- "13312141", "13321231", "11512141", "11521231", "14212231",
- "14221321", "12412231", "12421321", "15112321", "15121411",
- "13312321", "13321411", "11512321", "11521411", "14212411",
- "12412411", "21131143", "41131141", "11122144", "31122142",
- "11131234", "31131232", "21113143", "41113141", "21122233",
- "41122231", "21131323", "41131321", "11113234", "31113232",
- "11122324", "31122322", "11131414", "31131412", "21113323",
- "41113321", "21122413", "41122411", "11113414", "31113412",
- "22131142", "11231143", "31231141", "12122143", "32122141",
- "12131233", "32131231", "21231232", "22113142", "11213143",
- "22122232", "11222233",
- /* Column 12 */
- "22131322", "11231323", "31231321",
- "12113233", "32113231", "12122323", "32122321", "12131413",
- "32131411", "21231412", "22113322", "11213323", "22122412",
- "11222413", "31222411", "12113413", "32113411", "21213412",
- "23131141", "12231142", "21331141", "13122142", "13131232",
- "11322142", "22231231", "11331232", "23113141", "12213142",
- "23122231", "12222232", "23131321", "12231322", "21331321",
- "13113232", "13122322", "11313232", "13131412", "11322322",
- "22231411", "11331412", "23113321", "12213322", "23122411",
- "12222412", "21322411", "13113412", "22213411", "11313412",
- "13231141", "11431141", "14122141", "14131231", "12322141",
- "12331231", "13213141", "13222231", "11413141", "13231321",
- /* Column 13 */
- "11422231", "11431321", "14113231", "14122321", "12313231",
- "14131411", "12322321", "12331411", "13213321", "13222411",
- "11413321", "11422411", "14113411", "12313411", "21141142",
- "11132143", "31132141", "11141233", "31141231", "21123142",
- "21132232", "21141322", "11114143", "31114141", "11123233",
- "31123231", "11132323", "31132321", "11141413", "31141411",
- "21114232", "21123322", "21132412", "11114323", "31114321",
- "11123413", "31123411", "22141141", "11241142", "12132142",
- "12141232", "21241231", "22123141", "11223142", "22132231",
- "11232232", "22141321", "11241322", "12114142", "12123232",
- "12132322", "12141412", "21241411", "22114231", "11214232",
- "22123321", "11223322", "22132411",
- /* Column 14 */
- "11232412", "12114322",
- "12123412", "21223411", "12241141", "13132141", "13141231",
- "11332141", "11341231", "12223141", "12232231", "12241321",
- "13114141", "13123231", "11314141", "13132321", "11323231",
- "13141411", "11332321", "11341411", "12214231", "12223321",
- "12232411", "13114321", "13123411", "11314321", "11323411",
- "21151141", "11142142", "11151232", "21133141", "21142231",
- "21151321", "11124142", "11133232", "11142322", "11151412",
- "21115141", "21124231", "21133321", "21142411", "11115232",
- "11124322", "11133412", "11251141", "12142141", "12151231",
- "11233141", "11242231", "11251321", "12124141", "12133231",
- "12142321", "12151411", "11215141", "11224231", "11233321",
- "11242411",
- /* Column 15 */
- "12115231", "12124321", "12133411", "11152141",
- "11161231", "11134141", "11143231", "11152321", "11161411",
- "11116141", "11125231", "11134321", "11143411", "21111244",
- "41111242", "11111335", "31111333", "51111331", "21111424",
- "41111422", "11111515", "31111513", "51111511", "21211153",
- "41211151", "22111243", "42111241", "11211244", "31211242",
- "12111334", "32111332", "21211333", "41211331", "22111423",
- "42111421", "11211424", "31211422", "12111514", "32111512",
- "21211513", "41211511", "22211152", "11311153", "31311151",
- "23111242", "12211243", "32211241", "21311242", "13111333",
- "33111331", "22211332", "11311333", "31311331", "23111422",
- "12211423", "32211421", "21311422", "13111513",
- /* Column 16 */
- "33111511",
- "22211512", "11311513", "31311511", "23211151", "12311152",
- "21411151", "24111241", "13211242", "22311241", "11411242",
- "14111332", "23211331", "12311332", "21411331", "24111421",
- "13211422", "22311421", "11411422", "14111512", "23211511",
- "12311512", "21411511", "13311151", "11511151", "14211241",
- "12411241", "15111331", "13311331", "11511331", "14211421",
- "12411421", "15111511", "13311511", "11511511", "31121152",
- "21112153", "41112151", "21121243", "41121241", "11112244",
- "31112242", "11121334", "31121332", "21112333", "41112331",
- "21121423", "41121421", "11112424", "31112422", "11121514",
- "31121512", "21112513", "41112511", "12121153", "32121151",
- "21221152", "22112152",
- /* Column 17 */
- "11212153", "22121242", "11221243",
- "31221241", "12112243", "32112241", "12121333", "32121331",
- "21221332", "22112332", "11212333", "22121422", "11221423",
- "31221421", "12112423", "32112421", "12121513", "32121511",
- "21221512", "22112512", "11212513", "31212511", "13121152",
- "22221151", "11321152", "23112151", "12212152", "23121241",
- "12221242", "21321241", "13112242", "13121332", "11312242",
- "22221331", "11321332", "23112331", "12212332", "23121421",
- "12221422", "21321421", "13112422", "13121512", "11312422",
- "22221511", "11321512", "23112511", "12212512", "21312511",
- "14121151", "12321151", "13212151", "13221241", "11412151",
- "11421241", "14112241", "14121331", "12312241", "12321331",
- /* Column 18 */
- "13212331", "13221421", "11412331", "11421421", "14112421",
- "14121511", "12312421", "12321511", "13212511", "11412511",
- "11131153", "31131151", "21122152", "21131242", "11113153",
- "31113151", "11122243", "31122241", "11131333", "31131331",
- "21113242", "21122332", "21131422", "11113333", "31113331",
- "11122423", "31122421", "11131513", "31131511", "21113422",
- "21122512", "12131152", "21231151", "22122151", "11222152",
- "22131241", "11231242", "12113152", "12122242", "12131332",
- "21231331", "22113241", "11213242", "22122331", "11222332",
- "22131421", "11231422", "12113332", "12122422", "12131512",
- "21231511", "22113421", "11213422", "22122511", "11222512",
- "13131151", "11331151", "12222151",
- /* Column 19 */
- "12231241", "13113151",
- "13122241", "11313151", "13131331", "11322241", "11331331",
- "12213241", "12222331", "12231421", "13113331", "13122421",
- "11313331", "13131511", "11322421", "11331511", "12213421",
- "12222511", "11141152", "21132151", "21141241", "11123152",
- "11132242", "11141332", "21114151", "21123241", "21132331",
- "21141421", "11114242", "11123332", "11132422", "11141512",
- "21114331", "21123421", "21132511", "12141151", "11232151",
- "11241241", "12123151", "12132241", "12141331", "11214151",
- "11223241", "11232331", "11241421", "12114241", "12123331",
- "12132421", "12141511", "11214331", "11223421", "11232511",
- "11151151", "11133151", "11142241", "11151331", "11115151",
- "11124241",
- /* Column 20 */
- "11133331", "11142421", "11151511", "11111254",
- "31111252", "21111343", "41111341", "11111434", "31111432",
- "21111523", "41111521", "11111614", "31111612", "31211161",
- "12111253", "32111251", "21211252", "22111342", "11211343",
- "31211341", "12111433", "32111431", "21211432", "22111522",
- "11211523", "31211521", "12111613", "32111611", "21211612",
- "12211162", "21311161", "13111252", "22211251", "11311252",
- "23111341", "12211342", "21311341", "13111432", "22211431",
- "11311432", "23111521", "12211522", "21311521", "13111612",
- "22211611", "11311612", "13211161", "11411161", "14111251",
- "12311251", "13211341", "11411341", "14111431", "12311431",
- "13211521", "11411521", "14111611", "12311611",
- /* Column 21 */
- "21121162",
- "11112163", "31112161", "11121253", "31121251", "21112252",
- "21121342", "11112343", "31112341", "11121433", "31121431",
- "21112432", "21121522", "11112523", "31112521", "11121613",
- "31121611", "22121161", "11221162", "12112162", "12121252",
- "21221251", "22112251", "11212252", "22121341", "11221342",
- "12112342", "12121432", "21221431", "22112431", "11212432",
- "22121521", "11221522", "12112522", "12121612", "21221611",
- "12221161", "13112161", "13121251", "11312161", "11321251",
- "32121115", "52121113", "21221116", "41221114", "61221112",
- "22112116", "42112114", "31212115", "51212113", "13121116",
- "33121114", "22221115", "42221113", "11321116", "31321114",
- "51321112", "23112115",
- /* Column 22 */
- "43112113", "12212116", "32212114",
- "52212112", "21312115", "41312113", "61312111", "14121115",
- "34121113", "23221114", "43221112", "12321115", "32321113",
- "52321111", "21421114", "41421112", "24112114", "13212115",
- "33212113", "22312114", "42312112", "11412115", "31412113",
- "51412111", "15121114", "24221113", "13321114", "33321112",
- "22421113", "42421111", "11521114", "31521112", "25112113",
- "14212114", "34212112", "23312113", "43312111", "12412114",
- "32412112", "21512113", "41512111", "16121113", "25221112",
- "14321113", "34321111", "23421112", "12521113", "32521111",
- "15212113", "24312112", "13412113", "33412111", "22512112",
- "11612113", "31612111", "31131115", "51131113", "21122116",
- /* Column 23 */
- "41122114", "61122112", "31113115", "51113113", "12131116",
- "32131114", "52131112", "21231115", "41231113", "61231111",
- "22122115", "42122113", "11222116", "31222114", "51222112",
- "12113116", "32113114", "52113112", "21213115", "41213113",
- "61213111", "13131115", "33131113", "22231114", "42231112",
- "11331115", "31331113", "51331111", "23122114", "43122112",
- "12222115", "32222113", "52222111", "21322114", "41322112",
- "13113115", "33113113", "22213114", "42213112", "11313115",
- "31313113", "51313111", "14131114", "34131112", "23231113",
- "43231111", "12331114", "32331112", "21431113", "41431111",
- "24122113", "13222114", "33222112", "22322113", "42322111",
- "11422114", "31422112", "14113114",
- /* Column 24 */
- "34113112", "23213113",
- "43213111", "12313114", "32313112", "21413113", "41413111",
- "15131113", "24231112", "13331113", "33331111", "22431112",
- "25122112", "14222113", "34222111", "23322112", "12422113",
- "32422111", "21522112", "15113113", "24213112", "13313113",
- "33313111", "22413112", "11513113", "31513111", "16131112",
- "25231111", "14331112", "23431111", "15222112", "24322111",
- "13422112", "22522111", "16113112", "25213111", "14313112",
- "23413111", "12513112", "21613111", "11141116", "31141114",
- "51141112", "21132115", "41132113", "61132111", "11123116",
- "31123114", "51123112", "21114115", "41114113", "61114111",
- "12141115", "32141113", "52141111", "21241114", "41241112",
- "22132114",
- /* Column 25 */
- "42132112", "11232115", "31232113", "51232111",
- "12123115", "32123113", "52123111", "21223114", "41223112",
- "22114114", "42114112", "11214115", "31214113", "51214111",
- "13141114", "33141112", "22241113", "42241111", "11341114",
- "31341112", "23132113", "43132111", "12232114", "32232112",
- "21332113", "41332111", "13123114", "33123112", "22223113",
- "42223111", "11323114", "31323112", "23114113", "43114111",
- "12214114", "32214112", "21314113", "41314111", "14141113",
- "34141111", "23241112", "12341113", "32341111", "24132112",
- "13232113", "33232111", "22332112", "11432113", "31432111",
- "14123113", "34123111", "23223112", "12323113", "32323111",
- "21423112", "24114112", "13214113", "33214111",
- /* Column 26 */
- "22314112",
- "11414113", "31414111", "15141112", "24241111", "13341112",
- "25132111", "14232112", "23332111", "12432112", "15123112",
- "24223111", "13323112", "22423111", "11523112", "25114111",
- "14214112", "23314111", "12414112", "21514111", "16141111",
- "14341111", "15232111", "13432111", "16123111", "14323111",
- "12523111", "15214111", "13414111", "11614111", "11151115",
- "31151113", "51151111", "21142114", "41142112", "11133115",
- "31133113", "51133111", "21124114", "41124112", "11115115",
- "31115113", "51115111", "12151114", "32151112", "21251113",
- "41251111", "22142113", "42142111", "11242114", "31242112",
- "12133114", "32133112", "21233113", "41233111", "22124113",
- "42124111", "11224114",
- /* Column 27 */
- "31224112", "12115114", "32115112",
- "21215113", "41215111", "13151113", "33151111", "22251112",
- "23142112", "12242113", "32242111", "21342112", "13133113",
- "33133111", "22233112", "11333113", "31333111", "23124112",
- "12224113", "32224111", "21324112", "13115113", "33115111",
- "22215112", "11315113", "31315111", "14151112", "23251111",
- "24142111", "13242112", "22342111", "14133112", "23233111",
- "12333112", "21433111", "24124111", "13224112", "22324111",
- "11424112", "14115112", "23215111", "12315112", "21415111",
- "15151111", "14242111", "15133111", "13333111", "14224111",
- "12424111", "15115111", "13315111", "11515111", "11161114",
- "31161112", "21152113", "41152111", "11143114", "31143112",
- /* Column 28 */
- "21134113", "41134111", "11125114", "31125112", "21116113",
- "41116111", "12161113", "32161111", "22152112", "11252113",
- "31252111", "12143113", "32143111", "21243112", "22134112",
- "11234113", "31234111", "12125113", "32125111", "21225112",
- "22116112", "11216113", "31216111", "13161112", "23152111",
- "12252112", "13143112", "22243111", "11343112", "23134111",
- "12234112", "21334111", "13125112", "22225111", "11325112",
- "23116111", "12216112", "21316111", "14161111", "13252111",
- "14143111", "12343111", "13234111", "11434111", "14125111",
- "12325111", "13216111", "11416111", "31111216", "51111214",
- "31211125", "51211123", "32111215", "52111213", "21211216",
- "41211214", "61211212", "12211126",
- /* Column 29 */
- "32211124", "52211122",
- "21311125", "41311123", "61311121", "13111216", "33111214",
- "22211215", "42211213", "11311216", "31311214", "51311212",
- "13211125", "33211123", "22311124", "42311122", "11411125",
- "31411123", "51411121", "14111215", "34111213", "23211214",
- "43211212", "12311215", "32311213", "52311211", "21411214",
- "41411212", "14211124", "34211122", "23311123", "43311121",
- "12411124", "32411122", "21511123", "41511121", "15111214",
- "24211213", "13311214", "33311212", "22411213", "42411211",
- "11511214", "31511212", "15211123", "24311122", "13411123",
- "33411121", "22511122", "11611123", "31611121", "16111213",
- "25211212", "14311213", "34311211", "23411212", "12511213",
- "32511211",
- /* Column 30 */
- "21611212", "21121126", "41121124", "61121122",
- "31112125", "51112123", "31121215", "51121213", "21112216",
- "41112214", "61112212", "22121125", "42121123", "11221126",
- "31221124", "51221122", "12112126", "32112124", "52112122",
- "12121216", "32121214", "52121212", "21221215", "41221213",
- "61221211", "22112215", "42112213", "11212216", "31212214",
- "51212212", "23121124", "43121122", "12221125", "32221123",
- "52221121", "21321124", "41321122", "13112125", "33112123",
- "13121215", "33121213", "11312125", "22221214", "42221212",
- "11321215", "31321213", "51321211", "23112214", "43112212",
- "12212215", "32212213", "52212211", "21312214", "41312212",
- "24121123", "13221124", "33221122", "22321123",
- /* Column 31 */
- "42321121",
- "11421124", "31421122", "14112124", "34112122", "14121214",
- "34121212", "12312124", "23221213", "43221211", "12321214",
- "32321212", "21421213", "41421211", "24112213", "13212214",
- "33212212", "22312213", "42312211", "11412214", "31412212",
- "25121122", "14221123", "34221121", "23321122", "12421123",
- "32421121", "21521122", "15112123", "15121213", "13312123",
- "24221212", "13321213", "33321211", "11512123", "22421212",
- "11521213", "31521211", "25112212", "14212213", "34212211",
- "23312212", "12412213", "32412211", "21512212", "15221122",
- "24321121", "13421122", "22521121", "16112122", "16121212",
- "14312122", "25221211", "14321212", "12512122", "23421211",
- "12521212", "15212212",
- /* Column 32 */
- "24312211", "13412212", "22512211",
- "11612212", "21131125", "41131123", "61131121", "11122126",
- "31122124", "51122122", "11131216", "31131214", "51131212",
- "21113125", "41113123", "61113121", "21122215", "41122213",
- "61122211", "11113216", "31113214", "51113212", "22131124",
- "42131122", "11231125", "31231123", "51231121", "12122125",
- "32122123", "52122121", "12131215", "32131213", "52131211",
- "21231214", "41231212", "22113124", "42113122", "11213125",
- "22122214", "42122212", "11222215", "31222213", "51222211",
- "12113215", "32113213", "52113211", "21213214", "41213212",
- "23131123", "43131121", "12231124", "32231122", "21331123",
- "41331121", "13122124", "33122122", "13131214", "33131212",
- /* Column 33 */
- "11322124", "22231213", "42231211", "11331214", "31331212",
- "23113123", "43113121", "12213124", "23122213", "43122211",
- "12222214", "32222212", "21322213", "41322211", "13113214",
- "33113212", "22213213", "42213211", "11313214", "31313212",
- "24131122", "13231123", "33231121", "22331122", "11431123",
- "31431121", "14122123", "34122121", "14131213", "34131211",
- "12322123", "23231212", "12331213", "32331211", "21431212",
- "24113122", "13213123", "24122212", "13222213", "33222211",
- "11413123", "22322212", "11422213", "31422211", "14113213",
- "34113211", "23213212", "12313213", "32313211", "21413212",
- "25131121", "14231122", "23331121", "12431122", "15122122",
- "15131212", "13322122", "24231211",
- /* Column 34 */
- "13331212", "11522122",
- "22431211", "25113121", "14213122", "25122211", "14222212",
- "12413122", "23322211", "12422212", "21522211", "15113212",
- "24213211", "13313212", "22413211", "11513212", "15231121",
- "13431121", "16122121", "16131211", "14322121", "14331211",
- "12522121", "15213121", "15222211", "13413121", "13422211",
- "11613121", "16113211", "14313211", "12513211", "21141124",
- "41141122", "11132125", "31132123", "51132121", "11141215",
- "31141213", "51141211", "21123124", "41123122", "21132214",
- "41132212", "11114125", "31114123", "51114121", "11123215",
- "31123213", "51123211", "21114214", "41114212", "22141123",
- "42141121", "11241124", "31241122", "12132124", "32132122",
- "12141214",
- /* Column 35 */
- "32141212", "21241213", "41241211", "22123123",
- "42123121", "11223124", "22132213", "42132211", "11232214",
- "31232212", "12114124", "32114122", "12123214", "32123212",
- "21223213", "41223211", "22114213", "42114211", "11214214",
- "31214212", "23141122", "12241123", "32241121", "21341122",
- "13132123", "33132121", "13141213", "33141211", "11332123",
- "22241212", "11341213", "31341211", "23123122", "12223123",
- "23132212", "12232213", "32232211", "21332212", "13114123",
- "33114121", "13123213", "33123211", "11314123", "22223212",
- "11323213", "31323211", "23114212", "12214213", "32214211",
- "21314212", "24141121", "13241122", "22341121", "14132122",
- "14141212", "12332122", "23241211", "12341212",
- /* Column 36 */
- "24123121",
- "13223122", "24132211", "13232212", "11423122", "22332211",
- "11432212", "14114122", "14123212", "12314122", "23223211",
- "12323212", "21423211", "24114211", "13214212", "22314211",
- "11414212", "14241121", "15132121", "15141211", "13332121",
- "13341211", "14223121", "14232211", "12423121", "12432211",
- "15114121", "15123211", "13314121", "13323211", "11514121",
- "11523211", "14214211", "12414211", "21151123", "41151121",
- "11142124", "31142122", "11151214", "31151212", "21133123",
- "41133121", "21142213", "41142211", "11124124", "31124122",
- "11133214", "31133212", "21115123", "41115121", "21124213",
- "41124211", "11115214", "31115212", "22151122", "11251123",
- "31251121", "12142123",
- /* Column 37 */
- "32142121", "12151213", "32151211",
- "21251212", "22133122", "11233123", "22142212", "11242213",
- "31242211", "12124123", "32124121", "12133213", "32133211",
- "21233212", "22115122", "11215123", "22124212", "11224213",
- "31224211", "12115213", "32115211", "21215212", "23151121",
- "12251122", "13142122", "13151212", "11342122", "22251211",
- "23133121", "12233122", "23142211", "12242212", "21342211",
- "13124122", "13133212", "11324122", "22233211", "11333212",
- "23115121", "12215122", "23124211", "12224212", "21324211",
- "13115212", "22215211", "11315212", "13251121", "14142121",
- "14151211", "12342121", "13233121", "13242211", "11433121",
- "14124121", "14133211", "12324121", "12333211", "13215121",
- /* Column 38 */
- "13224211", "11415121", "11424211", "14115211", "12315211",
- "21161122", "11152123", "31152121", "11161213", "31161211",
- "21143122", "21152212", "11134123", "31134121", "11143213",
- "31143211", "21125122", "21134212", "11116123", "31116121",
- "11125213", "31125211", "22161121", "12152122", "12161212",
- "22143121", "11243122", "22152211", "11252212", "12134122",
- "12143212", "21243211", "22125121", "11225122", "22134211",
- "11234212", "12116122", "12125212", "21225211", "13152121",
- "13161211", "12243121", "12252211", "13134121", "13143211",
- "11334121", "11343211", "12225121", "12234211", "13116121",
- "13125211", "11316121", "11325211", "21111226", "41111224",
- "61111222", "31111315", "51111313",
- /* Column 39 */
- "21211135", "41211133",
- "61211131", "22111225", "42111223", "11211226", "31211224",
- "51211222", "12111316", "32111314", "52111312", "21211315",
- "41211313", "61211311", "22211134", "42211132", "11311135",
- "31311133", "51311131", "23111224", "43111222", "12211225",
- "32211223", "52211221", "21311224", "41311222", "13111315",
- "33111313", "22211314", "42211312", "11311315", "31311313",
- "51311311", "23211133", "43211131", "12311134", "32311132",
- "21411133", "41411131", "24111223", "13211224", "33211222",
- "22311223", "42311221", "11411224", "31411222", "14111314",
- "34111312", "23211313", "43211311", "12311314", "32311312",
- "21411313", "41411311", "24211132", "13311133", "33311131",
- "22411132",
- /* Column 40 */
- "11511133", "31511131", "25111222", "14211223",
- "34211221", "23311222", "12411223", "32411221", "21511222",
- "15111313", "24211312", "13311313", "33311311", "22411312",
- "11511313", "31511311", "25211131", "14311132", "23411131",
- "12511132", "21611131", "15211222", "24311221", "13411222",
- "22511221", "11611222", "16111312", "25211311", "14311312",
- "23411311", "12511312", "21611311", "31121134", "51121132",
- "21112135", "41112133", "61112131", "21121225", "41121223",
- "61121221", "11112226", "31112224", "51112222", "11121316",
- "31121314", "51121312", "21112315", "41112313", "61112311",
- "12121135", "32121133", "52121131", "21221134", "41221132",
- "22112134", "42112132", "11212135", "22121224",
- /* Column 41 */
- "42121222",
- "11221225", "31221223", "51221221", "12112225", "32112223",
- "52112221", "12121315", "32121313", "52121311", "21221314",
- "41221312", "22112314", "42112312", "11212315", "31212313",
- "51212311", "13121134", "33121132", "22221133", "42221131",
- "11321134", "31321132", "23112133", "43112131", "12212134",
- "23121223", "43121221", "12221224", "32221222", "21321223",
- "41321221", "13112224", "33112222", "13121314", "33121312",
- "11312224", "22221313", "42221311", "11321314", "31321312",
- /* Column 42 */
- "23112313", "43112311", "12212314", "32212312", "21312313",
- "41312311", "14121133", "34121131", "23221132", "12321133",
- "32321131", "21421132", "24112132", "13212133", "24121222",
- "13221223", "33221221", "11412133", "22321222", "11421223",
- "31421221", "14112223", "34112221", "14121313", "34121311",
- "12312223", "23221312", "12321313", "32321311", "21421312",
- "24112312", "13212313", "33212311", "22312312", "11412313",
- "31412311", "15121132", "24221131", "13321132", "22421131"
-};
-
-static char *c49_appxe_odd[2401] = {
- /* Appendix E - Code 49 Encodation Patterns (Odd Symbol Character Parity) */
- /* Column 1 */
- "22121116",
- "42121114", "31221115", "51221113", "32112115", "52112113",
- "21212116", "41212114", "61212112", "23121115", "43121113",
- "12221116", "32221114", "52221112", "21321115", "41321113",
- "61321111", "13112116", "33112114", "22212115", "42212113",
- "11312116", "31312114", "51312112", "24121114", "13221115",
- "33221113", "22321114", "42321112", "11421115", "31421113",
- "51421111", "14112115", "34112113", "23212114", "43212112",
- "12312115", "32312113", "52312111", "21412114", "41412112",
- "25121113", "14221114", "34221112", "23321113", "43321111",
- "12421114", "32421112", "21521113", "41521111", "15112114",
- "24212113", "13312114", "33312112", "22412113", "42412111",
- "11512114", "31512112",
- /* Column 2 */
- "15221113", "24321112", "13421113",
- "33421111", "22521112", "16112113", "25212112", "14312113",
- "34312111", "23412112", "12512113", "32512111", "21612112",
- "21131116", "41131114", "61131112", "31122115", "51122113",
- "21113116", "41113114", "61113112", "22131115", "42131113",
- "11231116", "31231114", "51231112", "12122116", "32122114",
- "52122112", "21222115", "41222113", "61222111", "22113115",
- "42113113", "11213116", "31213114", "51213112", "23131114",
- "43131112", "12231115", "32231113", "52231111", "21331114",
- "41331112", "13122115", "33122113", "22222114", "42222112",
- "11322115", "31322113", "51322111", "23113114", "43113112",
- "12213115", "32213113", "52213111", "21313114", "41313112",
- /* Column 3 */
- "24131113", "13231114", "33231112", "22331113", "42331111",
- "11431114", "31431112", "14122114", "34122112", "23222113",
- "43222111", "12322114", "32322112", "21422113", "41422111",
- "24113113", "13213114", "33213112", "22313113", "42313111",
- "11413114", "31413112", "25131112", "14231113", "34231111",
- "23331112", "12431113", "32431111", "15122113", "24222112",
- "13322113", "33322111", "22422112", "11522113", "31522111",
- "25113112", "14213113", "34213111", "23313112", "12413113",
- "32413111", "21513112", "15231112", "24331111", "13431112",
- "16122112", "25222111", "14322112", "23422111", "12522112",
- "15213112", "24313111", "13413112", "22513111", "11613112",
- "21141115", "41141113", "61141111",
- /* Column 4 */
- "11132116", "31132114",
- "51132112", "21123115", "41123113", "61123111", "11114116",
- "31114114", "51114112", "22141114", "42141112", "11241115",
- "31241113", "51241111", "12132115", "32132113", "52132111",
- "21232114", "41232112", "22123114", "42123112", "11223115",
- "31223113", "51223111", "12114115", "32114113", "52114111",
- "21214114", "41214112", "23141113", "43141111", "12241114",
- "32241112", "21341113", "41341111", "13132114", "33132112",
- "22232113", "42232111", "11332114", "31332112", "23123113",
- "43123111", "12223114", "32223112", "21323113", "41323111",
- "13114114", "33114112", "22214113", "42214111", "11314114",
- "31314112", "24141112", "13241113", "33241111", "22341112",
- "14132113",
- /* Column 5 */
- "34132111", "23232112", "12332113", "32332111",
- "21432112", "24123112", "13223113", "33223111", "22323112",
- "11423113", "31423111", "14114113", "34114111", "23214112",
- "12314113", "32314111", "21414112", "25141111", "14241112",
- "23341111", "15132112", "24232111", "13332112", "22432111",
- "25123111", "14223112", "23323111", "12423112", "21523111",
- "15114112", "24214111", "13314112", "22414111", "11514112",
- "15241111", "16132111", "14332111", "15223111", "13423111",
- "16114111", "14314111", "12514111", "21151114", "41151112",
- "11142115", "31142113", "51142111", "21133114", "41133112",
- "11124115", "31124113", "51124111", "21115114", "41115112",
- "22151113", "42151111", "11251114", "31251112",
- /* Column 6 */
- "12142114",
- "32142112", "21242113", "41242111", "22133113", "42133111",
- "11233114", "31233112", "12124114", "32124112", "21224113",
- "41224111", "22115113", "42115111", "11215114", "31215112",
- "23151112", "12251113", "32251111", "13142113", "33142111",
- "22242112", "11342113", "31342111", "23133112", "12233113",
- "32233111", "21333112", "13124113", "33124111", "22224112",
- "11324113", "31324111", "23115112", "12215113", "32215111",
- "21315112", "24151111", "13251112", "14142112", "23242111",
- "12342112", "24133111", "13233112", "22333111", "11433112",
- "14124112", "23224111", "12324112", "21424111", "24115111",
- "13215112", "22315111", "11415112", "14251111", "15142111",
- "13342111", "14233111",
- /* Column 7 */
- "12433111", "15124111", "13324111",
- "11524111", "14215111", "12415111", "21161113", "41161111",
- "11152114", "31152112", "21143113", "41143111", "11134114",
- "31134112", "21125113", "41125111", "11116114", "31116112",
- "22161112", "12152113", "32152111", "21252112", "22143112",
- "11243113", "31243111", "12134113", "32134111", "21234112",
- "22125112", "11225113", "31225111", "12116113", "32116111",
- "21216112", "23161111", "13152112", "22252111", "23143111",
- "12243112", "21343111", "13134112", "22234111", "11334112",
- "23125111", "12225112", "21325111", "13116112", "22216111",
- "11316112", "14152111", "13243111", "14134111", "12334111",
- "13225111", "11425111", "14116111", "12316111", "41111215",
- /* Column 8 */
- "61111213", "21211126", "41211124", "61211122", "22111216",
- "42111214", "31211215", "51211213", "22211125", "42211123",
- "11311126", "31311124", "51311122", "23111215", "43111213",
- "12211216", "32211214", "52211212", "21311215", "41311213",
- "61311211", "23211124", "43211122", "12311125", "32311123",
- "52311121", "21411124", "41411122", "24111214", "13211215",
- "33211213", "22311214", "42311212", "11411215", "31411213",
- "51411211", "24211123", "13311124", "33311122", "22411123",
- "42411121", "11511124", "31511122", "25111213", "14211214",
- "34211212", "23311213", "43311211", "12411214", "32411212",
- "21511213", "41511211", "25211122", "14311123", "34311121",
- "23411122", "12511123", "32511121",
- /* Column 9 */
- "21611122", "15211213",
- "24311212", "13411213", "33411211", "22511212", "11611213",
- "31611211", "31121125", "51121123", "21112126", "41112124",
- "61112122", "21121216", "41121214", "61121212", "31112215",
- "51112213", "12121126", "32121124", "52121122", "21221125",
- "41221123", "61221121", "22112125", "42112123", "11212126",
- "22121215", "42121213", "11221216", "31221214", "51221212",
- "12112216", "32112214", "52112212", "21212215", "41212213",
- "61212211", "13121125", "33121123", "22221124", "42221122",
- "11321125", "31321123", "51321121", "23112124", "43112122",
- "12212125", "23121214", "43121212", "12221215", "32221213",
- "52221211", "21321214", "41321212", "13112215", "33112213",
- "22212214",
- /* Column 10 */
- "42212212", "11312215", "31312213", "51312211",
- "14121124", "34121122", "23221123", "43221121", "12321124",
- "32321122", "21421123", "41421121", "24112123", "13212124",
- "24121213", "13221214", "33221212", "11412124", "22321213",
- "42321211", "11421214", "31421212", "14112214", "34112212",
- "23212213", "43212211", "12312214", "32312212", "21412213",
- "41412211", "15121123", "24221122", "13321123", "33321121",
- "22421122", "11521123", "31521121", "25112122", "14212123",
- "25121212", "14221213", "34221211", "12412123", "23321212",
- "12421213", "32421211", "21521212", "15112213", "24212212",
- "13312213", "33312211", "22412212", "11512213", "31512211",
- "16121122", "25221121", "14321122", "23421121",
- /* Column 11 */
- "12521122",
- "15212122", "15221212", "13412122", "24321211", "13421212",
- "11612122", "22521211", "16112212", "25212211", "14312212",
- "23412211", "12512212", "21612211", "11131126", "31131124",
- "51131122", "21122125", "41122123", "61122121", "21131215",
- "41131213", "61131211", "11113126", "31113124", "51113122",
- "11122216", "31122214", "51122212", "21113215", "41113213",
- "61113211", "12131125", "32131123", "52131121", "21231124",
- "41231122", "22122124", "42122122", "11222125", "22131214",
- "42131212", "11231215", "31231213", "51231211", "12113125",
- "32113123", "52113121", "12122215", "32122213", "52122211",
- "21222214", "41222212", "22113214", "42113212", "11213215",
- "31213213", "51213211",
- /* Column 12 */
- "13131124", "33131122", "22231123",
- "42231121", "11331124", "31331122", "23122123", "43122121",
- "12222124", "23131213", "43131211", "12231214", "32231212",
- "21331213", "41331211", "13113124", "33113122", "13122214",
- "33122212", "11313124", "22222213", "42222211", "11322214",
- "31322212", "23113213", "43113211", "12213214", "32213212",
- "21313213", "41313211", "14131123", "34131121", "23231122",
- "12331123", "32331121", "21431122", "24122122", "13222123",
- "24131212", "13231213", "33231211", "11422123", "22331212",
- "11431213", "31431211", "14113123", "34113121", "14122213",
- "34122211", "12313123", "23222212", "12322213", "32322211",
- "21422212", "24113212", "13213213", "33213211", "22313212",
- /* Column 13 */
- "11413213", "31413211", "15131122", "24231121", "13331122",
- "22431121", "25122121", "14222122", "25131211", "14231212",
- "12422122", "23331211", "12431212", "15113122", "15122212",
- "13313122", "24222211", "13322212", "11513122", "22422211",
- "11522212", "25113211", "14213212", "23313211", "12413212",
- "21513211", "16131121", "14331121", "15222121", "15231211",
- "13422121", "13431211", "16113121", "16122211", "14313121",
- "14322211", "12513121", "12522211", "15213211", "13413211",
- "11613211", "11141125", "31141123", "51141121", "21132124",
- "41132122", "21141214", "41141212", "11123125", "31123123",
- "51123121", "11132215", "31132213", "51132211", "21114124",
- "41114122", "21123214", "41123212",
- /* Column 14 */
- "11114215", "31114213",
- "51114211", "12141124", "32141122", "21241123", "41241121",
- "22132123", "42132121", "11232124", "22141213", "42141211",
- "11241214", "31241212", "12123124", "32123122", "12132214",
- "32132212", "21232213", "41232211", "22114123", "42114121",
- "11214124", "22123213", "42123211", "11223214", "31223212",
- "12114214", "32114212", "21214213", "41214211", "13141123",
- "33141121", "22241122", "11341123", "31341121", "23132122",
- "12232123", "23141212", "12241213", "32241211", "21341212",
- "13123123", "33123121", "13132213", "33132211", "11323123",
- "22232212", "11332213", "31332211", "23114122", "12214123",
- "23123212", "12223213", "32223211", "21323212", "13114213",
- "33114211",
- /* Column 15 */
- "22214212", "11314213", "31314211", "14141122",
- "23241121", "12341122", "24132121", "13232122", "24141211",
- "13241212", "11432122", "22341211", "14123122", "14132212",
- "12323122", "23232211", "12332212", "21432211", "24114121",
- "13214122", "24123211", "13223212", "11414122", "22323211",
- "11423212", "14114212", "23214211", "12314212", "21414211",
- "15141121", "13341121", "14232121", "14241211", "12432121",
- "15123121", "15132211", "13323121", "13332211", "11523121",
- "14214121", "14223211", "12414121", "12423211", "15114211",
- "13314211", "11514211", "11151124", "31151122", "21142123",
- "41142121", "21151213", "41151211", "11133124", "31133122",
- "11142214", "31142212", "21124123", "41124121",
- /* Column 16 */
- "21133213",
- "41133211", "11115124", "31115122", "11124214", "31124212",
- "21115213", "41115211", "12151123", "32151121", "21251122",
- "22142122", "11242123", "22151212", "11251213", "31251211",
- "12133123", "32133121", "12142213", "32142211", "21242212",
- "22124122", "11224123", "22133212", "11233213", "31233211",
- "12115123", "32115121", "12124213", "32124211", "21224212",
- "22115212", "11215213", "31215211", "13151122", "22251121",
- "23142121", "12242122", "23151211", "12251212", "13133122",
- "13142212", "11333122", "22242211", "11342212", "23124121",
- "12224122", "23133211", "12233212", "21333211", "13115122",
- "13124212", "11315122", "22224211", "11324212", "23115211",
- "12215212", "21315211",
- /* Column 17 */
- "14151121", "13242121", "13251211",
- "14133121", "14142211", "12333121", "12342211", "13224121",
- "13233211", "11424121", "11433211", "14115121", "14124211",
- "12315121", "12324211", "13215211", "11415211", "11161123",
- "31161121", "21152122", "21161212", "11143123", "31143121",
- "11152213", "31152211", "21134122", "21143212", "11125123",
- "31125121", "11134213", "31134211", "21116122", "21125212",
- "12161122", "22152121", "11252122", "22161211", "12143122",
- "12152212", "21252211", "22134121", "11234122", "22143211",
- "11243212", "12125122", "12134212", "21234211", "22116121",
- "11216122", "22125211", "11225212", "13161121", "12252121",
- "13143121", "13152211", "11343121", "12234121", "12243211",
- /* Column 18 */
- "13125121", "13134211", "11325121", "11334211", "12216121",
- "12225211", "31111225", "51111223", "21111316", "41111314",
- "61111312", "31211134", "51211132", "12111226", "32111224",
- "52111222", "21211225", "41211223", "61211221", "22111315",
- "42111313", "11211316", "31211314", "51211312", "12211135",
- "32211133", "52211131", "21311134", "41311132", "13111225",
- "33111223", "22211224", "42211222", "11311225", "31311223",
- "51311221", "23111314", "43111312", "12211315", "32211313",
- "52211311", "21311314", "41311312", "13211134", "33211132",
- "22311133", "42311131", "11411134", "31411132", "14111224",
- "34111222", "23211223", "43211221", "12311224", "32311222",
- "21411223", "41411221", "24111313",
- /* Column 19 */
- "13211314", "33211312",
- "22311313", "42311311", "11411314", "31411312", "14211133",
- "34211131", "23311132", "12411133", "32411131", "21511132",
- "15111223", "24211222", "13311223", "33311221", "22411222",
- "11511223", "31511221", "25111312", "14211313", "34211311",
- "23311312", "12411313", "32411311", "21511312", "15211132",
- "24311131", "13411132", "22511131", "11611132", "16111222",
- "25211221", "14311222", "23411221", "12511222", "21611221",
- "15211312", "24311311", "13411312", "22511311", "11611312",
- "21121135", "41121133", "61121131", "11112136", "31112134",
- "51112132", "11121226", "31121224", "51121222", "21112225",
- "41112223", "61112221", "21121315", "41121313", "61121311",
- "11112316",
- /* Column 20 */
- "31112314", "51112312", "22121134", "42121132",
- "11221135", "31221133", "51221131", "12112135", "32112133",
- "52112131", "12121225", "32121223", "52121221", "21221224",
- "41221222", "22112224", "42112222", "11212225", "22121314",
- "42121312", "11221315", "31221313", "51221311", "12112315",
- "32112313", "52112311", "21212314", "41212312", "23121133",
- "43121131", "12221134", "32221132", "21321133", "41321131",
- "13112134", "33112132", "13121224", "33121222", "11312134",
- "22221223", "42221221", "11321224", "31321222", "23112223",
- "43112221", "12212224", "23121313", "43121311", "12221314",
- "32221312", "21321313", "41321311", "13112314", "33112312",
- "22212313", "42212311", "11312314", "31312312",
- /* Column 21 */
- "24121132",
- "13221133", "33221131", "22321132", "11421133", "31421131",
- "14112133", "34112131", "14121223", "34121221", "12312133",
- "23221222", "12321223", "32321221", "21421222", "24112222",
- "13212223", "24121312", "13221313", "33221311", "11412223",
- "22321312", "11421313", "31421311", "14112313", "34112311",
- "23212312", "12312313", "32312311", "21412312", "25121131",
- "14221132", "23321131", "12421132", "21521131", "15112132",
- "15121222", "13312132", "24221221", "13321222", "11512132",
- "22421221", "11521222", "25112221", "14212222", "25121311",
- "14221312", "12412222", "23321311", "12421312", "21521311",
- "15112312", "24212311", "13312312", "22412311", "11512312",
- "15221131", "13421131",
- /* Column 22 */
- "16112131", "16121221", "14312131",
- "14321221", "12512131", "12521221", "15212221", "15221311",
- "13412221", "13421311", "11612221", "16112311", "14312311",
- "12512311", "21131134", "41131132", "11122135", "31122133",
- "51122131", "11131225", "31131223", "51131221", "21113134",
- "41113132", "21122224", "41122222", "21131314", "41131312",
- "11113225", "31113223", "51113221", "11122315", "31122313",
- "51122311", "21113314", "41113312", "22131133", "42131131",
- "11231134", "31231132", "12122134", "32122132", "12131224",
- "32131222", "21231223", "41231221", "22113133", "42113131",
- "11213134", "22122223", "42122221", "11222224", "22131313",
- "42131311", "11231314", "31231312", "12113224", "32113222",
- /* Column 23 */
- "12122314", "32122312", "21222313", "41222311", "22113313",
- "42113311", "11213314", "31213312", "23131132", "12231133",
- "32231131", "21331132", "13122133", "33122131", "13131223",
- "33131221", "11322133", "22231222", "11331223", "31331221",
- "23113132", "12213133", "23122222", "12222223", "23131312",
- "12231313", "32231311", "21331312", "13113223", "33113221",
- "13122313", "33122311", "11313223", "22222312", "11322313",
- "31322311", "23113312", "12213313", "32213311", "21313312",
- "24131131", "13231132", "22331131", "11431132", "14122132",
- "14131222", "12322132", "23231221", "12331222", "21431221",
- "24113131", "13213132", "24122221", "13222222", "24131311",
- "11413132", "13231312", "11422222",
- /* Column 24 */
- "22331311", "11431312",
- "14113222", "14122312", "12313222", "23222311", "12322312",
- "21422311", "24113311", "13213312", "22313311", "11413312",
- "14231131", "12431131", "15122131", "15131221", "13322131",
- "13331221", "11522131", "14213131", "14222221", "12413131",
- "14231311", "12422221", "12431311", "15113221", "15122311",
- "13313221", "13322311", "11513221", "11522311", "14213311",
- "12413311", "21141133", "41141131", "11132134", "31132132",
- "11141224", "31141222", "21123133", "41123131", "21132223",
- "41132221", "21141313", "41141311", "11114134", "31114132",
- "11123224", "31123222", "11132314", "31132312", "21114223",
- "41114221", "21123313", "41123311", "11114314", "31114312",
- "22141132",
- /* Column 25 */
- "11241133", "31241131", "12132133", "32132131",
- "12141223", "32141221", "21241222", "22123132", "11223133",
- "22132222", "11232223", "22141312", "11241313", "31241311",
- "12114133", "32114131", "12123223", "32123221", "12132313",
- "32132311", "21232312", "22114222", "11214223", "22123312",
- "11223313", "31223311", "12114313", "32114311", "21214312",
- "23141131", "12241132", "21341131", "13132132", "13141222",
- "11332132", "22241221", "11341222", "23123131", "12223132",
- "23132221", "12232222", "23141311", "12241312", "21341311",
- "13114132", "13123222", "11314132", "13132312", "11323222",
- "22232311", "11332312", "23114221", "12214222", "23123311",
- "12223312", "21323311", "13114312", "22214311",
- /* Column 26 */
- "11314312",
- "13241131", "14132131", "14141221", "12332131", "12341221",
- "13223131", "13232221", "11423131", "13241311", "11432221",
- "14114131", "14123221", "12314131", "14132311", "12323221",
- "12332311", "13214221", "13223311", "11414221", "11423311",
- "14114311", "12314311", "21151132", "11142133", "31142131",
- "11151223", "31151221", "21133132", "21142222", "21151312",
- "11124133", "31124131", "11133223", "31133221", "11142313",
- "31142311", "21115132", "21124222", "21133312", "11115223",
- "31115221", "11124313", "31124311", "22151131", "11251132",
- "12142132", "12151222", "21251221", "22133131", "11233132",
- "22142221", "11242222", "22151311", "11251312", "12124132",
- "12133222", "12142312",
- /* Column 27 */
- "21242311", "22115131", "11215132",
- "22124221", "11224222", "22133311", "11233312", "12115222",
- "12124312", "21224311", "12251131", "13142131", "13151221",
- "11342131", "12233131", "12242221", "12251311", "13124131",
- "13133221", "11324131", "13142311", "11333221", "11342311",
- "12215131", "12224221", "12233311", "13115221", "13124311",
- "11315221", "11324311", "21161131", "11152132", "11161222",
- "21143131", "21152221", "21161311", "11134132", "11143222",
- "11152312", "21125131", "21134221", "21143311", "11116132",
- "11125222", "11134312", "12152131", "12161221", "11243131",
- "11252221", "12134131", "12143221", "12152311", "11225131",
- "11234221", "11243311", "12116131", "12125221", "12134311",
- /* Column 28 */
- "21111235", "41111233", "61111231", "11111326", "31111324",
- "51111322", "21111415", "41111413", "61111411", "21211144",
- "41211142", "22111234", "42111232", "11211235", "31211233",
- "51211231", "12111325", "32111323", "52111321", "21211324",
- "41211322", "22111414", "42111412", "11211415", "31211413",
- "51211411", "22211143", "42211141", "11311144", "31311142",
- "23111233", "43111231", "12211234", "32211232", "21311233",
- "41311231", "13111324", "33111322", "22211323", "42211321",
- "11311324", "31311322", "23111413", "43111411", "12211414",
- "32211412", "21311413", "41311411", "23211142", "12311143",
- "32311141", "21411142", "24111232", "13211233", "33211231",
- "22311232", "11411233", "31411231",
- /* Column 29 */
- "14111323", "34111321",
- "23211322", "12311323", "32311321", "21411322", "24111412",
- "13211413", "33211411", "22311412", "11411413", "31411411",
- "24211141", "13311142", "22411141", "11511142", "25111231",
- "14211232", "23311231", "12411232", "21511231", "15111322",
- "24211321", "13311322", "22411321", "11511322", "25111411",
- "14211412", "23311411", "12411412", "21511411", "14311141",
- "12511141", "15211231", "13411231", "11611231", "16111321",
- "14311321", "12511321", "15211411", "13411411", "11611411",
- "31121143", "51121141", "21112144", "41112142", "21121234",
- "41121232", "11112235", "31112233", "51112231", "11121325",
- "31121323", "51121321", "21112324", "41112322", "21121414",
- "41121412",
- /* Column 30 */
- "11112415", "31112413", "51112411", "12121144",
- "32121142", "21221143", "41221141", "22112143", "42112141",
- "11212144", "22121233", "42121231", "11221234", "31221232",
- "12112234", "32112232", "12121324", "32121322", "21221323",
- "41221321", "22112323", "42112321", "11212324", "22121413",
- "42121411", "11221414", "31221412", "12112414", "32112412",
- "21212413", "41212411", "13121143", "33121141", "22221142",
- "11321143", "31321141", "23112142", "12212143", "23121232",
- "12221233", "32221231", "21321232", "13112233", "33112231",
- "13121323", "33121321", "11312233", "22221322", "11321323",
- "31321321", "23112322", "12212323", "23121412", "12221413",
- "32221411", "21321412", "13112413", "33112411",
- /* Column 31 */
- "22212412",
- "11312413", "31312411", "14121142", "23221141", "12321142",
- "21421141", "24112141", "13212142", "24121231", "13221232",
- "11412142", "22321231", "11421232", "14112232", "14121322",
- "12312232", "23221321", "12321322", "21421321", "24112321",
- "13212322", "24121411", "13221412", "11412322", "22321411",
- "11421412", "14112412", "23212411", "12312412", "21412411",
- "15121141", "13321141", "11521141", "14212141", "14221231",
- "12412141", "12421231", "15112231", "15121321", "13312231",
- "13321321", "11512231", "11521321", "14212321", "14221411",
- "12412321", "12421411", "15112411", "13312411", "11512411",
- "11131144", "31131142", "21122143", "41122141", "21131233",
- "41131231", "11113144",
- /* Column 32 */
- "31113142", "11122234", "31122232",
- "11131324", "31131322", "21113233", "41113231", "21122323",
- "41122321", "21131413", "41131411", "11113324", "31113322",
- "11122414", "31122412", "21113413", "41113411", "12131143",
- "32131141", "21231142", "22122142", "11222143", "22131232",
- "11231233", "31231231", "12113143", "32113141", "12122233",
- "32122231", "12131323", "32131321", "21231322", "22113232",
- "11213233", "22122322", "11222323", "22131412", "11231413",
- "31231411", "12113323", "32113321", "12122413", "32122411",
- "21222412", "22113412", "11213413", "31213411", "13131142",
- "22231141", "11331142", "23122141", "12222142", "23131231",
- "12231232", "21331231", "13113142", "13122232", "11313142",
- /* Column 33 */
- "13131322", "11322232", "22231321", "11331322", "23113231",
- "12213232", "23122321", "12222322", "23131411", "12231412",
- "21331411", "13113322", "13122412", "11313322", "22222411",
- "11322412", "23113411", "12213412", "21313411", "14131141",
- "12331141", "13222141", "13231231", "11422141", "11431231",
- "14113141", "14122231", "12313141", "14131321", "12322231",
- "12331321", "13213231", "13222321", "11413231", "13231411",
- "11422321", "11431411", "14113321", "14122411", "12313321",
- "12322411", "13213411", "11413411", "11141143", "31141141",
- "21132142", "21141232", "11123143", "31123141", "11132233",
- "31132231", "11141323", "31141321", "21114142", "21123232",
- "21132322", "21141412", "11114233",
- /* Column 34 */
- "31114231", "11123323",
- "31123321", "11132413", "31132411", "21114322", "21123412",
- "12141142", "21241141", "22132141", "11232142", "22141231",
- "11241232", "12123142", "12132232", "12141322", "21241321",
- "22114141", "11214142", "22123231", "11223232", "22132321",
- "11232322", "22141411", "11241412", "12114232", "12123322",
- "12132412", "21232411", "22114321", "11214322", "22123411",
- "11223412", "13141141", "11341141", "12232141", "12241231",
- "13123141", "13132231", "11323141", "13141321", "11332231",
- "11341321", "12214141", "12223231", "12232321", "12241411",
- "13114231", "13123321", "11314231", "13132411", "11323321",
- "11332411", "12214321", "12223411", "11151142", "21142141",
- "21151231",
- /* Column 35 */
- "11133142", "11142232", "11151322", "21124141",
- "21133231", "21142321", "21151411", "11115142", "11124232",
- "11133322", "11142412", "21115231", "21124321", "21133411",
- "12151141", "11242141", "11251231", "12133141", "12142231",
- "12151321", "11224141", "11233231", "11242321", "11251411",
- "12115141", "12124231", "12133321", "12142411", "11215231",
- "11224321", "11233411", "11161141", "11143141", "11152231",
- "11161321", "11125141", "11134231", "11143321", "11152411",
- "11111245", "31111243", "51111241", "21111334", "41111332",
- "11111425", "31111423", "51111421", "21111514", "41111512",
- "31211152", "12111244", "32111242", "21211243", "41211241",
- "22111333", "42111331", "11211334", "31211332",
- /* Column 36 */
- "12111424",
- "32111422", "21211423", "41211421", "22111513", "42111511",
- "11211514", "31211512", "12211153", "32211151", "21311152",
- "13111243", "33111241", "22211242", "11311243", "31311241",
- "23111332", "12211333", "32211331", "21311332", "13111423",
- "33111421", "22211422", "11311423", "31311421", "23111512",
- "12211513", "32211511", "21311512", "13211152", "22311151",
- "11411152", "14111242", "23211241", "12311242", "21411241",
- "24111331", "13211332", "22311331", "11411332", "14111422",
- "23211421", "12311422", "21411421", "24111511", "13211512",
- "22311511", "11411512", "14211151", "12411151", "15111241",
- "13311241", "11511241", "14211331", "12411331", "15111421",
- "13311421", "11511421",
- /* Column 37 */
- "14211511", "12411511", "21121153",
- "41121151", "11112154", "31112152", "11121244", "31121242",
- "21112243", "41112241", "21121333", "41121331", "11112334",
- "31112332", "11121424", "31121422", "21112423", "41112421",
- "21121513", "41121511", "11112514", "31112512", "22121152",
- "11221153", "31221151", "12112153", "32112151", "12121243",
- "32121241", "21221242", "22112242", "11212243", "22121332",
- "11221333", "31221331", "12112333", "32112331", "12121423",
- "32121421", "21221422", "22112422", "11212423", "22121512",
- "11221513", "31221511", "12112513", "32112511", "21212512",
- "23121151", "12221152", "21321151", "13112152", "13121242",
- "11312152", "22221241", "11321242", "23112241", "12212242",
- /* Column 38 */
- "23121331", "12221332", "21321331", "13112332", "13121422",
- "11312332", "22221421", "11321422", "23112421", "12212422",
- "23121511", "12221512", "21321511", "13112512", "22212511",
- "11312512", "13221151", "11421151", "14112151", "14121241",
- "12312151", "12321241", "13212241", "13221331", "11412241",
- "11421331", "14112331", "14121421", "12312331", "12321421",
- "13212421", "13221511", "11412421", "11421511", "14112511",
- "12312511", "21131152", "11122153", "31122151", "11131243",
- "31131241", "21113152", "21122242", "21131332", "11113243",
- "31113241", "11122333", "31122331", "11131423", "31131421",
- "21113332", "21122422", "21131512", "11113423", "31113421",
- "11122513", "31122511", "22131151",
- /* Column 39 */
- "11231152", "12122152",
- "12131242", "21231241", "22113151", "11213152", "22122241",
- "11222242", "22131331", "11231332", "12113242", "12122332",
- "12131422", "21231421", "22113331", "11213332", "22122421",
- "11222422", "22131511", "11231512", "12113422", "12122512",
- "21222511", "12231151", "13122151", "13131241", "11322151",
- "11331241", "12213151", "12222241", "12231331", "13113241",
- "13122331", "11313241", "13131421", "11322331", "11331421",
- "12213331", "12222421", "12231511", "13113421", "13122511",
- "11313421", "11322511", "21141151", "11132152", "11141242",
- "21123151", "21132241", "21141331", "11114152", "11123242",
- "11132332", "11141422", "21114241", "21123331", "21132421",
- "21141511",
- /* Column 40 */
- "11114332", "11123422", "11132512", "11241151",
- "12132151", "12141241", "11223151", "11232241", "11241331",
- "12114151", "12123241", "12132331", "12141421", "11214241",
- "11223331", "11232421", "11241511", "12114331", "12123421",
- "12132511", "11142151", "11151241", "11124151", "11133241",
- "11142331", "11151421", "11115241", "11124331", "11133421",
- "11142511", "21111253", "41111251", "11111344", "31111342",
- "21111433", "41111431", "11111524", "31111522", "21111613",
- "41111611", "21211162", "22111252", "11211253", "31211251",
- "12111343", "32111341", "21211342", "22111432", "11211433",
- "31211431", "12111523", "32111521", "21211522", "22111612",
- "11211613", "31211611", "22211161", "11311162",
- /* Column 41 */
- "23111251",
- "12211252", "21311251", "13111342", "22211341", "11311342",
- "23111431", "12211432", "21311431", "13111522", "22211521",
- "11311522", "23111611", "12211612", "21311611", "12311161",
- "13211251", "11411251", "14111341", "12311341", "13211431",
- "11411431", "14111521", "12311521", "13211611", "11411611",
- "31121161", "21112162", "21121252", "11112253", "31112251",
- "11121343", "31121341", "21112342", "21121432", "11112433",
- "31112431", "11121523", "31121521", "21112522", "21121612",
- /* Column 42 */
- "12121162", "21221161", "22112161", "11212162", "22121251",
- "11221252", "12112252", "12121342", "21221341", "22112341",
- "11212342", "22121431", "11221432", "12112432", "12121522",
- "21221521", "22112521", "11212522", "22121611", "11221612",
- "13121161", "11321161", "12212161", "12221251", "13112251",
- "13121341", "11312251", "11321341", "12212341", "12221431",
- "13112431", "13121521", "11312431", "11321521", "12212521",
- "12221611", "11131162", "21122161", "21131251", "11113162"
-};
diff --git a/3rdparty/zint-2.4.4/backend/common.c b/3rdparty/zint-2.4.4/backend/common.c
deleted file mode 100644
index 981902e..0000000
--- a/3rdparty/zint-2.4.4/backend/common.c
+++ /dev/null
@@ -1,374 +0,0 @@
-/* common.c - Contains functions needed for a number of barcodes */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-#include
-#include
-#include
-#include "common.h"
-
-int ustrlen(unsigned char data[]) {
- /* Local replacement for strlen() with unsigned char strings */
- int i;
- for (i=0;data[i];i++);
-
- return i;
-}
-
-void ustrcpy(unsigned char target[], unsigned char source[]) {
- /* Local replacement for strcpy() with unsigned char strings */
- int i, len;
-
- len = ustrlen(source);
- for(i = 0; i < len; i++) {
- target[i] = source[i];
- }
- target[i] = '\0';
-}
-
-void concat(char dest[], char source[])
-{ /* Concatinates dest[] with the contents of source[], copying /0 as well */
- unsigned int i, j, n;
-
- j = strlen(dest);
- n = strlen(source);
- for(i = 0; i <= n; i++) {
- dest[i + j] = source[i]; }
-}
-
-void uconcat(unsigned char dest[], unsigned char source[])
-{ /* Concatinates dest[] with the contents of source[], copying /0 as well */
- unsigned int i, j;
-
- j = ustrlen(dest);
- for(i = 0; i <= ustrlen(source); i++) {
- dest[i + j] = source[i]; }
-}
-
-
-int ctoi(char source)
-{ /* Converts a character 0-9 to its equivalent integer value */
- if((source >= '0') && (source <= '9'))
- return (source - '0');
- return(source - 'A' + 10);
-}
-
-char itoc(int source)
-{ /* Converts an integer value to its hexadecimal character */
- if ((source >= 0) && (source <= 9)) {
- return ('0' + source); }
- else {
- return ('A' + (source - 10)); }
-}
-
-void to_upper(unsigned char source[])
-{ /* Converts lower case characters to upper case in a string source[] */
- unsigned int i, src_len = ustrlen(source);
-
- for (i = 0; i < src_len; i++) {
- if ((source[i] >= 'a') && (source[i] <= 'z')) {
- source [i] = (source[i] - 'a') + 'A'; }
- }
-}
-
-int is_sane(char test_string[], unsigned char source[], int length)
-{ /* Verifies that a string only uses valid characters */
- unsigned int i, j, latch;
- unsigned int lt = strlen(test_string);
-
- for(i = 0; i < length; i++) {
- latch = FALSE;
- for(j = 0; j < lt; j++) {
- if (source[i] == test_string[j]) {
- latch = TRUE;
- break;
- }
- }
- if (!(latch)) {
- return ERROR_INVALID_DATA1;
- }
- }
-
- return 0;
-}
-
-int posn(char set_string[], char data)
-{ /* Returns the position of data in set_string */
- unsigned int i, n = strlen(set_string);
-
- for(i = 0; i < n; i++) {
- if (data == set_string[i]) { return i; } }
- return 0;
-}
-
-void lookup(char set_string[], char *table[], char data, char dest[])
-{ /* Replaces huge switch statements for looking up in tables */
- unsigned int i, n = strlen(set_string);
-
- for(i = 0; i < n; i++) {
- if (data == set_string[i]) { concat(dest, table[i]); } }
-}
-
-int module_is_set(struct zint_symbol *symbol, int y_coord, int x_coord)
-{
- return (symbol->encoded_data[y_coord][x_coord / 7] >> (x_coord % 7)) & 1;
-#if 0
- switch(x_sub) {
- case 0: if((symbol->encoded_data[y_coord][x_char] & 0x01) != 0) { result = 1; } break;
- case 1: if((symbol->encoded_data[y_coord][x_char] & 0x02) != 0) { result = 1; } break;
- case 2: if((symbol->encoded_data[y_coord][x_char] & 0x04) != 0) { result = 1; } break;
- case 3: if((symbol->encoded_data[y_coord][x_char] & 0x08) != 0) { result = 1; } break;
- case 4: if((symbol->encoded_data[y_coord][x_char] & 0x10) != 0) { result = 1; } break;
- case 5: if((symbol->encoded_data[y_coord][x_char] & 0x20) != 0) { result = 1; } break;
- case 6: if((symbol->encoded_data[y_coord][x_char] & 0x40) != 0) { result = 1; } break;
- }
-
- return result;
-#endif
-}
-
-void set_module(struct zint_symbol *symbol, int y_coord, int x_coord)
-{
- symbol->encoded_data[y_coord][x_coord / 7] |= 1 << (x_coord % 7);
-#if 0
- int x_char, x_sub;
-
-
- x_char = x_coord / 7;
- x_sub = x_coord % 7;
-
- switch(x_sub) {
- case 0: symbol->encoded_data[y_coord][x_char] += 0x01; break;
- case 1: symbol->encoded_data[y_coord][x_char] += 0x02; break;
- case 2: symbol->encoded_data[y_coord][x_char] += 0x04; break;
- case 3: symbol->encoded_data[y_coord][x_char] += 0x08; break;
- case 4: symbol->encoded_data[y_coord][x_char] += 0x10; break;
- case 5: symbol->encoded_data[y_coord][x_char] += 0x20; break;
- case 6: symbol->encoded_data[y_coord][x_char] += 0x40; break;
- } /* The last binary digit is reserved for colour barcodes */
-#endif
-}
-
-void unset_module(struct zint_symbol *symbol, int y_coord, int x_coord)
-{
- symbol->encoded_data[y_coord][x_coord / 7] &= ~(1 << (x_coord % 7));
-#if 0
- int x_char, x_sub;
-
- x_char = x_coord / 7;
- x_sub = x_coord % 7;
-
- switch(x_sub) {
- case 0: symbol->encoded_data[y_coord][x_char] -= 0x01; break;
- case 1: symbol->encoded_data[y_coord][x_char] -= 0x02; break;
- case 2: symbol->encoded_data[y_coord][x_char] -= 0x04; break;
- case 3: symbol->encoded_data[y_coord][x_char] -= 0x08; break;
- case 4: symbol->encoded_data[y_coord][x_char] -= 0x10; break;
- case 5: symbol->encoded_data[y_coord][x_char] -= 0x20; break;
- case 6: symbol->encoded_data[y_coord][x_char] -= 0x40; break;
- } /* The last binary digit is reserved for colour barcodes */
-#endif
-}
-
-void expand(struct zint_symbol *symbol, char data[])
-{ /* Expands from a width pattern to a bit pattern */
-
- unsigned int reader, n = strlen(data);
- int writer, i;
- char latch;
-
- writer = 0;
- latch = '1';
-
- for(reader = 0; reader < n; reader++) {
- for(i = 0; i < ctoi(data[reader]); i++) {
- if(latch == '1') { set_module(symbol, symbol->rows, writer); }
- writer++;
- }
-
- latch = (latch == '1' ? '0' : '1');
- }
-
- if(symbol->symbology != BARCODE_PHARMA) {
- if(writer > symbol->width) {
- symbol->width = writer;
- }
- } else {
- /* Pharmacode One ends with a space - adjust for this */
- if(writer > symbol->width + 2) {
- symbol->width = writer - 2;
- }
- }
- symbol->rows = symbol->rows + 1;
-}
-
-int is_stackable(int symbology) {
- /* Indicates which symbologies can have row binding */
- if(symbology < BARCODE_PDF417) { return 1; }
- if(symbology == BARCODE_CODE128B) { return 1; }
- if(symbology == BARCODE_ISBNX) { return 1; }
- if(symbology == BARCODE_EAN14) { return 1; }
- if(symbology == BARCODE_NVE18) { return 1; }
- if(symbology == BARCODE_KOREAPOST) { return 1; }
- if(symbology == BARCODE_PLESSEY) { return 1; }
- if(symbology == BARCODE_TELEPEN_NUM) { return 1; }
- if(symbology == BARCODE_ITF14) { return 1; }
- if(symbology == BARCODE_CODE32) { return 1; }
-
- return 0;
-}
-
-int is_extendable(int symbology) {
- /* Indicates which symbols can have addon */
- if(symbology == BARCODE_EANX) { return 1; }
- if(symbology == BARCODE_UPCA) { return 1; }
- if(symbology == BARCODE_UPCE) { return 1; }
- if(symbology == BARCODE_ISBNX) { return 1; }
- if(symbology == BARCODE_UPCA_CC) { return 1; }
- if(symbology == BARCODE_UPCE_CC) { return 1; }
- if(symbology == BARCODE_EANX_CC) { return 1; }
-
- return 0;
-}
-
-int roundup(float input)
-{
- float remainder;
- int integer_part;
-
- integer_part = (int)input;
- remainder = input - integer_part;
-
- if(remainder > 0.1) {
- integer_part++;
- }
-
- return integer_part;
-}
-
-int istwodigits(unsigned char source[], int position)
-{
- if((source[position] >= '0') && (source[position] <= '9')) {
- if((source[position + 1] >= '0') && (source[position + 1] <= '9')) {
- return 1;
- }
- }
-
- return 0;
-}
-
-float froundup(float input)
-{
- float fraction, output = 0.0;
-
- fraction = input - (int)input;
- if(fraction > 0.01) { output = (input - fraction) + 1.0; } else { output = input; }
-
- return output;
-}
-
-int latin1_process(struct zint_symbol *symbol, unsigned char source[], unsigned char preprocessed[], int *length)
-{
- int j, i, next;
-
- /* Convert Unicode to Latin-1 for those symbologies which only support Latin-1 */
- j = 0;
- i = 0;
- do {
- next = -1;
- if(source[i] < 128) {
- preprocessed[j] = source[i];
- j++;
- next = i + 1;
- } else {
- if(source[i] == 0xC2) {
- preprocessed[j] = source[i + 1];
- j++;
- next = i + 2;
- }
- if(source[i] == 0xC3) {
- preprocessed[j] = source[i + 1] + 64;
- j++;
- next = i + 2;
- }
- }
- if(next == -1) {
- strcpy(symbol->errtxt, "error: Invalid character in input string (only Latin-1 characters supported)");
- return ERROR_INVALID_DATA1;
- }
- i = next;
- } while(i < *length);
- preprocessed[j] = '\0';
- *length = j;
-
- return 0;
-}
-
-int utf8toutf16(struct zint_symbol *symbol, unsigned char source[], int vals[], int *length)
-{
- int bpos, jpos, error_number;
- int next;
-
- bpos = 0;
- jpos = 0;
- error_number = 0;
- next = 0;
-
- do {
- if(source[bpos] <= 0x7f) {
- /* 1 byte mode (7-bit ASCII) */
- vals[jpos] = source[bpos];
- next = bpos + 1;
- jpos++;
- } else {
- if((source[bpos] >= 0x80) && (source[bpos] <= 0xbf)) {
- strcpy(symbol->errtxt, "Corrupt Unicode data");
- return ERROR_INVALID_DATA1;
- }
- if((source[bpos] >= 0xc0) && (source[bpos] <= 0xc1)) {
- strcpy(symbol->errtxt, "Overlong encoding not supported");
- return ERROR_INVALID_DATA1;
- }
-
- if((source[bpos] >= 0xc2) && (source[bpos] <= 0xdf)) {
- /* 2 byte mode */
- vals[jpos] = ((source[bpos] & 0x1f) << 6) + (source[bpos + 1] & 0x3f);
- next = bpos + 2;
- jpos++;
- } else
- if((source[bpos] >= 0xe0) && (source[bpos] <= 0xef)) {
- /* 3 byte mode */
- vals[jpos] = ((source[bpos] & 0x0f) << 12) + ((source[bpos + 1] & 0x3f) << 6) + (source[bpos + 2] & 0x3f);
- next = bpos + 3;
- jpos ++;
- } else
- if(source[bpos] >= 0xf0) {
- strcpy(symbol->errtxt, "Unicode sequences of more than 3 bytes not supported");
- return ERROR_INVALID_DATA1;
- }
- }
-
- bpos = next;
-
- } while(bpos < *length);
- *length = jpos;
-
- return error_number;
-}
-
diff --git a/3rdparty/zint-2.4.4/backend/common.h b/3rdparty/zint-2.4.4/backend/common.h
deleted file mode 100644
index 52bc911..0000000
--- a/3rdparty/zint-2.4.4/backend/common.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/* common.h - Header for all common functions in common.c */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-/* Used in some logic */
-#ifndef __COMMON_H
-#define __COMMON_H
-
-#ifndef FALSE
-#define FALSE 0
-#endif
-
-#ifndef TRUE
-#define TRUE 1
-#endif
-
-/* The most commonly used set */
-#define NEON "0123456789"
-
-#include "zint.h"
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern int ustrlen(unsigned char source[]);
-extern void ustrcpy(unsigned char target[], unsigned char source[]);
-extern void concat(char dest[], char source[]);
-extern void uconcat(unsigned char dest[], unsigned char source[]);
-extern int ctoi(char source);
-extern char itoc(int source);
-extern void to_upper(unsigned char source[]);
-extern int is_sane(char test_string[], unsigned char source[], int length);
-extern void lookup(char set_string[], char *table[], char data, char dest[]);
-extern int posn(char set_string[], char data);
-extern void expand(struct zint_symbol *symbol, char data[]);
-extern int is_stackable(int symbology);
-extern int is_extendable(int symbology);
-extern int roundup(float input);
-extern int module_is_set(struct zint_symbol *symbol, int y_coord, int x_coord);
-extern void set_module(struct zint_symbol *symbol, int y_coord, int x_coord);
-extern void unset_module(struct zint_symbol *symbol, int y_coord, int x_coord);
-extern int istwodigits(unsigned char source[], int position);
-extern float froundup(float input);
-extern int parunmodd(unsigned char llyth);
-extern int latin1_process(struct zint_symbol *symbol, unsigned char source[], unsigned char preprocessed[], int *length);
-extern int utf8toutf16(struct zint_symbol *symbol, unsigned char source[], int vals[], int *length);
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __COMMON_H */
diff --git a/3rdparty/zint-2.4.4/backend/composite.c b/3rdparty/zint-2.4.4/backend/composite.c
deleted file mode 100644
index 5b21d13..0000000
--- a/3rdparty/zint-2.4.4/backend/composite.c
+++ /dev/null
@@ -1,1957 +0,0 @@
-/* composite.c - Handles UCC.EAN Composite Symbols */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-/* The functions "getBit", "init928" and "encode928" are copyright BSI and are
- released with permission under the following terms:
-
- "Copyright subsists in all BSI publications. BSI also holds the copyright, in the
- UK, of the international standardisation bodies. Except as
- permitted under the Copyright, Designs and Patents Act 1988 no extract may be
- reproduced, stored in a retrieval system or transmitted in any form or by any
- means - electronic, photocopying, recording or otherwise - without prior written
- permission from BSI.
-
- "This does not preclude the free use, in the course of implementing the standard,
- of necessary details such as symbols, and size, type or grade designations. If these
- details are to be used for any other purpose than implementation then the prior
- written permission of BSI must be obtained."
-
- The date of publication for these functions is 31 May 2006
-*/
-
-#include
-#include
-#include
-#include
-#ifdef _MSC_VER
-#include
-#endif
-#include "common.h"
-#include "large.h"
-#include "composite.h"
-#include "pdf417.h"
-#include "gs1.h"
-
-#define UINT unsigned short
-
-extern int general_rules(char field[], char type[]);
-extern int eanx(struct zint_symbol *symbol, unsigned char source[], int length);
-extern int ean_128(struct zint_symbol *symbol, unsigned char source[], int length);
-extern int rss14(struct zint_symbol *symbol, unsigned char source[], int length);
-extern int rsslimited(struct zint_symbol *symbol, unsigned char source[], int length);
-extern int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int length);
-
-static UINT pwr928[69][7];
-
-int _min(int first, int second) {
-
- if(first <= second)
- return first;
- else
- return second;
-}
-
-/* gets bit in bitString at bitPos */
-int getBit(UINT *bitStr, int bitPos) {
- return !!(bitStr[bitPos >> 4] & (0x8000 >> (bitPos & 15)));
-}
-
-/* initialize pwr928 encoding table */
-void init928(void) {
- int i, j, v;
- int cw[7];
- cw[6] = 1L;
- for (i = 5; i >= 0; i--)
- cw[i] = 0;
-
- for (i = 0; i < 7; i++)
- pwr928[0][i] = cw[i];
- for (j = 1; j < 69; j++) {
- for (v = 0, i = 6; i >= 1; i--) {
- v = (2 * cw[i]) + (v / 928);
- pwr928[j][i] = cw[i] = v % 928;
- }
- pwr928[j][0] = cw[0] = (2 * cw[0]) + (v / 928);
- }
- return;
-}
-
-/* converts bit string to base 928 values, codeWords[0] is highest order */
-int encode928(UINT bitString[], UINT codeWords[], int bitLng) {
- int i, j, b, bitCnt, cwNdx, cwCnt, cwLng;
- for (cwNdx = cwLng = b = 0; b < bitLng; b += 69, cwNdx += 7) {
- bitCnt = _min(bitLng-b, 69);
- cwLng += cwCnt = bitCnt/10 + 1;
- for (i = 0; i < cwCnt; i++)
- codeWords[cwNdx+i] = 0; /* init 0 */
- for (i = 0; i < bitCnt; i++) {
- if (getBit(bitString, b+bitCnt-i-1)) {
- for (j = 0; j < cwCnt; j++)
- codeWords[cwNdx+j] += pwr928[i][j+7-cwCnt];
- }
- }
- for (i = cwCnt-1; i > 0; i--) {
- /* add "carries" */
- codeWords[cwNdx+i-1] += codeWords[cwNdx+i]/928L;
- codeWords[cwNdx+i] %= 928L;
- }
- }
- return (cwLng);
-}
-
-int cc_a(struct zint_symbol *symbol, char source[], int cc_width)
-{ /* CC-A 2D component */
- int i, strpos, segment, bitlen, cwCnt, variant, rows;
- int k, offset, j, total, rsCodeWords[8];
- int LeftRAPStart, RightRAPStart, CentreRAPStart, StartCluster;
- int LeftRAP, RightRAP, CentreRAP, Cluster, dummy[5];
- int writer, flip, loop;
- UINT codeWords[28];
- UINT bitStr[13];
- char codebarre[100], pattern[580];
- char local_source[210]; /* A copy of source but with padding zeroes to make 208 bits */
-
- variant=0;
-
- for(i = 0; i < 13; i++) { bitStr[i] = 0; }
- for(i = 0; i < 28; i++) { codeWords[i] = 0; }
-
- bitlen = strlen(source);
-
- for(i = 0; i < 208; i++) { local_source[i] = '0'; }
- for(i = 0; i < bitlen; i++) { local_source[i] = source[i]; }
- local_source[208] = '\0';
-
- for(segment = 0; segment < 13; segment++) {
- strpos = segment * 16;
- if(local_source[strpos] == '1') { bitStr[segment] += 0x8000; }
- if(local_source[strpos + 1] == '1') { bitStr[segment] += 0x4000; }
- if(local_source[strpos + 2] == '1') { bitStr[segment] += 0x2000; }
- if(local_source[strpos + 3] == '1') { bitStr[segment] += 0x1000; }
- if(local_source[strpos + 4] == '1') { bitStr[segment] += 0x800; }
- if(local_source[strpos + 5] == '1') { bitStr[segment] += 0x400; }
- if(local_source[strpos + 6] == '1') { bitStr[segment] += 0x200; }
- if(local_source[strpos + 7] == '1') { bitStr[segment] += 0x100; }
- if(local_source[strpos + 8] == '1') { bitStr[segment] += 0x80; }
- if(local_source[strpos + 9] == '1') { bitStr[segment] += 0x40; }
- if(local_source[strpos + 10] == '1') { bitStr[segment] += 0x20; }
- if(local_source[strpos + 11] == '1') { bitStr[segment] += 0x10; }
- if(local_source[strpos + 12] == '1') { bitStr[segment] += 0x08; }
- if(local_source[strpos + 13] == '1') { bitStr[segment] += 0x04; }
- if(local_source[strpos + 14] == '1') { bitStr[segment] += 0x02; }
- if(local_source[strpos + 15] == '1') { bitStr[segment] += 0x01; }
- }
-
- init928();
- /* encode codeWords from bitStr */
- cwCnt = encode928(bitStr, codeWords, bitlen);
-
- switch(cc_width) {
- case 2:
- switch(cwCnt) {
- case 6: variant = 0; break;
- case 8: variant = 1; break;
- case 9: variant = 2; break;
- case 11: variant = 3; break;
- case 12: variant = 4; break;
- case 14: variant = 5; break;
- case 17: variant = 6; break;
- }
- break;
- case 3:
- switch(cwCnt) {
- case 8: variant = 7; break;
- case 10: variant = 8; break;
- case 12: variant = 9; break;
- case 14: variant = 10; break;
- case 17: variant = 11; break;
- }
- break;
- case 4:
- switch(cwCnt) {
- case 8: variant = 12; break;
- case 11: variant = 13; break;
- case 14: variant = 14; break;
- case 17: variant = 15; break;
- case 20: variant = 16; break;
- }
- break;
- }
-
- rows = ccaVariants[variant];
- k = ccaVariants[17 + variant];
- offset = ccaVariants[34 + variant];
-
- /* Reed-Solomon error correction */
-
- for(i = 0; i < 8; i++) {
- rsCodeWords[i] = 0;
- }
- total = 0;
- for(i = 0; i < cwCnt; i++) {
- total = (codeWords[i] + rsCodeWords[k - 1]) % 929;
- for(j = k - 1; j >= 0; j--) {
- if(j == 0) {
- rsCodeWords[j] = (929 - (total * ccaCoeffs[offset + j]) % 929) % 929;
- } else {
- rsCodeWords[j] = (rsCodeWords[j - 1] + 929 - (total * ccaCoeffs[offset + j]) % 929) % 929;
- }
- }
- }
-
- for(j = 0; j < k; j++) {
- if(rsCodeWords[j] != 0) { rsCodeWords[j] = 929 - rsCodeWords[j]; }
- }
-
- for(i = k - 1; i >= 0; i--) {
- codeWords[cwCnt] = rsCodeWords[i];
- cwCnt++;
- }
-
- /* Place data into table */
- LeftRAPStart = aRAPTable[variant];
- CentreRAPStart = aRAPTable[variant + 17];
- RightRAPStart = aRAPTable[variant + 34];
- StartCluster = aRAPTable[variant + 51] / 3;
-
- LeftRAP = LeftRAPStart;
- CentreRAP = CentreRAPStart;
- RightRAP = RightRAPStart;
- Cluster = StartCluster; /* Cluster can be 0, 1 or 2 for Cluster(0), Cluster(3) and Cluster(6) */
-
- for(i = 0; i < rows; i++) {
- strcpy(codebarre, "");
- offset = 929 * Cluster;
- for(j = 0; j < 5; j++) {
- dummy[j] = 0;
- }
- for(j = 0; j < cc_width ; j++) {
- dummy[j + 1] = codeWords[i * cc_width + j];
- }
- /* Copy the data into codebarre */
- concat(codebarre, RAPLR[LeftRAP]);
- concat(codebarre, "1");
- concat(codebarre, codagemc[offset + dummy[1]]);
- concat(codebarre, "1");
- if(cc_width == 3) {
- concat(codebarre, RAPC[CentreRAP]);
- }
- if(cc_width >= 2) {
- concat(codebarre, "1");
- concat(codebarre, codagemc[offset + dummy[2]]);
- concat(codebarre, "1");
- }
- if(cc_width == 4) {
- concat(codebarre, RAPC[CentreRAP]);
- }
- if(cc_width >= 3) {
- concat(codebarre, "1");
- concat(codebarre, codagemc[offset + dummy[3]]);
- concat(codebarre, "1");
- }
- if(cc_width == 4) {
- concat(codebarre, "1");
- concat(codebarre, codagemc[offset + dummy[4]]);
- concat(codebarre, "1");
- }
- concat(codebarre, RAPLR[RightRAP]);
- concat(codebarre, "1"); /* stop */
-
- /* Now codebarre is a mixture of letters and numbers */
-
- writer = 0;
- flip = 1;
- strcpy(pattern, "");
- for(loop = 0; loop < strlen(codebarre); loop++) {
- if((codebarre[loop] >= '0') && (codebarre[loop] <= '9')) {
- for(k = 0; k < ctoi(codebarre[loop]); k++) {
- if(flip == 0) {
- pattern[writer] = '0';
- } else {
- pattern[writer] = '1';
- }
- writer++;
- }
- pattern[writer] = '\0';
- if(flip == 0) {
- flip = 1;
- } else {
- flip = 0;
- }
- } else {
- lookup(BRSET, PDFttf, codebarre[loop], pattern);
- writer += 5;
- }
- }
- symbol->width = writer;
-
- /* so now pattern[] holds the string of '1's and '0's. - copy this to the symbol */
- for(loop = 0; loop < strlen(pattern); loop++) {
- if(pattern[loop] == '1') { set_module(symbol, i, loop); }
- }
- symbol->row_height[i] = 2;
- symbol->rows++;
-
- /* Set up RAPs and Cluster for next row */
- LeftRAP++;
- CentreRAP++;
- RightRAP++;
- Cluster++;
-
- if(LeftRAP == 53) {
- LeftRAP = 1;
- }
- if(CentreRAP == 53) {
- CentreRAP = 1;
- }
- if(RightRAP == 53) {
- RightRAP = 1;
- }
- if(Cluster == 3) {
- Cluster = 0;
- }
- }
-
- return 0;
-}
-
-int cc_b(struct zint_symbol *symbol, char source[], int cc_width)
-{ /* CC-B 2D component */
- int length, i, binloc;
-#ifndef _MSC_VER
- unsigned char data_string[(strlen(source) / 8) + 3];
-#else
- unsigned char* data_string = (unsigned char*)_alloca((strlen(source) / 8) + 3);
-#endif
- int chainemc[180], mclength;
- int k, j, longueur, mccorrection[50], offset;
- int total, dummy[5];
- char codebarre[100], pattern[580];
- int variant, LeftRAPStart, CentreRAPStart, RightRAPStart, StartCluster;
- int LeftRAP, CentreRAP, RightRAP, Cluster, writer, flip, loop;
-
- length = strlen(source) / 8;
-
- for(i = 0; i < length; i++) {
- binloc = i * 8;
-
- data_string[i] = 0;
- if(source[binloc] == '1') { data_string[i] += 0x80; }
- if(source[binloc + 1] == '1') { data_string[i] += 0x40; }
- if(source[binloc + 2] == '1') { data_string[i] += 0x20; }
- if(source[binloc + 3] == '1') { data_string[i] += 0x10; }
- if(source[binloc + 4] == '1') { data_string[i] += 0x08; }
- if(source[binloc + 5] == '1') { data_string[i] += 0x04; }
- if(source[binloc + 6] == '1') { data_string[i] += 0x02; }
- if(source[binloc + 7] == '1') { data_string[i] += 0x01; }
- }
-
-
- mclength = 0;
-
- /* "the CC-B component shall have codeword 920 in the first symbol character position" (section 9a) */
- chainemc[mclength] = 920;
- mclength++;
-
- byteprocess(chainemc, &mclength, data_string, 0, length, 0);
-
- /* Now figure out which variant of the symbol to use and load values accordingly */
-
- variant = 0;
-
- if(cc_width == 2) {
- variant = 13;
- if(mclength <= 33) { variant = 12; }
- if(mclength <= 29) { variant = 11; }
- if(mclength <= 24) { variant = 10; }
- if(mclength <= 19) { variant = 9; }
- if(mclength <= 13) { variant = 8; }
- if(mclength <= 8) { variant = 7; }
- }
-
- if(cc_width == 3) {
- variant = 23;
- if(mclength <= 70) { variant = 22; }
- if(mclength <= 58) { variant = 21; }
- if(mclength <= 46) { variant = 20; }
- if(mclength <= 34) { variant = 19; }
- if(mclength <= 24) { variant = 18; }
- if(mclength <= 18) { variant = 17; }
- if(mclength <= 14) { variant = 16; }
- if(mclength <= 10) { variant = 15; }
- if(mclength <= 6) { variant = 14; }
- }
-
- if(cc_width == 4) {
- variant = 34;
- if(mclength <= 108) { variant = 33; }
- if(mclength <= 90) { variant = 32; }
- if(mclength <= 72) { variant = 31; }
- if(mclength <= 54) { variant = 30; }
- if(mclength <= 39) { variant = 29; }
- if(mclength <= 30) { variant = 28; }
- if(mclength <= 24) { variant = 27; }
- if(mclength <= 18) { variant = 26; }
- if(mclength <= 12) { variant = 25; }
- if(mclength <= 8) { variant = 24; }
- }
-
- /* Now we have the variant we can load the data - from here on the same as MicroPDF417 code */
- variant --;
- symbol->option_2 = MicroVariants[variant]; /* columns */
- symbol->rows = MicroVariants[variant + 34]; /* rows */
- k = MicroVariants[variant + 68]; /* number of EC CWs */
- longueur = (symbol->option_2 * symbol->rows) - k; /* number of non-EC CWs */
- i = longueur - mclength; /* amount of padding required */
- offset = MicroVariants[variant + 102]; /* coefficient offset */
-
- /* We add the padding */
- while (i > 0) {
- chainemc[mclength] = 900;
- mclength++;
- i--;
- }
-
- /* Reed-Solomon error correction */
- longueur = mclength;
- for(loop = 0; loop < 50; loop++) {
- mccorrection[loop] = 0;
- }
- total = 0;
- for(i = 0; i < longueur; i++) {
- total = (chainemc[i] + mccorrection[k - 1]) % 929;
- for(j = k - 1; j >= 0; j--) {
- if(j == 0) {
- mccorrection[j] = (929 - (total * Microcoeffs[offset + j]) % 929) % 929;
- } else {
- mccorrection[j] = (mccorrection[j - 1] + 929 - (total * Microcoeffs[offset + j]) % 929) % 929;
- }
- }
- }
-
- for(j = 0; j < k; j++) {
- if(mccorrection[j] != 0) { mccorrection[j] = 929 - mccorrection[j]; }
- }
- /* we add these codes to the string */
- for(i = k - 1; i >= 0; i--) {
- chainemc[mclength] = mccorrection[i];
- mclength++;
- }
-
- /* Now get the RAP (Row Address Pattern) start values */
- LeftRAPStart = RAPTable[variant];
- CentreRAPStart = RAPTable[variant + 34];
- RightRAPStart = RAPTable[variant + 68];
- StartCluster = RAPTable[variant + 102] / 3;
-
- /* That's all values loaded, get on with the encoding */
-
- LeftRAP = LeftRAPStart;
- CentreRAP = CentreRAPStart;
- RightRAP = RightRAPStart;
- Cluster = StartCluster; /* Cluster can be 0, 1 or 2 for Cluster(0), Cluster(3) and Cluster(6) */
-
- for(i = 0; i < symbol->rows; i++) {
- strcpy(codebarre, "");
- offset = 929 * Cluster;
- for(j = 0; j < 5; j++) {
- dummy[j] = 0;
- }
- for(j = 0; j < symbol->option_2 ; j++) {
- dummy[j + 1] = chainemc[i * symbol->option_2 + j];
- }
- /* Copy the data into codebarre */
- concat(codebarre, RAPLR[LeftRAP]);
- concat(codebarre, "1");
- concat(codebarre, codagemc[offset + dummy[1]]);
- concat(codebarre, "1");
- if(cc_width == 3) {
- concat(codebarre, RAPC[CentreRAP]);
- }
- if(cc_width >= 2) {
- concat(codebarre, "1");
- concat(codebarre, codagemc[offset + dummy[2]]);
- concat(codebarre, "1");
- }
- if(cc_width == 4) {
- concat(codebarre, RAPC[CentreRAP]);
- }
- if(cc_width >= 3) {
- concat(codebarre, "1");
- concat(codebarre, codagemc[offset + dummy[3]]);
- concat(codebarre, "1");
- }
- if(cc_width == 4) {
- concat(codebarre, "1");
- concat(codebarre, codagemc[offset + dummy[4]]);
- concat(codebarre, "1");
- }
- concat(codebarre, RAPLR[RightRAP]);
- concat(codebarre, "1"); /* stop */
-
- /* Now codebarre is a mixture of letters and numbers */
-
- writer = 0;
- flip = 1;
- strcpy(pattern, "");
- for(loop = 0; loop < strlen(codebarre); loop++) {
- if((codebarre[loop] >= '0') && (codebarre[loop] <= '9')) {
- for(k = 0; k < ctoi(codebarre[loop]); k++) {
- if(flip == 0) {
- pattern[writer] = '0';
- } else {
- pattern[writer] = '1';
- }
- writer++;
- }
- pattern[writer] = '\0';
- if(flip == 0) {
- flip = 1;
- } else {
- flip = 0;
- }
- } else {
- lookup(BRSET, PDFttf, codebarre[loop], pattern);
- writer += 5;
- }
- }
- symbol->width = writer;
-
- /* so now pattern[] holds the string of '1's and '0's. - copy this to the symbol */
- for(loop = 0; loop < strlen(pattern); loop++) {
- if(pattern[loop] == '1') { set_module(symbol, i, loop); }
- }
- symbol->row_height[i] = 2;
-
- /* Set up RAPs and Cluster for next row */
- LeftRAP++;
- CentreRAP++;
- RightRAP++;
- Cluster++;
-
- if(LeftRAP == 53) {
- LeftRAP = 1;
- }
- if(CentreRAP == 53) {
- CentreRAP = 1;
- }
- if(RightRAP == 53) {
- RightRAP = 1;
- }
- if(Cluster == 3) {
- Cluster = 0;
- }
- }
-
- return 0;
-}
-
-int cc_c(struct zint_symbol *symbol, char source[], int cc_width, int ecc_level)
-{ /* CC-C 2D component - byte compressed PDF417 */
- int length, i, binloc;
-#ifndef _MSC_VER
- unsigned char data_string[(strlen(source) / 8) + 4];
-#else
- unsigned char* data_string = (unsigned char*)_alloca((strlen(source) / 8) + 4);
-#endif
- int chainemc[1000], mclength, k;
- int offset, longueur, loop, total, j, mccorrection[520];
- int c1, c2, c3, dummy[35];
- char codebarre[100], pattern[580];
-
- length = strlen(source) / 8;
-
- for(i = 0; i < length; i++) {
- binloc = i * 8;
-
- data_string[i] = 0;
- if(source[binloc] == '1') { data_string[i] += 0x80; }
- if(source[binloc + 1] == '1') { data_string[i] += 0x40; }
- if(source[binloc + 2] == '1') { data_string[i] += 0x20; }
- if(source[binloc + 3] == '1') { data_string[i] += 0x10; }
- if(source[binloc + 4] == '1') { data_string[i] += 0x08; }
- if(source[binloc + 5] == '1') { data_string[i] += 0x04; }
- if(source[binloc + 6] == '1') { data_string[i] += 0x02; }
- if(source[binloc + 7] == '1') { data_string[i] += 0x01; }
- }
-
- mclength = 0;
-
- chainemc[mclength] = 0; /* space for length descriptor */
- mclength++;
- chainemc[mclength] = 920; /* CC-C identifier */
- mclength++;
-
- byteprocess(chainemc, &mclength, data_string, 0, length, 0);
-
- chainemc[0] = mclength;
-
- k = 1;
- for(i = 1; i <= (ecc_level + 1); i++)
- {
- k *= 2;
- }
-
- /* 796 - we now take care of the Reed Solomon codes */
- switch(ecc_level) {
- case 1: offset = 2; break;
- case 2: offset = 6; break;
- case 3: offset = 14; break;
- case 4: offset = 30; break;
- case 5: offset = 62; break;
- case 6: offset = 126; break;
- case 7: offset = 254; break;
- case 8: offset = 510; break;
- default: offset = 0; break;
- }
-
- longueur = mclength;
- for(loop = 0; loop < 520; loop++) {
- mccorrection[loop] = 0;
- }
- total = 0;
- for(i = 0; i < longueur; i++) {
- total = (chainemc[i] + mccorrection[k - 1]) % 929;
- for(j = k - 1; j >= 0; j--) {
- if(j == 0) {
- mccorrection[j] = (929 - (total * coefrs[offset + j]) % 929) % 929;
- } else {
- mccorrection[j] = (mccorrection[j - 1] + 929 - (total * coefrs[offset + j]) % 929) % 929;
- }
- }
- }
-
- for(j = 0; j < k; j++) {
- if(mccorrection[j] != 0) { mccorrection[j] = 929 - mccorrection[j]; }
- }
- /* we add these codes to the string */
- for(i = k - 1; i >= 0; i--) {
- chainemc[mclength] = mccorrection[i];
- mclength++;
- }
-
- /* 818 - The CW string is finished */
- c1 = (mclength / cc_width - 1) / 3;
- c2 = ecc_level * 3 + (mclength / cc_width - 1) % 3;
- c3 = cc_width - 1;
-
- /* we now encode each row */
- for(i = 0; i <= (mclength / cc_width) - 1; i++) {
- for(j = 0; j < cc_width ; j++) {
- dummy[j + 1] = chainemc[i * cc_width + j];
- }
- k = (i / 3) * 30;
- switch(i % 3) {
- /* follows this pattern from US Patent 5,243,655:
- Row 0: L0 (row #, # of rows) R0 (row #, # of columns)
- Row 1: L1 (row #, security level) R1 (row #, # of rows)
- Row 2: L2 (row #, # of columns) R2 (row #, security level)
- Row 3: L3 (row #, # of rows) R3 (row #, # of columns)
- etc. */
- case 0:
- dummy[0] = k + c1;
- dummy[cc_width + 1] = k + c3;
- break;
- case 1:
- dummy[0] = k + c2;
- dummy[cc_width + 1] = k + c1;
- break;
- case 2:
- dummy[0] = k + c3;
- dummy[cc_width + 1] = k + c2;
- break;
- }
- strcpy(codebarre, "+*"); /* Start with a start char and a separator */
-
- for(j = 0; j <= cc_width + 1; j++) {
- switch(i % 3) {
- case 1: offset = 929; /* cluster(3) */ break;
- case 2: offset = 1858; /* cluster(6) */ break;
- default: offset = 0; /* cluster(0) */ break;
- }
- concat(codebarre, codagemc[offset + dummy[j]]);
- concat(codebarre, "*");
- }
- concat(codebarre, "-");
-
- strcpy(pattern, "");
- for(loop = 0; loop < strlen(codebarre); loop++) {
- lookup(BRSET, PDFttf, codebarre[loop], pattern);
- }
- for(loop = 0; loop < strlen(pattern); loop++) {
- if(pattern[loop] == '1') { set_module(symbol, i, loop); }
- }
- symbol->row_height[i] = 3;
- }
- symbol->rows = (mclength / cc_width);
- symbol->width = strlen(pattern);
-
- return 0;
-}
-
-int cc_binary_string(struct zint_symbol *symbol, const char source[], char binary_string[], int cc_mode, int *cc_width, int *ecc, int lin_width)
-{ /* Handles all data encodation from section 5 of ISO/IEC 24723 */
- int encoding_method, read_posn, d1, d2, value, alpha_pad;
- int i, j, mask, ai_crop, ai_crop_posn, fnc1_latch;
- long int group_val;
- int ai90_mode, latch, remainder, binary_length;
- char date_str[4];
-#ifndef _MSC_VER
- char general_field[strlen(source) + 1], general_field_type[strlen(source) + 1];
-#else
- char* general_field = (char*)_alloca(strlen(source) + 1);
- char* general_field_type = (char*)_alloca(strlen(source) + 1);
-#endif
- int target_bitsize;
-
- encoding_method = 1;
- read_posn = 0;
- ai_crop = 0;
- ai_crop_posn = -1;
- fnc1_latch = 0;
- alpha_pad = 0;
- ai90_mode = 0;
- *ecc = 0;
- value = 0;
- target_bitsize = 0;
-
- if((source[0] == '1') && ((source[1] == '0') || (source[1] == '1') || (source[1] == '7')) && (strlen(source) > 8)) {
- /* Source starts (10), (11) or (17) */
- encoding_method = 2;
- }
-
- if((source[0] == '9') && (source[1] == '0')) {
- /* Source starts (90) */
- encoding_method = 3;
- }
-
- if(encoding_method == 1) {
- concat(binary_string, "0");
- }
-
- if(encoding_method == 2) {
- /* Encoding Method field "10" - date and lot number */
-
- concat(binary_string, "10");
-
- if(source[1] == '0') {
- /* No date data */
- concat(binary_string, "11");
- read_posn = 2;
- } else {
- /* Production Date (11) or Expiration Date (17) */
- date_str[0] = source[2];
- date_str[1] = source[3];
- date_str[2] = '\0';
- group_val = atoi(date_str) * 384;
-
- date_str[0] = source[4];
- date_str[1] = source[5];
- group_val += (atoi(date_str) - 1) * 32;
-
- date_str[0] = source[6];
- date_str[1] = source[7];
- group_val += atoi(date_str);
-
- mask = 0x8000;
- for(j = 0; j < 16; j++) {
- if((group_val & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
-
- if(source[1] == '1') {
- /* Production Date AI 11 */
- concat(binary_string, "0");
- } else {
- /* Expiration Date AI 17 */
- concat(binary_string, "1");
- }
- read_posn = 8;
- }
-
- if((source[read_posn] == '1') && (source[read_posn + 1] == '0')) {
- /* Followed by AI 10 - strip this from general field */
- read_posn += 2;
- } else {
- /* An FNC1 character needs to be inserted in the general field */
- fnc1_latch = 1;
- }
- }
-
- if (encoding_method == 3) {
- /* Encodation Method field of "11" - AI 90 */
-#ifndef _MSC_VER
- char ninety[strlen(source) + 1];
-#else
- char* ninety = (char*)_alloca(strlen(source) + 1);
-#endif
- char numeric_part[4];
- int alpha, alphanum, numeric, test1, test2, test3, next_ai_posn;
- int numeric_value, table3_letter, mask;
-
- /* "This encodation method may be used if an element string with an AI
- 90 occurs at the start of the data message, and if the data field
- following the two-digit AI 90 starts with an alphanumeric string which
- complies with a specific format." (para 5.2.2) */
-
- i = 0;
- do {
- ninety[i] = source[i + 2];
- i++;
- } while ((strlen(source) > i + 2) && ('[' != source[i + 2]));
- ninety[i] = '\0';
-
- /* Find out if the AI 90 data is alphabetic or numeric or both */
-
- alpha = 0;
- alphanum = 0;
- numeric = 0;
-
- for(i = 0; i < strlen(ninety); i++) {
-
- if ((ninety[i] >= 'A') && (ninety[i] <= 'Z')) {
- /* Character is alphabetic */
- alpha += 1;
- }
-
- if ((ninety[i] >= '0') && (ninety[i] <= '9')) {
- /* Character is numeric */
- numeric += 1;
- }
-
- switch(ninety[i]) {
- case '*':
- case ',':
- case '-':
- case '.':
- case '/': alphanum += 1; break;
- }
-
- if (!(((ninety[i] >= '0') && (ninety[i] <= '9')) || ((ninety[i] >= 'A') && (ninety[i] <= 'Z')))) {
- if((ninety[i] != '*') && (ninety[i] != ',') && (ninety[i] != '-') && (ninety[i] != '.') && (ninety[i] != '/')) {
- /* An Invalid AI 90 character */
- strcpy(symbol->errtxt, "Invalid AI 90 data");
- return ERROR_INVALID_DATA1;
- }
- }
- }
-
- /* must start with 0, 1, 2 or 3 digits followed by an uppercase character */
- test1 = -1;
- for(i = 3; i >= 0; i--) {
- if ((ninety[i] >= 'A') && (ninety[i] <= 'Z')) {
- test1 = i;
- }
- }
-
- test2 = 0;
- for(i = 0; i < test1; i++) {
- if (!((ninety[i] >= '0') && (ninety[i] <= '9'))) {
- test2 = 1;
- }
- }
-
- /* leading zeros are not permitted */
- test3 = 0;
- if((test1 >= 1) && (ninety[0] == '0')) { test3 = 1; }
-
- if((test1 != -1) && (test2 != 1) && (test3 == 0)) {
- /* Encodation method "11" can be used */
- concat(binary_string, "11");
-
- numeric -= test1;
- alpha --;
-
- /* Decide on numeric, alpha or alphanumeric mode */
- /* Alpha mode is a special mode for AI 90 */
-
- if(alphanum > 0) {
- /* Alphanumeric mode */
- concat(binary_string, "0");
- ai90_mode = 1;
- } else {
- if(alpha > numeric) {
- /* Alphabetic mode */
- concat(binary_string, "11");
- ai90_mode = 2;
- } else {
- /* Numeric mode */
- concat(binary_string, "10");
- ai90_mode = 3;
- }
- }
-
- next_ai_posn = 2 + strlen(ninety);
-
- if(source[next_ai_posn] == '[') {
- /* There are more AIs afterwords */
- if((source[next_ai_posn + 1] == '2') && (source[next_ai_posn + 2] == '1')) {
- /* AI 21 follows */
- ai_crop = 1;
- ai_crop_posn = next_ai_posn + 1;
- }
-
- if((source[next_ai_posn + 1] == '8') && (source[next_ai_posn + 2] == '0') && (source[next_ai_posn + 3] == '0') && (source[next_ai_posn + 4] == '4')) {
- /* AI 8004 follows */
- ai_crop = 2;
- ai_crop_posn = next_ai_posn + 1;
- }
- }
-
- switch(ai_crop) {
- case 0: concat(binary_string, "0"); break;
- case 1: concat(binary_string, "10"); break;
- case 2: concat(binary_string, "11"); break;
- }
-
- if(test1 == 0) {
- strcpy(numeric_part, "0");
- } else {
- for(i = 0; i < test1; i++) {
- numeric_part[i] = ninety[i];
- }
- numeric_part[i] = '\0';
- }
-
- numeric_value = atoi(numeric_part);
-
- table3_letter = -1;
- if(numeric_value < 31) {
- switch(ninety[test1]) {
- case 'B': table3_letter = 0; break;
- case 'D': table3_letter = 1; break;
- case 'H': table3_letter = 2; break;
- case 'I': table3_letter = 3; break;
- case 'J': table3_letter = 4; break;
- case 'K': table3_letter = 5; break;
- case 'L': table3_letter = 6; break;
- case 'N': table3_letter = 7; break;
- case 'P': table3_letter = 8; break;
- case 'Q': table3_letter = 9; break;
- case 'R': table3_letter = 10; break;
- case 'S': table3_letter = 11; break;
- case 'T': table3_letter = 12; break;
- case 'V': table3_letter = 13; break;
- case 'W': table3_letter = 14; break;
- case 'Z': table3_letter = 15; break;
- }
- }
-
- if(table3_letter != -1) {
- /* Encoding can be done according to 5.2.2 c) 2) */
- /* five bit binary string representing value before letter */
- mask = 0x10;
- for(j = 0; j < 5; j++) {
- if((numeric_value & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
-
- /* followed by four bit representation of letter from Table 3 */
- mask = 0x08;
- for(j = 0; j < 4; j++) {
- if((table3_letter & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
- } else {
- /* Encoding is done according to 5.2.2 c) 3) */
- concat(binary_string, "11111");
- /* ten bit representation of number */
- mask = 0x200;
- for(j = 0; j < 10; j++) {
- if((numeric_value & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
-
- /* five bit representation of ASCII character */
- mask = 0x10;
- for(j = 0; j < 5; j++) {
- if(((ninety[test1] - 65) & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
- }
-
- read_posn = test1 + 3;
- } else {
- /* Use general field encodation instead */
- concat(binary_string, "0");
- read_posn = 0;
- }
- }
-
- /* Now encode the rest of the AI 90 data field */
- if(ai90_mode == 2) {
- /* Alpha encodation (section 5.2.3) */
- do {
- if((source[read_posn] >= '0') && (source[read_posn] <= '9')) {
- mask = 0x10;
- for(j = 0; j < 5; j++) {
- if(((source[read_posn] + 4) & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
- }
-
- if((source[read_posn] >= 'A') && (source[read_posn] <= 'Z')) {
- mask = 0x20;
- for(j = 0; j < 6; j++) {
- if(((source[read_posn] - 65) & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
- }
-
- if(source[read_posn] == '[') {
- concat(binary_string, "11111");
- }
-
- read_posn++;
- } while ((source[read_posn - 1] != '[') && (source[read_posn - 1] != '\0'));
- alpha_pad = 1; /* This is overwritten if a general field is encoded */
- }
-
- if(ai90_mode == 1) {
- /* Alphanumeric mode */
- do {
- if((source[read_posn] >= '0') && (source[read_posn] <= '9')) {
- mask = 0x10;
- for(j = 0; j < 5; j++) {
- if(((source[read_posn] - 43) & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
- }
-
- if((source[read_posn] >= 'A') && (source[read_posn] <= 'Z')) {
- mask = 0x20;
- for(j = 0; j < 6; j++) {
- if(((source[read_posn] - 33) & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
- }
-
- switch(source[read_posn]) {
- case '[': concat(binary_string, "01111"); break;
- case '*': concat(binary_string, "111010"); break;
- case ',': concat(binary_string, "111011"); break;
- case '-': concat(binary_string, "111100"); break;
- case '.': concat(binary_string, "111101"); break;
- case '/': concat(binary_string, "111110"); break;
- }
-
- read_posn++;
- } while ((source[read_posn - 1] != '[') && (source[read_posn - 1] != '\0'));
- }
-
- read_posn += (2 * ai_crop);
-
- /* The compressed data field has been processed if appropriate - the
- rest of the data (if any) goes into a general-purpose data compaction field */
-
- j = 0;
- if(fnc1_latch == 1) {
- /* Encodation method "10" has been used but it is not followed by
- AI 10, so a FNC1 character needs to be added */
- general_field[j] = '[';
- j++;
- }
-
- for(i = read_posn; i < strlen(source); i++) {
- general_field[j] = source[i];
- j++;
- }
- general_field[j] = '\0';
-
- if(strlen(general_field) != 0) { alpha_pad = 0; }
-
- latch = 0;
- for(i = 0; i < strlen(general_field); i++) {
- /* Table 13 - ISO/IEC 646 encodation */
- if((general_field[i] < ' ') || (general_field[i] > 'z')) {
- general_field_type[i] = INVALID_CHAR; latch = 1;
- } else {
- general_field_type[i] = ISOIEC;
- }
-
- if(general_field[i] == '#') {
- general_field_type[i] = INVALID_CHAR; latch = 1;
- }
- if(general_field[i] == '$') {
- general_field_type[i] = INVALID_CHAR; latch = 1;
- }
- if(general_field[i] == '@') {
- general_field_type[i] = INVALID_CHAR; latch = 1;
- }
- if(general_field[i] == 92) {
- general_field_type[i] = INVALID_CHAR; latch = 1;
- }
- if(general_field[i] == '^') {
- general_field_type[i] = INVALID_CHAR; latch = 1;
- }
- if(general_field[i] == 96) {
- general_field_type[i] = INVALID_CHAR; latch = 1;
- }
-
- /* Table 12 - Alphanumeric encodation */
- if((general_field[i] >= 'A') && (general_field[i] <= 'Z')) {
- general_field_type[i] = ALPHA_OR_ISO;
- }
- if(general_field[i] == '*') {
- general_field_type[i] = ALPHA_OR_ISO;
- }
- if(general_field[i] == ',') {
- general_field_type[i] = ALPHA_OR_ISO;
- }
- if(general_field[i] == '-') {
- general_field_type[i] = ALPHA_OR_ISO;
- }
- if(general_field[i] == '.') {
- general_field_type[i] = ALPHA_OR_ISO;
- }
- if(general_field[i] == '/') {
- general_field_type[i] = ALPHA_OR_ISO;
- }
-
- /* Numeric encodation */
- if((general_field[i] >= '0') && (general_field[i] <= '9')) {
- general_field_type[i] = ANY_ENC;
- }
- if(general_field[i] == '[') {
- /* FNC1 can be encoded in any system */
- general_field_type[i] = ANY_ENC;
- }
-
- }
-
- general_field_type[strlen(general_field)] = '\0';
-
- if(latch == 1) {
- /* Invalid characters in input data */
- strcpy(symbol->errtxt, "Invalid characters in input data");
- return ERROR_INVALID_DATA1;
- }
-
- for(i = 0; i < strlen(general_field); i++) {
- if((general_field_type[i] == ISOIEC) && (general_field[i + 1] == '[')) {
- general_field_type[i + 1] = ISOIEC;
- }
- }
-
- for(i = 0; i < strlen(general_field); i++) {
- if((general_field_type[i] == ALPHA_OR_ISO) && (general_field[i + 1] == '[')) {
- general_field_type[i + 1] = ALPHA_OR_ISO;
- }
- }
-
- latch = general_rules(general_field, general_field_type);
-
- i = 0;
- do {
- switch(general_field_type[i]) {
- case NUMERIC:
-
- if(i != 0) {
- if((general_field_type[i - 1] != NUMERIC) && (general_field[i - 1] != '[')) {
- concat(binary_string, "000"); /* Numeric latch */
- }
- }
-
- if(general_field[i] != '[') {
- d1 = ctoi(general_field[i]);
- } else {
- d1 = 10;
- }
-
- if(general_field[i + 1] != '[') {
- d2 = ctoi(general_field[i + 1]);
- } else {
- d2 = 10;
- }
-
- value = (11 * d1) + d2 + 8;
-
- mask = 0x40;
- for(j = 0; j < 7; j++) {
- if((value & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
-
- i += 2;
- break;
-
- case ALPHA:
-
- if(i != 0) {
- if((general_field_type[i - 1] == NUMERIC) || (general_field[i - 1] == '[')) {
- concat(binary_string, "0000"); /* Alphanumeric latch */
- }
- if(general_field_type[i - 1] == ISOIEC) {
- concat(binary_string, "00100"); /* ISO/IEC 646 latch */
- }
- }
-
- if((general_field[i] >= '0') && (general_field[i] <= '9')) {
-
- value = general_field[i] - 43;
-
- mask = 0x10;
- for(j = 0; j < 5; j++) {
- if((value & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
- }
-
- if((general_field[i] >= 'A') && (general_field[i] <= 'Z')) {
-
- value = general_field[i] - 33;
-
- mask = 0x20;
- for(j = 0; j < 6; j++) {
- if((value & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
- }
-
- if(general_field[i] == '[') concat(binary_string, "01111"); /* FNC1/Numeric latch */
- if(general_field[i] == '*') concat(binary_string, "111010"); /* asterisk */
- if(general_field[i] == ',') concat(binary_string, "111011"); /* comma */
- if(general_field[i] == '-') concat(binary_string, "111100"); /* minus or hyphen */
- if(general_field[i] == '.') concat(binary_string, "111101"); /* period or full stop */
- if(general_field[i] == '/') concat(binary_string, "111110"); /* slash or solidus */
-
- i++;
- break;
-
- case ISOIEC:
-
- if(i != 0) {
- if((general_field_type[i - 1] == NUMERIC) || (general_field[i - 1] == '[')) {
- concat(binary_string, "0000"); /* Alphanumeric latch */
- concat(binary_string, "00100"); /* ISO/IEC 646 latch */
- }
- if(general_field_type[i - 1] == ALPHA) {
- concat(binary_string, "00100"); /* ISO/IEC 646 latch */
- }
- }
-
- if((general_field[i] >= '0') && (general_field[i] <= '9')) {
-
- value = general_field[i] - 43;
-
- mask = 0x10;
- for(j = 0; j < 5; j++) {
- if((value & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
- }
-
- if((general_field[i] >= 'A') && (general_field[i] <= 'Z')) {
-
- value = general_field[i] - 1;
-
- mask = 0x40;
- for(j = 0; j < 7; j++) {
- if((value & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
- }
-
- if((general_field[i] >= 'a') && (general_field[i] <= 'z')) {
-
- value = general_field[i] - 7;
-
- mask = 0x40;
- for(j = 0; j < 7; j++) {
- if((value & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
- }
-
- if(general_field[i] == '[') concat(binary_string, "01111"); /* FNC1/Numeric latch */
- if(general_field[i] == '!') concat(binary_string, "11101000"); /* exclamation mark */
- if(general_field[i] == 34) concat(binary_string, "11101001"); /* quotation mark */
- if(general_field[i] == 37) concat(binary_string, "11101010"); /* percent sign */
- if(general_field[i] == '&') concat(binary_string, "11101011"); /* ampersand */
- if(general_field[i] == 39) concat(binary_string, "11101100"); /* apostrophe */
- if(general_field[i] == '(') concat(binary_string, "11101101"); /* left parenthesis */
- if(general_field[i] == ')') concat(binary_string, "11101110"); /* right parenthesis */
- if(general_field[i] == '*') concat(binary_string, "11101111"); /* asterisk */
- if(general_field[i] == '+') concat(binary_string, "11110000"); /* plus sign */
- if(general_field[i] == ',') concat(binary_string, "11110001"); /* comma */
- if(general_field[i] == '-') concat(binary_string, "11110010"); /* minus or hyphen */
- if(general_field[i] == '.') concat(binary_string, "11110011"); /* period or full stop */
- if(general_field[i] == '/') concat(binary_string, "11110100"); /* slash or solidus */
- if(general_field[i] == ':') concat(binary_string, "11110101"); /* colon */
- if(general_field[i] == ';') concat(binary_string, "11110110"); /* semicolon */
- if(general_field[i] == '<') concat(binary_string, "11110111"); /* less-than sign */
- if(general_field[i] == '=') concat(binary_string, "11111000"); /* equals sign */
- if(general_field[i] == '>') concat(binary_string, "11111001"); /* greater-than sign */
- if(general_field[i] == '?') concat(binary_string, "11111010"); /* question mark */
- if(general_field[i] == '_') concat(binary_string, "11111011"); /* underline or low line */
- if(general_field[i] == ' ') concat(binary_string, "11111100"); /* space */
-
- i++;
- break;
- }
- } while (i + latch < strlen(general_field));
-
- binary_length = strlen(binary_string);
- if(cc_mode == 1) {
- /* CC-A 2D component - calculate remaining space */
- switch(*(cc_width)) {
- case 2:
- if(binary_length > 167) { return ERROR_TOO_LONG; }
- if(binary_length <= 167) { target_bitsize = 167; }
- if(binary_length <= 138) { target_bitsize = 138; }
- if(binary_length <= 118) { target_bitsize = 118; }
- if(binary_length <= 108) { target_bitsize = 108; }
- if(binary_length <= 88) { target_bitsize = 88; }
- if(binary_length <= 78) { target_bitsize = 78; }
- if(binary_length <= 59) { target_bitsize = 59; }
- break;
- case 3:
- if(binary_length > 167) { return ERROR_TOO_LONG; }
- if(binary_length <= 167) { target_bitsize = 167; }
- if(binary_length <= 138) { target_bitsize = 138; }
- if(binary_length <= 118) { target_bitsize = 118; }
- if(binary_length <= 98) { target_bitsize = 98; }
- if(binary_length <= 78) { target_bitsize = 78; }
- break;
- case 4:
- if(binary_length > 197) { return ERROR_TOO_LONG; }
- if(binary_length <= 197) { target_bitsize = 197; }
- if(binary_length <= 167) { target_bitsize = 167; }
- if(binary_length <= 138) { target_bitsize = 138; }
- if(binary_length <= 108) { target_bitsize = 108; }
- if(binary_length <= 78) { target_bitsize = 78; }
- break;
- }
- }
-
- if(cc_mode == 2) {
- /* CC-B 2D component - calculated from ISO/IEC 24728 Table 1 */
- switch(*(cc_width)) {
- case 2:
- if(binary_length > 336) { return ERROR_TOO_LONG; }
- if(binary_length <= 336) { target_bitsize = 336; }
- if(binary_length <= 296) { target_bitsize = 296; }
- if(binary_length <= 256) { target_bitsize = 256; }
- if(binary_length <= 208) { target_bitsize = 208; }
- if(binary_length <= 160) { target_bitsize = 160; }
- if(binary_length <= 104) { target_bitsize = 104; }
- if(binary_length <= 56) { target_bitsize = 56; }
- break;
- case 3:
- if(binary_length > 768) { return ERROR_TOO_LONG; }
- if(binary_length <= 768) { target_bitsize = 768; }
- if(binary_length <= 648) { target_bitsize = 648; }
- if(binary_length <= 536) { target_bitsize = 536; }
- if(binary_length <= 416) { target_bitsize = 416; }
- if(binary_length <= 304) { target_bitsize = 304; }
- if(binary_length <= 208) { target_bitsize = 208; }
- if(binary_length <= 152) { target_bitsize = 152; }
- if(binary_length <= 112) { target_bitsize = 112; }
- if(binary_length <= 72) { target_bitsize = 72; }
- if(binary_length <= 32) { target_bitsize = 32; }
- break;
- case 4:
- if(binary_length > 1184) { return ERROR_TOO_LONG; }
- if(binary_length <= 1184) { target_bitsize = 1184; }
- if(binary_length <= 1016) { target_bitsize = 1016; }
- if(binary_length <= 840) { target_bitsize = 840; }
- if(binary_length <= 672) { target_bitsize = 672; }
- if(binary_length <= 496) { target_bitsize = 496; }
- if(binary_length <= 352) { target_bitsize = 352; }
- if(binary_length <= 264) { target_bitsize = 264; }
- if(binary_length <= 208) { target_bitsize = 208; }
- if(binary_length <= 152) { target_bitsize = 152; }
- if(binary_length <= 96) { target_bitsize = 96; }
- if(binary_length <= 56) { target_bitsize = 56; }
- break;
- }
- }
-
- if (cc_mode == 3) {
- /* CC-C 2D Component is a bit more complex! */
- int byte_length, codewords_used, ecc_level, ecc_codewords, rows;
- int codewords_total, target_codewords, target_bytesize;
-
- byte_length = binary_length / 8;
- if(binary_length % 8 != 0) { byte_length++; }
-
- codewords_used = (byte_length / 6) * 5;
- codewords_used += byte_length % 6;
-
- ecc_level = 7;
- if(codewords_used <= 1280) { ecc_level = 6; }
- if(codewords_used <= 640) { ecc_level = 5; }
- if(codewords_used <= 320) { ecc_level = 4; }
- if(codewords_used <= 160) { ecc_level = 3; }
- if(codewords_used <= 40) { ecc_level = 2; }
- *(ecc) = ecc_level;
- ecc_codewords = 1;
- for(i = 1; i <= (ecc_level + 1); i++){
- ecc_codewords *= 2;
- }
-
- codewords_used += ecc_codewords;
- codewords_used += 3;
-
- if(codewords_used > symbol->option_3) {
- return ERROR_TOO_LONG;
- }
- /* *(cc_width) = 0.5 + sqrt((codewords_used) / 3); */
- *(cc_width) = (lin_width - 62) / 17;
- if((codewords_used / *(cc_width)) > 90) {
- /* stop the symbol from becoming too high */
- *(cc_width) = *(cc_width) + 1;
- }
-
- rows = codewords_used / *(cc_width);
- if(codewords_used % *(cc_width) != 0) {
- rows++;
- }
-
- codewords_total = *(cc_width) * rows;
-
- target_codewords = codewords_total - ecc_codewords;
- target_codewords -= 3;
-
- target_bytesize = 6 * (target_codewords / 5);
- target_bytesize += target_codewords % 5;
-
- target_bitsize = 8 * target_bytesize;
- }
-
- remainder = binary_length - target_bitsize;
-
- if(latch == 1) {
- i = 0;
- /* There is still one more numeric digit to encode */
-
- if((remainder >= 4) && (remainder <= 6)) {
- d1 = ctoi(general_field[i]);
- d1++;
-
- mask = 0x08;
- for(j = 0; j < 4; j++) {
- if((value & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
- } else {
- d1 = ctoi(general_field[i]);
- d2 = 10;
-
- value = (11 * d1) + d2 + 8;
-
- mask = 0x40;
- for(j = 0; j < 7; j++) {
- if((value & mask) == 0x00) {
- concat(binary_string, "0");
- } else {
- concat(binary_string, "1");
- }
- mask = mask >> 1;
- }
- /* This may push the symbol up to the next size */
- }
- }
-
- if(strlen(binary_string) > 11805) { /* (2361 * 5) */
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- /* all the code below is repeated from above - it needs to be calculated again because the
- size of the symbol may have changed when adding data in the above sequence */
-
- binary_length = strlen(binary_string);
- if(cc_mode == 1) {
- /* CC-A 2D component - calculate padding required */
- switch(*(cc_width)) {
- case 2:
- if(binary_length > 167) { return ERROR_TOO_LONG; }
- if(binary_length <= 167) { target_bitsize = 167; }
- if(binary_length <= 138) { target_bitsize = 138; }
- if(binary_length <= 118) { target_bitsize = 118; }
- if(binary_length <= 108) { target_bitsize = 108; }
- if(binary_length <= 88) { target_bitsize = 88; }
- if(binary_length <= 78) { target_bitsize = 78; }
- if(binary_length <= 59) { target_bitsize = 59; }
- break;
- case 3:
- if(binary_length > 167) { return ERROR_TOO_LONG; }
- if(binary_length <= 167) { target_bitsize = 167; }
- if(binary_length <= 138) { target_bitsize = 138; }
- if(binary_length <= 118) { target_bitsize = 118; }
- if(binary_length <= 98) { target_bitsize = 98; }
- if(binary_length <= 78) { target_bitsize = 78; }
- break;
- case 4:
- if(binary_length > 197) { return ERROR_TOO_LONG; }
- if(binary_length <= 197) { target_bitsize = 197; }
- if(binary_length <= 167) { target_bitsize = 167; }
- if(binary_length <= 138) { target_bitsize = 138; }
- if(binary_length <= 108) { target_bitsize = 108; }
- if(binary_length <= 78) { target_bitsize = 78; }
- break;
- }
- }
-
- if(cc_mode == 2) {
- /* CC-B 2D component */
- switch(*(cc_width)) {
- case 2:
- if(binary_length > 336) { return ERROR_TOO_LONG; }
- if(binary_length <= 336) { target_bitsize = 336; }
- if(binary_length <= 296) { target_bitsize = 296; }
- if(binary_length <= 256) { target_bitsize = 256; }
- if(binary_length <= 208) { target_bitsize = 208; }
- if(binary_length <= 160) { target_bitsize = 160; }
- if(binary_length <= 104) { target_bitsize = 104; }
- if(binary_length <= 56) { target_bitsize = 56; }
- break;
- case 3:
- if(binary_length > 768) { return ERROR_TOO_LONG; }
- if(binary_length <= 768) { target_bitsize = 768; }
- if(binary_length <= 648) { target_bitsize = 648; }
- if(binary_length <= 536) { target_bitsize = 536; }
- if(binary_length <= 416) { target_bitsize = 416; }
- if(binary_length <= 304) { target_bitsize = 304; }
- if(binary_length <= 208) { target_bitsize = 208; }
- if(binary_length <= 152) { target_bitsize = 152; }
- if(binary_length <= 112) { target_bitsize = 112; }
- if(binary_length <= 72) { target_bitsize = 72; }
- if(binary_length <= 32) { target_bitsize = 32; }
- break;
- case 4:
- if(binary_length > 1184) { return ERROR_TOO_LONG; }
- if(binary_length <= 1184) { target_bitsize = 1184; }
- if(binary_length <= 1016) { target_bitsize = 1016; }
- if(binary_length <= 840) { target_bitsize = 840; }
- if(binary_length <= 672) { target_bitsize = 672; }
- if(binary_length <= 496) { target_bitsize = 496; }
- if(binary_length <= 352) { target_bitsize = 352; }
- if(binary_length <= 264) { target_bitsize = 264; }
- if(binary_length <= 208) { target_bitsize = 208; }
- if(binary_length <= 152) { target_bitsize = 152; }
- if(binary_length <= 96) { target_bitsize = 96; }
- if(binary_length <= 56) { target_bitsize = 56; }
- break;
- }
- }
-
- if (cc_mode == 3) {
- /* CC-C 2D Component is a bit more complex! */
- int byte_length, codewords_used, ecc_level, ecc_codewords, rows;
- int codewords_total, target_codewords, target_bytesize;
-
- byte_length = binary_length / 8;
- if(binary_length % 8 != 0) { byte_length++; }
-
- codewords_used = (byte_length / 6) * 5;
- codewords_used += byte_length % 6;
-
- ecc_level = 7;
- if(codewords_used <= 1280) { ecc_level = 6; }
- if(codewords_used <= 640) { ecc_level = 5; }
- if(codewords_used <= 320) { ecc_level = 4; }
- if(codewords_used <= 160) { ecc_level = 3; }
- if(codewords_used <= 40) { ecc_level = 2; }
- *(ecc) = ecc_level;
- ecc_codewords = 1;
- for(i = 1; i <= (ecc_level + 1); i++){
- ecc_codewords *= 2;
- }
-
- codewords_used += ecc_codewords;
- codewords_used += 3;
-
- if(codewords_used > symbol->option_3) {
- return ERROR_TOO_LONG;
- }
- /* *(cc_width) = 0.5 + sqrt((codewords_used) / 3); */
- *(cc_width) = (lin_width - 62) / 17;
- if((codewords_used / *(cc_width)) > 90) {
- /* stop the symbol from becoming too high */
- *(cc_width) = *(cc_width) + 1;
- }
-
- rows = codewords_used / *(cc_width);
- if(codewords_used % *(cc_width) != 0) {
- rows++;
- }
-
- codewords_total = *(cc_width) * rows;
-
- target_codewords = codewords_total - ecc_codewords;
- target_codewords -= 3;
-
- target_bytesize = 6 * (target_codewords / 5);
- target_bytesize += target_codewords % 5;
-
- target_bitsize = 8 * target_bytesize;
- }
-
- if(binary_length < target_bitsize) {
- /* Now add padding to binary string */
- if (alpha_pad == 1) {
- concat(binary_string, "11111");
- alpha_pad = 0;
- /* Extra FNC1 character required after Alpha encodation (section 5.2.3) */
- }
-
- if ((strlen(general_field) != 0) && (general_field_type[strlen(general_field) - 1] == NUMERIC)) {
- concat(binary_string, "0000");
- }
-
- while (strlen(binary_string) < target_bitsize) {
- concat(binary_string, "00100");
- }
-
- if(strlen(binary_string) > target_bitsize) {
- binary_string[target_bitsize] = '\0';
- }
- }
-
- return 0;
-}
-
-void add_leading_zeroes(struct zint_symbol *symbol)
-{
- int with_addon = 0;
- int first_len = 0, second_len = 0, zfirst_len = 0, zsecond_len = 0, i, h, n = 0;
-
- h = strlen(symbol->primary);
- for(i = 0; i < h; i++) {
- if(symbol->primary[i] == '+') {
- with_addon = 1;
- } else {
- if(with_addon == 0) {
- first_len++;
- } else {
- second_len++;
- }
- }
- }
-
- /* Calculate target lengths */
- if(first_len <= 12) { zfirst_len = 12; }
- if(first_len <= 7) { zfirst_len = 7; }
- if(second_len <= 5) { zsecond_len = 5; }
- if(second_len <= 2) { zsecond_len = 2; }
- if(second_len == 0) { zsecond_len = 0; }
-
- /* Add leading zeroes */
- n = zfirst_len - first_len;
- if (n > 0)
- {
- memmove(symbol->primary + n, symbol->primary, h);
- memset(symbol->primary, '0', n);
- }
- n += first_len + 1;
- if (zsecond_len)
- {
- memmove(symbol->primary + n + zsecond_len, symbol->primary + n, second_len);
- memset(symbol->primary + n , '0', zsecond_len);
- n += zsecond_len + second_len;
- }
- symbol->primary[n] = '\0';
-}
-
-int composite(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- int error_number, cc_mode, cc_width, ecc_level;
- int j, i, k, separator_row;
- unsigned int rs = length + 1;
- unsigned int bs = 20 * rs;
- unsigned int pri_len;
-#ifndef _MSC_VER
- char reduced[rs];
- char binary_string[bs];
-#else
- char* reduced = (char*)_alloca(rs);
- char* binary_string = (char*)_alloca(bs);
-#endif
- struct zint_symbol *linear;
- int top_shift, bottom_shift;
-
- error_number = 0;
- separator_row = 0;
- pri_len = strlen(symbol->primary);
- if(pri_len == 0) {
- strcpy(symbol->errtxt, "No primary (linear) message in 2D composite");
- return ERROR_INVALID_OPTION;
- }
-
- if(length > 2990) {
- strcpy(symbol->errtxt, "2D component input data too long");
- return ERROR_TOO_LONG;
- }
-
- linear = ZBarcode_Create(); /* Symbol contains the 2D component and Linear contains the rest */
-
- error_number = gs1_verify(symbol, source, length, reduced);
- if(error_number != 0) { return error_number; }
-
- cc_mode = symbol->option_1;
-
- if((cc_mode == 3) && (symbol->symbology != BARCODE_EAN128_CC)) {
- /* CC-C can only be used with a GS1-128 linear part */
- strcpy(symbol->errtxt, "Invalid mode (CC-C only valid with GS1-128 linear component)");
- return ERROR_INVALID_OPTION;
- }
-
- linear->symbology = symbol->symbology;
-
- if(linear->symbology != BARCODE_EAN128_CC) {
- /* Set the "component linkage" flag in the linear component */
- linear->option_1 = 2;
- } else {
- /* GS1-128 needs to know which type of 2D component is used */
- linear->option_1 = cc_mode;
- }
-
- switch(symbol->symbology) {
- case BARCODE_EANX_CC: error_number = eanx(linear, (unsigned char *)symbol->primary, pri_len); break;
- case BARCODE_EAN128_CC: error_number = ean_128(linear, (unsigned char *)symbol->primary, pri_len); break;
- case BARCODE_RSS14_CC: error_number = rss14(linear, (unsigned char *)symbol->primary, pri_len); break;
- case BARCODE_RSS_LTD_CC: error_number = rsslimited(linear, (unsigned char *)symbol->primary, pri_len); break;
- case BARCODE_RSS_EXP_CC: error_number = rssexpanded(linear, (unsigned char *)symbol->primary, pri_len); break;
- case BARCODE_UPCA_CC: error_number = eanx(linear, (unsigned char *)symbol->primary, pri_len); break;
- case BARCODE_UPCE_CC: error_number = eanx(linear, (unsigned char *)symbol->primary, pri_len); break;
- case BARCODE_RSS14STACK_CC: error_number = rss14(linear, (unsigned char *)symbol->primary, pri_len); break;
- case BARCODE_RSS14_OMNI_CC: error_number = rss14(linear, (unsigned char *)symbol->primary, pri_len); break;
- case BARCODE_RSS_EXPSTACK_CC: error_number = rssexpanded(linear, (unsigned char *)symbol->primary, pri_len); break;
- }
-
- if(error_number != 0) {
- strcpy(symbol->errtxt, linear->errtxt);
- concat(symbol->errtxt, " in linear component");
- return error_number;
- }
-
- switch(symbol->symbology) {
- /* Determine width of 2D component according to ISO/IEC 24723 Table 1 */
- case BARCODE_EANX_CC:
- switch(pri_len) {
- case 7: /* EAN-8 */
- case 10: /* EAN-8 + 2 */
- case 13: /* EAN-8 + 5 */
- cc_width = 3;
- break;
- case 12: /* EAN-13 */
- case 15: /* EAN-13 + 2 */
- case 18: /* EAN-13 + 5 */
- cc_width = 4;
- break;
- }
- break;
- case BARCODE_EAN128_CC: cc_width = 4; break;
- case BARCODE_RSS14_CC: cc_width = 4; break;
- case BARCODE_RSS_LTD_CC: cc_width = 3; break;
- case BARCODE_RSS_EXP_CC: cc_width = 4; break;
- case BARCODE_UPCA_CC: cc_width = 4; break;
- case BARCODE_UPCE_CC: cc_width = 2; break;
- case BARCODE_RSS14STACK_CC: cc_width = 2; break;
- case BARCODE_RSS14_OMNI_CC: cc_width = 2; break;
- case BARCODE_RSS_EXPSTACK_CC: cc_width = 4; break;
- }
-
- memset(binary_string, 0, bs);
-
- if(cc_mode < 1 || cc_mode > 3) { cc_mode = 1; }
-
- if(cc_mode == 1) {
- i = cc_binary_string(symbol, reduced, binary_string, cc_mode, &cc_width, &ecc_level, linear->width);
- if (i == ERROR_TOO_LONG) {
- cc_mode = 2;
- }
- }
-
- if(cc_mode == 2) { /* If the data didn't fit into CC-A it is recalculated for CC-B */
- i = cc_binary_string(symbol, reduced, binary_string, cc_mode, &cc_width, &ecc_level, linear->width);
- if (i == ERROR_TOO_LONG) {
- if(symbol->symbology != BARCODE_EAN128_CC) {
- return ERROR_TOO_LONG;
- } else {
- cc_mode = 3;
- }
- }
- }
-
- if(cc_mode == 3) { /* If the data didn't fit in CC-B (and linear part is GS1-128) it is recalculated
- for CC-C */
- i = cc_binary_string(symbol, reduced, binary_string, cc_mode, &cc_width, &ecc_level, linear->width);
- if (i == ERROR_TOO_LONG) {
- return ERROR_TOO_LONG;
- }
- }
-
- switch(cc_mode) { /* Note that ecc_level is only relevant to CC-C */
- case 1: error_number = cc_a(symbol, binary_string, cc_width); break;
- case 2: error_number = cc_b(symbol, binary_string, cc_width); break;
- case 3: error_number = cc_c(symbol, binary_string, cc_width, ecc_level); break;
- }
-
- if(error_number != 0) {
- return ERROR_ENCODING_PROBLEM;
- }
-
- /* Merge the linear component with the 2D component */
-
- top_shift = 0;
- bottom_shift = 0;
-
- switch(symbol->symbology) {
- /* Determine horizontal alignment (according to section 12.3) */
- case BARCODE_EANX_CC:
- switch(pri_len) {
- case 7: /* EAN-8 */
- case 10: /* EAN-8 + 2 */
- case 13: /* EAN-8 + 5 */
- bottom_shift = 13;
- break;
- case 12: /* EAN-13 */
- case 15: /* EAN-13 + 2 */
- case 18: /* EAN-13 + 5 */
- bottom_shift = 2;
- break;
- }
- break;
- case BARCODE_EAN128_CC: if(cc_mode == 3) {
- bottom_shift = 7;
- }
- break;
- case BARCODE_RSS14_CC: bottom_shift = 4; break;
- case BARCODE_RSS_LTD_CC: bottom_shift = 9; break;
- case BARCODE_RSS_EXP_CC: k = 1;
- while((!(module_is_set(linear, 1, k - 1))) && module_is_set(linear, 1, k)) {
- /* while((linear->encoded_data[1][k - 1] != '1') && (linear->encoded_data[1][k] != '0')) { */
- k++;
- }
- top_shift = k;
- break;
- case BARCODE_UPCA_CC: bottom_shift = 2; break;
- case BARCODE_UPCE_CC: bottom_shift = 2; break;
- case BARCODE_RSS14STACK_CC: top_shift = 1; break;
- case BARCODE_RSS14_OMNI_CC: top_shift = 1; break;
- case BARCODE_RSS_EXPSTACK_CC: k = 1;
- while((!(module_is_set(linear, 1, k - 1))) && module_is_set(linear, 1, k)) {
- /* while((linear->encoded_data[1][k - 1] != '1') && (linear->encoded_data[1][k] != '0')) { */
- k++;
- }
- top_shift = k;
- break;
- }
-
- if(top_shift != 0) {
- /* Move the 2d component of the symbol horizontally */
- for(i = 0; i <= symbol->rows; i++) {
- for(j = (symbol->width + top_shift); j >= top_shift; j--) {
- if(module_is_set(symbol, i, j - top_shift)) { set_module(symbol, i, j); } else { unset_module(symbol, i, j); }
- }
- for(j = 0; j < top_shift; j++) {
- unset_module(symbol, i, j);
- }
- }
- }
-
- /* Merge linear and 2D components into one structure */
- for(i = 0; i <= linear->rows; i++) {
- symbol->row_height[symbol->rows + i] = linear->row_height[i];
- for(j = 0; j <= linear->width; j++) {
- if(module_is_set(linear, i, j)) { set_module(symbol, i + symbol->rows, j + bottom_shift); } else { unset_module(symbol, i + symbol->rows, j + bottom_shift); }
- }
- }
- if((linear->width + bottom_shift) > symbol->width) {
- symbol->width = linear->width + bottom_shift;
- }
- if((symbol->width + top_shift) > symbol->width) {
- symbol->width += top_shift;
- }
- symbol->rows += linear->rows;
- ustrcpy(symbol->text, (unsigned char *)linear->text);
-
- ZBarcode_Delete(linear);
-
- return error_number;
-}
diff --git a/3rdparty/zint-2.4.4/backend/composite.h b/3rdparty/zint-2.4.4/backend/composite.h
deleted file mode 100644
index 30ace7f..0000000
--- a/3rdparty/zint-2.4.4/backend/composite.h
+++ /dev/null
@@ -1,62 +0,0 @@
-/* composite.c - Tables for UCC.EAN Composite Symbols */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#define NUMERIC 110
-#define ALPHA 97
-#define ISOIEC 105
-#define INVALID_CHAR 100
-#define ANY_ENC 120
-#define ALPHA_OR_ISO 121
-
-/* CC-A component coefficients from ISO/IEC 24728:2006 Annex F */
-static int ccaCoeffs[30] = {
- /* k = 4 */
- 522, 568, 723, 809,
-
- /* k = 5 */
- 427, 919, 460, 155, 566,
-
- /* k = 6 */
- 861, 285, 19, 803, 17, 766,
-
- /* k = 7 */
- 76, 925, 537, 597, 784, 691, 437,
-
- /* k = 8 */
- 237, 308, 436, 284, 646, 653, 428, 379
-};
-
-/* rows, error codewords, k-offset of valid CC-A sizes from ISO/IEC 24723:2006 Table 9 */
-static int ccaVariants[51] = {
- 5, 6, 7, 8, 9, 10, 12, 4, 5, 6, 7, 8, 3, 4, 5, 6, 7,
- 4, 4, 5, 5, 6, 6, 7, 4, 5, 6, 7, 7, 4, 5, 6, 7, 8,
- 0, 0, 4, 4, 9, 9, 15, 0, 4, 9, 15, 15, 0, 4, 9, 15, 22
-};
-
-/* following is Left RAP, Centre RAP, Right RAP and Start Cluster from ISO/IEC 24723:2006 tables 10 and 11 */
-static int aRAPTable[68] = {
- 39, 1, 32, 8, 14, 43, 20, 11, 1, 5, 15, 21, 40, 43, 46, 34, 29,
- 0, 0, 0, 0, 0, 0, 0, 43, 33, 37, 47, 1, 20, 23, 26, 14, 9,
- 19, 33, 12, 40, 46, 23, 52, 23, 13, 17, 27, 33, 52, 3, 6, 46, 41,
- 6, 0, 3, 3, 3, 0, 3, 3, 0, 3, 6, 6, 0, 0, 0, 0, 3
-};
-
-/* Row Address Patterns are as defined in pdf417.h */
diff --git a/3rdparty/zint-2.4.4/backend/dllversion.c b/3rdparty/zint-2.4.4/backend/dllversion.c
deleted file mode 100644
index 0500863..0000000
--- a/3rdparty/zint-2.4.4/backend/dllversion.c
+++ /dev/null
@@ -1,31 +0,0 @@
-/* Sed: http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/programmersguide/versions.asp */
-#if defined (_WIN32) && (defined(_USRDLL) || defined(DLL_EXPORT) || defined(PIC))
-#include
-#include
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif
-
-__declspec(dllexport) HRESULT DllGetVersion (DLLVERSIONINFO2* pdvi);
-
-#ifdef __cplusplus
-}
-#endif
-
-HRESULT DllGetVersion (DLLVERSIONINFO2* pdvi)
-{
- if (!pdvi || (sizeof(*pdvi) != pdvi->info1.cbSize))
- return (E_INVALIDARG);
-
- pdvi->info1.dwMajorVersion = 2;
- pdvi->info1.dwMinorVersion = 2;
- pdvi->info1.dwBuildNumber = 1;
- pdvi->info1.dwPlatformID = DLLVER_PLATFORM_WINDOWS;
- if (sizeof(DLLVERSIONINFO2) == pdvi->info1.cbSize)
- pdvi->ullVersion = MAKEDLLVERULL(2, 2, 1, 0);
-
- return S_OK;
-}
-#endif /* _WIN32 */
diff --git a/3rdparty/zint-2.4.4/backend/dmatrix.c b/3rdparty/zint-2.4.4/backend/dmatrix.c
deleted file mode 100644
index f98e737..0000000
--- a/3rdparty/zint-2.4.4/backend/dmatrix.c
+++ /dev/null
@@ -1,910 +0,0 @@
-/* dmatrix.c Handles Data Matrix ECC 200 symbols */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- developed from and including some functions from:
- IEC16022 bar code generation
- Adrian Kennard, Andrews & Arnold Ltd
- with help from Cliff Hones on the RS coding
-
- (c) 2004 Adrian Kennard, Andrews & Arnold Ltd
- (c) 2006 Stefan Schmidt
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include
-#include
-#include
-#include
-#ifdef _MSC_VER
-#include
-#endif
-#include "reedsol.h"
-#include "common.h"
-#include "dmatrix.h"
-
-// Annex M placement alorithm low level
-static void ecc200placementbit(int *array, int NR, int NC, int r, int c, int p, char b)
-{
- if (r < 0) {
- r += NR;
- c += 4 - ((NR + 4) % 8);
- }
- if (c < 0) {
- c += NC;
- r += 4 - ((NC + 4) % 8);
- }
- array[r * NC + c] = (p << 3) + b;
-}
-
-static void ecc200placementblock(int *array, int NR, int NC, int r,
- int c, int p)
-{
- ecc200placementbit(array, NR, NC, r - 2, c - 2, p, 7);
- ecc200placementbit(array, NR, NC, r - 2, c - 1, p, 6);
- ecc200placementbit(array, NR, NC, r - 1, c - 2, p, 5);
- ecc200placementbit(array, NR, NC, r - 1, c - 1, p, 4);
- ecc200placementbit(array, NR, NC, r - 1, c - 0, p, 3);
- ecc200placementbit(array, NR, NC, r - 0, c - 2, p, 2);
- ecc200placementbit(array, NR, NC, r - 0, c - 1, p, 1);
- ecc200placementbit(array, NR, NC, r - 0, c - 0, p, 0);
-}
-
-static void ecc200placementcornerA(int *array, int NR, int NC, int p)
-{
- ecc200placementbit(array, NR, NC, NR - 1, 0, p, 7);
- ecc200placementbit(array, NR, NC, NR - 1, 1, p, 6);
- ecc200placementbit(array, NR, NC, NR - 1, 2, p, 5);
- ecc200placementbit(array, NR, NC, 0, NC - 2, p, 4);
- ecc200placementbit(array, NR, NC, 0, NC - 1, p, 3);
- ecc200placementbit(array, NR, NC, 1, NC - 1, p, 2);
- ecc200placementbit(array, NR, NC, 2, NC - 1, p, 1);
- ecc200placementbit(array, NR, NC, 3, NC - 1, p, 0);
-}
-
-static void ecc200placementcornerB(int *array, int NR, int NC, int p)
-{
- ecc200placementbit(array, NR, NC, NR - 3, 0, p, 7);
- ecc200placementbit(array, NR, NC, NR - 2, 0, p, 6);
- ecc200placementbit(array, NR, NC, NR - 1, 0, p, 5);
- ecc200placementbit(array, NR, NC, 0, NC - 4, p, 4);
- ecc200placementbit(array, NR, NC, 0, NC - 3, p, 3);
- ecc200placementbit(array, NR, NC, 0, NC - 2, p, 2);
- ecc200placementbit(array, NR, NC, 0, NC - 1, p, 1);
- ecc200placementbit(array, NR, NC, 1, NC - 1, p, 0);
-}
-
-static void ecc200placementcornerC(int *array, int NR, int NC, int p)
-{
- ecc200placementbit(array, NR, NC, NR - 3, 0, p, 7);
- ecc200placementbit(array, NR, NC, NR - 2, 0, p, 6);
- ecc200placementbit(array, NR, NC, NR - 1, 0, p, 5);
- ecc200placementbit(array, NR, NC, 0, NC - 2, p, 4);
- ecc200placementbit(array, NR, NC, 0, NC - 1, p, 3);
- ecc200placementbit(array, NR, NC, 1, NC - 1, p, 2);
- ecc200placementbit(array, NR, NC, 2, NC - 1, p, 1);
- ecc200placementbit(array, NR, NC, 3, NC - 1, p, 0);
-}
-
-static void ecc200placementcornerD(int *array, int NR, int NC, int p)
-{
- ecc200placementbit(array, NR, NC, NR - 1, 0, p, 7);
- ecc200placementbit(array, NR, NC, NR - 1, NC - 1, p, 6);
- ecc200placementbit(array, NR, NC, 0, NC - 3, p, 5);
- ecc200placementbit(array, NR, NC, 0, NC - 2, p, 4);
- ecc200placementbit(array, NR, NC, 0, NC - 1, p, 3);
- ecc200placementbit(array, NR, NC, 1, NC - 3, p, 2);
- ecc200placementbit(array, NR, NC, 1, NC - 2, p, 1);
- ecc200placementbit(array, NR, NC, 1, NC - 1, p, 0);
-}
-
-// Annex M placement alorithm main function
-static void ecc200placement(int *array, int NR, int NC)
-{
- int r, c, p;
- // invalidate
- for (r = 0; r < NR; r++)
- for (c = 0; c < NC; c++)
- array[r * NC + c] = 0;
- // start
- p = 1;
- r = 4;
- c = 0;
- do {
- // check corner
- if (r == NR && !c)
- ecc200placementcornerA(array, NR, NC, p++);
- if (r == NR - 2 && !c && NC % 4)
- ecc200placementcornerB(array, NR, NC, p++);
- if (r == NR - 2 && !c && (NC % 8) == 4)
- ecc200placementcornerC(array, NR, NC, p++);
- if (r == NR + 4 && c == 2 && !(NC % 8))
- ecc200placementcornerD(array, NR, NC, p++);
- // up/right
- do {
- if (r < NR && c >= 0 && !array[r * NC + c])
- ecc200placementblock(array, NR, NC, r, c, p++);
- r -= 2;
- c += 2;
- }
- while (r >= 0 && c < NC);
- r++;
- c += 3;
- // down/left
- do {
- if (r >= 0 && c < NC && !array[r * NC + c])
- ecc200placementblock(array, NR, NC, r, c, p++);
- r += 2;
- c -= 2;
- }
- while (r < NR && c >= 0);
- r += 3;
- c++;
- }
- while (r < NR || c < NC);
- // unfilled corner
- if (!array[NR * NC - 1])
- array[NR * NC - 1] = array[NR * NC - NC - 2] = 1;
-}
-
-// calculate and append ecc code, and if necessary interleave
-static void ecc200(unsigned char *binary, int bytes, int datablock, int rsblock, int skew)
-{
- int blocks = (bytes + 2) / datablock, b;
- int n, p;
- rs_init_gf(0x12d);
- rs_init_code(rsblock, 1);
- for (b = 0; b < blocks; b++) {
- unsigned char buf[256], ecc[256];
- p = 0;
- for (n = b; n < bytes; n += blocks)
- buf[p++] = binary[n];
- rs_encode(p, buf, ecc);
- p = rsblock - 1; // comes back reversed
- for (n = b; n < rsblock * blocks; n += blocks) {
- if (skew) {
- /* Rotate ecc data to make 144x144 size symbols acceptable */
- /* See http://groups.google.com/group/postscriptbarcode/msg/5ae8fda7757477da */
- if(b < 8) {
- binary[bytes + n + 2] = ecc[p--];
- } else {
- binary[bytes + n - 8] = ecc[p--];
- }
- } else {
- binary[bytes + n] = ecc[p--];
- }
- }
- }
- rs_free();
-}
-
-int isx12(unsigned char source)
-{
- if(source == 13) { return 1; }
- if(source == 42) { return 1; }
- if(source == 62) { return 1; }
- if(source == 32) { return 1; }
- if((source >= '0') && (source <= '9')) { return 1; }
- if((source >= 'A') && (source <= 'Z')) { return 1; }
-
- return 0;
-}
-
-void dminsert(char binary_string[], int posn, char newbit)
-{ /* Insert a character into the middle of a string at position posn */
- int i, end;
-
- end = strlen(binary_string);
- for(i = end; i > posn; i--) {
- binary_string[i] = binary_string[i - 1];
- }
- binary_string[posn] = newbit;
-}
-
-void insert_value(unsigned char binary_stream[], int posn, int streamlen, char newbit)
-{
- int i;
-
- for(i = streamlen; i > posn; i--) {
- binary_stream[i] = binary_stream[i - 1];
- }
- binary_stream[posn] = newbit;
-}
-
-int look_ahead_test(unsigned char source[], int sourcelen, int position, int current_mode, int gs1)
-{
- /* A custom version of the 'look ahead test' from Annex P */
- /* This version is deliberately very reluctant to end a data stream with EDIFACT encoding */
-
- float ascii_count, c40_count, text_count, x12_count, edf_count, b256_count, best_count;
- int sp, done, best_scheme;
- char reduced_char;
-
- /* step (j) */
- if(current_mode == DM_ASCII) {
- ascii_count = 0.0;
- c40_count = 1.0;
- text_count = 1.0;
- x12_count = 1.0;
- edf_count = 1.0;
- b256_count = 1.25;
- } else {
- ascii_count = 1.0;
- c40_count = 2.0;
- text_count = 2.0;
- x12_count = 2.0;
- edf_count = 2.0;
- b256_count = 2.25;
- }
-
- switch(current_mode) {
- case DM_C40: c40_count = 0.0; break;
- case DM_TEXT: text_count = 0.0; break;
- case DM_X12: x12_count = 0.0; break;
- case DM_EDIFACT: edf_count = 0.0; break;
- case DM_BASE256: b256_count = 0.0; break;
- }
-
- for(sp = position; (sp < sourcelen) && (sp <= (position + 8)); sp++) {
-
- if(source[sp] <= 127) { reduced_char = source[sp]; } else { reduced_char = source[sp] - 127; }
-
- if((source[sp] >= '0') && (source[sp] <= '9')) { ascii_count += 0.5; } else { ascii_count += 1.0; }
- if(source[sp] > 127) { ascii_count += 1.0; }
-
- done = 0;
- if(reduced_char == ' ') { c40_count += (2.0 / 3.0); done = 1; }
- if((reduced_char >= '0') && (reduced_char <= '9')) { c40_count += (2.0 / 3.0); done = 1; }
- if((reduced_char >= 'A') && (reduced_char <= 'Z')) { c40_count += (2.0 / 3.0); done = 1; }
- if(source[sp] > 127) { c40_count += (4.0 / 3.0); }
- if(done == 0) { c40_count += (4.0 / 3.0); }
-
- done = 0;
- if(reduced_char == ' ') { text_count += (2.0 / 3.0); done = 1; }
- if((reduced_char >= '0') && (reduced_char <= '9')) { text_count += (2.0 / 3.0); done = 1; }
- if((reduced_char >= 'a') && (reduced_char <= 'z')) { text_count += (2.0 / 3.0); done = 1; }
- if(source[sp] > 127) { text_count += (4.0 / 3.0); }
- if(done == 0) { text_count += (4.0 / 3.0); }
-
- if(isx12(source[sp])) { x12_count += (2.0 / 3.0); } else { x12_count += 4.0; }
-
- /* step (p) */
- done = 0;
- if((source[sp] >= ' ') && (source[sp] <= '^')) { edf_count += (3.0 / 4.0); } else { edf_count += 6.0; }
- if(gs1 && (source[sp] == '[')) { edf_count += 6.0; }
- if(sp >= (sourcelen - 5)) { edf_count += 6.0; } /* MMmmm fudge! */
-
- /* step (q) */
- if(gs1 && (source[sp] == '[')) { b256_count += 4.0; } else { b256_count += 1.0; }
-
- /* printf("%c lat a%.2f c%.2f t%.2f x%.2f e%.2f b%.2f\n", source[sp], ascii_count, c40_count, text_count, x12_count, edf_count, b256_count); */
-
- }
-
- best_count = ascii_count;
- best_scheme = DM_ASCII;
-
- if(b256_count <= best_count) {
- best_count = b256_count;
- best_scheme = DM_BASE256;
- }
-
- if(edf_count <= best_count) {
- best_count = edf_count;
- best_scheme = DM_EDIFACT;
- }
-
- if(text_count <= best_count) {
- best_count = text_count;
- best_scheme = DM_TEXT;
- }
-
- if(x12_count <= best_count) {
- best_count = x12_count;
- best_scheme = DM_X12;
- }
-
- if(c40_count <= best_count) {
- best_count = c40_count;
- best_scheme = DM_C40;
- }
-
- return best_scheme;
-}
-
-int dm200encode(struct zint_symbol *symbol, unsigned char source[], unsigned char target[], int *last_mode, int length)
-{
- /* Encodes data using ASCII, C40, Text, X12, EDIFACT or Base 256 modes as appropriate */
- /* Supports encoding FNC1 in supporting systems */
-
- int sp, tp, i, gs1;
- int current_mode, next_mode;
- int inputlen = length;
- int c40_buffer[6], c40_p;
- int text_buffer[6], text_p;
- int x12_buffer[6], x12_p;
- int edifact_buffer[8], edifact_p;
- int debug = 0;
-#ifndef _MSC_VER
- char binary[2 * inputlen];
-#else
- char* binary = (char*)_alloca(2 * inputlen);
-#endif
-
- sp = 0;
- tp = 0;
- memset(c40_buffer, 0, 6);
- c40_p = 0;
- memset(text_buffer, 0, 6);
- text_p = 0;
- memset(x12_buffer, 0, 6);
- x12_p = 0;
- memset(edifact_buffer, 0, 8);
- edifact_p = 0;
- strcpy(binary, "");
-
- /* step (a) */
- current_mode = DM_ASCII;
- next_mode = DM_ASCII;
-
- if(symbol->input_mode == GS1_MODE) { gs1 = 1; } else { gs1 = 0; }
-
- if(gs1) {
- target[tp] = 232; tp++;
- concat(binary, " ");
- if(debug) printf("FN1 ");
- } /* FNC1 */
-
- if(symbol->output_options & READER_INIT) {
- if(gs1) {
- strcpy(symbol->errtxt, "Cannot encode in GS1 mode and Reader Initialisation at the same time");
- return ERROR_INVALID_OPTION;
- } else {
- target[tp] = 234; tp++; /* Reader Programming */
- concat(binary, " ");
- if(debug) printf("RP ");
- }
- }
-
- while (sp < inputlen) {
-
- current_mode = next_mode;
-
- /* step (b) - ASCII encodation */
- if(current_mode == DM_ASCII) {
- next_mode = DM_ASCII;
-
- if(istwodigits(source, sp) && ((sp + 1) != inputlen)) {
- target[tp] = (10 * ctoi(source[sp])) + ctoi(source[sp + 1]) + 130;
- if(debug) printf("N%d ", target[tp] - 130);
- tp++; concat(binary, " ");
- sp += 2;
- } else {
- next_mode = look_ahead_test(source, inputlen, sp, current_mode, gs1);
-
- if(next_mode != DM_ASCII) {
- switch(next_mode) {
- case DM_C40: target[tp] = 230; tp++; concat(binary, " ");
- if(debug) printf("C40 "); break;
- case DM_TEXT: target[tp] = 239; tp++; concat(binary, " ");
- if(debug) printf("TEX "); break;
- case DM_X12: target[tp] = 238; tp++; concat(binary, " ");
- if(debug) printf("X12 "); break;
- case DM_EDIFACT: target[tp] = 240; tp++; concat(binary, " ");
- if(debug) printf("EDI "); break;
- case DM_BASE256: target[tp] = 231; tp++; concat(binary, " ");
- if(debug) printf("BAS "); break;
- }
- } else {
- if(source[sp] > 127) {
- target[tp] = 235; /* FNC4 */
- if(debug) printf("FN4 ");
- tp++;
- target[tp] = (source[sp] - 128) + 1;
- if(debug) printf("A%02X ", target[tp] - 1);
- tp++; concat(binary, " ");
- } else {
- if(gs1 && (source[sp] == '[')) {
- target[tp] = 232; /* FNC1 */
- if(debug) printf("FN1 ");
- } else {
- target[tp] = source[sp] + 1;
- if(debug) printf("A%02X ", target[tp] - 1);
- }
- tp++;
- concat(binary, " ");
- }
- sp++;
- }
- }
-
- }
-
- /* step (c) C40 encodation */
- if(current_mode == DM_C40) {
- int shift_set, value;
-
- next_mode = DM_C40;
- if(c40_p == 0) {
- next_mode = look_ahead_test(source, inputlen, sp, current_mode, gs1);
- }
-
- if(next_mode != DM_C40) {
- target[tp] = 254; tp++; concat(binary, " ");/* Unlatch */
- next_mode = DM_ASCII;
- if (debug) printf("ASC ");
- } else {
- if(source[sp] > 127) {
- c40_buffer[c40_p] = 1; c40_p++;
- c40_buffer[c40_p] = 30; c40_p++; /* Upper Shift */
- shift_set = c40_shift[source[sp] - 128];
- value = c40_value[source[sp] - 128];
- } else {
- shift_set = c40_shift[source[sp]];
- value = c40_value[source[sp]];
- }
-
- if(gs1 && (source[sp] == '[')) {
- shift_set = 2;
- value = 27; /* FNC1 */
- }
-
- if(shift_set != 0) {
- c40_buffer[c40_p] = shift_set - 1; c40_p++;
- }
- c40_buffer[c40_p] = value; c40_p++;
-
- if(c40_p >= 3) {
- int iv;
-
- iv = (1600 * c40_buffer[0]) + (40 * c40_buffer[1]) + (c40_buffer[2]) + 1;
- target[tp] = iv / 256; tp++;
- target[tp] = iv % 256; tp++;
- concat(binary, " ");
- if (debug) printf("[%d %d %d] ", c40_buffer[0], c40_buffer[1], c40_buffer[2]);
-
- c40_buffer[0] = c40_buffer[3];
- c40_buffer[1] = c40_buffer[4];
- c40_buffer[2] = c40_buffer[5];
- c40_buffer[3] = 0;
- c40_buffer[4] = 0;
- c40_buffer[5] = 0;
- c40_p -= 3;
- }
- sp++;
- }
- }
-
- /* step (d) Text encodation */
- if(current_mode == DM_TEXT) {
- int shift_set, value;
-
- next_mode = DM_TEXT;
- if(text_p == 0) {
- next_mode = look_ahead_test(source, inputlen, sp, current_mode, gs1);
- }
-
- if(next_mode != DM_TEXT) {
- target[tp] = 254; tp++; concat(binary, " ");/* Unlatch */
- next_mode = DM_ASCII;
- if (debug) printf("ASC ");
- } else {
- if(source[sp] > 127) {
- text_buffer[text_p] = 1; text_p++;
- text_buffer[text_p] = 30; text_p++; /* Upper Shift */
- shift_set = text_shift[source[sp] - 128];
- value = text_value[source[sp] - 128];
- } else {
- shift_set = text_shift[source[sp]];
- value = text_value[source[sp]];
- }
-
- if(gs1 && (source[sp] == '[')) {
- shift_set = 2;
- value = 27; /* FNC1 */
- }
-
- if(shift_set != 0) {
- text_buffer[text_p] = shift_set - 1; text_p++;
- }
- text_buffer[text_p] = value; text_p++;
-
- if(text_p >= 3) {
- int iv;
-
- iv = (1600 * text_buffer[0]) + (40 * text_buffer[1]) + (text_buffer[2]) + 1;
- target[tp] = iv / 256; tp++;
- target[tp] = iv % 256; tp++;
- concat(binary, " ");
- if (debug) printf("[%d %d %d] ", text_buffer[0], text_buffer[1], text_buffer[2]);
-
- text_buffer[0] = text_buffer[3];
- text_buffer[1] = text_buffer[4];
- text_buffer[2] = text_buffer[5];
- text_buffer[3] = 0;
- text_buffer[4] = 0;
- text_buffer[5] = 0;
- text_p -= 3;
- }
- sp++;
- }
- }
-
- /* step (e) X12 encodation */
- if(current_mode == DM_X12) {
- int value = 0;
-
- next_mode = DM_X12;
- if(text_p == 0) {
- next_mode = look_ahead_test(source, inputlen, sp, current_mode, gs1);
- }
-
- if(next_mode != DM_X12) {
- target[tp] = 254; tp++; concat(binary, " ");/* Unlatch */
- next_mode = DM_ASCII;
- if (debug) printf("ASC ");
- } else {
- if(source[sp] == 13) { value = 0; }
- if(source[sp] == '*') { value = 1; }
- if(source[sp] == '>') { value = 2; }
- if(source[sp] == ' ') { value = 3; }
- if((source[sp] >= '0') && (source[sp] <= '9')) { value = (source[sp] - '0') + 4; }
- if((source[sp] >= 'A') && (source[sp] <= 'Z')) { value = (source[sp] - 'A') + 14; }
-
- x12_buffer[x12_p] = value; x12_p++;
-
- if(x12_p >= 3) {
- int iv;
-
- iv = (1600 * x12_buffer[0]) + (40 * x12_buffer[1]) + (x12_buffer[2]) + 1;
- target[tp] = iv / 256; tp++;
- target[tp] = iv % 256; tp++;
- concat(binary, " ");
- if (debug) printf("[%d %d %d] ", x12_buffer[0], x12_buffer[1], x12_buffer[2]);
-
- x12_buffer[0] = x12_buffer[3];
- x12_buffer[1] = x12_buffer[4];
- x12_buffer[2] = x12_buffer[5];
- x12_buffer[3] = 0;
- x12_buffer[4] = 0;
- x12_buffer[5] = 0;
- x12_p -= 3;
- }
- sp++;
- }
- }
-
- /* step (f) EDIFACT encodation */
- if(current_mode == DM_EDIFACT) {
- int value = 0;
-
- next_mode = DM_EDIFACT;
- if(edifact_p == 3) {
- next_mode = look_ahead_test(source, inputlen, sp, current_mode, gs1);
- }
-
- if(next_mode != DM_EDIFACT) {
- edifact_buffer[edifact_p] = 31; edifact_p++;
- next_mode = DM_ASCII;
- } else {
- if((source[sp] >= '@') && (source[sp] <= '^')) { value = source[sp] - '@'; }
- if((source[sp] >= ' ') && (source[sp] <= '?')) { value = source[sp]; }
-
- edifact_buffer[edifact_p] = value; edifact_p++;
- sp++;
- }
-
- if(edifact_p >= 4) {
- target[tp] = (edifact_buffer[0] << 2) + ((edifact_buffer[1] & 0x30) >> 4); tp++;
- target[tp] = ((edifact_buffer[1] & 0x0f) << 4) + ((edifact_buffer[2] & 0x3c) >> 2); tp++;
- target[tp] = ((edifact_buffer[2] & 0x03) << 6) + edifact_buffer[3]; tp++;
- concat(binary, " ");
- if (debug) printf("[%d %d %d %d] ", edifact_buffer[0], edifact_buffer[1], edifact_buffer[2], edifact_buffer[3]);
-
- edifact_buffer[0] = edifact_buffer[4];
- edifact_buffer[1] = edifact_buffer[5];
- edifact_buffer[2] = edifact_buffer[6];
- edifact_buffer[3] = edifact_buffer[7];
- edifact_buffer[4] = 0;
- edifact_buffer[5] = 0;
- edifact_buffer[6] = 0;
- edifact_buffer[7] = 0;
- edifact_p -= 4;
- }
- }
-
- /* step (g) Base 256 encodation */
- if(current_mode == DM_BASE256) {
- next_mode = look_ahead_test(source, inputlen, sp, current_mode, gs1);
-
- if(next_mode == DM_BASE256) {
- target[tp] = source[sp];
- if(debug) printf("B%02X ", target[tp]);
- tp++;
- sp++;
- concat(binary, "b");
- } else {
- next_mode = DM_ASCII;
- if(debug) printf("ASC ");
- }
- }
-
- if(tp > 1558) {
- return 0;
- }
-
- } /* while */
-
- /* Empty buffers */
- if(c40_p == 2) {
- target[tp] = 254; tp++; /* unlatch */
- target[tp] = source[inputlen - 2] + 1; tp++;
- target[tp] = source[inputlen - 1] + 1; tp++;
- concat(binary, " ");
- if(debug) printf("ASC A%02X A%02X ", target[tp - 2] - 1, target[tp - 1] - 1);
- current_mode = DM_ASCII;
- }
- if(c40_p == 1) {
- target[tp] = 254; tp++; /* unlatch */
- target[tp] = source[inputlen - 1] + 1; tp++;
- concat(binary, " ");
- if(debug) printf("ASC A%02X ", target[tp - 1] - 1);
- current_mode = DM_ASCII;
- }
-
- if(text_p == 2) {
- target[tp] = 254; tp++; /* unlatch */
- target[tp] = source[inputlen - 2] + 1; tp++;
- target[tp] = source[inputlen - 1] + 1; tp++;
- concat(binary, " ");
- if(debug) printf("ASC A%02X A%02X ", target[tp - 2] - 1, target[tp - 1] - 1);
- current_mode = DM_ASCII;
- }
- if(text_p == 1) {
- target[tp] = 254; tp++; /* unlatch */
- target[tp] = source[inputlen - 1] + 1; tp++;
- concat(binary, " ");
- if(debug) printf("ASC A%02X ", target[tp - 1] - 1);
- current_mode = DM_ASCII;
- }
-
- if(x12_p == 2) {
- target[tp] = 254; tp++; /* unlatch */
- target[tp] = source[inputlen - 2] + 1; tp++;
- target[tp] = source[inputlen - 1] + 1; tp++;
- concat(binary, " ");
- if(debug) printf("ASC A%02X A%02X ", target[tp - 2] - 1, target[tp - 1] - 1);
- current_mode = DM_ASCII;
- }
- if(x12_p == 1) {
- target[tp] = 254; tp++; /* unlatch */
- target[tp] = source[inputlen - 1] + 1; tp++;
- concat(binary, " ");
- if(debug) printf("ASC A%02X ", target[tp - 1] - 1);
- current_mode = DM_ASCII;
- }
-
- /* Add length and randomising algorithm to b256 */
- i = 0;
- while (i < tp) {
- if(binary[i] == 'b') {
- if((i == 0) || ((i != 0) && (binary[i - 1] != 'b'))) {
- /* start of binary data */
- int binary_count; /* length of b256 data */
-
- for(binary_count = 0; binary[binary_count + i] == 'b'; binary_count++);
-
- if(binary_count <= 249) {
- dminsert(binary, i, 'b');
- insert_value(target, i, tp, binary_count); tp++;
- } else {
- dminsert(binary, i, 'b');
- dminsert(binary, i + 1, 'b');
- insert_value(target, i, tp, (binary_count / 250) + 249); tp++;
- insert_value(target, i + 1, tp, binary_count % 250); tp++;
- }
- }
- }
- i++;
- }
-
- for(i = 0; i < tp; i++) {
- if(binary[i] == 'b') {
- int prn, temp;
-
- prn = ((149 * (i + 1)) % 255) + 1;
- temp = target[i] + prn;
- if (temp <= 255) { target[i] = temp; } else { target[i] = temp - 256; }
- }
- }
-
- if(debug) {
- printf("\n\n");
- for(i = 0; i < tp; i++){
- printf("%02X ", target[i]);
- }
- printf("\n");
- }
-
- *(last_mode) = current_mode;
- return tp;
-}
-
-void add_tail(unsigned char target[], int tp, int tail_length, int last_mode)
-{
- /* adds unlatch and pad bits */
- int i, prn, temp;
-
- switch(last_mode) {
- case DM_C40:
- case DM_TEXT:
- case DM_X12:
- target[tp] = 254; tp++; /* Unlatch */
- tail_length--;
- }
-
- for(i = tail_length; i > 0; i--) {
- if(i == tail_length) {
- target[tp] = 129; tp++; /* Pad */
- } else {
- prn = ((149 * (tp + 1)) % 253) + 1;
- temp = 129 + prn;
- if(temp <= 254) {
- target[tp] = temp; tp++;
- } else {
- target[tp] = temp - 254; tp++;
- }
- }
- }
-}
-
-int data_matrix_200(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- int inputlen, i, skew = 0;
- unsigned char binary[2200];
- int binlen;
- int symbolsize, optionsize, calcsize;
- int taillength, error_number = 0;
- int H, W, FH, FW, datablock, bytes, rsblock;
- int last_mode;
- unsigned char *grid = 0;
- inputlen = length;
-
- binlen = dm200encode(symbol, source, binary, &last_mode, length);
-
- if(binlen == 0) {
- strcpy(symbol->errtxt, "Data too long to fit in symbol");
- return ERROR_TOO_LONG;
- }
-
- if((symbol->option_2 >= 1) && (symbol->option_2 <= 30)) {
- optionsize = intsymbol[symbol->option_2 - 1];
- } else {
- optionsize = -1;
- }
-
- calcsize = 29;
- for(i = 29; i > -1; i--) {
- if(matrixbytes[i] >= binlen) {
- calcsize = i;
- }
- }
-
- if(symbol->option_3 == DM_SQUARE) {
- /* Force to use square symbol */
- switch(calcsize) {
- case 2:
- case 4:
- case 6:
- case 9:
- case 11:
- case 14:
- calcsize++;
- }
- }
-
- symbolsize = optionsize;
- if(calcsize > optionsize) {
- symbolsize = calcsize;
- if(optionsize != -1) {
- /* flag an error */
- error_number = WARN_INVALID_OPTION;
- strcpy(symbol->errtxt, "Data does not fit in selected symbol size");
- }
- }
-
- H = matrixH[symbolsize];
- W = matrixW[symbolsize];
- FH = matrixFH[symbolsize];
- FW = matrixFW[symbolsize];
- bytes = matrixbytes[symbolsize];
- datablock = matrixdatablock[symbolsize];
- rsblock = matrixrsblock[symbolsize];
-
- taillength = bytes - binlen;
-
- if(taillength != 0) {
- add_tail(binary, binlen, taillength, last_mode);
- }
-
- // ecc code
- if(symbolsize == 29) { skew = 1; }
- ecc200(binary, bytes, datablock, rsblock, skew);
- { // placement
- int x, y, NC, NR, *places;
- NC = W - 2 * (W / FW);
- NR = H - 2 * (H / FH);
- places = (int*)malloc(NC * NR * sizeof(int));
- ecc200placement(places, NR, NC);
- grid = (unsigned char*)malloc(W * H);
- memset(grid, 0, W * H);
- for (y = 0; y < H; y += FH) {
- for (x = 0; x < W; x++)
- grid[y * W + x] = 1;
- for (x = 0; x < W; x += 2)
- grid[(y + FH - 1) * W + x] = 1;
- }
- for (x = 0; x < W; x += FW) {
- for (y = 0; y < H; y++)
- grid[y * W + x] = 1;
- for (y = 0; y < H; y += 2)
- grid[y * W + x + FW - 1] = 1;
- }
- for (y = 0; y < NR; y++) {
- for (x = 0; x < NC; x++) {
- int v = places[(NR - y - 1) * NC + x];
- //fprintf (stderr, "%4d", v);
- if (v == 1 || (v > 7 && (binary[(v >> 3) - 1] & (1 << (v & 7)))))
- grid[(1 + y + 2 * (y / (FH - 2))) * W + 1 + x + 2 * (x / (FW - 2))] = 1;
- }
- //fprintf (stderr, "\n");
- }
- for(y = H - 1; y >= 0; y--) {
- int x;
- for(x = 0; x < W; x++) {
- if(grid[W * y + x]) {
- set_module(symbol, (H - y) - 1, x);
- }
- }
- symbol->row_height[(H - y) - 1] = 1;
- }
- free(grid);
- free(places);
- }
-
- symbol->rows = H;
- symbol->width = W;
-
- return error_number;
-}
-
-int dmatrix(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- int error_number;
-
- if(symbol->option_1 <= 1) {
- /* ECC 200 */
- error_number = data_matrix_200(symbol, source, length);
- } else {
- /* ECC 000 - 140 */
- strcpy(symbol->errtxt, "Older Data Matrix standards are no longer supported");
- error_number = ERROR_INVALID_OPTION;
- }
-
- return error_number;
-}
diff --git a/3rdparty/zint-2.4.4/backend/dmatrix.h b/3rdparty/zint-2.4.4/backend/dmatrix.h
deleted file mode 100644
index 79d1143..0000000
--- a/3rdparty/zint-2.4.4/backend/dmatrix.h
+++ /dev/null
@@ -1,101 +0,0 @@
-/* dmatrix.h - Handles Data Matrix ECC 200 */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include "common.h"
-
-#ifndef __IEC16022ECC200_H
-#define __IEC16022ECC200_H
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern int data_matrix_200(struct zint_symbol *symbol, unsigned char source[], int length);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#define MAXBARCODE 3116
-
-#define DM_ASCII 1
-#define DM_C40 2
-#define DM_TEXT 3
-#define DM_X12 4
-#define DM_EDIFACT 5
-#define DM_BASE256 6
-
-static int c40_shift[] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3 };
-
-static int c40_value[] = {
- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
- 3,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,4,5,6,7,8,9,10,11,12,13,
- 15,16,17,18,19,20,21,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,
- 22,23,24,25,26,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31 };
-
-static int text_shift[] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 2, 2, 2, 2, 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 3, 3, 3, 3 };
-
-static int text_value[] = {
- 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,
- 3,0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,4,5,6,7,8,9,10,11,12,13,
- 15,16,17,18,19,20,21,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,
- 22,23,24,25,26,0,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,27,28,29,30,31 };
-
-static int intsymbol[] = {
- 0,1,3,5,7,8,10,12,13,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,2,4,6,9,11,14 };
-
-static int matrixH[] = {
- 10, 12, 8, 14, 8, 16, 12, 18, 20, 12, 22, 16, 24, 26, 16, 32, 36, 40, 44, 48,
- 52, 64, 72, 80, 88, 96, 104, 120, 132, 144 };
-
-static int matrixW[] = {
- 10, 12, 18, 14, 32, 16, 26, 18, 20, 36, 22, 36, 24, 26, 48, 32, 36, 40, 44,
- 48, 52, 64, 72, 80, 88, 96, 104, 120, 132, 144 };
-
-static int matrixFH[] = {
- 10, 12, 8, 14, 8, 16, 12, 18, 20, 12, 22, 16, 24, 26, 16, 16, 18, 20, 22, 24,
- 26, 16, 18, 20, 22, 24, 26, 20, 22, 24 };
-
-static int matrixFW[] = {
- 10, 12, 18, 14, 16, 16, 26, 18, 20, 18, 22, 18, 24, 26, 24, 16, 18, 20, 22,
- 24, 26, 16, 18, 20, 22, 24, 26, 20, 22, 24 };
-
-static int matrixbytes[] = {
- 3, 5, 5, 8, 10, 12, 16, 18, 22, 22, 30, 32, 36, 44, 49, 62, 86, 114, 144,
- 174, 204, 280, 368, 456, 576, 696, 816, 1050, 1304, 1558 };
-
-static int matrixdatablock[] = {
- 3, 5, 5, 8, 10, 12, 16, 18, 22, 22, 30, 32, 36, 44, 49, 62, 86, 114, 144,
- 174, 102, 140, 92, 114, 144, 174, 136, 175, 163, 156 };
-
-static int matrixrsblock[] = {
- 5, 7, 7, 10, 11, 12, 14, 14, 18, 18, 20, 24, 24, 28, 28, 36, 42, 48, 56, 68,
- 42, 56, 36, 48, 56, 68, 56, 68, 62, 62 };
-
-#endif /* __IEC16022ECC200_H */
diff --git a/3rdparty/zint-2.4.4/backend/font.h b/3rdparty/zint-2.4.4/backend/font.h
deleted file mode 100644
index 2c32b5e..0000000
--- a/3rdparty/zint-2.4.4/backend/font.h
+++ /dev/null
@@ -1,1691 +0,0 @@
-/* font.h - Font for PNG images */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-/* This file contains the pixel-by-pixel representation of the "Misc Fixed" font
- at 10 point size processed by the Gimp */
-
-static int ascii_font[9310] = {
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
- 0,0,0,0,0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0,0,0,1,0,0,
- 0,1,0,0,0,0,0,1,0,0,0
-};
diff --git a/3rdparty/zint-2.4.4/backend/gb2312.h b/3rdparty/zint-2.4.4/backend/gb2312.h
deleted file mode 100644
index eca1c50..0000000
--- a/3rdparty/zint-2.4.4/backend/gb2312.h
+++ /dev/null
@@ -1,7467 +0,0 @@
-/* gb2312.h - Unicode to GB 2312-1980 lookup table
-
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-unsigned long int gb2312_lookup[] = {
- 0x00A4, 0xA1E8,
- 0x00A7, 0xA1EC,
- 0x00A8, 0xA1A7,
- 0x00B0, 0xA1E3,
- 0x00B1, 0xA1C0,
- 0x00B7, 0xA1A4,
- 0x00D7, 0xA1C1,
- 0x00E0, 0xA8A4,
- 0x00E1, 0xA8A2,
- 0x00E8, 0xA8A8,
- 0x00E9, 0xA8A6,
- 0x00EA, 0xA8BA,
- 0x00EC, 0xA8AC,
- 0x00ED, 0xA8AA,
- 0x00F2, 0xA8B0,
- 0x00F3, 0xA8AE,
- 0x00F7, 0xA1C2,
- 0x00F9, 0xA8B4,
- 0x00FA, 0xA8B2,
- 0x00FC, 0xA8B9,
- 0x0101, 0xA8A1,
- 0x0113, 0xA8A5,
- 0x011B, 0xA8A7,
- 0x012B, 0xA8A9,
- 0x014D, 0xA8AD,
- 0x016B, 0xA8B1,
- 0x01CE, 0xA8A3,
- 0x01D0, 0xA8AB,
- 0x01D2, 0xA8AF,
- 0x01D4, 0xA8B3,
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xA7A8,
- 0x0417, 0xA7A9,
- 0x0418, 0xA7AA,
- 0x0419, 0xA7AB,
- 0x041A, 0xA7AC,
- 0x041B, 0xA7AD,
- 0x041C, 0xA7AE,
- 0x041D, 0xA7AF,
- 0x041E, 0xA7B0,
- 0x041F, 0xA7B1,
- 0x0420, 0xA7B2,
- 0x0421, 0xA7B3,
- 0x0422, 0xA7B4,
- 0x0423, 0xA7B5,
- 0x0424, 0xA7B6,
- 0x0425, 0xA7B7,
- 0x0426, 0xA7B8,
- 0x0427, 0xA7B9,
- 0x0428, 0xA7BA,
- 0x0429, 0xA7BB,
- 0x042A, 0xA7BC,
- 0x042B, 0xA7BD,
- 0x042C, 0xA7BE,
- 0x042D, 0xA7BF,
- 0x042E, 0xA7C0,
- 0x042F, 0xA7C1,
- 0x0430, 0xA7D1,
- 0x0431, 0xA7D2,
- 0x0432, 0xA7D3,
- 0x0433, 0xA7D4,
- 0x0434, 0xA7D5,
- 0x0435, 0xA7D6,
- 0x0436, 0xA7D8,
- 0x0437, 0xA7D9,
- 0x0438, 0xA7DA,
- 0x0439, 0xA7DB,
- 0x043A, 0xA7DC,
- 0x043B, 0xA7DD,
- 0x043C, 0xA7DE,
- 0x043D, 0xA7DF,
- 0x043E, 0xA7E0,
- 0x043F, 0xA7E1,
- 0x0440, 0xA7E2,
- 0x0441, 0xA7E3,
- 0x0442, 0xA7E4,
- 0x0443, 0xA7E5,
- 0x0444, 0xA7E6,
- 0x0445, 0xA7E7,
- 0x0446, 0xA7E8,
- 0x0447, 0xA7E9,
- 0x0448, 0xA7EA,
- 0x0449, 0xA7EB,
- 0x044A, 0xA7EC,
- 0x044B, 0xA7ED,
- 0x044C, 0xA7EE,
- 0x044D, 0xA7EF,
- 0x044E, 0xA7F0,
- 0x044F, 0xA7F1,
- 0x0451, 0xA7D7,
- 0x2014, 0xA1AA,
- 0x2016, 0xA1AC,
- 0x2018, 0xA1AE,
- 0x2019, 0xA1AF,
- 0x201C, 0xA1B0,
- 0x201D, 0xA1B1,
- 0x2026, 0xA1AD,
- 0x2030, 0xA1EB,
- 0x2032, 0xA1E4,
- 0x2033, 0xA1E5,
- 0x203B, 0xA1F9,
- 0x2103, 0xA1E6,
- 0x2116, 0xA1ED,
- 0x2160, 0xA2F1,
- 0x2161, 0xA2F2,
- 0x2162, 0xA2F3,
- 0x2163, 0xA2F4,
- 0x2164, 0xA2F5,
- 0x2165, 0xA2F6,
- 0x2166, 0xA2F7,
- 0x2167, 0xA2F8,
- 0x2168, 0xA2F9,
- 0x2169, 0xA2FA,
- 0x216A, 0xA2FB,
- 0x216B, 0xA2FC,
- 0x2190, 0xA1FB,
- 0x2191, 0xA1FC,
- 0x2192, 0xA1FA,
- 0x2193, 0xA1FD,
- 0x2208, 0xA1CA,
- 0x220F, 0xA1C7,
- 0x2211, 0xA1C6,
- 0x221A, 0xA1CC,
- 0x221D, 0xA1D8,
- 0x221E, 0xA1DE,
- 0x2220, 0xA1CF,
- 0x2225, 0xA1CE,
- 0x2227, 0xA1C4,
- 0x2228, 0xA1C5,
- 0x2229, 0xA1C9,
- 0x222A, 0xA1C8,
- 0x222B, 0xA1D2,
- 0x222E, 0xA1D3,
- 0x2234, 0xA1E0,
- 0x2235, 0xA1DF,
- 0x2236, 0xA1C3,
- 0x2237, 0xA1CB,
- 0x223D, 0xA1D7,
- 0x2248, 0xA1D6,
- 0x224C, 0xA1D5,
- 0x2260, 0xA1D9,
- 0x2261, 0xA1D4,
- 0x2264, 0xA1DC,
- 0x2265, 0xA1DD,
- 0x226E, 0xA1DA,
- 0x226F, 0xA1DB,
- 0x2299, 0xA1D1,
- 0x22A5, 0xA1CD,
- 0x2312, 0xA1D0,
- 0x2460, 0xA2D9,
- 0x2461, 0xA2DA,
- 0x2462, 0xA2DB,
- 0x2463, 0xA2DC,
- 0x2464, 0xA2DD,
- 0x2465, 0xA2DE,
- 0x2466, 0xA2DF,
- 0x2467, 0xA2E0,
- 0x2468, 0xA2E1,
- 0x2469, 0xA2E2,
- 0x2474, 0xA2C5,
- 0x2475, 0xA2C6,
- 0x2476, 0xA2C7,
- 0x2477, 0xA2C8,
- 0x2478, 0xA2C9,
- 0x2479, 0xA2CA,
- 0x247A, 0xA2CB,
- 0x247B, 0xA2CC,
- 0x247C, 0xA2CD,
- 0x247D, 0xA2CE,
- 0x247E, 0xA2CF,
- 0x247F, 0xA2D0,
- 0x2480, 0xA2D1,
- 0x2481, 0xA2D2,
- 0x2482, 0xA2D3,
- 0x2483, 0xA2D4,
- 0x2484, 0xA2D5,
- 0x2485, 0xA2D6,
- 0x2486, 0xA2D7,
- 0x2487, 0xA2D8,
- 0x2488, 0xA2B1,
- 0x2489, 0xA2B2,
- 0x248A, 0xA2B3,
- 0x248B, 0xA2B4,
- 0x248C, 0xA2B5,
- 0x248D, 0xA2B6,
- 0x248E, 0xA2B7,
- 0x248F, 0xA2B8,
- 0x2490, 0xA2B9,
- 0x2491, 0xA2BA,
- 0x2492, 0xA2BB,
- 0x2493, 0xA2BC,
- 0x2494, 0xA2BD,
- 0x2495, 0xA2BE,
- 0x2496, 0xA2BF,
- 0x2497, 0xA2C0,
- 0x2498, 0xA2C1,
- 0x2499, 0xA2C2,
- 0x249A, 0xA2C3,
- 0x249B, 0xA2C4,
- 0x2500, 0xA9A4,
- 0x2501, 0xA9A5,
- 0x2502, 0xA9A6,
- 0x2503, 0xA9A7,
- 0x2504, 0xA9A8,
- 0x2505, 0xA9A9,
- 0x2506, 0xA9AA,
- 0x2507, 0xA9AB,
- 0x2508, 0xA9AC,
- 0x2509, 0xA9AD,
- 0x250A, 0xA9AE,
- 0x250B, 0xA9AF,
- 0x250C, 0xA9B0,
- 0x250D, 0xA9B1,
- 0x250E, 0xA9B2,
- 0x250F, 0xA9B3,
- 0x2510, 0xA9B4,
- 0x2511, 0xA9B5,
- 0x2512, 0xA9B6,
- 0x2513, 0xA9B7,
- 0x2514, 0xA9B8,
- 0x2515, 0xA9B9,
- 0x2516, 0xA9BA,
- 0x2517, 0xA9BB,
- 0x2518, 0xA9BC,
- 0x2519, 0xA9BD,
- 0x251A, 0xA9BE,
- 0x251B, 0xA9BF,
- 0x251C, 0xA9C0,
- 0x251D, 0xA9C1,
- 0x251E, 0xA9C2,
- 0x251F, 0xA9C3,
- 0x2520, 0xA9C4,
- 0x2521, 0xA9C5,
- 0x2522, 0xA9C6,
- 0x2523, 0xA9C7,
- 0x2524, 0xA9C8,
- 0x2525, 0xA9C9,
- 0x2526, 0xA9CA,
- 0x2527, 0xA9CB,
- 0x2528, 0xA9CC,
- 0x2529, 0xA9CD,
- 0x252A, 0xA9CE,
- 0x252B, 0xA9CF,
- 0x252C, 0xA9D0,
- 0x252D, 0xA9D1,
- 0x252E, 0xA9D2,
- 0x252F, 0xA9D3,
- 0x2530, 0xA9D4,
- 0x2531, 0xA9D5,
- 0x2532, 0xA9D6,
- 0x2533, 0xA9D7,
- 0x2534, 0xA9D8,
- 0x2535, 0xA9D9,
- 0x2536, 0xA9DA,
- 0x2537, 0xA9DB,
- 0x2538, 0xA9DC,
- 0x2539, 0xA9DD,
- 0x253A, 0xA9DE,
- 0x253B, 0xA9DF,
- 0x253C, 0xA9E0,
- 0x253D, 0xA9E1,
- 0x253E, 0xA9E2,
- 0x253F, 0xA9E3,
- 0x2540, 0xA9E4,
- 0x2541, 0xA9E5,
- 0x2542, 0xA9E6,
- 0x2543, 0xA9E7,
- 0x2544, 0xA9E8,
- 0x2545, 0xA9E9,
- 0x2546, 0xA9EA,
- 0x2547, 0xA9EB,
- 0x2548, 0xA9EC,
- 0x2549, 0xA9ED,
- 0x254A, 0xA9EE,
- 0x254B, 0xA9EF,
- 0x25A0, 0xA1F6,
- 0x25A1, 0xA1F5,
- 0x25B2, 0xA1F8,
- 0x25B3, 0xA1F7,
- 0x25C6, 0xA1F4,
- 0x25C7, 0xA1F3,
- 0x25CB, 0xA1F0,
- 0x25CE, 0xA1F2,
- 0x25CF, 0xA1F1,
- 0x2605, 0xA1EF,
- 0x2606, 0xA1EE,
- 0x2640, 0xA1E2,
- 0x2642, 0xA1E1,
- 0x3000, 0xA1A1,
- 0x3001, 0xA1A2,
- 0x3002, 0xA1A3,
- 0x3003, 0xA1A8,
- 0x3005, 0xA1A9,
- 0x3008, 0xA1B4,
- 0x3009, 0xA1B5,
- 0x300A, 0xA1B6,
- 0x300B, 0xA1B7,
- 0x300C, 0xA1B8,
- 0x300D, 0xA1B9,
- 0x300E, 0xA1BA,
- 0x300F, 0xA1BB,
- 0x3010, 0xA1BE,
- 0x3011, 0xA1BF,
- 0x3013, 0xA1FE,
- 0x3014, 0xA1B2,
- 0x3015, 0xA1B3,
- 0x3016, 0xA1BC,
- 0x3017, 0xA1BD,
- 0x3041, 0xA4A1,
- 0x3042, 0xA4A2,
- 0x3043, 0xA4A3,
- 0x3044, 0xA4A4,
- 0x3045, 0xA4A5,
- 0x3046, 0xA4A6,
- 0x3047, 0xA4A7,
- 0x3048, 0xA4A8,
- 0x3049, 0xA4A9,
- 0x304A, 0xA4AA,
- 0x304B, 0xA4AB,
- 0x304C, 0xA4AC,
- 0x304D, 0xA4AD,
- 0x304E, 0xA4AE,
- 0x304F, 0xA4AF,
- 0x3050, 0xA4B0,
- 0x3051, 0xA4B1,
- 0x3052, 0xA4B2,
- 0x3053, 0xA4B3,
- 0x3054, 0xA4B4,
- 0x3055, 0xA4B5,
- 0x3056, 0xA4B6,
- 0x3057, 0xA4B7,
- 0x3058, 0xA4B8,
- 0x3059, 0xA4B9,
- 0x305A, 0xA4BA,
- 0x305B, 0xA4BB,
- 0x305C, 0xA4BC,
- 0x305D, 0xA4BD,
- 0x305E, 0xA4BE,
- 0x305F, 0xA4BF,
- 0x3060, 0xA4C0,
- 0x3061, 0xA4C1,
- 0x3062, 0xA4C2,
- 0x3063, 0xA4C3,
- 0x3064, 0xA4C4,
- 0x3065, 0xA4C5,
- 0x3066, 0xA4C6,
- 0x3067, 0xA4C7,
- 0x3068, 0xA4C8,
- 0x3069, 0xA4C9,
- 0x306A, 0xA4CA,
- 0x306B, 0xA4CB,
- 0x306C, 0xA4CC,
- 0x306D, 0xA4CD,
- 0x306E, 0xA4CE,
- 0x306F, 0xA4CF,
- 0x3070, 0xA4D0,
- 0x3071, 0xA4D1,
- 0x3072, 0xA4D2,
- 0x3073, 0xA4D3,
- 0x3074, 0xA4D4,
- 0x3075, 0xA4D5,
- 0x3076, 0xA4D6,
- 0x3077, 0xA4D7,
- 0x3078, 0xA4D8,
- 0x3079, 0xA4D9,
- 0x307A, 0xA4DA,
- 0x307B, 0xA4DB,
- 0x307C, 0xA4DC,
- 0x307D, 0xA4DD,
- 0x307E, 0xA4DE,
- 0x307F, 0xA4DF,
- 0x3080, 0xA4E0,
- 0x3081, 0xA4E1,
- 0x3082, 0xA4E2,
- 0x3083, 0xA4E3,
- 0x3084, 0xA4E4,
- 0x3085, 0xA4E5,
- 0x3086, 0xA4E6,
- 0x3087, 0xA4E7,
- 0x3088, 0xA4E8,
- 0x3089, 0xA4E9,
- 0x308A, 0xA4EA,
- 0x308B, 0xA4EB,
- 0x308C, 0xA4EC,
- 0x308D, 0xA4ED,
- 0x308E, 0xA4EE,
- 0x308F, 0xA4EF,
- 0x3090, 0xA4F0,
- 0x3091, 0xA4F1,
- 0x3092, 0xA4F2,
- 0x3093, 0xA4F3,
- 0x30A1, 0xA5A1,
- 0x30A2, 0xA5A2,
- 0x30A3, 0xA5A3,
- 0x30A4, 0xA5A4,
- 0x30A5, 0xA5A5,
- 0x30A6, 0xA5A6,
- 0x30A7, 0xA5A7,
- 0x30A8, 0xA5A8,
- 0x30A9, 0xA5A9,
- 0x30AA, 0xA5AA,
- 0x30AB, 0xA5AB,
- 0x30AC, 0xA5AC,
- 0x30AD, 0xA5AD,
- 0x30AE, 0xA5AE,
- 0x30AF, 0xA5AF,
- 0x30B0, 0xA5B0,
- 0x30B1, 0xA5B1,
- 0x30B2, 0xA5B2,
- 0x30B3, 0xA5B3,
- 0x30B4, 0xA5B4,
- 0x30B5, 0xA5B5,
- 0x30B6, 0xA5B6,
- 0x30B7, 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F3,
- 0x30F4, 0xA5F4,
- 0x30F5, 0xA5F5,
- 0x30F6, 0xA5F6,
- 0x3105, 0xA8C5,
- 0x3106, 0xA8C6,
- 0x3107, 0xA8C7,
- 0x3108, 0xA8C8,
- 0x3109, 0xA8C9,
- 0x310A, 0xA8CA,
- 0x310B, 0xA8CB,
- 0x310C, 0xA8CC,
- 0x310D, 0xA8CD,
- 0x310E, 0xA8CE,
- 0x310F, 0xA8CF,
- 0x3110, 0xA8D0,
- 0x3111, 0xA8D1,
- 0x3112, 0xA8D2,
- 0x3113, 0xA8D3,
- 0x3114, 0xA8D4,
- 0x3115, 0xA8D5,
- 0x3116, 0xA8D6,
- 0x3117, 0xA8D7,
- 0x3118, 0xA8D8,
- 0x3119, 0xA8D9,
- 0x311A, 0xA8DA,
- 0x311B, 0xA8DB,
- 0x311C, 0xA8DC,
- 0x311D, 0xA8DD,
- 0x311E, 0xA8DE,
- 0x311F, 0xA8DF,
- 0x3120, 0xA8E0,
- 0x3121, 0xA8E1,
- 0x3122, 0xA8E2,
- 0x3123, 0xA8E3,
- 0x3124, 0xA8E4,
- 0x3125, 0xA8E5,
- 0x3126, 0xA8E6,
- 0x3127, 0xA8E7,
- 0x3128, 0xA8E8,
- 0x3129, 0xA8E9,
- 0x3220, 0xA2E5,
- 0x3221, 0xA2E6,
- 0x3222, 0xA2E7,
- 0x3223, 0xA2E8,
- 0x3224, 0xA2E9,
- 0x3225, 0xA2EA,
- 0x3226, 0xA2EB,
- 0x3227, 0xA2EC,
- 0x3228, 0xA2ED,
- 0x3229, 0xA2EE,
- 0x4E00, 0xD2BB,
- 0x4E01, 0xB6A1,
- 0x4E03, 0xC6DF,
- 0x4E07, 0xCDF2,
- 0x4E08, 0xD5C9,
- 0x4E09, 0xC8FD,
- 0x4E0A, 0xC9CF,
- 0x4E0B, 0xCFC2,
- 0x4E0C, 0xD8A2,
- 0x4E0D, 0xB2BB,
- 0x4E0E, 0xD3EB,
- 0x4E10, 0xD8A4,
- 0x4E11,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507E, 0xD9C7,
- 0x507F, 0xB3A5,
- 0x5080, 0xBFFE,
- 0x5085, 0xB8B5,
- 0x5088, 0xC0FC,
- 0x508D, 0xB0F8,
- 0x50A3, 0xB4F6,
- 0x50A5, 0xD9CE,
- 0x50A7, 0xD9CF,
- 0x50A8, 0xB4A2,
- 0x50A9, 0xD9D0,
- 0x50AC, 0xB4DF,
- 0x50B2, 0xB0C1,
- 0x50BA, 0xD9D1,
- 0x50BB, 0xC9B5,
- 0x50CF, 0xCFF1,
- 0x50D6, 0xD9D2,
- 0x50DA, 0xC1C5,
- 0x50E6, 0xD9D6,
- 0x50E7, 0xC9AE,
- 0x50EC, 0xD9D5,
- 0x50ED, 0xD9D4,
- 0x50EE, 0xD9D7,
- 0x50F3, 0xCBDB,
- 0x50F5, 0xBDA9,
- 0x50FB, 0xC6A7,
- 0x5106, 0xD9D3,
- 0x5107, 0xD9D8,
- 0x510B, 0xD9D9,
- 0x5112, 0xC8E5,
- 0x5121, 0xC0DC,
- 0x513F, 0xB6F9,
- 0x5140, 0xD8A3,
- 0x5141, 0xD4CA,
- 0x5143, 0xD4AA,
- 0x5144, 0xD0D6,
- 0x5145, 0xB3E4,
- 0x5146, 0xD5D7,
- 0x5148, 0xCFC8,
- 0x5149, 0xB9E2,
- 0x514B, 0xBFCB,
- 0x514D, 0xC3E2,
- 0x5151, 0xB6D2,
- 0x5154, 0xCDC3,
- 0x5155, 0xD9EE,
- 0x5156, 0xD9F0,
- 0x515A, 0xB5B3,
- 0x515C, 0xB6B5,
- 0x5162, 0xBEA4,
- 0x5165, 0xC8EB,
- 0x5168, 0xC8AB,
- 0x516B, 0xB0CB,
- 0x516C, 0xB9AB,
- 0x516D, 0xC1F9,
- 0x516E, 0xD9E2,
- 0x5170, 0xC0BC,
- 0x5171, 0xB9B2,
- 0x5173, 0xB9D8,
- 0x5174, 0xD0CB,
- 0x5175, 0xB1F8,
- 0x5176, 0xC6E4,
- 0x5177, 0xBEDF,
- 0x5178, 0xB5E4,
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, 0xDBCA,
- 0x51FD, 0xBAAF,
- 0x51FF, 0xD4E4,
- 0x5200, 0xB5B6,
- 0x5201, 0xB5F3,
- 0x5202, 0xD8D6,
- 0x5203, 0xC8D0,
- 0x5206, 0xB7D6,
- 0x5207, 0xC7D0,
- 0x5208, 0xD8D7,
- 0x520A, 0xBFAF,
- 0x520D, 0xDBBB,
- 0x520E, 0xD8D8,
- 0x5211, 0xD0CC,
- 0x5212, 0xBBAE,
- 0x5216, 0xEBBE,
- 0x5217, 0xC1D0,
- 0x5218, 0xC1F5,
- 0x5219, 0xD4F2,
- 0x521A, 0xB8D5,
- 0x521B, 0xB4B4,
- 0x521D, 0xB3F5,
- 0x5220, 0xC9BE,
- 0x5224, 0xC5D0,
- 0x5228, 0xC5D9,
- 0x5229, 0xC0FB,
- 0x522B, 0xB1F0,
- 0x522D, 0xD8D9,
- 0x522E, 0xB9CE,
- 0x5230, 0xB5BD,
- 0x5233, 0xD8DA,
- 0x5236, 0xD6C6,
- 0x5237, 0xCBA2,
- 0x5238, 0xC8AF,
- 0x5239, 0xC9B2,
- 0x523A, 0xB4CC,
- 0x523B, 0xBFCC,
- 0x523D, 0xB9F4,
- 0x523F, 0xD8DB,
- 0x5240, 0xD8DC,
- 0x5241, 0xB6E7,
- 0x5242, 0xBCC1,
- 0x5243, 0xCCEA,
- 0x524A, 0xCFF7,
- 0x524C, 0xD8DD,
- 0x524D, 0xC7B0,
- 0x5250, 0xB9D0,
- 0x5251, 0xBDA3,
- 0x5254, 0xCCDE,
- 0x5256, 0xC6CA,
- 0x525C, 0xD8E0,
- 0x525E, 0xD8DE,
- 0x5261, 0xD8DF,
- 0x5265, 0xB0FE,
- 0x5267, 0xBEE7,
- 0x5269, 0xCAA3,
- 0x526A, 0xBCF4,
- 0x526F, 0xB8B1,
- 0x5272, 0xB8EE,
- 0x527D, 0xD8E2,
- 0x527F, 0xBDCB,
- 0x5281, 0xD8E4,
- 0x5282, 0xD8E3,
- 0x5288, 0xC5FC,
- 0x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 0xD8A6,
- 0x5347, 0xC9FD,
- 0x5348, 0xCEE7,
- 0x5349, 0xBBDC,
- 0x534A, 0xB0EB,
- 0x534E, 0xBBAA,
- 0x534F, 0xD0AD,
- 0x5351, 0xB1B0,
- 0x5352, 0xD7E4,
- 0x5353, 0xD7BF,
- 0x5355, 0xB5A5,
- 0x5356, 0xC2F4,
- 0x5357, 0xC4CF,
- 0x535A, 0xB2A9,
- 0x535C, 0xB2B7,
- 0x535E, 0xB1E5,
- 0x535F, 0xDFB2,
- 0x5360, 0xD5BC,
- 0x5361, 0xBFA8,
- 0x5362, 0xC2AC,
- 0x5363, 0xD8D5,
- 0x5364, 0xC2B1,
- 0x5366, 0xD8D4,
- 0x5367, 0xCED4,
- 0x5369, 0xDAE0,
- 0x536B, 0xCEC0,
- 0x536E, 0xD8B4,
- 0x536F, 0xC3AE,
- 0x5370, 0xD3A1,
- 0x5371, 0xCEA3,
- 0x5373, 0xBCB4,
- 0x5374, 0xC8B4,
- 0x5375, 0xC2D1,
- 0x5377, 0xBEED,
- 0x5378, 0xD0B6,
- 0x537A, 0xDAE1,
- 0x537F, 0xC7E4,
- 0x5382, 0xB3A7,
- 0x5384, 0xB6F2,
- 0x5385, 0xCCFC,
- 0x5386, 0xC0FA,
- 0x5389, 0xC0F7,
- 0x538B, 0xD1B9,
- 0x538C, 0xD1E1,
- 0x538D, 0xD8C7,
- 0x5395, 0xB2DE,
- 0x5398, 0xC0E5,
- 0x539A, 0xBAF1,
- 0x539D, 0xD8C8,
- 0x539F, 0xD4AD,
- 0x53A2, 0xCFE1,
- 0x53A3, 0xD8C9,
- 0x53A5, 0xD8CA,
- 0x53A6, 0xCFC3,
- 0x53A8, 0xB3F8,
- 0x53A9, 0xBEC7,
- 0x53AE, 0xD8CB,
- 0x53B6, 0xDBCC,
- 0x53BB, 0xC8A5,
- 0x53BF, 0xCFD8,
- 0x53C1, 0xC8FE,
- 0x53C2, 0xB2CE,
- 0x53C8, 0xD3D6,
- 0x53C9, 0xB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0xDFC4,
- 0x5426, 0xB7F1,
- 0x5427, 0xB0C9,
- 0x5428, 0xB6D6,
- 0x5429, 0xB7D4,
- 0x542B, 0xBAAC,
- 0x542C, 0xCCFD,
- 0x542D, 0xBFD4,
- 0x542E, 0xCBB1,
- 0x542F, 0xC6F4,
- 0x5431, 0xD6A8,
- 0x5432, 0xDFC5,
- 0x5434, 0xCEE2,
- 0x5435, 0xB3B3,
- 0x5438, 0xCEFC,
- 0x5439, 0xB4B5,
- 0x543B, 0xCEC7,
- 0x543C, 0xBAF0,
- 0x543E, 0xCEE1,
- 0x5440, 0xD1BD,
- 0x5443, 0xDFC0,
- 0x5446, 0xB4F4,
- 0x5448, 0xB3CA,
- 0x544A, 0xB8E6,
- 0x544B, 0xDFBB,
- 0x5450, 0xC4C5,
- 0x5452, 0xDFBC,
- 0x5453, 0xDFBD,
- 0x5454, 0xDFBE,
- 0x5455, 0xC5BB,
- 0x5456, 0xDFBF,
- 0x5457, 0xDFC2,
- 0x5458, 0xD4B1,
- 0x5459, 0xDFC3,
- 0x545B, 0xC7BA,
- 0x545C, 0xCED8,
- 0x5462, 0xC4D8,
- 0x5464, 0xDFCA,
- 0x5466, 0xDFCF,
- 0x5468, 0xD6DC,
- 0x5471, 0xDFC9,
- 0x5472, 0xDFDA,
- 0x5473, 0xCEB6,
- 0x5475, 0xBAC7,
- 0x5476, 0xDFCE,
- 0x5477, 0xDFC8,
- 0x5478, 0xC5DE,
- 0x547B, 0xC9EB,
- 0x547C, 0xBAF4,
- 0x547D, 0xC3FC,
- 0x5480, 0xBED7,
- 0x5482, 0xDFC6,
- 0x5484, 0xDFCD,
- 0x5486, 0xC5D8,
- 0x548B, 0xD5A6,
- 0x548C, 0xBACD,
- 0x548E, 0xBECC,
- 0x548F, 0xD3BD,
- 0x5490, 0xB8C0,
- 0x5492, 0xD6E4,
- 0x5494, 0xDFC7,
- 0x5495, 0xB9BE,
- 0x5496, 0xBFA7,
- 0x5499, 0xC1FC,
- 0x549A, 0xDF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5506, 0xCBF4,
- 0x5507, 0xB4BD,
- 0x5509, 0xB0A6,
- 0x550F, 0xDFF1,
- 0x5510, 0xCCC6,
- 0x5511, 0xDFF2,
- 0x5514, 0xDFED,
- 0x551B, 0xDFE9,
- 0x5520, 0xDFEB,
- 0x5522, 0xDFEF,
- 0x5523, 0xDFF0,
- 0x5524, 0xBBBD,
- 0x5527, 0xDFF3,
- 0x552A, 0xDFF4,
- 0x552C, 0xBBA3,
- 0x552E, 0xCADB,
- 0x552F, 0xCEA8,
- 0x5530, 0xE0A7,
- 0x5531, 0xB3AA,
- 0x5533, 0xE0A6,
- 0x5537, 0xE0A1,
- 0x553C, 0xDFFE,
- 0x553E, 0xCDD9,
- 0x553F, 0xDFFC,
- 0x5541, 0xDFFA,
- 0x5543, 0xBFD0,
- 0x5544, 0xD7C4,
- 0x5546, 0xC9CC,
- 0x5549, 0xDFF8,
- 0x554A, 0xB0A1,
- 0x5550, 0xDFFD,
- 0x5555, 0xDFFB,
- 0x5556, 0xE0A2,
- 0x555C, 0xE0A8,
- 0x5561, 0xB7C8,
- 0x5564, 0xC6A1,
- 0x5565, 0xC9B6,
- 0x5566, 0xC0B2,
- 0x5567, 0xDFF5,
- 0x556A, 0xC5BE,
- 0x556C, 0xD8C4,
- 0x556D, 0xDFF9,
- 0x556E, 0xC4F6,
- 0x5575, 0xE0A3,
- 0x5576, 0xE0A4,
- 0x5577, 0xE0A5,
- 0x5578, 0xD0A5,
- 0x557B, 0xE0B4,
- 0x557C, 0xCCE4,
- 0x557E, 0xE0B1,
- 0x5580, 0xBFA6,
- 0x5581, 0xE0AF,
- 0x5582, 0xCEB9,
- 0x5583, 0xE0AB,
- 0x5584, 0xC9C6,
- 0x5587, 0xC0AE,
- 0x5588, 0xE0AE,
- 0x5589, 0xBAED,
- 0x558A, 0xBAB0,
- 0x558B, 0xE0A9,
- 0x558F, 0xDFF6,
- 0x5591, 0xE0B3,
- 0x5594, 0xE0B8,
- 0x5598, 0xB4AD,
- 0x5599,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0xCAA5,
- 0x5728, 0xD4DA,
- 0x5729, 0xDBD7,
- 0x572A, 0xDBD9,
- 0x572C, 0xDBD8,
- 0x572D, 0xB9E7,
- 0x572E, 0xDBDC,
- 0x572F, 0xDBDD,
- 0x5730, 0xB5D8,
- 0x5733, 0xDBDA,
- 0x5739, 0xDBDB,
- 0x573A, 0xB3A1,
- 0x573B, 0xDBDF,
- 0x573E, 0xBBF8,
- 0x5740, 0xD6B7,
- 0x5742, 0xDBE0,
- 0x5747, 0xBEF9,
- 0x574A, 0xB7BB,
- 0x574C, 0xDBD0,
- 0x574D, 0xCCAE,
- 0x574E, 0xBFB2,
- 0x574F, 0xBBB5,
- 0x5750, 0xD7F8,
- 0x5751, 0xBFD3,
- 0x5757, 0xBFE9,
- 0x575A, 0xBCE1,
- 0x575B, 0xCCB3,
- 0x575C, 0xDBDE,
- 0x575D, 0xB0D3,
- 0x575E, 0xCEEB,
- 0x575F, 0xB7D8,
- 0x5760, 0xD7B9,
- 0x5761, 0xC6C2,
- 0x5764, 0xC0A4,
- 0x5766, 0xCCB9,
- 0x5768, 0xDBE7,
- 0x5769, 0xDBE1,
- 0x576A, 0xC6BA,
- 0x576B, 0xDBE3,
- 0x576D, 0xDBE8,
- 0x576F, 0xC5F7,
- 0x5773, 0xDBEA,
- 0x5776, 0xDBE9,
- 0x5777, 0xBFC0,
- 0x577B, 0xDBE6,
- 0x577C, 0xDBE5,
- 0x5782, 0xB4B9,
- 0x5783, 0xC0AC,
- 0x5784, 0xC2A2,
- 0x5785, 0xDBE2,
- 0x5786, 0xDBE4,
- 0x578B, 0xD0CD,
- 0x578C, 0xDBED,
- 0x5792, 0xC0DD,
- 0x5793, 0xDBF2,
- 0x579B, 0xB6E2,
- 0x57A0, 0xDBF3,
- 0x57A1, 0xDBD2,
- 0x57A2, 0xB9B8,
- 0x57A3, 0xD4AB,
- 0x57A4, 0xDBEC,
- 0x57A6, 0xBFD1,
- 0x57A7, 0xDBF0,
- 0x57A9, 0xDBD1,
-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899, 0xC7BD,
- 0x589A, 0xDCAE,
- 0x589E, 0xD4F6,
- 0x589F, 0xD0E6,
- 0x58A8, 0xC4AB,
- 0x58A9, 0xB6D5,
- 0x58BC, 0xDBD4,
- 0x58C1, 0xB1DA,
- 0x58C5, 0xDBD5,
- 0x58D1, 0xDBD6,
- 0x58D5, 0xBABE,
- 0x58E4, 0xC8C0,
- 0x58EB, 0xCABF,
- 0x58EC, 0xC8C9,
- 0x58EE, 0xD7B3,
- 0x58F0, 0xC9F9,
- 0x58F3, 0xBFC7,
- 0x58F6, 0xBAF8,
- 0x58F9, 0xD2BC,
- 0x5902, 0xE2BA,
- 0x5904, 0xB4A6,
- 0x5907, 0xB1B8,
- 0x590D, 0xB8B4,
- 0x590F, 0xCFC4,
- 0x5914, 0xD9E7,
- 0x5915, 0xCFA6,
- 0x5916, 0xCDE2,
- 0x5919, 0xD9ED,
- 0x591A, 0xB6E0,
- 0x591C, 0xD2B9,
- 0x591F, 0xB9BB,
- 0x5924, 0xE2B9,
- 0x5925, 0xE2B7,
- 0x5927, 0xB4F3,
- 0x5929, 0xCCEC,
- 0x592A, 0xCCAB,
- 0x592B, 0xB7F2,
- 0x592D, 0xD8B2,
- 0x592E, 0xD1EB,
- 0x592F, 0xBABB,
- 0x5931, 0xCAA7,
- 0x5934, 0xCDB7,
- 0x5937, 0xD2C4,
- 0x5938, 0xBFE4,
- 0x5939, 0xBCD0,
- 0x593A, 0xB6E1,
- 0x593C, 0xDEC5,
- 0x5941, 0xDEC6,
- 0x5942, 0xDBBC,
- 0x5944, 0xD1D9,
- 0x5947, 0xC6E6,
- 0x5948, 0xC4CE,
- 0x5949, 0xB7EE,
- 0x594B, 0xB7DC,
- 0x594E, 0xBFFC,
- 0x594F, 0xD7E0,
- 0x5951, 0xC6F5,
- 0x5954, 0xB1BC,
- 0x5955, 0xDEC8,
- 0x5956, 0xBDB1,
- 0x5957, 0xCCD7,
- 0x5958, 0xDECA,
- 0x595A, 0xDEC9,
- 0x5960, 0x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5FA,
- 0x6015, 0xC5C2,
- 0x6016, 0xB2C0,
- 0x6019, 0xE2EF,
- 0x601B, 0xE2F2,
- 0x601C, 0xC1AF,
- 0x601D, 0xCBBC,
- 0x6020, 0xB5A1,
- 0x6021, 0xE2F9,
- 0x6025, 0xBCB1,
- 0x6026, 0xE2F1,
- 0x6027, 0xD0D4,
- 0x6028, 0xD4B9,
- 0x6029, 0xE2F5,
- 0x602A, 0xB9D6,
- 0x602B, 0xE2F6,
- 0x602F, 0xC7D3,
- 0x6035, 0xE2F0,
- 0x603B, 0xD7DC,
- 0x603C, 0xEDA1,
- 0x603F, 0xE2F8,
- 0x6041, 0xEDA5,
- 0x6042, 0xE2FE,
- 0x6043, 0xCAD1,
- 0x604B, 0xC1B5,
- 0x604D, 0xBBD0,
- 0x6050, 0xBFD6,
- 0x6052, 0xBAE3,
- 0x6055, 0xCBA1,
- 0x6059, 0xEDA6,
- 0x605A, 0xEDA3,
- 0x605D, 0xEDA2,
- 0x6062, 0xBBD6,
- 0x6063, 0xEDA7,
- 0x6064, 0xD0F4,
- 0x6067, 0xEDA4,
- 0x6068, 0xBADE,
- 0x6069, 0xB6F7,
- 0x606A, 0xE3A1,
- 0x606B, 0xB6B2,
- 0x606C, 0xCCF1,
- 0x606D, 0xB9A7,
- 0x606F, 0xCFA2,
- 0x6070, 0xC7A1,
- 0x6073, 0xBFD2,
- 0x6076, 0xB6F1,
- 0x6078, 0xE2FA,
- 0x6079, 0xE2FB,
- 0x607A, 0xE2FD,
- 0x607B, 0xE2FC,
- 0x607C, 0xC4D5,
- 0x607D, 0xE3A2,
- 0x607F, 0xD3C1,
- 0x6083, 0xE3A7,
- 0x6084, 0xC7C4,
- 0x6089, 0xCFA4,
- 0x608C, 0xE3A9,
- 0x608D, 0xBAB7,
- 0x6092, 0xE3A8,
- 0x6094, 0xBBDA,
- 0x6096, 0xE3A3,
- 0x609A, 0xE3A4,
- 0x609B, 0xE3AA,
- 0x609D, 0xE3A6,
- 0x609F, 0xCE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x614C, 0xBBC5,
- 0x614E, 0xC9F7,
- 0x6151, 0xC9E5,
- 0x6155, 0xC4BD,
- 0x615D, 0xEDAB,
- 0x6162, 0xC2FD,
- 0x6167, 0xBBDB,
- 0x6168, 0xBFAE,
- 0x6170, 0xCEBF,
- 0x6175, 0xE3BC,
- 0x6177, 0xBFB6,
- 0x618B, 0xB1EF,
- 0x618E, 0xD4F7,
- 0x6194, 0xE3BE,
- 0x619D, 0xEDAD,
- 0x61A7, 0xE3BF,
- 0x61A8, 0xBAA9,
- 0x61A9, 0xEDAC,
- 0x61AC, 0xE3BD,
- 0x61B7, 0xE3C0,
- 0x61BE, 0xBAB6,
- 0x61C2, 0xB6AE,
- 0x61C8, 0xD0B8,
- 0x61CA, 0xB0C3,
- 0x61CB, 0xEDAE,
- 0x61D1, 0xEDAF,
- 0x61D2, 0xC0C1,
- 0x61D4, 0xE3C1,
- 0x61E6, 0xC5B3,
- 0x61F5, 0xE3C2,
- 0x61FF, 0xDCB2,
- 0x6206, 0xEDB0,
- 0x6208, 0xB8EA,
- 0x620A, 0xCEEC,
- 0x620B, 0xEAA7,
- 0x620C, 0xD0E7,
- 0x620D, 0xCAF9,
- 0x620E, 0xC8D6,
- 0x620F, 0xCFB7,
- 0x6210, 0xB3C9,
- 0x6211, 0xCED2,
- 0x6212, 0xBDE4,
- 0x6215, 0xE3DE,
- 0x6216, 0xBBF2,
- 0x6217, 0xEAA8,
- 0x6218, 0xD5BD,
- 0x621A, 0xC6DD,
- 0x621B, 0xEAA9,
- 0x621F, 0xEAAA,
- 0x6221, 0xEAAC,
- 0x6222, 0xEAAB,
- 0x6224, 0xEAAE,
- 0x6225, 0xEAAD,
- 0x622A, 0xBDD8,
- 0x622C, 0xEAAF,
- 0x622E, 0xC2BE,
- 0x6233, 0xB4C1,
- 0x6234, 0xB4F7,
- 0x6237, 0xBBA7,
- 0x623D, 0xECE6,
- 0x623E, 0xECE5,
- 0x623F, 0xB7BF,
- 0x6240, 0xCBF9,
- 0x6241, 0xB1E2,
- 0x6243, 0xECE7,
- 0x6247, 0xC9C8,
- 0x6248, 0xECE8,
- 0x6249, 0xECE9,
- 0x624B, 0xCAD6,
- 0x624C, 0xDED0,
- 0x624D, 0xB2C5,
- 0x624E, 0xD4FA,
- 0x6251, 0xC6CB,
- 0x6252, 0xB0C7,
- 0x6253, 0xB4F2,
- 0x6254, 0xC8D3,
- 0x6258, 0xCDD0,
- 0x625B, 0xBFB8,
- 0x6263, 0xBFDB,
- 0x6266, 0xC7A4,
- 0x6267, 0xD6B4,
- 0x6269, 0xC0A9,
- 0x626A, 0xDED1,
- 0x626B, 0xC9A8,
- 0x626C, 0xD1EF,
- 0x626D, 0xC5A4,
- 0x626E, 0xB0E7,
- 0x626F, 0xB3B6,
- 0x6270, 0xC8C5,
- 0x6273, 0xB0E2,
- 0x6276, 0xB7F6,
- 0x6279, 0xC5FA,
- 0x627C, 0xB6F3,
- 0x627E, 0xD5D2,
- 0x627F, 0xB3D0,
- 0x6280, 0xBCBC,
- 0x6284, 0xB3AD,
- 0x6289, 0xBEF1,
- 0x628A, 0xB0D1,
- 0x6291, 0xD2D6,
- 0x6292, 0xCAE3,
- 0x6293, 0xD7A5,
- 0x6295, 0xCDB6,
- 0x6296, 0xB6B6,
- 0x6297, 0xBFB9,
- 0x6298, 0xD5DB,
- 0x629A, 0xB8A7,
- 0x629B, 0xC5D7,
- 0x629F, 0xDED2,
- 0x62A0, 0xBFD9,
- 0x62A1, 0xC2D5,
- 0x62A2, 0xC7C0,
- 0x62A4, 0xBBA4,
- 0x62A5, 0xB1A8,
- 0x62A8, 0xC5EA,
- 0x62AB, 0xC5FB,
- 0x62AC, 0xCCA7,
- 0x62B1, 0xB1A7,
- 0x62B5, 0xB5D6,
- 0x62B9, 0xC4A8,
- 0x62BB, 0xDED3,
- 0x62BC, 0xD1BA,
- 0x62BD, 0xB3E9,
- 0x62BF, 0xC3F2,
- 0x62C2, 0xB7F7,
- 0x62C4, 0xD6F4,
- 0x62C5, 0xB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4EC,
- 0x632F, 0xD5F1,
- 0x6332, 0xEAFD,
- 0x6339, 0xDEDA,
- 0x633A, 0xCDA6,
- 0x633D, 0xCDEC,
- 0x6342, 0xCEE6,
- 0x6343, 0xDEDC,
- 0x6345, 0xCDB1,
- 0x6346, 0xC0A6,
- 0x6349, 0xD7BD,
- 0x634B, 0xDEDB,
- 0x634C, 0xB0C6,
- 0x634D, 0xBAB4,
- 0x634E, 0xC9D3,
- 0x634F, 0xC4F3,
- 0x6350, 0xBEE8,
- 0x6355, 0xB2B6,
- 0x635E, 0xC0CC,
- 0x635F, 0xCBF0,
- 0x6361, 0xBCF1,
- 0x6362, 0xBBBB,
- 0x6363, 0xB5B7,
- 0x6367, 0xC5F5,
- 0x6369, 0xDEE6,
- 0x636D, 0xDEE3,
- 0x636E, 0xBEDD,
- 0x6371, 0xDEDF,
- 0x6376, 0xB4B7,
- 0x6377, 0xBDDD,
- 0x637A, 0xDEE0,
- 0x637B, 0xC4ED,
- 0x6380, 0xCFC6,
- 0x6382, 0xB5E0,
- 0x6387, 0xB6DE,
- 0x6388, 0xCADA,
- 0x6389, 0xB5F4,
- 0x638A, 0xDEE5,
- 0x638C, 0xD5C6,
- 0x638E, 0xDEE1,
- 0x638F, 0xCCCD,
- 0x6390, 0xC6FE,
- 0x6392, 0xC5C5,
- 0x6396, 0xD2B4,
- 0x6398, 0xBEF2,
- 0x63A0, 0xC2D3,
- 0x63A2, 0xCCBD,
- 0x63A3, 0xB3B8,
- 0x63A5, 0xBDD3,
- 0x63A7, 0xBFD8,
- 0x63A8, 0xCDC6,
- 0x63A9, 0xD1DA,
- 0x63AA, 0xB4EB,
- 0x63AC, 0xDEE4,
- 0x63AD, 0xDEDD,
- 0x63AE, 0xDEE7,
- 0x63B0, 0xEAFE,
- 0x63B3, 0xC2B0,
- 0x63B4, 0xDEE2,
- 0x63B7, 0xD6C0,
- 0x63B8, 0xB5A7,
- 0x63BA, 0xB2F4,
- 0x63BC, 0xDEE8,
- 0x63BE, 0xDEF2,
- 0x63C4, 0xDEED,
- 0x63C6, 0xDEF1,
- 0x63C9, 0xC8E0,
- 0x63CD, 0xD7E1,
- 0x63CE, 0xDEEF,
- 0x63CF, 0xC3E8,
- 0x63D0, 0xCCE1,
- 0x63D2, 0xB2E5,
- 0x63D6, 0xD2BE,
- 0x63DE, 0xDEEE,
- 0x63E0, 0xDEEB,
- 0x63E1, 0xCED5,
- 0x63E3, 0xB4A7,
- 0x63E9, 0xBFAB,
- 0x63EA, 0xBEBE,
- 0x63ED, 0xBDD2,
- 0x63F2, 0xDEE9,
- 0x63F4, 0xD4AE,
- 0x63F6, 0xDEDE,
- 0x63F8, 0xDEEA,
- 0x63FD, 0xC0BF,
- 0x63FF, 0xDEEC,
- 0x6400, 0xB2F3,
- 0x6401, 0xB8E9,
- 0x6402, 0xC2A7,
- 0x6405, 0xBDC1,
- 0x640B, 0xDEF5,
- 0x640C, 0xDEF8,
- 0x640F, 0xB2AB,
- 0x6410, 0xB4A4,
- 0x6413, 0xB4EA,
- 0x6414, 0xC9A6,
- 0x641B, 0xDEF6,
- 0x641C, 0xCBD1,
- 0x641E, 0xB8E3,
- 0x6420, 0xDEF7,
- 0x6421, 0xDEFA,
- 0x6426, 0xDEF9,
- 0x642A, 0xCCC2,
- 0x642C, 0xB0E1,
- 0x642D, 0xB4EE,
- 0x6434, 0xE5BA,
- 0x643A, 0xD0AF,
- 0x643D, 0xB2EB,
- 0x643F, 0xEBA1,
- 0x6441, 0xDEF4,
- 0x6444, 0xC9E3,
- 0x6445, 0xDEF3,
- 0x6446, 0xB0DA,
- 0x6447, 0xD2A1,
- 0x6448, 0xB1F7,
- 0x644A, 0xCCAF,
- 0x6452, 0xDEF0,
- 0x6454, 0xCBA4,
- 0x6458, 0xD5AA,
- 0x645E, 0xDEFB,
- 0x6467, 0xB4DD,
- 0x6469, 0xC4A6,
- 0x646D, 0xDEFD,
- 0x6478, 0xC3FE,
- 0x6479, 0xC4A1,
- 0x647A, 0xDFA1,
- 0x6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0x6606, 0xC0A5,
- 0x660A, 0xEABB,
- 0x660C, 0xB2FD,
- 0x660E, 0xC3F7,
- 0x660F, 0xBBE8,
- 0x6613, 0xD2D7,
- 0x6614, 0xCEF4,
- 0x6615, 0xEABF,
- 0x6619, 0xEABC,
- 0x661D, 0xEAC3,
- 0x661F, 0xD0C7,
- 0x6620, 0xD3B3,
- 0x6625, 0xB4BA,
- 0x6627, 0xC3C1,
- 0x6628, 0xD7F2,
- 0x662D, 0xD5D1,
- 0x662F, 0xCAC7,
- 0x6631, 0xEAC5,
- 0x6634, 0xEAC4,
- 0x6635, 0xEAC7,
- 0x6636, 0xEAC6,
- 0x663C, 0xD6E7,
- 0x663E, 0xCFD4,
- 0x6641, 0xEACB,
- 0x6643, 0xBBCE,
- 0x664B, 0xBDFA,
- 0x664C, 0xC9CE,
- 0x664F, 0xEACC,
- 0x6652, 0xC9B9,
- 0x6653, 0xCFFE,
- 0x6654, 0xEACA,
- 0x6655, 0xD4CE,
- 0x6656, 0xEACD,
- 0x6657, 0xEACF,
- 0x665A, 0xCDED,
- 0x665F, 0xEAC9,
- 0x6661, 0xEACE,
- 0x6664, 0xCEEE,
- 0x6666, 0xBBDE,
- 0x6668, 0xB3BF,
- 0x666E, 0xC6D5,
- 0x666F, 0xBEB0,
- 0x6670, 0xCEFA,
- 0x6674, 0xC7E7,
- 0x6676, 0xBEA7,
- 0x6677, 0xEAD0,
- 0x667A, 0xD6C7,
- 0x667E, 0xC1C0,
- 0x6682, 0xD4DD,
- 0x6684, 0xEAD1,
- 0x6687, 0xCFBE,
- 0x668C, 0xEAD2,
- 0x6691, 0xCAEE,
- 0x6696, 0xC5AF,
- 0x6697, 0xB0B5,
- 0x669D, 0xEAD4,
- 0x66A7, 0xEAD3,
- 0x66A8, 0xF4DF,
- 0x66AE, 0xC4BA,
- 0x66B4, 0xB1A9,
- 0x66B9, 0xE5DF,
- 0x66BE, 0xEAD5,
- 0x66D9, 0xCAEF,
- 0x66DB, 0xEAD6,
- 0x66DC, 0xEAD7,
- 0x66DD, 0xC6D8,
- 0x66E6, 0xEAD8,
- 0x66E9, 0xEAD9,
- 0x66F0, 0xD4BB,
- 0x66F2, 0xC7FA,
- 0x66F3, 0xD2B7,
- 0x66F4, 0xB8FC,
- 0x66F7, 0xEAC2,
- 0x66F9, 0xB2DC,
- 0x66FC, 0xC2FC,
- 0x66FE, 0xD4F8,
- 0x66FF, 0xCCE6,
- 0x6700, 0xD7EE,
- 0x6708, 0xD4C2,
- 0x6709, 0xD3D0,
- 0x670A, 0xEBC3,
- 0x670B, 0xC5F3,
- 0x670D, 0xB7FE,
- 0x6710, 0xEBD4,
- 0x6714, 0xCBB7,
- 0x6715, 0xEBDE,
- 0x6717, 0xC0CA,
- 0x671B, 0xCDFB,
- 0x671D, 0xB3AF,
- 0x671F, 0xC6DA,
- 0x6726, 0xEBFC,
- 0x6728, 0xC4BE,
- 0x672A, 0xCEB4,
- 0x672B, 0xC4A9,
- 0x672C, 0xB1BE,
- 0x672D, 0xD4FD,
- 0x672F, 0xCAF5,
- 0x6731, 0xD6EC,
- 0x6734, 0xC6D3,
- 0x6735, 0xB6E4,
- 0x673A, 0xBBFA,
- 0x673D, 0xD0E0,
- 0x6740, 0xC9B1,
- 0x6742, 0xD4D3,
- 0x6743, 0xC8A8,
- 0x6746, 0xB8CB,
- 0x6748, 0xE8BE,
- 0x6749, 0xC9BC,
- 0x674C, 0xE8BB,
- 0x674E, 0xC0EE,
- 0x674F, 0xD0D3,
- 0x6750, 0xB2C4,
- 0x6751, 0xB4E5,
- 0x6753, 0xE8BC,
- 0x6756, 0xD5C8,
- 0x675C, 0xB6C5,
- 0x675E, 0xE8BD,
- 0x675F, 0xCAF8,
- 0x6760, 0xB8DC,
- 0x6761, 0xCCF5,
- 0x6765, 0xC0B4,
- 0x6768, 0xD1EE,
- 0x6769, 0xE8BF,
- 0x676A, 0xE8C2,
- 0x676D, 0xBABC,
- 0x676F, 0xB1AD,
- 0x6770, 0xBDDC,
- 0x6772, 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- 0x6800, 0xE8D9,
- 0x6805, 0xD5A4,
- 0x6807, 0xB1EA,
- 0x6808, 0xD5BB,
- 0x6809, 0xE8CE,
- 0x680A, 0xE8D0,
- 0x680B, 0xB6B0,
- 0x680C, 0xE8D3,
- 0x680E, 0xE8DD,
- 0x680F, 0xC0B8,
- 0x6811, 0xCAF7,
- 0x6813, 0xCBA8,
- 0x6816, 0xC6DC,
- 0x6817, 0xC0F5,
- 0x681D, 0xE8E9,
- 0x6821, 0xD0A3,
- 0x6829, 0xE8F2,
- 0x682A, 0xD6EA,
- 0x6832, 0xE8E0,
- 0x6833, 0xE8E1,
- 0x6837, 0xD1F9,
- 0x6838, 0xBACB,
- 0x6839, 0xB8F9,
- 0x683C, 0xB8F1,
- 0x683D, 0xD4D4,
- 0x683E, 0xE8EF,
- 0x6840, 0xE8EE,
- 0x6841, 0xE8EC,
- 0x6842, 0xB9F0,
- 0x6843, 0xCCD2,
- 0x6844, 0xE8E6,
- 0x6845, 0xCEA6,
- 0x6846, 0xBFF2,
- 0x6848, 0xB0B8,
- 0x6849, 0xE8F1,
- 0x684A, 0xE8F0,
- 0x684C, 0xD7C0,
- 0x684E, 0xE8E4,
- 0x6850, 0xCDA9,
- 0x6851, 0xC9A3,
- 0x6853, 0xBBB8,
- 0x6854, 0xBDDB,
- 0x6855, 0xE8EA,
- 0x6860, 0xE8E2,
- 0x6861, 0xE8E3,
- 0x6862, 0xE8E5,
- 0x6863, 0xB5B5,
- 0x6864, 0xE8E7,
- 0x6865, 0xC7C5,
- 0x6866, 0xE8EB,
- 0x6867, 0xE8ED,
- 0x6868, 0xBDB0,
- 0x6869, 0xD7AE,
- 0x686B, 0xE8F8,
- 0x6874, 0xE8F5,
- 0x6876, 0xCDB0,
- 0x6877, 0xE8F6,
- 0x6881, 0xC1BA,
- 0x6883, 0xE8E8,
- 0x6885, 0xC3B7,
- 0x6886, 0xB0F0,
- 0x688F, 0xE8F4,
- 0x6893, 0xE8F7,
- 0x6897, 0xB9A3,
-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- 0x705E, 0xE5B1,
- 0x706B, 0xBBF0,
- 0x706C, 0xECE1,
- 0x706D, 0xC3F0,
- 0x706F, 0xB5C6,
- 0x7070, 0xBBD2,
- 0x7075, 0xC1E9,
- 0x7076, 0xD4EE,
- 0x7078, 0xBEC4,
- 0x707C, 0xD7C6,
- 0x707E, 0xD4D6,
- 0x707F, 0xB2D3,
- 0x7080, 0xECBE,
- 0x7085, 0xEAC1,
- 0x7089, 0xC2AF,
- 0x708A, 0xB4B6,
- 0x708E, 0xD1D7,
- 0x7092, 0xB3B4,
- 0x7094, 0xC8B2,
- 0x7095, 0xBFBB,
- 0x7096, 0xECC0,
- 0x7099, 0xD6CB,
- 0x709C, 0xECBF,
- 0x709D, 0xECC1,
- 0x70AB, 0xECC5,
- 0x70AC, 0xBEE6,
- 0x70AD, 0xCCBF,
- 0x70AE, 0xC5DA,
- 0x70AF, 0xBEBC,
- 0x70B1, 0xECC6,
- 0x70B3, 0xB1FE,
- 0x70B7, 0xECC4,
- 0x70B8, 0xD5A8,
- 0x70B9, 0xB5E3,
- 0x70BB, 0xECC2,
- 0x70BC, 0xC1B6,
- 0x70BD, 0xB3E3,
- 0x70C0, 0xECC3,
- 0x70C1, 0xCBB8,
- 0x70C2, 0xC0C3,
- 0x70C3, 0xCCFE,
- 0x70C8, 0xC1D2,
- 0x70CA, 0xECC8,
- 0x70D8, 0xBAE6,
- 0x70D9, 0xC0D3,
- 0x70DB, 0xD6F2,
- 0x70DF, 0xD1CC,
- 0x70E4, 0xBFBE,
- 0x70E6, 0xB7B3,
- 0x70E7, 0xC9D5,
- 0x70E8, 0xECC7,
- 0x70E9, 0xBBE2,
- 0x70EB, 0xCCCC,
- 0x70EC, 0xBDFD,
- 0x70ED, 0xC8C8,
- 0x70EF, 0xCFA9,
- 0x70F7, 0xCDE9,
- 0x70F9, 0xC5EB,
- 0x70FD, 0xB7E9,
- 0x7109, 0xD1C9,
- 0x710A, 0xBAB8,
- 0x7110, 0xECC9,
- 0x7113, 0xECCA,
- 0x7115, 0xBBC0,
- 0x7116, 0xECCB,
- 0x7118, 0xECE2,
- 0x7119, 0xB1BA,
- 0x711A, 0xB7D9,
- 0x7126, 0xBDB9,
- 0x712F, 0xECCC,
- 0x7130, 0xD1E6,
- 0x7131, 0xECCD,
- 0x7136, 0xC8BB,
- 0x7145, 0xECD1,
- 0x714A, 0xECD3,
- 0x714C, 0xBBCD,
- 0x714E, 0xBCE5,
- 0x715C, 0xECCF,
- 0x715E, 0xC9B7,
- 0x7164, 0xC3BA,
- 0x7166, 0xECE3,
- 0x7167, 0xD5D5,
- 0x7168, 0xECD0,
- 0x716E, 0xD6F3,
- 0x7172, 0xECD2,
- 0x7173, 0xECCE,
- 0x7178, 0xECD4,
- 0x717A, 0xECD5,
- 0x717D, 0xC9BF,
- 0x7184, 0xCFA8,
- 0x718A, 0xD0DC,
- 0x718F, 0xD1AC,
- 0x7194, 0xC8DB,
- 0x7198, 0xECD6,
- 0x7199, 0xCEF5,
- 0x719F, 0xCAEC,
- 0x71A0, 0xECDA,
- 0x71A8, 0xECD9,
- 0x71AC, 0xB0BE,
- 0x71B3, 0xECD7,
- 0x71B5, 0xECD8,
- 0x71B9, 0xECE4,
- 0x71C3, 0xC8BC,
- 0x71CE, 0xC1C7,
- 0x71D4, 0xECDC,
- 0x71D5, 0xD1E0,
- 0x71E0, 0xECDB,
- 0x71E5, 0xD4EF,
- 0x71E7, 0xECDD,
- 0x71EE, 0xDBC6,
- 0x71F9, 0xECDE,
- 0x7206, 0xB1AC,
- 0x721D, 0xECDF,
- 0x7228, 0xECE0,
- 0x722A, 0xD7A6,
- 0x722C, 0xC5C0,
- 0x7230, 0xEBBC,
- 0x7231, 0xB0AE,
- 0x7235, 0xBEF4,
- 0x7236, 0xB8B8,
- 0x7237, 0xD2AF,
- 0x7238, 0xB0D6,
- 0x7239, 0xB5F9,
- 0x723B, 0xD8B3,
- 0x723D, 0xCBAC,
- 0x723F, 0xE3DD,
- 0x7247, 0xC6AC,
- 0x7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 0xE1F8,
- 0x72F3, 0xE1FC,
- 0x72F4, 0xE1F9,
- 0x72F7, 0xE1FA,
- 0x72F8, 0xC0EA,
- 0x72FA, 0xE1FE,
- 0x72FB, 0xE2A1,
- 0x72FC, 0xC0C7,
- 0x7301, 0xE1FB,
- 0x7303, 0xE1FD,
- 0x730A, 0xE2A5,
- 0x730E, 0xC1D4,
- 0x7313, 0xE2A3,
- 0x7315, 0xE2A8,
- 0x7316, 0xB2FE,
- 0x7317, 0xE2A2,
- 0x731B, 0xC3CD,
- 0x731C, 0xB2C2,
- 0x731D, 0xE2A7,
- 0x731E, 0xE2A6,
- 0x7321, 0xE2A4,
- 0x7322, 0xE2A9,
- 0x7325, 0xE2AB,
- 0x7329, 0xD0C9,
- 0x732A, 0xD6ED,
- 0x732B, 0xC3A8,
- 0x732C, 0xE2AC,
- 0x732E, 0xCFD7,
- 0x7331, 0xE2AE,
- 0x7334, 0xBAEF,
- 0x7337, 0xE9E0,
- 0x7338, 0xE2AD,
- 0x7339, 0xE2AA,
- 0x733E, 0xBBAB,
- 0x733F, 0xD4B3,
- 0x734D, 0xE2B0,
- 0x7350, 0xE2AF,
- 0x7352, 0xE9E1,
- 0x7357, 0xE2B1,
- 0x7360, 0xE2B2,
- 0x736C, 0xE2B3,
- 0x736D, 0xCCA1,
- 0x736F, 0xE2B4,
- 0x737E, 0xE2B5,
- 0x7384, 0xD0FE,
- 0x7387, 0xC2CA,
- 0x7389, 0xD3F1,
- 0x738B, 0xCDF5,
- 0x738E, 0xE7E0,
- 0x7391, 0xE7E1,
- 0x7396, 0xBEC1,
- 0x739B, 0xC2EA,
- 0x739F, 0xE7E4,
- 0x73A2, 0xE7E3,
- 0x73A9, 0xCDE6,
- 0x73AB, 0xC3B5,
- 0x73AE, 0xE7E2,
- 0x73AF, 0xBBB7,
- 0x73B0, 0xCFD6,
- 0x73B2, 0xC1E1,
- 0x73B3, 0xE7E9,
- 0x73B7, 0xE7E8,
- 0x73BA, 0xE7F4,
- 0x73BB, 0xB2A3,
- 0x73C0, 0xE7EA,
- 0x73C2, 0xE7E6,
- 0x73C8, 0xE7EC,
- 0x73C9, 0xE7EB,
- 0x73CA, 0xC9BA,
- 0x73CD, 0xD5E4,
- 0x73CF, 0xE7E5,
- 0x73D0, 0xB7A9,
- 0x73D1, 0xE7E7,
- 0x73D9, 0xE7EE,
- 0x73DE, 0xE7F3,
- 0x73E0, 0xD6E9,
- 0x73E5, 0xE7ED,
- 0x73E7, 0xE7F2,
- 0x73E9, 0xE7F1,
- 0x73ED, 0xB0E0,
- 0x73F2, 0xE7F5,
- 0x7403, 0xC7F2,
- 0x7405, 0xC0C5,
- 0x7406, 0xC0ED,
- 0x7409, 0xC1F0,
- 0x740A, 0xE7F0,
- 0x740F, 0xE7F6,
- 0x7410, 0xCBF6,
- 0x741A, 0xE8A2,
- 0x741B, 0xE8A1,
- 0x7422, 0xD7C1,
- 0x7425, 0xE7FA,
- 0x7426, 0xE7F9,
- 0x7428, 0xE7FB,
- 0x742A, 0xE7F7,
- 0x742C, 0xE7FE,
- 0x742E, 0xE7FD,
- 0x7430, 0xE7FC,
- 0x7433, 0xC1D5,
- 0x7434, 0xC7D9,
- 0x7435, 0xC5FD,
- 0x7436, 0xC5C3,
- 0x743C, 0xC7ED,
- 0x7441, 0xE8A3,
- 0x7455, 0xE8A6,
- 0x7457, 0xE8A5,
- 0x7459, 0xE8A7,
- 0x745A, 0xBAF7,
- 0x745B, 0xE7F8,
- 0x745C, 0xE8A4,
- 0x745E, 0xC8F0,
- 0x745F, 0xC9AA,
- 0x746D, 0xE8A9,
- 0x7470, 0xB9E5,
- 0x7476, 0xD1FE,
- 0x7477, 0xE8A8,
- 0x747E, 0xE8AA,
- 0x7480, 0xE8AD,
- 0x7481, 0xE8AE,
- 0x7483, 0xC1A7,
- 0x7487, 0xE8AF,
- 0x748B, 0xE8B0,
- 0x748E, 0xE8AC,
- 0x7490, 0xE8B4,
- 0x749C, 0xE8AB,
- 0x749E, 0xE8B1,
- 0x74A7, 0xE8B5,
- 0x74A8, 0xE8B2,
- 0x74A9, 0xE8B3,
- 0x74BA, 0xE8B7,
- 0x74D2, 0xE8B6,
- 0x74DC, 0xB9CF,
- 0x74DE, 0xF0AC,
- 0x74E0, 0xF0AD,
- 0x74E2, 0xC6B0,
- 0x74E3, 0xB0EA,
- 0x74E4, 0xC8BF,
- 0x74E6, 0xCDDF,
- 0x74EE, 0xCECD,
- 0x74EF, 0xEAB1,
- 0x74F4, 0xEAB2,
- 0x74F6, 0xC6BF,
- 0x74F7, 0xB4C9,
- 0x74FF, 0xEAB3,
- 0x7504, 0xD5E7,
- 0x750D, 0xDDF9,
- 0x750F, 0xEAB4,
- 0x7511, 0xEAB5,
- 0x7513, 0xEAB6,
- 0x7518, 0xB8CA,
- 0x7519, 0xDFB0,
- 0x751A, 0xC9F5,
- 0x751C, 0xCCF0,
- 0x751F, 0xC9FA,
- 0x7525, 0xC9FB,
- 0x7528, 0xD3C3,
- 0x7529, 0xCBA6,
- 0x752B, 0xB8A6,
- 0x752C, 0xF0AE,
- 0x752D, 0xB1C2,
- 0x752F, 0xE5B8,
- 0x7530, 0xCCEF,
- 0x7531, 0xD3C9,
- 0x7532, 0xBCD7,
- 0x7533, 0xC9EA,
- 0x7535, 0xB5E7,
- 0x7537, 0xC4D0,
- 0x7538, 0xB5E9,
- 0x753A, 0xEEAE,
- 0x753B, 0xBBAD,
- 0x753E, 0xE7DE,
- 0x7540, 0xEEAF,
- 0x7545, 0xB3A9,
- 0x7548, 0xEEB2,
- 0x754B, 0xEEB1,
- 0x754C, 0xBDE7,
- 0x754E, 0xEEB0,
- 0x754F, 0xCEB7,
- 0x7554, 0xC5CF,
- 0x7559, 0xC1F4,
- 0x755A, 0xDBCE,
- 0x755B, 0xEEB3,
- 0x755C, 0xD0F3,
- 0x7565, 0xC2D4,
- 0x7566, 0xC6E8,
- 0x756A, 0xB7AC,
- 0x7572, 0xEEB4,
- 0x7574, 0xB3EB,
- 0x7578, 0xBBFB,
- 0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 0xB3D5,
- 0x75F9, 0xB1D4,
- 0x75FC, 0xF0F3,
- 0x75FF, 0xF0F4,
- 0x7600, 0xF0F6,
- 0x7601, 0xB4E1,
- 0x7603, 0xF0F1,
- 0x7605, 0xF0F7,
- 0x760A, 0xF0FA,
- 0x760C, 0xF0F8,
- 0x7610, 0xF0F5,
- 0x7615, 0xF0FD,
- 0x7617, 0xF0F9,
- 0x7618, 0xF0FC,
- 0x7619, 0xF0FE,
- 0x761B, 0xF1A1,
- 0x761F, 0xCEC1,
- 0x7620, 0xF1A4,
- 0x7622, 0xF1A3,
- 0x7624, 0xC1F6,
- 0x7625, 0xF0FB,
- 0x7626, 0xCADD,
- 0x7629, 0xB4F1,
- 0x762A, 0xB1F1,
- 0x762B, 0xCCB1,
- 0x762D, 0xF1A6,
- 0x7630, 0xF1A7,
- 0x7633, 0xF1AC,
- 0x7634, 0xD5CE,
- 0x7635, 0xF1A9,
- 0x7638, 0xC8B3,
- 0x763C, 0xF1A2,
- 0x763E, 0xF1AB,
- 0x763F, 0xF1A8,
- 0x7640, 0xF1A5,
- 0x7643, 0xF1AA,
- 0x764C, 0xB0A9,
- 0x764D, 0xF1AD,
- 0x7654, 0xF1AF,
- 0x7656, 0xF1B1,
- 0x765C, 0xF1B0,
- 0x765E, 0xF1AE,
- 0x7663, 0xD1A2,
- 0x766B, 0xF1B2,
- 0x766F, 0xF1B3,
- 0x7678, 0xB9EF,
- 0x767B, 0xB5C7,
- 0x767D, 0xB0D7,
- 0x767E, 0xB0D9,
- 0x7682, 0xD4ED,
- 0x7684, 0xB5C4,
- 0x7686, 0xBDD4,
- 0x7687, 0xBBCA,
- 0x7688, 0xF0A7,
- 0x768B, 0xB8DE,
- 0x768E, 0xF0A8,
- 0x7691, 0xB0A8,
- 0x7693, 0xF0A9,
- 0x7696, 0xCDEE,
- 0x7699, 0xF0AA,
- 0x76A4, 0xF0AB,
- 0x76AE, 0xC6A4,
- 0x76B1, 0xD6E5,
- 0x76B2, 0xF1E4,
-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, 0xEDBB,
- 0x781A, 0xD1E2,
- 0x781C, 0xEDBF,
- 0x781D, 0xEDC0,
- 0x781F, 0xEDC4,
- 0x7823, 0xEDC8,
- 0x7825, 0xEDC6,
- 0x7826, 0xEDCE,
- 0x7827, 0xD5E8,
- 0x7829, 0xEDC9,
- 0x782C, 0xEDC7,
- 0x782D, 0xEDBE,
- 0x7830, 0xC5E9,
- 0x7834, 0xC6C6,
- 0x7837, 0xC9E9,
- 0x7838, 0xD4D2,
- 0x7839, 0xEDC1,
- 0x783A, 0xEDC2,
- 0x783B, 0xEDC3,
- 0x783C, 0xEDC5,
- 0x783E, 0xC0F9,
- 0x7840, 0xB4A1,
- 0x7845, 0xB9E8,
- 0x7847, 0xEDD0,
- 0x784C, 0xEDD1,
- 0x784E, 0xEDCA,
- 0x7850, 0xEDCF,
- 0x7852, 0xCEF8,
- 0x7855, 0xCBB6,
- 0x7856, 0xEDCC,
- 0x7857, 0xEDCD,
- 0x785D, 0xCFF5,
- 0x786A, 0xEDD2,
- 0x786B, 0xC1F2,
- 0x786C, 0xD3B2,
- 0x786D, 0xEDCB,
- 0x786E, 0xC8B7,
- 0x7877, 0xBCEF,
- 0x787C, 0xC5F0,
- 0x7887, 0xEDD6,
- 0x7889, 0xB5EF,
- 0x788C, 0xC2B5,
- 0x788D, 0xB0AD,
- 0x788E, 0xCBE9,
- 0x7891, 0xB1AE,
- 0x7893, 0xEDD4,
- 0x7897, 0xCDEB,
- 0x7898, 0xB5E2,
- 0x789A, 0xEDD5,
- 0x789B, 0xEDD3,
- 0x789C, 0xEDD7,
- 0x789F, 0xB5FA,
- 0x78A1, 0xEDD8,
- 0x78A3, 0xEDD9,
- 0x78A5, 0xEDDC,
- 0x78A7, 0xB1CC,
- 0x78B0, 0xC5F6,
- 0x78B1, 0xBCEE,
- 0x78B2, 0xEDDA,
- 0x78B3, 0xCCBC,
- 0x78B4, 0xB2EA,
- 0x78B9, 0xEDDB,
- 0x78BE, 0xC4EB,
- 0x78C1, 0xB4C5,
- 0x78C5, 0xB0F5,
- 0x78C9, 0xEDDF,
- 0x78CA, 0xC0DA,
- 0x78CB, 0xB4E8,
- 0x78D0, 0xC5CD,
- 0x78D4, 0xEDDD,
- 0x78D5, 0xBFC4,
- 0x78D9, 0xEDDE,
- 0x78E8, 0xC4A5,
- 0x78EC, 0xEDE0,
- 0x78F2, 0xEDE1,
- 0x78F4, 0xEDE3,
- 0x78F7, 0xC1D7,
- 0x78FA, 0xBBC7,
- 0x7901, 0xBDB8,
- 0x7905, 0xEDE2,
- 0x7913, 0xEDE4,
- 0x791E, 0xEDE6,
- 0x7924, 0xEDE5,
- 0x7934, 0xEDE7,
- 0x793A, 0xCABE,
- 0x793B, 0xECEA,
- 0x793C, 0xC0F1,
- 0x793E, 0xC9E7,
- 0x7940, 0xECEB,
- 0x7941, 0xC6EE,
- 0x7946, 0xECEC,
- 0x7948, 0xC6ED,
- 0x7949, 0xECED,
- 0x7953, 0xECF0,
- 0x7956, 0xD7E6,
- 0x7957, 0xECF3,
- 0x795A, 0xECF1,
- 0x795B, 0xECEE,
- 0x795C, 0xECEF,
- 0x795D, 0xD7A3,
- 0x795E, 0xC9F1,
- 0x795F, 0xCBEE,
- 0x7960, 0xECF4,
- 0x7962, 0xECF2,
- 0x7965, 0xCFE9,
- 0x7967, 0xECF6,
- 0x7968, 0xC6B1,
- 0x796D, 0xBCC0,
- 0x796F, 0xECF5,
- 0x7977, 0xB5BB,
- 0x7978, 0xBBF6,
- 0x797A, 0xECF7,
- 0x7980, 0xD9F7,
- 0x7981, 0xBDFB,
- 0x7984, 0xC2BB,
- 0x7985, 0xECF8,
- 0x798A, 0xECF9,
- 0x798F, 0xB8A3,
- 0x799A, 0xECFA,
- 0x79A7, 0xECFB,
- 0x79B3, 0xECFC,
- 0x79B9, 0xD3ED,
- 0x79BA, 0xD8AE,
- 0x79BB, 0xC0EB,
- 0x79BD, 0xC7DD,
- 0x79BE, 0xBACC,
- 0x79C0, 0xD0E3,
- 0x79C1, 0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 0xD2AB,
- 0x8001, 0xC0CF,
- 0x8003, 0xBFBC,
- 0x8004, 0xEBA3,
- 0x8005, 0xD5DF,
- 0x8006, 0xEAC8,
- 0x800B, 0xF1F3,
- 0x800C, 0xB6F8,
- 0x800D, 0xCBA3,
- 0x8010, 0xC4CD,
- 0x8012, 0xF1E7,
- 0x8014, 0xF1E8,
- 0x8015, 0xB8FB,
- 0x8016, 0xF1E9,
- 0x8017, 0xBAC4,
- 0x8018, 0xD4C5,
- 0x8019, 0xB0D2,
- 0x801C, 0xF1EA,
- 0x8020, 0xF1EB,
- 0x8022, 0xF1EC,
- 0x8025, 0xF1ED,
- 0x8026, 0xF1EE,
- 0x8027, 0xF1EF,
- 0x8028, 0xF1F1,
- 0x8029, 0xF1F0,
- 0x802A, 0xC5D5,
- 0x8031, 0xF1F2,
- 0x8033, 0xB6FA,
- 0x8035, 0xF1F4,
- 0x8036, 0xD2AE,
- 0x8037, 0xDEC7,
- 0x8038, 0xCBCA,
- 0x803B, 0xB3DC,
- 0x803D, 0xB5A2,
- 0x803F, 0xB9A2,
- 0x8042, 0xC4F4,
- 0x8043, 0xF1F5,
- 0x8046, 0xF1F6,
- 0x804A, 0xC1C4,
- 0x804B, 0xC1FB,
- 0x804C, 0xD6B0,
- 0x804D, 0xF1F7,
- 0x8052, 0xF1F8,
- 0x8054, 0xC1AA,
- 0x8058, 0xC6B8,
- 0x805A, 0xBEDB,
- 0x8069, 0xF1F9,
- 0x806A, 0xB4CF,
- 0x8071, 0xF1FA,
- 0x807F, 0xEDB2,
- 0x8080, 0xEDB1,
- 0x8083, 0xCBE0,
- 0x8084, 0xD2DE,
- 0x8086, 0xCBC1,
- 0x8087, 0xD5D8,
- 0x8089, 0xC8E2,
- 0x808B, 0xC0DF,
- 0x808C, 0xBCA1,
- 0x8093, 0xEBC1,
- 0x8096, 0xD0A4,
- 0x8098, 0xD6E2,
- 0x809A, 0xB6C7,
- 0x809B, 0xB8D8,
- 0x809C, 0xEBC0,
- 0x809D,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C,
- 0x8106, 0xB4E0,
- 0x8109, 0xC2F6,
- 0x810A, 0xBCB9,
- 0x810D, 0xEBDA,
- 0x810E, 0xEBDB,
- 0x810F, 0xD4E0,
- 0x8110, 0xC6EA,
- 0x8111, 0xC4D4,
- 0x8112, 0xEBDF,
- 0x8113, 0xC5A7,
- 0x8114, 0xD9F5,
- 0x8116, 0xB2B1,
- 0x8118, 0xEBE4,
- 0x811A, 0xBDC5,
- 0x811E, 0xEBE2,
- 0x812C, 0xEBE3,
- 0x812F, 0xB8AC,
- 0x8131, 0xCDD1,
- 0x8132, 0xEBE5,
- 0x8136, 0xEBE1,
- 0x8138, 0xC1B3,
- 0x813E, 0xC6A2,
- 0x8146, 0xCCF3,
- 0x8148, 0xEBE6,
- 0x814A, 0xC0B0,
- 0x814B, 0xD2B8,
- 0x814C, 0xEBE7,
- 0x8150, 0xB8AF,
- 0x8151, 0xB8AD,
- 0x8153, 0xEBE8,
- 0x8154, 0xC7BB,
- 0x8155, 0xCDF3,
- 0x8159, 0xEBEA,
- 0x815A, 0xEBEB,
- 0x8160, 0xEBED,
- 0x8165, 0xD0C8,
- 0x8167, 0xEBF2,
- 0x8169, 0xEBEE,
- 0x816D, 0xEBF1,
- 0x816E, 0xC8F9,
- 0x8170, 0xD1FC,
- 0x8171, 0xEBEC,
- 0x8174, 0xEBE9,
- 0x8179, 0xB8B9,
- 0x817A, 0xCFD9,
- 0x817B, 0xC4E5,
- 0x817C, 0xEBEF,
- 0x817D, 0xEBF0,
- 0x817E, 0xCCDA,
- 0x817F, 0xCDC8,
- 0x8180, 0xB0F2,
- 0x8182, 0xEBF6,
- 0x8188, 0xEBF5,
- 0x818A, 0xB2B2,
- 0x818F, 0xB8E0,
- 0x8191, 0xEBF7,
- 0x8198, 0xB1EC,
- 0x819B, 0xCCC5,
- 0x819C, 0xC4A4,
- 0x819D, 0xCFA5,
- 0x81A3, 0xEBF9,
- 0x81A6, 0xECA2,
- 0x81A8, 0xC5F2,
- 0x81AA, 0xEBFA,
- 0x81B3, 0xC9C5,
- 0x81BA, 0xE2DF,
- 0x81BB, 0xEBFE,
- 0x81C0, 0xCDCE,
- 0x81C1, 0xECA1,
- 0x81C2, 0xB1DB,
- 0x81C3, 0xD3B7,
- 0x81C6, 0xD2DC,
- 0x81CA, 0xEBFD,
- 0x81CC, 0xEBFB,
- 0x81E3, 0xB3BC,
- 0x81E7, 0xEAB0,
- 0x81EA, 0xD7D4,
- 0x81EC, 0xF4AB,
- 0x81ED, 0xB3F4,
- 0x81F3, 0xD6C1,
- 0x81F4, 0xD6C2,
- 0x81FB, 0xD5E9,
- 0x81FC, 0xBECA,
- 0x81FE, 0xF4A7,
- 0x8200, 0xD2A8,
- 0x8201, 0xF4A8,
- 0x8202, 0xF4A9,
- 0x8204, 0xF4AA,
- 0x8205, 0xBECB,
- 0x8206, 0xD3DF,
- 0x820C, 0xC9E0,
- 0x820D, 0xC9E1,
- 0x8210, 0xF3C2,
- 0x8212, 0xCAE6,
- 0x8214, 0xCCF2,
- 0x821B, 0xE2B6,
- 0x821C, 0xCBB4,
- 0x821E, 0xCEE8,
- 0x821F, 0xD6DB,
- 0x8221, 0xF4AD,
- 0x8222, 0xF4AE,
- 0x8223, 0xF4AF,
- 0x8228, 0xF4B2,
- 0x822A, 0xBABD,
- 0x822B, 0xF4B3,
- 0x822C, 0xB0E3,
- 0x822D, 0xF4B0,
- 0x822F, 0xF4B1,
- 0x8230, 0xBDA2,
- 0x8231, 0xB2D5,
- 0x8233, 0xF4B6,
- 0x8234, 0xF4B7,
- 0x8235, 0xB6E6,
- 0x8236, 0xB2B0,
- 0x8237, 0xCFCF,
- 0x8238, 0xF4B4,
- 0x8239, 0xB4AC,
- 0x823B, 0xF4B5,
- 0x823E, 0xF4B8,
- 0x8244, 0xF4B9,
- 0x8247, 0xCDA7,
- 0x8249, 0xF4BA,
- 0x824B, 0xF4BB,
- 0x824F, 0xF4BC,
- 0x8258, 0xCBD2,
- 0x825A, 0xF4BD,
- 0x825F, 0xF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xDCDF,
- 0x82D4, 0xCCA6,
- 0x82D5, 0xDCE6,
- 0x82D7, 0xC3E7,
- 0x82D8, 0xDCDC,
- 0x82DB, 0xBFC1,
- 0x82DC, 0xDCD9,
- 0x82DE, 0xB0FA,
- 0x82DF, 0xB9B6,
- 0x82E0, 0xDCE5,
- 0x82E1, 0xDCD3,
- 0x82E3, 0xDCC4,
- 0x82E4, 0xDCD6,
- 0x82E5, 0xC8F4,
- 0x82E6, 0xBFE0,
- 0x82EB, 0xC9BB,
- 0x82EF, 0xB1BD,
- 0x82F1, 0xD3A2,
- 0x82F4, 0xDCDA,
- 0x82F7, 0xDCD5,
- 0x82F9, 0xC6BB,
- 0x82FB, 0xDCDE,
- 0x8301, 0xD7C2,
- 0x8302, 0xC3AF,
- 0x8303, 0xB7B6,
- 0x8304, 0xC7D1,
- 0x8305, 0xC3A9,
- 0x8306, 0xDCE2,
- 0x8307, 0xDCD8,
- 0x8308, 0xDCEB,
- 0x8309, 0xDCD4,
- 0x830C, 0xDCDD,
- 0x830E, 0xBEA5,
- 0x830F, 0xDCD7,
- 0x8311, 0xDCE0,
- 0x8314, 0xDCE3,
- 0x8315, 0xDCE4,
- 0x8317, 0xDCF8,
- 0x831A, 0xDCE1,
- 0x831B, 0xDDA2,
- 0x831C, 0xDCE7,
- 0x8327, 0xBCEB,
- 0x8328, 0xB4C4,
- 0x832B, 0xC3A3,
- 0x832C, 0xB2E7,
- 0x832D, 0xDCFA,
- 0x832F, 0xDCF2,
- 0x8331, 0xDCEF,
- 0x8333, 0xDCFC,
- 0x8334, 0xDCEE,
- 0x8335, 0xD2F0,
- 0x8336, 0xB2E8,
- 0x8338, 0xC8D7,
- 0x8339, 0xC8E3,
- 0x833A, 0xDCFB,
- 0x833C, 0xDCED,
- 0x8340, 0xDCF7,
- 0x8343, 0xDCF5,
- 0x8346, 0xBEA3,
- 0x8347, 0xDCF4,
- 0x8349, 0xB2DD,
- 0x834F, 0xDCF3,
- 0x8350, 0xBCF6,
- 0x8351, 0xDCE8,
- 0x8352, 0xBBC4,
- 0x8354, 0xC0F3,
- 0x835A, 0xBCD4,
- 0x835B, 0xDCE9,
- 0x835C, 0xDCEA,
- 0x835E, 0xDCF1,
- 0x835F, 0xDCF6,
- 0x8360, 0xDCF9,
- 0x8361, 0xB5B4,
- 0x8363, 0xC8D9,
- 0x8364, 0xBBE7,
- 0x8365, 0xDCFE,
- 0x8366, 0xDCFD,
- 0x8367, 0xD3AB,
- 0x8368, 0xDDA1,
- 0x8369, 0xDDA3,
- 0x836A, 0xDDA5,
- 0x836B, 0xD2F1,
- 0x836C, 0xDDA4,
- 0x836D, 0xDDA6,
- 0x836E, 0xDDA7,
- 0x836F, 0xD2A9,
- 0x8377, 0xBAC9,
- 0x8378, 0xDDA9,
- 0x837B, 0xDDB6,
- 0x837C, 0xDDB1,
- 0x837D, 0xDDB4,
- 0x8385, 0xDDB0,
- 0x8386, 0xC6CE,
- 0x8389, 0xC0F2,
- 0x838E, 0xC9AF,
- 0x8392, 0xDCEC,
- 0x8393, 0xDDAE,
- 0x8398, 0xDDB7,
- 0x839B, 0xDCF0,
- 0x839C, 0xDDAF,
- 0x839E, 0xDDB8,
- 0x83A0, 0xDDAC,
- 0x83A8, 0xDDB9,
- 0x83A9, 0xDDB3,
- 0x83AA, 0xDDAD,
- 0x83AB, 0xC4AA,
- 0x83B0, 0xDDA8,
- 0x83B1, 0xC0B3,
- 0x83B2, 0xC1AB,
- 0x83B3, 0xDDAA,
- 0x83B4, 0xDDAB,
- 0x83B6, 0xDDB2,
- 0x83B7, 0xBBF1,
- 0x83B8, 0xDDB5,
- 0x83B9, 0xD3A8,
- 0x83BA, 0xDDBA,
- 0x83BC, 0xDDBB,
- 0x83BD, 0xC3A7,
- 0x83C0, 0xDDD2,
- 0x83C1, 0xDDBC,
- 0x83C5, 0xDDD1,
- 0x83C7, 0xB9BD,
- 0x83CA, 0xBED5,
- 0x83CC, 0xBEFA,
- 0x83CF, 0xBACA,
- 0x83D4, 0xDDCA,
- 0x83D6, 0xDDC5,
- 0x83D8, 0xDDBF,
- 0x83DC, 0xB2CB,
- 0x83DD, 0xDDC3,
- 0x83DF, 0xDDCB,
- 0x83E0, 0xB2A4,
- 0x83E1, 0xDDD5,
- 0x83E5, 0xDDBE,
- 0x83E9, 0xC6D0,
- 0x83EA, 0xDDD0,
- 0x83F0, 0xDDD4,
- 0x83F1, 0xC1E2,
- 0x83F2, 0xB7C6,
- 0x83F8, 0xDDCE,
- 0x83F9, 0xDDCF,
- 0x83FD, 0xDDC4,
- 0x8401, 0xDDBD,
- 0x8403, 0xDDCD,
- 0x8404, 0xCCD1,
- 0x8406, 0xDDC9,
- 0x840B, 0xDDC2,
- 0x840C, 0xC3C8,
- 0x840D, 0xC6BC,
- 0x840E, 0xCEAE,
- 0x840F, 0xDDCC,
- 0x8411, 0xDDC8,
- 0x8418, 0xDDC1,
- 0x841C, 0xDDC6,
- 0x841D, 0xC2DC,
- 0x8424, 0xD3A9,
- 0x8425, 0xD3AA,
- 0x8426, 0xDDD3,
- 0x8427, 0xCFF4,
- 0x8428, 0xC8F8,
- 0x8431, 0xDDE6,
- 0x8438, 0xDDC7,
- 0x843C, 0xDDE0,
- 0x843D, 0xC2E4,
- 0x8446, 0xDDE1,
- 0x8451, 0xDDD7,
- 0x8457, 0xD6F8,
- 0x8459, 0xDDD9,
- 0x845A, 0xDDD8,
- 0x845B, 0xB8F0,
- 0x845C, 0xDDD6,
- 0x8461, 0xC6CF,
- 0x8463, 0xB6AD,
- 0x8469, 0xDDE2,
- 0x846B, 0xBAF9,
- 0x846C, 0xD4E1,
- 0x846D, 0xDDE7,
- 0x8471, 0xB4D0,
- 0x8473, 0xDDDA,
- 0x8475, 0xBFFB,
- 0x8476, 0xDDE3,
- 0x8478, 0xDDDF,
- 0x847A, 0xDDDD,
- 0x8482, 0xB5D9,
- 0x8487, 0xDDDB,
- 0x8488, 0xDDDC,
- 0x8489, 0xDDDE,
- 0x848B, 0xBDAF,
- 0x848C, 0xDDE4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857E, 0xC0D9,
- 0x8584, 0xB1A1,
- 0x8585, 0xDEB6,
- 0x8587, 0xDEB1,
- 0x858F, 0xDEB2,
- 0x859B, 0xD1A6,
- 0x859C, 0xDEB5,
- 0x85A4, 0xDEAF,
- 0x85A8, 0xDEB0,
- 0x85AA, 0xD0BD,
- 0x85AE, 0xDEB4,
- 0x85AF, 0xCAED,
- 0x85B0, 0xDEB9,
- 0x85B7, 0xDEB8,
- 0x85B9, 0xDEB7,
- 0x85C1, 0xDEBB,
- 0x85C9, 0xBDE5,
- 0x85CF, 0xB2D8,
- 0x85D0, 0xC3EA,
- 0x85D3, 0xDEBA,
- 0x85D5, 0xC5BA,
- 0x85DC, 0xDEBC,
- 0x85E4, 0xCCD9,
- 0x85E9, 0xB7AA,
- 0x85FB, 0xD4E5,
- 0x85FF, 0xDEBD,
- 0x8605, 0xDEBF,
- 0x8611, 0xC4A2,
- 0x8616, 0xDEC1,
- 0x8627, 0xDEBE,
- 0x8629, 0xDEC0,
- 0x8638, 0xD5BA,
- 0x863C, 0xDEC2,
- 0x864D, 0xF2AE,
- 0x864E, 0xBBA2,
- 0x864F, 0xC2B2,
- 0x8650, 0xC5B0,
- 0x8651, 0xC2C7,
- 0x8654, 0xF2AF,
- 0x865A, 0xD0E9,
- 0x865E, 0xD3DD,
- 0x8662, 0xEBBD,
- 0x866B, 0xB3E6,
- 0x866C, 0xF2B0,
- 0x866E, 0xF2B1,
- 0x8671, 0xCAAD,
- 0x8679, 0xBAE7,
- 0x867A, 0xF2B3,
- 0x867B, 0xF2B5,
- 0x867C, 0xF2B4,
- 0x867D, 0xCBE4,
- 0x867E, 0xCFBA,
- 0x867F, 0xF2B2,
- 0x8680, 0xCAB4,
- 0x8681, 0xD2CF,
- 0x8682, 0xC2EC,
- 0x868A, 0xCEC3,
- 0x868B, 0xF2B8,
- 0x868C, 0xB0F6,
- 0x868D, 0xF2B7,
- 0x8693, 0xF2BE,
- 0x8695, 0xB2CF,
- 0x869C, 0xD1C1,
- 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 0x8803, 0xD9F9,
- 0x880A, 0xF3B9,
- 0x8813, 0xF3B7,
- 0x8815, 0xC8E4,
- 0x8816, 0xF3B6,
- 0x881B, 0xF3BA,
- 0x8821, 0xF3BB,
- 0x8822, 0xB4C0,
- 0x8832, 0xEEC3,
- 0x8839, 0xF3BC,
- 0x883C, 0xF3BD,
- 0x8840, 0xD1AA,
- 0x8844, 0xF4AC,
- 0x8845, 0xD0C6,
- 0x884C, 0xD0D0,
- 0x884D, 0xD1DC,
- 0x8854, 0xCFCE,
- 0x8857, 0xBDD6,
- 0x8859, 0xD1C3,
- 0x8861, 0xBAE2,
- 0x8862, 0xE1E9,
- 0x8863, 0xD2C2,
- 0x8864, 0xF1C2,
- 0x8865, 0xB2B9,
- 0x8868, 0xB1ED,
- 0x8869, 0xF1C3,
- 0x886B, 0xC9C0,
- 0x886C, 0xB3C4,
- 0x886E, 0xD9F2,
- 0x8870, 0xCBA5,
- 0x8872, 0xF1C4,
- 0x8877, 0xD6D4,
- 0x887D, 0xF1C5,
- 0x887E, 0xF4C0,
- 0x887F, 0xF1C6,
- 0x8881, 0xD4AC,
- 0x8882, 0xF1C7,
- 0x8884, 0xB0C0,
- 0x8885, 0xF4C1,
- 0x8888, 0xF4C2,
- 0x888B, 0xB4FC,
- 0x888D, 0xC5DB,
- 0x8892, 0xCCBB,
- 0x8896, 0xD0E4,
- 0x889C, 0xCDE0,
- 0x88A2, 0xF1C8,
- 0x88A4, 0xD9F3,
- 0x88AB, 0xB1BB,
- 0x88AD, 0xCFAE,
- 0x88B1, 0xB8A4,
- 0x88B7, 0xF1CA,
- 0x88BC, 0xF1CB,
- 0x88C1, 0xB2C3,
- 0x88C2, 0xC1D1,
- 0x88C5, 0xD7B0,
- 0x88C6, 0xF1C9,
- 0x88C9, 0xF1CC,
- 0x88CE, 0xF1CE,
- 0x88D2, 0xD9F6,
- 0x88D4, 0xD2E1,
- 0x88D5, 0xD4A3,
- 0x88D8, 0xF4C3,
- 0x88D9, 0xC8B9,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- 0x9005, 0xE5CB,
- 0x9006, 0xC4E6,
- 0x9009, 0xD1A1,
- 0x900A, 0xD1B7,
- 0x900B, 0xE5CD,
- 0x900D, 0xE5D0,
- 0x900F, 0xCDB8,
- 0x9010, 0xD6F0,
- 0x9011, 0xE5CF,
- 0x9012, 0xB5DD,
- 0x9014, 0xCDBE,
- 0x9016, 0xE5D1,
- 0x9017, 0xB6BA,
- 0x901A, 0xCDA8,
- 0x901B, 0xB9E4,
- 0x901D, 0xCAC5,
- 0x901E, 0xB3D1,
- 0x901F, 0xCBD9,
- 0x9020, 0xD4EC,
- 0x9021, 0xE5D2,
- 0x9022, 0xB7EA,
- 0x9026, 0xE5CE,
- 0x902D, 0xE5D5,
- 0x902E, 0xB4FE,
- 0x902F, 0xE5D6,
- 0x9035, 0xE5D3,
- 0x9036, 0xE5D4,
- 0x9038, 0xD2DD,
- 0x903B, 0xC2DF,
- 0x903C, 0xB1C6,
- 0x903E, 0xD3E2,
- 0x9041, 0xB6DD,
- 0x9042, 0xCBEC,
- 0x9044, 0xE5D7,
- 0x9047, 0xD3F6,
- 0x904D, 0xB1E9,
- 0x904F, 0xB6F4,
- 0x9050, 0xE5DA,
- 0x9051, 0xE5D8,
- 0x9052, 0xE5D9,
- 0x9053, 0xB5C0,
- 0x9057, 0xD2C5,
- 0x9058, 0xE5DC,
- 0x905B, 0xE5DE,
- 0x9062, 0xE5DD,
- 0x9063, 0xC7B2,
- 0x9065, 0xD2A3,
- 0x9068, 0xE5DB,
- 0x906D, 0xD4E2,
- 0x906E, 0xD5DA,
- 0x9074, 0xE5E0,
- 0x9075, 0xD7F1,
- 0x907D, 0xE5E1,
- 0x907F, 0xB1DC,
- 0x9080, 0xD1FB,
- 0x9082, 0xE5E2,
- 0x9083, 0xE5E4,
- 0x9088, 0xE5E3,
- 0x908B, 0xE5E5,
- 0x9091, 0xD2D8,
- 0x9093, 0xB5CB,
- 0x9095, 0xE7DF,
- 0x9097, 0xDAF5,
- 0x9099, 0xDAF8,
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x914C, 0xD7C3,
- 0x914D, 0xC5E4,
- 0x914E, 0xF4FC,
- 0x914F, 0xF4FD,
- 0x9150, 0xF4FB,
- 0x9152, 0xBEC6,
- 0x9157, 0xD0EF,
- 0x915A, 0xB7D3,
- 0x915D, 0xD4CD,
- 0x915E, 0xCCAA,
- 0x9161, 0xF5A2,
- 0x9162, 0xF5A1,
- 0x9163, 0xBAA8,
- 0x9164, 0xF4FE,
- 0x9165, 0xCBD6,
- 0x9169, 0xF5A4,
- 0x916A, 0xC0D2,
- 0x916C, 0xB3EA,
- 0x916E, 0xCDAA,
- 0x916F, 0xF5A5,
- 0x9170, 0xF5A3,
- 0x9171, 0xBDB4,
- 0x9172, 0xF5A8,
- 0x9174, 0xF5A9,
- 0x9175, 0xBDCD,
- 0x9176, 0xC3B8,
- 0x9177, 0xBFE1,
- 0x9178, 0xCBE1,
- 0x9179, 0xF5AA,
- 0x917D, 0xF5A6,
- 0x917E, 0xF5A7,
- 0x917F, 0xC4F0,
- 0x9185, 0xF5AC,
- 0x9187, 0xB4BC,
- 0x9189, 0xD7ED,
- 0x918B, 0xB4D7,
- 0x918C, 0xF5AB,
- 0x918D, 0xF5AE,
- 0x9190, 0xF5AD,
- 0x9191, 0xF5AF,
- 0x9192, 0xD0D1,
- 0x919A, 0xC3D1,
- 0x919B, 0xC8A9,
- 0x91A2, 0xF5B0,
- 0x91A3, 0xF5B1,
- 0x91AA, 0xF5B2,
- 0x91AD, 0xF5B3,
- 0x91AE, 0xF5B4,
- 0x91AF, 0xF5B5,
- 0x91B4, 0xF5B7,
- 0x91B5, 0xF5B6,
- 0x91BA, 0xF5B8,
- 0x91C7, 0xB2C9,
- 0x91C9, 0xD3D4,
- 0x91CA, 0xCACD,
- 0x91CC, 0xC0EF,
- 0x91CD, 0xD6D8,
- 0x91CE, 0xD2B0,
- 0x91CF, 0xC1BF,
- 0x91D1, 0xBDF0,
- 0x91DC, 0xB8AA,
- 0x9274, 0xBCF8,
- 0x928E, 0xF6C6,
- 0x92AE, 0xF6C7,
- 0x92C8, 0xF6C8,
- 0x933E, 0xF6C9,
- 0x936A, 0xF6CA,
- 0x938F, 0xF6CC,
- 0x93CA, 0xF6CB,
- 0x93D6, 0xF7E9,
- 0x943E, 0xF6CD,
- 0x946B, 0xF6CE,
- 0x9485, 0xEEC4,
- 0x9486, 0xEEC5,
- 0x9487, 0xEEC6,
- 0x9488, 0xD5EB,
- 0x9489, 0xB6A4,
- 0x948A, 0xEEC8,
- 0x948B, 0xEEC7,
- 0x948C, 0xEEC9,
- 0x948D, 0xEECA,
- 0x948E, 0xC7A5,
- 0x948F, 0xEECB,
- 0x9490, 0xEECC,
- 0x9492, 0xB7B0,
- 0x9493, 0xB5F6,
- 0x9494, 0xEECD,
- 0x9495, 0xEECF,
- 0x9497, 0xEECE,
- 0x9499, 0xB8C6,
- 0x949A, 0xEED0,
- 0x949B, 0xEED1,
- 0x949C, 0xEED2,
- 0x949D, 0xB6DB,
- 0x949E, 0xB3AE,
- 0x949F, 0xD6D3,
- 0x94A0, 0xC4C6,
- 0x94A1, 0xB1B5,
- 0x94A2, 0xB8D6,
- 0x94A3, 0xEED3,
- 0x94A4, 0xEED4,
- 0x94A5, 0xD4BF,
- 0x94A6, 0xC7D5,
- 0x94A7, 0xBEFB,
- 0x94A8, 0xCED9,
- 0x94A9, 0xB9B3,
- 0x94AA, 0xEED6,
- 0x94AB, 0xEED5,
- 0x94AC, 0xEED8,
- 0x94AD, 0xEED7,
- 0x94AE, 0xC5A5,
- 0x94AF, 0xEED9,
- 0x94B0, 0xEEDA,
- 0x94B1, 0xC7AE,
- 0x94B2, 0xEEDB,
- 0x94B3, 0xC7AF,
- 0x94B4, 0xEEDC,
- 0x94B5, 0xB2A7,
- 0x94B6, 0xEEDD,
- 0x94B7, 0xEEDE,
- 0x94B8, 0xEEDF,
- 0x94B9, 0xEEE0,
- 0x94BA, 0xEEE1,
- 0x94BB, 0xD7EA,
- 0x94BC, 0xEEE2,
- 0x94BD, 0xEEE3,
-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 0xCBF8,
- 0x9502, 0xEFAE,
- 0x9503, 0xEFAD,
- 0x9504, 0xB3FA,
- 0x9505, 0xB9F8,
- 0x9506, 0xEFAF,
- 0x9507, 0xEFB0,
- 0x9508, 0xD0E2,
- 0x9509, 0xEFB1,
- 0x950A, 0xEFB2,
- 0x950B, 0xB7E6,
- 0x950C, 0xD0BF,
- 0x950D, 0xEFB3,
- 0x950E, 0xEFB4,
- 0x950F, 0xEFB5,
- 0x9510, 0xC8F1,
- 0x9511, 0xCCE0,
- 0x9512, 0xEFB6,
- 0x9513, 0xEFB7,
- 0x9514, 0xEFB8,
- 0x9515, 0xEFB9,
- 0x9516, 0xEFBA,
- 0x9517, 0xD5E0,
- 0x9518, 0xEFBB,
- 0x9519, 0xB4ED,
- 0x951A, 0xC3AA,
- 0x951B, 0xEFBC,
- 0x951D, 0xEFBD,
- 0x951E, 0xEFBE,
- 0x951F, 0xEFBF,
- 0x9521, 0xCEFD,
- 0x9522, 0xEFC0,
- 0x9523, 0xC2E0,
- 0x9524, 0xB4B8,
- 0x9525, 0xD7B6,
- 0x9526, 0xBDF5,
- 0x9528, 0xCFC7,
- 0x9529, 0xEFC3,
- 0x952A, 0xEFC1,
- 0x952B, 0xEFC2,
- 0x952C, 0xEFC4,
- 0x952D, 0xB6A7,
- 0x952E, 0xBCFC,
- 0x952F, 0xBEE2,
- 0x9530, 0xC3CC,
- 0x9531, 0xEFC5,
- 0x9532, 0xEFC6,
- 0x9534, 0xEFC7,
- 0x9535, 0xEFCF,
- 0x9536, 0xEFC8,
- 0x9537, 0xEFC9,
- 0x9538, 0xEFCA,
- 0x9539, 0xC7C2,
- 0x953A, 0xEFF1,
- 0x953B, 0xB6CD,
- 0x953C, 0xEFCB,
- 0x953E, 0xEFCC,
- 0x953F, 0xEFCD,
- 0x9540, 0xB6C6,
- 0x9541, 0xC3BE,
- 0x9542, 0xEFCE,
- 0x9544, 0xEFD0,
- 0x9545, 0xEFD1,
- 0x9546, 0xEFD2,
- 0x9547, 0xD5F2,
- 0x9549, 0xEFD3,
- 0x954A, 0xC4F7,
- 0x954C, 0xEFD4,
- 0x954D, 0xC4F8,
- 0x954E, 0xEFD5,
- 0x954F, 0xEFD6,
- 0x9550, 0xB8E4,
- 0x9551, 0xB0F7,
- 0x9552, 0xEFD7,
- 0x9553, 0xEFD8,
- 0x9554, 0xEFD9,
- 0x9556, 0xEFDA,
- 0x9557, 0xEFDB,
- 0x9558, 0xEFDC,
- 0x9559, 0xEFDD,
- 0x955B, 0xEFDE,
- 0x955C, 0xBEB5,
- 0x955D, 0xEFE1,
- 0x955E, 0xEFDF,
- 0x955F, 0xEFE0,
- 0x9561, 0xEFE2,
- 0x9562, 0xEFE3,
- 0x9563, 0xC1CD,
- 0x9564, 0xEFE4,
- 0x9565, 0xEFE5,
- 0x9566, 0xEFE6,
- 0x9567, 0xEFE7,
- 0x9568, 0xEFE8,
- 0x9569, 0xEFE9,
- 0x956A, 0xEFEA,
- 0x956B, 0xEFEB,
- 0x956C, 0xEFEC,
- 0x956D, 0xC0D8,
- 0x956F, 0xEFED,
- 0x9570, 0xC1AD,
- 0x9571, 0xEFEE,
- 0x9572, 0xEFEF,
- 0x9573, 0xEFF0,
- 0x9576, 0xCFE2,
- 0x957F, 0xB3A4,
- 0x95E8, 0xC3C5,
- 0x95E9, 0xE3C5,
- 0x95EA, 0xC9C1,
- 0x95EB, 0xE3C6,
- 0x95ED, 0xB1D5,
- 0x95EE, 0xCECA,
- 0x95EF, 0xB4B3,
- 0x95F0, 0xC8F2,
- 0x95F1, 0xE3C7,
- 0x95F2, 0xCFD0,
- 0x95F3, 0xE3C8,
- 0x95F4, 0xBCE4,
- 0x95F5, 0xE3C9,
- 0x95F6, 0xE3CA,
- 0x95F7, 0xC3C6,
- 0x95F8, 0xD5A2,
- 0x95F9, 0xC4D6,
- 0x95FA, 0xB9EB,
- 0x95FB, 0xCEC5,
- 0x95FC, 0xE3CB,
- 0x95FD, 0xC3F6,
- 0x95FE, 0xE3CC,
- 0x9600, 0xB7A7,
- 0x9601, 0xB8F3,
- 0x9602, 0xBAD2,
- 0x9603, 0xE3CD,
- 0x9604, 0xE3CE,
- 0x9605, 0xD4C4,
- 0x9606, 0xE3CF,
- 0x9608, 0xE3D0,
- 0x9609, 0xD1CB,
- 0x960A, 0xE3D1,
- 0x960B, 0xE3D2,
- 0x960C, 0xE3D3,
- 0x960D, 0xE3D4,
- 0x960E, 0xD1D6,
- 0x960F, 0xE3D5,
- 0x9610, 0xB2FB,
- 0x9611, 0xC0BB,
- 0x9612, 0xE3D6,
- 0x9614, 0xC0AB,
- 0x9615, 0xE3D7,
- 0x9616, 0xE3D8,
- 0x9617, 0xE3D9,
- 0x9619, 0xE3DA,
- 0x961A, 0xE3DB,
- 0x961C, 0xB8B7,
- 0x961D, 0xDAE2,
- 0x961F, 0xB6D3,
- 0x9621, 0xDAE4,
- 0x9622, 0xDAE3,
- 0x962A, 0xDAE6,
- 0x962E, 0xC8EE,
- 0x9631, 0xDAE5,
- 0x9632, 0xB7C0,
- 0x9633, 0xD1F4,
- 0x9634, 0xD2F5,
- 0x9635, 0xD5F3,
- 0x9636, 0xBDD7,
- 0x963B, 0xD7E8,
- 0x963C, 0xDAE8,
- 0x963D, 0xDAE7,
- 0x963F, 0xB0A2,
- 0x9640, 0xCDD3,
- 0x9642, 0xDAE9,
- 0x9644, 0xB8BD,
- 0x9645, 0xBCCA,
- 0x9646, 0xC2BD,
- 0x9647, 0xC2A4,
- 0x9648, 0xB3C2,
- 0x9649, 0xDAEA,
- 0x964B, 0xC2AA,
- 0x964C, 0xC4B0,
- 0x964D, 0xBDB5,
- 0x9650, 0xCFDE,
- 0x9654, 0xDAEB,
- 0x9655, 0xC9C2,
- 0x965B, 0xB1DD,
- 0x965F, 0xDAEC,
- 0x9661, 0xB6B8,
- 0x9662, 0xD4BA,
- 0x9664, 0xB3FD,
- 0x9667, 0xDAED,
- 0x9668, 0xD4C9,
- 0x9669, 0xCFD5,
- 0x966A, 0xC5E3,
- 0x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 0xCFBC,
- 0x972A, 0xF6AF,
- 0x972D, 0xF6B0,
- 0x9730, 0xF6B1,
- 0x9732, 0xC2B6,
- 0x9738, 0xB0D4,
- 0x9739, 0xC5F9,
- 0x973E, 0xF6B2,
- 0x9752, 0xC7E0,
- 0x9753, 0xF6A6,
- 0x9756, 0xBEB8,
- 0x9759, 0xBEB2,
- 0x975B, 0xB5E5,
- 0x975E, 0xB7C7,
- 0x9760, 0xBFBF,
- 0x9761, 0xC3D2,
- 0x9762, 0xC3E6,
- 0x9765, 0xD8CC,
- 0x9769, 0xB8EF,
- 0x9773, 0xBDF9,
- 0x9774, 0xD1A5,
- 0x9776, 0xB0D0,
- 0x977C, 0xF7B0,
- 0x9785, 0xF7B1,
- 0x978B, 0xD0AC,
- 0x978D, 0xB0B0,
- 0x9791, 0xF7B2,
- 0x9792, 0xF7B3,
- 0x9794, 0xF7B4,
- 0x9798, 0xC7CA,
- 0x97A0, 0xBECF,
- 0x97A3, 0xF7B7,
- 0x97AB, 0xF7B6,
- 0x97AD, 0xB1DE,
- 0x97AF, 0xF7B5,
- 0x97B2, 0xF7B8,
- 0x97B4, 0xF7B9,
- 0x97E6, 0xCEA4,
- 0x97E7, 0xC8CD,
- 0x97E9, 0xBAAB,
- 0x97EA, 0xE8B8,
- 0x97EB, 0xE8B9,
- 0x97EC, 0xE8BA,
- 0x97ED, 0xBEC2,
- 0x97F3, 0xD2F4,
- 0x97F5, 0xD4CF,
- 0x97F6, 0xC9D8,
- 0x9875, 0xD2B3,
- 0x9876, 0xB6A5,
- 0x9877, 0xC7EA,
- 0x9878, 0xF1FC,
- 0x9879, 0xCFEE,
- 0x987A, 0xCBB3,
- 0x987B, 0xD0EB,
- 0x987C, 0xE7EF,
- 0x987D, 0xCDE7,
- 0x987E, 0xB9CB,
- 0x987F, 0xB6D9,
- 0x9880, 0xF1FD,
- 0x9881, 0xB0E4,
- 0x9882, 0xCBCC,
- 0x9883, 0xF1FE,
- 0x9884, 0xD4A4,
- 0x9885, 0xC2AD,
- 0x9886, 0xC1EC,
- 0x9887, 0xC6C4,
- 0x9888, 0xBEB1,
- 0x9889, 0xF2A1,
- 0x988A, 0xBCD5,
- 0x988C, 0xF2A2,
- 0x988D, 0xF2A3,
- 0x988F, 0xF2A4,
- 0x9890, 0xD2C3,
- 0x9891, 0xC6B5,
- 0x9893, 0xCDC7,
- 0x9894, 0xF2A5,
- 0x9896, 0xD3B1,
- 0x9897, 0xBFC5,
- 0x9898, 0xCCE2,
- 0x989A, 0xF2A6,
- 0x989B, 0xF2A7,
- 0x989C, 0xD1D5,
- 0x989D, 0xB6EE,
- 0x989E, 0xF2A8,
- 0x989F, 0xF2A9,
- 0x98A0, 0xB5DF,
- 0x98A1, 0xF2AA,
- 0x98A2, 0xF2AB,
- 0x98A4, 0xB2FC,
- 0x98A5, 0xF2AC,
- 0x98A6, 0xF2AD,
- 0x98A7, 0xC8A7,
- 0x98CE, 0xB7E7,
- 0x98D1, 0xECA9,
- 0x98D2, 0xECAA,
- 0x98D3, 0xECAB,
- 0x98D5, 0xECAC,
- 0x98D8, 0xC6AE,
- 0x98D9, 0xECAD,
- 0x98DA, 0xECAE,
- 0x98DE, 0xB7C9,
- 0x98DF, 0xCAB3,
- 0x98E7, 0xE2B8,
- 0x98E8, 0xF7CF,
- 0x990D, 0xF7D0,
- 0x9910, 0xB2CD,
- 0x992E, 0xF7D1,
- 0x9954, 0xF7D3,
- 0x9955, 0xF7D2,
- 0x9963, 0xE2BB,
- 0x9965, 0xBCA2,
- 0x9967, 0xE2BC,
- 0x9968, 0xE2BD,
- 0x9969, 0xE2BE,
- 0x996A, 0xE2BF,
- 0x996B, 0xE2C0,
- 0x996C, 0xE2C1,
- 0x996D, 0xB7B9,
- 0x996E, 0xD2FB,
- 0x996F, 0xBDA4,
- 0x9970, 0xCACE,
- 0x9971, 0xB1A5,
- 0x9972, 0xCBC7,
- 0x9974, 0xE2C2,
- 0x9975, 0xB6FC,
- 0x9976, 0xC8C4,
- 0x9977, 0xE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0xFF4F, 0xA3EF,
- 0xFF50, 0xA3F0,
- 0xFF51, 0xA3F1,
- 0xFF52, 0xA3F2,
- 0xFF53, 0xA3F3,
- 0xFF54, 0xA3F4,
- 0xFF55, 0xA3F5,
- 0xFF56, 0xA3F6,
- 0xFF57, 0xA3F7,
- 0xFF58, 0xA3F8,
- 0xFF59, 0xA3F9,
- 0xFF5A, 0xA3FA,
- 0xFF5B, 0xA3FB,
- 0xFF5C, 0xA3FC,
- 0xFF5D, 0xA3FD,
- 0xFF5E, 0xA1AB,
- 0xFFE0, 0xA1E9,
- 0xFFE1, 0xA1EA,
- 0xFFE3, 0xA3FE,
- 0xFFE5, 0xA3A4
-};
diff --git a/3rdparty/zint-2.4.4/backend/gridmtx.c b/3rdparty/zint-2.4.4/backend/gridmtx.c
deleted file mode 100644
index 47f904d..0000000
--- a/3rdparty/zint-2.4.4/backend/gridmtx.c
+++ /dev/null
@@ -1,1090 +0,0 @@
-/* gridmtx.c - Grid Matrix
-
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-/* This file impliments Grid Matrix as specified in
- AIM Global Document Number AIMD014 Rev. 1.63 Revised 9 Dec 2008 */
-
-#include
-#include
-#include
-#ifdef _MSC_VER
-#include
-#endif
-#include "common.h"
-#include "reedsol.h"
-#include "gridmtx.h"
-#include "gb2312.h"
-
-int number_lat(int gbdata[], int length, int position)
-{
- /* Attempt to calculate the 'cost' of using numeric mode from a given position in number of bits */
- /* Also ensures that numeric mode is not selected when it cannot be used: for example in
- a string which has "2.2.0" (cannot have more than one non-numeric character for each
- block of three numeric characters) */
- int sp;
- int numb = 0, nonum = 0, done;
- int tally = 0;
-
- sp = position;
-
- do {
- done = 0;
-
- if((gbdata[sp] >= '0') && (gbdata[sp] <= '9')) { numb++; done = 1; }
- switch(gbdata[sp]) {
- case ' ':
- case '+':
- case '-':
- case '.':
- case ',':
- nonum++;
- done = 1;
- }
- if((sp + 1) < length) {
- if((gbdata[sp] == 0x13) && (gbdata[sp + 1] == 0x10)) {
- nonum++;
- done = 1;
- sp++;
- }
- }
-
- if(done == 0) {
- tally += 80;
- } else {
- if(numb == 3) {
- if(nonum == 0) {
- tally += 10;
- }
- if(nonum == 1) {
- tally += 20;
- }
- if(nonum > 1) {
- tally += 80;
- }
- numb = 0;
- nonum = 0;
- }
- }
-
- sp++;
- } while ((sp < length) && (sp <= (position + 8)));
-
- if(numb == 0) {
- tally += 80;
- }
-
- if(numb > 1) {
- if(nonum == 0) {
- tally += 10;
- }
- if(nonum == 1) {
- tally += 20;
- }
- if(nonum > 1) {
- tally += 80;
- }
- }
-
- return tally;
-}
-
-int seek_forward(int gbdata[], int length, int position, int current_mode)
-{
- /* In complete contrast to the method recommended in Annex D of the ANSI standard this
- code uses a look-ahead test in the same manner as Data Matrix. This decision was made
- because the "official" algorithm does not provide clear methods for dealing with all
- possible combinations of input data */
-
- int number_count, byte_count, mixed_count, upper_count, lower_count, chinese_count;
- int sp, best_mode, done;
- int best_count, last = -1;
- int debug = 0;
-
- if(gbdata[position] > 0xff) { return GM_CHINESE; }
-
- switch(current_mode) {
- case GM_CHINESE:
- number_count = 13;
- byte_count = 13;
- mixed_count = 13;
- upper_count = 13;
- lower_count = 13;
- chinese_count = 0;
- break;
- case GM_NUMBER:
- number_count = 0;
- byte_count = 10;
- mixed_count = 10;
- upper_count = 10;
- lower_count = 10;
- chinese_count = 10;
- break;
- case GM_LOWER:
- number_count = 5;
- byte_count = 7;
- mixed_count = 7;
- upper_count = 5;
- lower_count = 0;
- chinese_count = 5;
- break;
- case GM_UPPER:
- number_count = 5;
- byte_count = 7;
- mixed_count = 7;
- upper_count = 0;
- lower_count = 5;
- chinese_count = 5;
- break;
- case GM_MIXED:
- number_count = 10;
- byte_count = 10;
- mixed_count = 0;
- upper_count = 10;
- lower_count = 10;
- chinese_count = 10;
- break;
- case GM_BYTE:
- number_count = 4;
- byte_count = 0;
- mixed_count = 4;
- upper_count = 4;
- lower_count = 4;
- chinese_count = 4;
- default: /* Start of symbol */
- number_count = 4;
- byte_count = 4;
- mixed_count = 4;
- upper_count = 4;
- lower_count = 4;
- chinese_count = 4;
- }
-
- for(sp = position; (sp < length) && (sp <= (position + 8)); sp++) {
-
- done = 0;
-
- if(gbdata[sp] >= 0xff) {
- byte_count += 17;
- mixed_count += 23;
- upper_count += 18;
- lower_count += 18;
- chinese_count += 13;
- done = 1;
- }
-
- if((gbdata[sp] >= 'a') && (gbdata[sp] <= 'z')) {
- byte_count += 8;
- mixed_count += 6;
- upper_count += 10;
- lower_count += 5;
- chinese_count += 13;
- done = 1;
- }
-
- if((gbdata[sp] >= 'A') && (gbdata[sp] <= 'Z')) {
- byte_count += 8;
- mixed_count += 6;
- upper_count += 5;
- lower_count += 10;
- chinese_count += 13;
- done = 1;
- }
-
- if((gbdata[sp] >= '0') && (gbdata[sp] <= '9')) {
- byte_count += 8;
- mixed_count += 6;
- upper_count += 8;
- lower_count += 8;
- chinese_count += 13;
- done = 1;
- }
-
- if(gbdata[sp] == ' ') {
- byte_count += 8;
- mixed_count += 6;
- upper_count += 5;
- lower_count += 5;
- chinese_count += 13;
- done = 1;
- }
-
- if(done == 0) {
- /* Control character */
- byte_count += 8;
- mixed_count += 16;
- upper_count += 13;
- lower_count += 13;
- chinese_count += 13;
- }
-
- if(gbdata[sp] >= 0x7f) {
- mixed_count += 20;
- upper_count += 20;
- lower_count += 20;
- }
- }
-
- /* Adjust for */
- for(sp = position; (sp < (length - 1)) && (sp <= (position + 7)); sp++) {
- if((gbdata[sp] == 0x13) && (gbdata[sp] == 0x10)) {
- chinese_count -= 13;
- }
- }
-
- /* Adjust for double digits */
- for(sp = position; (sp < (length - 1)) && (sp <= (position + 7)); sp++) {
- if(sp != last) {
- if(((gbdata[sp] >= '0') && (gbdata[sp] <= '9')) && ((gbdata[sp + 1] >= '0') && (gbdata[sp + 1] <= '9'))) {
- chinese_count -= 13;
- last = sp + 1;
- }
- }
- }
-
- /* Numeric mode is more complex */
- number_count += number_lat(gbdata, length, position);
-
- if(debug) { printf("C %d / B %d / M %d / U %d / L %d / N %d\n", chinese_count, byte_count, mixed_count, upper_count, lower_count, number_count); }
-
- best_count = chinese_count;
- best_mode = GM_CHINESE;
-
- if(byte_count <= best_count) {
- best_count = byte_count;
- best_mode = GM_BYTE;
- }
-
- if(mixed_count <= best_count) {
- best_count = mixed_count;
- best_mode = GM_MIXED;
- }
-
- if(upper_count <= best_count) {
- best_count = upper_count;
- best_mode = GM_UPPER;
- }
-
- if(lower_count <= best_count) {
- best_count = lower_count;
- best_mode = GM_LOWER;
- }
-
- if(number_count <= best_count) {
- best_count = number_count;
- best_mode = GM_NUMBER;
- }
-
- return best_mode;
-}
-
-void add_byte_count(char binary[], int byte_count_posn, int byte_count)
-{
- /* Add the length indicator for byte encoded blocks */
- if(byte_count & 0x100) { binary[byte_count_posn] = '0'; } else { binary[byte_count_posn] = '1'; }
- if(byte_count & 0x80) { binary[byte_count_posn + 1] = '0'; } else { binary[byte_count_posn + 1] = '1'; }
- if(byte_count & 0x40) { binary[byte_count_posn + 2] = '0'; } else { binary[byte_count_posn + 2] = '1'; }
- if(byte_count & 0x20) { binary[byte_count_posn + 3] = '0'; } else { binary[byte_count_posn + 3] = '1'; }
- if(byte_count & 0x10) { binary[byte_count_posn + 4] = '0'; } else { binary[byte_count_posn + 4] = '1'; }
- if(byte_count & 0x08) { binary[byte_count_posn + 5] = '0'; } else { binary[byte_count_posn + 5] = '1'; }
- if(byte_count & 0x04) { binary[byte_count_posn + 6] = '0'; } else { binary[byte_count_posn + 6] = '1'; }
- if(byte_count & 0x02) { binary[byte_count_posn + 7] = '0'; } else { binary[byte_count_posn + 7] = '1'; }
- if(byte_count & 0x01) { binary[byte_count_posn + 8] = '0'; } else { binary[byte_count_posn + 8] = '1'; }
-}
-
-void add_shift_char(char binary[], int shifty)
-{
- /* Add a control character to the data stream */
- int i, debug = 0;
- int glyph = 0;
-
- for(i = 0; i < 64; i++) {
- if(shift_set[i] == shifty) {
- glyph = i;
- }
- }
-
- if(debug) { printf("SHIFT [%d] ", glyph); }
-
- if(glyph & 0x20) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); }
-}
-
-int gm_encode(int gbdata[], int length, char binary[], int reader)
-{
- /* Create a binary stream representation of the input data.
- 7 sets are defined - Chinese characters, Numerals, Lower case letters, Upper case letters,
- Mixed numerals and latters, Control characters and 8-bit binary data */
- int sp, current_mode, next_mode, last_mode, glyph = 0;
- int c1, c2, done;
- int p = 0, ppos;
- int numbuf[3], punt = 0;
- int number_pad_posn, debug = 0;
- int byte_count_posn = 0, byte_count = 0;
- int shift, i;
-
- strcpy(binary, "");
-
- sp = 0;
- current_mode = 0;
- last_mode = 0;
- number_pad_posn = 0;
-
- if(reader) {
- concat(binary, "1010"); /* FNC3 - Reader Initialisation */
- }
-
- do {
- next_mode = seek_forward(gbdata, length, sp, current_mode);
-
- if(next_mode != current_mode) {
- switch(current_mode) {
- case 0:
- switch(next_mode) {
- case GM_CHINESE: concat(binary, "0001"); break;
- case GM_NUMBER: concat(binary, "0010"); break;
- case GM_LOWER: concat(binary, "0011"); break;
- case GM_UPPER: concat(binary, "0100"); break;
- case GM_MIXED: concat(binary, "0101"); break;
- case GM_BYTE: concat(binary, "0111"); break;
- }
- break;
- case GM_CHINESE:
- switch(next_mode) {
- case GM_NUMBER: concat(binary, "1111111100001"); break; // 8161
- case GM_LOWER: concat(binary, "1111111100010"); break; // 8162
- case GM_UPPER: concat(binary, "1111111100011"); break; // 8163
- case GM_MIXED: concat(binary, "1111111100100"); break; // 8164
- case GM_BYTE: concat(binary, "1111111100101"); break; // 8165
- }
- break;
- case GM_NUMBER:
- /* add numeric block padding value */
- switch(p) {
- case 1: binary[number_pad_posn] = '1'; binary[number_pad_posn + 1] = '0'; break; // 2 pad digits
- case 2: binary[number_pad_posn] = '0'; binary[number_pad_posn + 1] = '1'; break; // 1 pad digit
- case 3: binary[number_pad_posn] = '0'; binary[number_pad_posn + 1] = '0'; break; // 0 pad digits
- }
- switch(next_mode) {
- case GM_CHINESE: concat(binary, "1111111011"); break; // 1019
- case GM_LOWER: concat(binary, "1111111100"); break; // 1020
- case GM_UPPER: concat(binary, "1111111101"); break; // 1021
- case GM_MIXED: concat(binary, "1111111110"); break; // 1022
- case GM_BYTE: concat(binary, "1111111111"); break; // 1023
- }
- break;
- case GM_LOWER:
- case GM_UPPER:
- switch(next_mode) {
- case GM_CHINESE: concat(binary, "11100"); break; // 28
- case GM_NUMBER: concat(binary, "11101"); break; // 29
- case GM_LOWER:
- case GM_UPPER: concat(binary, "11110"); break; // 30
- case GM_MIXED: concat(binary, "1111100"); break; // 124
- case GM_BYTE: concat(binary, "1111110"); break; // 126
- }
- break;
- case GM_MIXED:
- switch(next_mode) {
- case GM_CHINESE: concat(binary, "1111110001"); break; // 1009
- case GM_NUMBER: concat(binary, "1111110010"); break; // 1010
- case GM_LOWER: concat(binary, "1111110011"); break; // 1011
- case GM_UPPER: concat(binary, "1111110100"); break; // 1012
- case GM_BYTE: concat(binary, "1111110111"); break; // 1015
- }
- break;
- case GM_BYTE:
- /* add byte block length indicator */
- add_byte_count(binary, byte_count_posn, byte_count);
- byte_count = 0;
- switch(next_mode) {
- case GM_CHINESE: concat(binary, "0001"); break; // 1
- case GM_NUMBER: concat(binary, "0010"); break; // 2
- case GM_LOWER: concat(binary, "0011"); break; // 3
- case GM_UPPER: concat(binary, "0100"); break; // 4
- case GM_MIXED: concat(binary, "0101"); break; // 5
- }
- break;
- }
- if(debug) {
- switch(next_mode) {
- case GM_CHINESE: printf("CHIN "); break;
- case GM_NUMBER: printf("NUMB "); break;
- case GM_LOWER: printf("LOWR "); break;
- case GM_UPPER: printf("UPPR "); break;
- case GM_MIXED: printf("MIXD "); break;
- case GM_BYTE: printf("BYTE "); break;
- }
- }
- }
- last_mode = current_mode;
- current_mode = next_mode;
-
- switch(current_mode) {
- case GM_CHINESE:
- done = 0;
- if(gbdata[sp] > 0xff) {
- /* GB2312 character */
- c1 = (gbdata[sp] & 0xff00) >> 8;
- c2 = gbdata[sp] & 0xff;
-
- if((c1 >= 0xa0) && (c1 <= 0xa9)) {
- glyph = (0x60 * (c1 - 0xa1)) + (c2 - 0xa0);
- }
- if((c1 >= 0xb0) && (c1 <= 0xf7)) {
- glyph = (0x60 * (c1 - 0xb0 + 9)) + (c2 - 0xa0);
- }
- done = 1;
- }
- if(!(done)) {
- if(sp != (length - 1)) {
- if((gbdata[sp] == 0x13) && (gbdata[sp + 1] == 0x10)) {
- /* End of Line */
- glyph = 7776;
- sp++;
- }
- done = 1;
- }
- }
- if(!(done)) {
- if(sp != (length - 1)) {
- if(((gbdata[sp] >= '0') && (gbdata[sp] <= '9')) &&
- ((gbdata[sp + 1] >= '0') && (gbdata[sp + 1] <= '9'))) {
- /* Two digits */
- glyph = 8033 + (10 * (gbdata[sp] - '0')) + (gbdata[sp + 1] - '0');
- sp++;
- }
- }
- }
- if(!(done)) {
- /* Byte value */
- glyph = 7777 + gbdata[sp];
- }
-
- if(debug) { printf("[%d] ", glyph); }
-
- if(glyph & 0x1000) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x800) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x400) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x200) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x100) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x80) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x40) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x20) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); }
- sp++;
- break;
-
- case GM_NUMBER:
- if(last_mode != current_mode) {
- /* Reserve a space for numeric digit padding value (2 bits) */
- number_pad_posn = strlen(binary);
- concat(binary, "XX");
- }
- p = 0;
- ppos = -1;
-
- /* Numeric compression can also include certain combinations of
- non-numeric character */
-
- numbuf[0] = '0';
- numbuf[1] = '0';
- numbuf[2] = '0';
- do {
- if((gbdata[sp] >= '0') && (gbdata[sp] <= '9')) {
- numbuf[p] = gbdata[sp];
- sp++;
- p++;
- }
- switch(gbdata[sp]) {
- case ' ':
- case '+':
- case '-':
- case '.':
- case ',':
- punt = gbdata[sp];
- sp++;
- ppos = p;
- break;
- }
- if(sp < (length - 1)) {
- if((gbdata[sp] == 0x13) && (gbdata[sp + 1] == 0x10)) {
- /* */
- punt = gbdata[sp];
- sp += 2;
- ppos = p;
- }
- }
- } while ((p < 3) && (sp < length));
-
- if(ppos != -1) {
- switch(punt) {
- case ' ': glyph = 0; break;
- case '+': glyph = 3; break;
- case '-': glyph = 6; break;
- case '.': glyph = 9; break;
- case ',': glyph = 12; break;
- case 0x13: glyph = 15; break;
- }
- glyph += ppos;
- glyph += 1000;
-
- if(debug) { printf("[%d] ", glyph); }
-
- if(glyph & 0x200) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x100) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x80) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x40) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x20) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); }
- }
-
- glyph = (100 * (numbuf[0] - '0')) + (10 * (numbuf[1] - '0')) + (numbuf[2] - '0');
- if(debug) { printf("[%d] ", glyph); }
-
- if(glyph & 0x200) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x100) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x80) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x40) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x20) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); }
- break;
-
- case GM_BYTE:
- if(last_mode != current_mode) {
- /* Reserve space for byte block length indicator (9 bits) */
- byte_count_posn = strlen(binary);
- concat(binary, "LLLLLLLLL");
- }
- if(byte_count == 512) {
- /* Maximum byte block size is 512 bytes. If longer is needed then start a new block */
- add_byte_count(binary, byte_count_posn, byte_count);
- concat(binary, "0111");
- byte_count_posn = strlen(binary);
- concat(binary, "LLLLLLLLL");
- byte_count = 0;
- }
-
- glyph = gbdata[sp];
- if(debug) { printf("[%d] ", glyph); }
- if(glyph & 0x80) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x40) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x20) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); }
- sp++;
- byte_count++;
- break;
-
- case GM_MIXED:
- shift = 1;
- if((gbdata[sp] >= '0') && (gbdata[sp] <= '9')) { shift = 0; }
- if((gbdata[sp] >= 'A') && (gbdata[sp] <= 'Z')) { shift = 0; }
- if((gbdata[sp] >= 'a') && (gbdata[sp] <= 'z')) { shift = 0; }
- if(gbdata[sp] == ' ') { shift = 0; }
-
- if(shift == 0) {
- /* Mixed Mode character */
- glyph = posn(EUROPIUM, gbdata[sp]);
- if(debug) { printf("[%d] ", glyph); }
-
- if(glyph & 0x20) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); }
- } else {
- /* Shift Mode character */
- concat(binary, "1111110110"); /* 1014 - shift indicator */
- add_shift_char(binary, gbdata[sp]);
- }
-
- sp++;
- break;
-
- case GM_UPPER:
- shift = 1;
- if((gbdata[sp] >= 'A') && (gbdata[sp] <= 'Z')) { shift = 0; }
- if(gbdata[sp] == ' ') { shift = 0; }
-
- if(shift == 0) {
- /* Upper Case character */
- glyph = posn("ABCDEFGHIJKLMNOPQRSTUVWXYZ ", gbdata[sp]);
- if(debug) { printf("[%d] ", glyph); }
-
- if(glyph & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); }
- } else {
- /* Shift Mode character */
- concat(binary, "1111101"); /* 127 - shift indicator */
- add_shift_char(binary, gbdata[sp]);
- }
-
- sp++;
- break;
-
- case GM_LOWER:
- shift = 1;
- if((gbdata[sp] >= 'a') && (gbdata[sp] <= 'z')) { shift = 0; }
- if(gbdata[sp] == ' ') { shift = 0; }
-
- if(shift == 0) {
- /* Lower Case character */
- glyph = posn("abcdefghijklmnopqrstuvwxyz ", gbdata[sp]);
- if(debug) { printf("[%d] ", glyph); }
-
- if(glyph & 0x10) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x08) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x04) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x02) { concat(binary, "1"); } else { concat(binary, "0"); }
- if(glyph & 0x01) { concat(binary, "1"); } else { concat(binary, "0"); }
- } else {
- /* Shift Mode character */
- concat(binary, "1111101"); /* 127 - shift indicator */
- add_shift_char(binary, gbdata[sp]);
- }
-
- sp++;
- break;
- }
- if(strlen(binary) > 9191) {
- return ERROR_TOO_LONG;
- }
-
- } while(sp < length);
-
- if(current_mode == GM_NUMBER) {
- /* add numeric block padding value */
- switch(p) {
- case 1: binary[number_pad_posn] = '1'; binary[number_pad_posn + 1] = '0'; break; // 2 pad digits
- case 2: binary[number_pad_posn] = '0'; binary[number_pad_posn + 1] = '1'; break; // 1 pad digit
- case 3: binary[number_pad_posn] = '0'; binary[number_pad_posn + 1] = '0'; break; // 0 pad digits
- }
- }
-
- if(current_mode == GM_BYTE) {
- /* Add byte block length indicator */
- add_byte_count(binary, byte_count_posn, byte_count);
- }
-
- /* Add "end of data" character */
- switch(current_mode) {
- case GM_CHINESE: concat(binary, "1111111100000"); break; // 8160
- case GM_NUMBER: concat(binary, "1111111010"); break; // 1018
- case GM_LOWER:
- case GM_UPPER: concat(binary, "11011"); break; // 27
- case GM_MIXED: concat(binary, "1111110000"); break; // 1008
- case GM_BYTE: concat(binary, "0000"); break; // 0
- }
-
- /* Add padding bits if required */
- p = 7 - (strlen(binary) % 7);
- if(p == 7) { p = 0; }
- for(i = 0; i < p; i++) {
- concat(binary, "0");
- }
-
- if(strlen(binary) > 9191) {
- return ERROR_TOO_LONG;
- }
- return 0;
-}
-
-void gm_add_ecc(char binary[], int data_posn, int layers, int ecc_level, int word[])
-{
- int total_cw, data_cw, i, j, wp;
- int n1, b1, n2, b2, e1, b3, e2;
- int block_size, data_size, ecc_size, toggle;
- int data[1320], block[130];
- unsigned char data_block[115], ecc_block[70];
-
- total_cw = gm_total_cw[(layers - 1)];
- data_cw = gm_data_codewords[((layers - 1) * 5) + (ecc_level - 1)];
-
- for(i = 0; i < 1320; i++) {
- data[i] = 0;
- }
-
- /* Convert from binary sream to 7-bit codewords */
- for(i = 0; i < data_posn; i++) {
- if(binary[i * 7] == '1') { data[i] += 0x40; }
- if(binary[(i * 7) + 1] == '1') { data[i] += 0x20; }
- if(binary[(i * 7) + 2] == '1') { data[i] += 0x10; }
- if(binary[(i * 7) + 3] == '1') { data[i] += 0x08; }
- if(binary[(i * 7) + 4] == '1') { data[i] += 0x04; }
- if(binary[(i * 7) + 5] == '1') { data[i] += 0x02; }
- if(binary[(i * 7) + 6] == '1') { data[i] += 0x01; }
- }
-
- /* Add padding codewords */
- data[data_posn] = 0x00;
- for(i = (data_posn + 1); i < data_cw; i++) {
- if(i & 1) {
- data[i] = 0x7e;
- toggle = 1;
- } else {
- data[i] = 0x00;
- toggle = 0;
- }
- }
-
- /* Get block sizes */
- n1 = gm_n1[(layers - 1)];
- b1 = gm_b1[(layers - 1)];
- n2 = n1 - 1;
- b2 = gm_b2[(layers - 1)];
- e1 = gm_ebeb[((layers - 1) * 20) + ((ecc_level - 1) * 4)];
- b3 = gm_ebeb[((layers - 1) * 20) + ((ecc_level - 1) * 4) + 1];
- e2 = gm_ebeb[((layers - 1) * 20) + ((ecc_level - 1) * 4) + 2];
-
- /* Split the data into blocks */
- wp = 0;
- for(i = 0; i < (b1 + b2); i++) {
- if(i < b1) { block_size = n1; } else { block_size = n2; }
- if(i < b3) { ecc_size = e1; } else { ecc_size = e2; }
- data_size = block_size - ecc_size;
-
- /* printf("block %d/%d: data %d / ecc %d\n", i + 1, (b1 + b2), data_size, ecc_size);*/
-
- for(j = 0; j < data_size; j++) {
- data_block[j] = data[wp];
- wp++;
- }
-
- /* Calculate ECC data for this block */
- rs_init_gf(0x89);
- rs_init_code(ecc_size, 1);
- rs_encode(data_size, data_block, ecc_block);
- rs_free();
-
- /* Correct error correction data but in reverse order */
- for(j = 0; j < data_size; j++) {
- block[j] = data_block[j];
- }
- for(j = 0; j < ecc_size; j++) {
- block[(j + data_size)] = ecc_block[ecc_size - j - 1];
- }
-
- for(j = 0; j < n2; j++) {
- word[((b1 + b2) * j) + i] = block[j];
- }
- if(block_size == n1) {
- word[((b1 + b2) * (n1 - 1)) + i] = block[(n1 - 1)];
- }
- }
-}
-
-void place_macromodule(char grid[], int x, int y, int word1, int word2, int size)
-{
- int i, j;
-
- i = (x * 6) + 1;
- j = (y * 6) + 1;
-
- if(word2 & 0x40) { grid[(j * size) + i + 2] = '1'; }
- if(word2 & 0x20) { grid[(j * size) + i + 3] = '1'; }
- if(word2 & 0x10) { grid[((j + 1) * size) + i] = '1'; }
- if(word2 & 0x08) { grid[((j + 1) * size) + i + 1] = '1'; }
- if(word2 & 0x04) { grid[((j + 1) * size) + i + 2] = '1'; }
- if(word2 & 0x02) { grid[((j + 1) * size) + i + 3] = '1'; }
- if(word2 & 0x01) { grid[((j + 2) * size) + i] = '1'; }
- if(word1 & 0x40) { grid[((j + 2) * size) + i + 1] = '1'; }
- if(word1 & 0x20) { grid[((j + 2) * size) + i + 2] = '1'; }
- if(word1 & 0x10) { grid[((j + 2) * size) + i + 3] = '1'; }
- if(word1 & 0x08) { grid[((j + 3) * size) + i] = '1'; }
- if(word1 & 0x04) { grid[((j + 3) * size) + i + 1] = '1'; }
- if(word1 & 0x02) { grid[((j + 3) * size) + i + 2] = '1'; }
- if(word1 & 0x01) { grid[((j + 3) * size) + i + 3] = '1'; }
-}
-
-void place_data_in_grid(int word[], char grid[], int modules, int size)
-{
- int x, y, macromodule, offset;
-
- offset = 13 - ((modules - 1) / 2);
- for(y = 0; y < modules; y++) {
- for(x = 0; x < modules; x++) {
- macromodule = gm_macro_matrix[((y + offset) * 27) + (x + offset)];
- place_macromodule(grid, x, y, word[macromodule * 2], word[(macromodule * 2) + 1], size);
- }
- }
-}
-
-void place_layer_id(char* grid, int size, int layers, int modules, int ecc_level)
-{
- /* Place the layer ID into each macromodule */
-
- int i, j, layer, start, stop;
-
-#ifndef _MSC_VER
- int layerid[layers + 1];
- int id[modules * modules];
-#else
- int* layerid = (int *)_alloca((layers + 1) * sizeof(int));
- int* id = (int *)_alloca((modules * modules) * sizeof(int));
-#endif
-
- /* Calculate Layer IDs */
- for(i = 0; i <= layers; i++) {
- if(ecc_level == 1) {
- layerid[i] = 3 - (i % 4);
- } else {
- layerid[i] = (i + 5 - ecc_level) % 4;
- }
- }
-
- for(i = 0; i < modules; i++) {
- for(j = 0; j < modules; j++) {
- id[(i * modules) + j] = 0;
- }
- }
-
- /* Calculate which value goes in each macromodule */
- start = modules / 2;
- stop = modules / 2;
- for(layer = 0; layer <= layers; layer++) {
- for(i = start; i <= stop; i++) {
- id[(start * modules) + i] = layerid[layer];
- id[(i * modules) + start] = layerid[layer];
- id[((modules - start - 1) * modules) + i] = layerid[layer];
- id[(i * modules) + (modules - start - 1)] = layerid[layer];
- }
- start--;
- stop++;
- }
-
- /* Place the data in the grid */
- for(i = 0; i < modules; i++) {
- for(j = 0; j < modules; j++) {
- if(id[(i * modules) + j] & 0x02) {
- grid[(((i * 6) + 1) * size) + (j * 6) + 1] = '1';
- }
- if(id[(i * modules) + j] & 0x01) {
- grid[(((i * 6) + 1) * size) + (j * 6) + 2] = '1';
- }
- }
- }
-}
-
-int grid_matrix(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- int size, modules, dark, error_number;
- int auto_layers, min_layers, layers, auto_ecc_level, min_ecc_level, ecc_level;
- int x, y, i, j, glyph;
- char binary[9300];
- int data_cw, input_latch = 0;
- int word[1460], data_max, reader = 0;
-
-#ifndef _MSC_VER
- int utfdata[length + 1];
- int gbdata[length + 1];
-#else
- int* utfdata = (int *)_alloca((length + 1) * sizeof(int));
- int* gbdata = (int *)_alloca((length + 1) * sizeof(int));
- char* grid;
-#endif
-
- for(i = 0; i < 1460; i++) {
- word[i] = 0;
- }
-
- switch(symbol->input_mode) {
- case DATA_MODE:
- for(i = 0; i < length; i++) {
- gbdata[i] = (int)source[i];
- }
- break;
- default:
- /* Convert Unicode input to GB-2312 */
- error_number = utf8toutf16(symbol, source, utfdata, &length);
- if(error_number != 0) { return error_number; }
-
- for(i = 0; i < length; i++) {
- if(utfdata[i] <= 0xff) {
- gbdata[i] = utfdata[i];
- } else {
- j = 0;
- glyph = 0;
- do {
- if(gb2312_lookup[j * 2] == utfdata[i]) {
- glyph = gb2312_lookup[(j * 2) + 1];
- }
- j++;
- } while ((j < 7445) && (glyph == 0));
- if(glyph == 0) {
- strcpy(symbol->errtxt, "Invalid character in input data");
- return ERROR_INVALID_DATA1;
- }
- gbdata[i] = glyph;
- }
- }
- break;
- }
-
- if(symbol->output_options & READER_INIT) reader = 1;
-
- error_number = gm_encode(gbdata, length, binary, reader);
- if(error_number != 0) {
- strcpy(symbol->errtxt, "Input data too long");
- return error_number;
- }
-
- /* Determine the size of the symbol */
- data_cw = strlen(binary) / 7;
-
- auto_layers = 13;
- for(i = 12; i > 0; i--) {
- if(gm_recommend_cw[(i - 1)] >= data_cw) { auto_layers = i; }
- }
- min_layers = 13;
- for(i = 12; i > 0; i--) {
- if(gm_max_cw[(i - 1)] >= data_cw) { min_layers = i; }
- }
- layers = auto_layers;
- auto_ecc_level = 3;
- if(layers == 1) { auto_ecc_level = 5; }
- if((layers == 2) || (layers == 3)) { auto_ecc_level = 4; }
- min_ecc_level = 1;
- if(layers == 1) { min_ecc_level = 4; }
- if((layers == 2) || (layers == 3)) { min_ecc_level = 2; }
- ecc_level = auto_ecc_level;
-
- if((symbol->option_2 >= 1) && (symbol->option_2 <= 13)) {
- input_latch = 1;
- if(symbol->option_2 > min_layers) {
- layers = symbol->option_2;
- } else {
- layers = min_layers;
- }
- }
-
- if(input_latch == 1) {
- auto_ecc_level = 3;
- if(layers == 1) { auto_ecc_level = 5; }
- if((layers == 2) || (layers == 3)) { auto_ecc_level = 4; }
- ecc_level = auto_ecc_level;
- if(data_cw > gm_data_codewords[(5 * (layers - 1)) + (ecc_level - 1)]) {
- layers++;
- }
- }
-
- if(input_latch == 0) {
- if((symbol->option_1 >= 1) && (symbol->option_1 <= 5)) {
- if(symbol->option_1 > min_ecc_level) {
- ecc_level = symbol->option_1;
- } else {
- ecc_level = min_ecc_level;
- }
- }
- if(data_cw > gm_data_codewords[(5 * (layers - 1)) + (ecc_level - 1)]) {
- do {
- layers++;
- } while ((data_cw > gm_data_codewords[(5 * (layers - 1)) + (ecc_level - 1)]) && (layers <= 13));
- }
- }
-
- data_max = 1313;
- switch(ecc_level) {
- case 2: data_max = 1167; break;
- case 3: data_max = 1021; break;
- case 4: data_max = 875; break;
- case 5: data_max = 729; break;
- }
-
- if(data_cw > data_max) {
- strcpy(symbol->errtxt, "Input data too long");
- return ERROR_TOO_LONG;
- }
-
- gm_add_ecc(binary, data_cw, layers, ecc_level, word);
- size = 6 + (layers * 12);
- modules = 1 + (layers * 2);
-
-#ifndef _MSC_VER
- char grid[size * size];
-#else
- grid = (char *)_alloca((size * size) * sizeof(char));
-#endif
-
- for(x = 0; x < size; x++) {
- for(y = 0; y < size; y++) {
- grid[(y * size) + x] = '0';
- }
- }
-
- place_data_in_grid(word, grid, modules, size);
- place_layer_id(grid, size, layers, modules, ecc_level);
-
- /* Add macromodule frames */
- for(x = 0; x < modules; x++) {
- dark = 1 - (x & 1);
- for(y = 0; y < modules; y++) {
- if(dark == 1) {
- for(i = 0; i < 5; i++) {
- grid[((y * 6) * size) + (x * 6) + i] = '1';
- grid[(((y * 6) + 5) * size) + (x * 6) + i] = '1';
- grid[(((y * 6) + i) * size) + (x * 6)] = '1';
- grid[(((y * 6) + i) * size) + (x * 6) + 5] = '1';
- }
- grid[(((y * 6) + 5) * size) + (x * 6) + 5] = '1';
- dark = 0;
- } else {
- dark = 1;
- }
- }
- }
-
- /* Copy values to symbol */
- symbol->width = size;
- symbol->rows = size;
-
- for(x = 0; x < size; x++) {
- for(y = 0; y < size; y++) {
- if(grid[(y * size) + x] == '1') {
- set_module(symbol, y, x);
- }
- }
- symbol->row_height[x] = 1;
- }
-
- return 0;
-}
diff --git a/3rdparty/zint-2.4.4/backend/gridmtx.h b/3rdparty/zint-2.4.4/backend/gridmtx.h
deleted file mode 100644
index ba684a1..0000000
--- a/3rdparty/zint-2.4.4/backend/gridmtx.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* gridmtx.h - definitions for Grid Matrix
-
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#define GM_NUMBER 1
-#define GM_LOWER 2
-#define GM_UPPER 3
-#define GM_MIXED 4
-#define GM_CONTROL 5
-#define GM_BYTE 6
-#define GM_CHINESE 7
-
-#define EUROPIUM "0123456789ABCDEFGHIJKLMOPRSTUVWXYZabcdefghijklmnopqrstuvwxyz "
-
-static char shift_set[] = {
- /* From Table 7 - Encoding of control characters */
- 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, /* NULL -> SI */
- 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, /* DLE -> US */
- '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', ':',
- ';', '<', '=', '>', '?', '@', '[', '\\', ']', '^', '_', '`', '{', '|', '}', '~'
-};
-
-static int gm_recommend_cw[] = { 9, 30, 59, 114, 170, 237, 315, 405, 506, 618, 741, 875, 1021 };
-static int gm_max_cw[] = { 11, 40, 79, 146, 218, 305, 405, 521, 650, 794, 953, 1125, 1313 };
-static int gm_total_cw[] = { 18, 50, 98, 162, 242, 338, 450, 578, 722, 882, 1058, 1250, 1458 };
-
-static int gm_data_codewords[] = {
- 0, 15, 13, 11, 9,
- 45, 40, 35, 30, 25,
- 89, 79, 69, 59, 49,
- 146, 130, 114, 98, 81,
- 218, 194, 170, 146, 121,
- 305, 271, 237, 203, 169,
- 405, 360, 315, 270, 225,
- 521, 463, 405, 347, 289,
- 650, 578, 506, 434, 361,
- 794, 706, 618, 530, 441,
- 953, 847, 741, 635, 529,
- 1125, 1000, 875, 750, 625,
- 1313, 1167, 1021, 875, 729
-};
-
-static int gm_n1[] = { 18, 50, 98, 81, 121, 113, 113, 116, 121, 126, 118, 125, 122 };
-static int gm_b1[] = { 1, 1, 1, 2, 2, 2, 2, 3, 2, 7, 5, 10, 6 };
-static int gm_b2[] = { 0, 0, 0, 0, 0, 1, 2, 2, 4, 0, 4, 0, 6 };
-
-static int gm_ebeb[] = {
- /* E1 B3 E2 B4 */
- 0, 0, 0, 0, // version 1
- 3, 1, 0, 0,
- 5, 1, 0, 0,
- 7, 1, 0, 0,
- 9, 1, 0, 0,
- 5, 1, 0, 0, // version 2
- 10, 1, 0, 0,
- 15, 1, 0, 0,
- 20, 1, 0, 0,
- 25, 1, 0, 0,
- 9, 1, 0, 0, // version 3
- 19, 1, 0, 0,
- 29, 1, 0, 0,
- 39, 1, 0, 0,
- 49, 1, 0, 0,
- 8, 2, 0, 0, // version 4
- 16, 2, 0, 0,
- 24, 2, 0, 0,
- 32, 2, 0, 0,
- 41, 1, 10, 1,
- 12, 2, 0, 0, // version 5
- 24, 2, 0, 0,
- 36, 2, 0, 0,
- 48, 2, 0, 0,
- 61, 1, 60, 1,
- 11, 3, 0, 0, // version 6
- 23, 1, 22, 2,
- 34, 2, 33, 1,
- 45, 3, 0, 0,
- 57, 1, 56, 2,
- 12, 1, 11, 3, // version 7
- 23, 2, 22, 2,
- 34, 3, 33, 1,
- 45, 4, 0, 0,
- 57, 1, 56, 3,
- 12, 2, 11, 3, // version 8
- 23, 5, 0, 0,
- 35, 3, 34, 2,
- 47, 1, 46, 4,
- 58, 4, 57, 1,
- 12, 6, 0, 0, // version 9
- 24, 6, 0, 0,
- 36, 6, 0, 0,
- 48, 6, 0, 0,
- 61, 1, 60, 5,
- 13, 4, 12, 3, // version 10
- 26, 1, 25, 6,
- 38, 5, 37, 2,
- 51, 2, 50, 5,
- 63, 7, 0, 0,
- 12, 6, 11, 3, // version 11
- 24, 4, 23, 5,
- 36, 2, 35, 7,
- 47, 9, 0, 0,
- 59, 7, 58, 2,
- 13, 5, 12, 5, // version 12
- 25, 10, 0, 0,
- 38, 5, 37, 5,
- 50, 10, 0, 0,
- 63, 5, 62, 5,
- 13, 1, 12, 11, //version 13
- 25, 3, 24, 9,
- 37, 5, 36, 7,
- 49, 7, 48, 5,
- 61, 9, 60, 3
-};
-
-static int gm_macro_matrix[] = {
- 728,625,626,627,628,629,630,631,632,633,634,635,636,637,638,639,640,641,642,643,644,645,646,647,648,649,650,
- 727,624,529,530,531,532,533,534,535,536,537,538,539,540,541,542,543,544,545,546,547,548,549,550,551,552,651,
- 726,623,528,441,442,443,444,445,446,447,448,449,450,451,452,453,454,455,456,457,458,459,460,461,462,553,652,
- 725,622,527,440,361,362,363,364,365,366,367,368,369,370,371,372,373,374,375,376,377,378,379,380,463,554,653,
- 724,621,526,439,360,289,290,291,292,293,294,295,296,297,298,299,300,301,302,303,304,305,306,381,464,555,654,
- 723,620,525,438,359,288,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,307,382,465,556,655,
- 722,619,524,437,358,287,224,169,170,171,172,173,174,175,176,177,178,179,180,181,182,241,308,383,466,557,656,
- 721,618,523,436,357,286,223,168,121,122,123,124,125,126,127,128,129,130,131,132,183,242,309,384,467,558,657,
- 720,617,522,435,356,285,222,167,120,81,82,83,84,85,86,87,88,89,90,133,184,243,310,385,468,559,658,
- 719,616,521,434,355,284,221,166,119,80,49,50,51,52,53,54,55,56,91,134,185,244,311,386,469,560,659,
- 718,615,520,433,354,283,220,165,118,79,48,25,26,27,28,29,30,57,92,135,186,245,312,387,470,561,660,
- 717,614,519,432,353,282,219,164,117,78,47,24,9,10,11,12,31,58,93,136,187,246,313,388,471,562,661,
- 716,613,518,431,352,281,218,163,116,77,46,23,8,1,2,13,32,59,94,137,188,247,314,389,472,563,662,
- 715,612,517,430,351,280,217,162,115,76,45,22,7,0,3,14,33,60,95,138,189,248,315,390,473,564,663,
- 714,611,516,429,350,279,216,161,114,75,44,21,6,5,4,15,34,61,96,139,190,249,316,391,474,565,664,
- 713,610,515,428,349,278,215,160,113,74,43,20,19,18,17,16,35,62,97,140,191,250,317,392,475,566,665,
- 712,609,514,427,348,277,214,159,112,73,42,41,40,39,38,37,36,63,98,141,192,251,318,393,476,567,666,
- 711,608,513,426,347,276,213,158,111,72,71,70,69,68,67,66,65,64,99,142,193,252,319,394,477,568,667,
- 710,607,512,425,346,275,212,157,110,109,108,107,106,105,104,103,102,101,100,143,194,253,320,395,478,569,668,
- 709,606,511,424,345,274,211,156,155,154,153,152,151,150,149,148,147,146,145,144,195,254,321,396,479,570,669,
- 708,605,510,423,344,273,210,209,208,207,206,205,204,203,202,201,200,199,198,197,196,255,322,397,480,571,670,
- 707,604,509,422,343,272,271,270,269,268,267,266,265,264,263,262,261,260,259,258,257,256,323,398,481,572,671,
- 706,603,508,421,342,341,340,339,338,337,336,335,334,333,332,331,330,329,328,327,326,325,324,399,482,573,672,
- 705,602,507,420,419,418,417,416,415,414,413,412,411,410,409,408,407,406,405,404,403,402,401,400,483,574,673,
- 704,601,506,505,504,503,502,501,500,499,498,497,496,495,494,493,492,491,490,489,488,487,486,485,484,575,674,
- 703,600,599,598,597,596,595,594,593,592,591,590,589,588,587,586,585,584,583,582,581,580,579,578,577,576,675,
- 702,701,700,699,698,697,696,695,694,693,692,691,690,689,688,687,686,685,684,683,682,681,680,679,678,677,676,
-};
diff --git a/3rdparty/zint-2.4.4/backend/gs1.c b/3rdparty/zint-2.4.4/backend/gs1.c
deleted file mode 100644
index 45e14dd..0000000
--- a/3rdparty/zint-2.4.4/backend/gs1.c
+++ /dev/null
@@ -1,311 +0,0 @@
-/* gs1.c - Verifies GS1 data */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include
-#include
-#include
-#ifdef _MSC_VER
-#include
-#endif
-#include "common.h"
-#include "gs1.h"
-
-/* This code does some checks on the integrity of GS1 data. It is not intended
- to be bulletproof, nor does it report very accurately what problem was found
- or where, but should prevent some of the more common encoding errors */
-
-void itostr(char ai_string[], int ai_value)
-{
- int thou, hund, ten, unit;
- char temp[2];
-
- strcpy(ai_string, "(");
- thou = ai_value / 1000;
- hund = (ai_value - (1000 * thou)) / 100;
- ten = (ai_value - ((1000 * thou) + (100 * hund))) / 10;
- unit = ai_value - ((1000 * thou) + (100 * hund) + (10 * ten));
-
- temp[1] = '\0';
- if(ai_value >= 1000) { temp[0] = itoc(thou); concat(ai_string, temp); }
- if(ai_value >= 100) { temp[0] = itoc(hund); concat(ai_string, temp); }
- temp[0] = itoc(ten);
- concat(ai_string, temp);
- temp[0] = itoc(unit);
- concat(ai_string, temp);
- concat(ai_string, ")");
-}
-
-int gs1_verify(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len, char reduced[])
-{
- int i, j, last_ai, ai_latch;
- char ai_string[6];
- int bracket_level, max_bracket_level, ai_length, max_ai_length, min_ai_length;
- int ai_value[100], ai_location[100], ai_count, data_location[100], data_length[100];
- int error_latch;
-
- /* Detect extended ASCII characters */
- for(i = 0; i < (int)src_len; i++) {
- if(source[i] >=128) {
- strcpy(symbol->errtxt, "Extended ASCII characters are not supported by GS1");
- return ERROR_INVALID_DATA1;
- }
- if(source[i] < 32) {
- strcpy(symbol->errtxt, "Control characters are not supported by GS1");
- return ERROR_INVALID_DATA1;
- }
- }
-
- if(source[0] != '[') {
- strcpy(symbol->errtxt, "Data does not start with an AI");
- return ERROR_INVALID_DATA1;
- }
-
- /* Check the position of the brackets */
- bracket_level = 0;
- max_bracket_level = 0;
- ai_length = 0;
- max_ai_length = 0;
- min_ai_length = 5;
- j = 0;
- ai_latch = 0;
- for(i = 0; i < (int)src_len; i++) {
- ai_length += j;
- if(((j == 1) && (source[i] != ']')) && ((source[i] < '0') || (source[i] > '9'))) { ai_latch = 1; }
- if(source[i] == '[') { bracket_level++; j = 1; }
- if(source[i] == ']') {
- bracket_level--;
- if(ai_length < min_ai_length) { min_ai_length = ai_length; }
- j = 0;
- ai_length = 0;
- }
- if(bracket_level > max_bracket_level) { max_bracket_level = bracket_level; }
- if(ai_length > max_ai_length) { max_ai_length = ai_length; }
- }
- min_ai_length--;
-
- if(bracket_level != 0) {
- /* Not all brackets are closed */
- strcpy(symbol->errtxt, "Malformed AI in input data (brackets don\'t match)");
- return ERROR_INVALID_DATA1;
- }
-
- if(max_bracket_level > 1) {
- /* Nested brackets */
- strcpy(symbol->errtxt, "Found nested brackets in input data");
- return ERROR_INVALID_DATA1;
- }
-
- if(max_ai_length > 4) {
- /* AI is too long */
- strcpy(symbol->errtxt, "Invalid AI in input data (AI too long)");
- return ERROR_INVALID_DATA1;
- }
-
- if(min_ai_length <= 1) {
- /* AI is too short */
- strcpy(symbol->errtxt, "Invalid AI in input data (AI too short)");
- return ERROR_INVALID_DATA1;
- }
-
- if(ai_latch == 1) {
- /* Non-numeric data in AI */
- strcpy(symbol->errtxt, "Invalid AI in input data (non-numeric characters in AI)");
- return ERROR_INVALID_DATA1;
- }
-
- ai_count = 0;
- for(i = 1; i < (int)src_len; i++) {
- if(source[i - 1] == '[') {
- ai_location[ai_count] = i;
- j = 0;
- do {
- ai_string[j] = source[i + j];
- j++;
- } while (ai_string[j - 1] != ']');
- ai_string[j - 1] = '\0';
- ai_value[ai_count] = atoi(ai_string);
- ai_count++;
- }
- }
-
- for(i = 0; i < ai_count; i++) {
- data_location[i] = ai_location[i] + 3;
- if(ai_value[i] >= 100) { data_location[i]++; }
- if(ai_value[i] >= 1000) { data_location[i]++; }
- data_length[i] = 0;
- do {
- data_length[i]++;
- } while ((source[data_location[i] + data_length[i] - 1] != '[') && (source[data_location[i] + data_length[i] - 1] != '\0'));
- data_length[i]--;
- }
-
- for(i = 0; i < ai_count; i++) {
- if(data_length[i] == 0) {
- /* No data for given AI */
- strcpy(symbol->errtxt, "Empty data field in input data");
- return ERROR_INVALID_DATA1;
- }
- }
-
- error_latch = 0;
- strcpy(ai_string, "");
- for(i = 0; i < ai_count; i++) {
- switch (ai_value[i]) {
- case 0: if(data_length[i] != 18) { error_latch = 1; } break;
- case 1:
- case 2:
- case 3: if(data_length[i] != 14) { error_latch = 1; } break;
- case 4: if(data_length[i] != 16) { error_latch = 1; } break;
- case 11:
- case 12:
- case 13:
- case 14:
- case 15:
- case 16:
- case 17:
- case 18:
- case 19: if(data_length[i] != 6) { error_latch = 1; } break;
- case 20: if(data_length[i] != 2) { error_latch = 1; } break;
- case 23:
- case 24:
- case 25:
- case 39:
- case 40:
- case 41:
- case 42:
- case 70:
- case 80:
- case 81: error_latch = 2; break;
- }
- if(
- ((ai_value[i] >= 100) && (ai_value[i] <= 179))
- || ((ai_value[i] >= 1000) && (ai_value[i] <= 1799))
- || ((ai_value[i] >= 200) && (ai_value[i] <= 229))
- || ((ai_value[i] >= 2000) && (ai_value[i] <= 2299))
- || ((ai_value[i] >= 300) && (ai_value[i] <= 309))
- || ((ai_value[i] >= 3000) && (ai_value[i] <= 3099))
- || ((ai_value[i] >= 31) && (ai_value[i] <= 36))
- || ((ai_value[i] >= 310) && (ai_value[i] <= 369))
- ) {
- error_latch = 2;
- }
- if((ai_value[i] >= 3100) && (ai_value[i] <= 3699)) {
- if(data_length[i] != 6) {
- error_latch = 1;
- }
- }
- if(
- ((ai_value[i] >= 370) && (ai_value[i] <= 379))
- || ((ai_value[i] >= 3700) && (ai_value[i] <= 3799))
- ) {
- error_latch = 2;
- }
- if((ai_value[i] >= 410) && (ai_value[i] <= 415)) {
- if(data_length[i] != 13) {
- error_latch = 1;
- }
- }
- if(
- ((ai_value[i] >= 4100) && (ai_value[i] <= 4199))
- || ((ai_value[i] >= 700) && (ai_value[i] <= 703))
- || ((ai_value[i] >= 800) && (ai_value[i] <= 810))
- || ((ai_value[i] >= 900) && (ai_value[i] <= 999))
- || ((ai_value[i] >= 9000) && (ai_value[i] <= 9999))
- ) {
- error_latch = 2;
- }
- if((error_latch < 4) && (error_latch > 0)) {
- /* error has just been detected: capture AI */
- itostr(ai_string, ai_value[i]);
- error_latch += 4;
- }
- }
-
- if(error_latch == 5) {
- strcpy(symbol->errtxt, "Invalid data length for AI ");
- concat(symbol->errtxt, ai_string);
- return ERROR_INVALID_DATA1;
- }
-
- if(error_latch == 6) {
- strcpy(symbol->errtxt, "Invalid AI value ");
- concat(symbol->errtxt, ai_string);
- return ERROR_INVALID_DATA1;
- }
-
- /* Resolve AI data - put resulting string in 'reduced' */
- j = 0;
- last_ai = 0;
- ai_latch = 1;
- for(i = 0; i < (int)src_len; i++) {
- if((source[i] != '[') && (source[i] != ']')) {
- reduced[j++] = source[i];
- }
- if(source[i] == '[') {
- /* Start of an AI string */
- if(ai_latch == 0) {
- reduced[j++] = '[';
- }
- ai_string[0] = source[i + 1];
- ai_string[1] = source[i + 2];
- ai_string[2] = '\0';
- last_ai = atoi(ai_string);
- ai_latch = 0;
- /* The following values from "GS-1 General Specification version 8.0 issue 2, May 2008"
- figure 5.4.8.2.1 - 1 "Element Strings with Pre-Defined Length Using Application Identifiers" */
- if(
- ((last_ai >= 0) && (last_ai <= 4))
- || ((last_ai >= 11) && (last_ai <= 20))
- || (last_ai == 23) /* legacy support - see 5.3.8.2.2 */
- || ((last_ai >= 31) && (last_ai <= 36))
- || (last_ai == 41)
- ) {
- ai_latch = 1;
- }
- }
- /* The ']' character is simply dropped from the input */
- }
- reduced[j] = '\0';
-
- /* the character '[' in the reduced string refers to the FNC1 character */
- return 0;
-}
-
-int ugs1_verify(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len, unsigned char reduced[])
-{
- /* Only to keep the compiler happy */
-#ifndef _MSC_VER
- char temp[src_len + 5];
-#else
- char* temp = (char*)_alloca(src_len + 5);
-#endif
- int error_number;
-
- error_number = gs1_verify(symbol, source, src_len, temp);
- if(error_number != 0) { return error_number; }
-
- if (strlen(temp) < src_len + 5) {
- ustrcpy(reduced, (unsigned char*)temp);
- return 0;
- }
- strcpy(symbol->errtxt, "ugs1_verify overflow");
- return ERROR_INVALID_DATA1;
-}
diff --git a/3rdparty/zint-2.4.4/backend/gs1.h b/3rdparty/zint-2.4.4/backend/gs1.h
deleted file mode 100644
index 42b40df..0000000
--- a/3rdparty/zint-2.4.4/backend/gs1.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/* gs1.h - Verifies GS1 data */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-#ifndef __GS1_H
-#define __GS1_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-extern int gs1_verify(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len, char reduced[]);
-extern int ugs1_verify(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len, unsigned char reduced[]);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __GS1_H */
\ No newline at end of file
diff --git a/3rdparty/zint-2.4.4/backend/imail.c b/3rdparty/zint-2.4.4/backend/imail.c
deleted file mode 100644
index 5094139..0000000
--- a/3rdparty/zint-2.4.4/backend/imail.c
+++ /dev/null
@@ -1,700 +0,0 @@
-/* imail.c - Handles Intelligent Mail (aka OneCode) for USPS */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-/* The function "USPS_MSB_Math_CRC11GenerateFrameCheckSequence"
- is Copyright (C) 2006 United States Postal Service */
-
-static short int BCD[40] = {
- 0, 0, 0, 0,
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 1, 1, 0, 0,
- 0, 0, 1, 0,
- 1, 0, 1, 0,
- 0, 1, 1, 0,
- 1, 1, 1, 0,
- 0, 0, 0, 1,
- 1, 0, 0, 1
-};
-
-#include
-#include
-#include
-#include "common.h"
-#include "large.h"
-
-#define SODIUM "0123456789-"
-
-/* The following lookup tables were generated using the code in Appendix C */
-
-static unsigned short AppxD_I[1287] = { /* Appendix D Table 1 - 5 of 13 characters */
- 0x001F, 0x1F00, 0x002F, 0x1E80, 0x0037, 0x1D80, 0x003B, 0x1B80, 0x003D, 0x1780,
- 0x003E, 0x0F80, 0x004F, 0x1E40, 0x0057, 0x1D40, 0x005B, 0x1B40, 0x005D, 0x1740,
- 0x005E, 0x0F40, 0x0067, 0x1CC0, 0x006B, 0x1AC0, 0x006D, 0x16C0, 0x006E, 0x0EC0,
- 0x0073, 0x19C0, 0x0075, 0x15C0, 0x0076, 0x0DC0, 0x0079, 0x13C0, 0x007A, 0x0BC0,
- 0x007C, 0x07C0, 0x008F, 0x1E20, 0x0097, 0x1D20, 0x009B, 0x1B20, 0x009D, 0x1720,
- 0x009E, 0x0F20, 0x00A7, 0x1CA0, 0x00AB, 0x1AA0, 0x00AD, 0x16A0, 0x00AE, 0x0EA0,
- 0x00B3, 0x19A0, 0x00B5, 0x15A0, 0x00B6, 0x0DA0, 0x00B9, 0x13A0, 0x00BA, 0x0BA0,
- 0x00BC, 0x07A0, 0x00C7, 0x1C60, 0x00CB, 0x1A60, 0x00CD, 0x1660, 0x00CE, 0x0E60,
- 0x00D3, 0x1960, 0x00D5, 0x1560, 0x00D6, 0x0D60, 0x00D9, 0x1360, 0x00DA, 0x0B60,
- 0x00DC, 0x0760, 0x00E3, 0x18E0, 0x00E5, 0x14E0, 0x00E6, 0x0CE0, 0x00E9, 0x12E0,
- 0x00EA, 0x0AE0, 0x00EC, 0x06E0, 0x00F1, 0x11E0, 0x00F2, 0x09E0, 0x00F4, 0x05E0,
- 0x00F8, 0x03E0, 0x010F, 0x1E10, 0x0117, 0x1D10, 0x011B, 0x1B10, 0x011D, 0x1710,
- 0x011E, 0x0F10, 0x0127, 0x1C90, 0x012B, 0x1A90, 0x012D, 0x1690, 0x012E, 0x0E90,
- 0x0133, 0x1990, 0x0135, 0x1590, 0x0136, 0x0D90, 0x0139, 0x1390, 0x013A, 0x0B90,
- 0x013C, 0x0790, 0x0147, 0x1C50, 0x014B, 0x1A50, 0x014D, 0x1650, 0x014E, 0x0E50,
- 0x0153, 0x1950, 0x0155, 0x1550, 0x0156, 0x0D50, 0x0159, 0x1350, 0x015A, 0x0B50,
- 0x015C, 0x0750, 0x0163, 0x18D0, 0x0165, 0x14D0, 0x0166, 0x0CD0, 0x0169, 0x12D0,
- 0x016A, 0x0AD0, 0x016C, 0x06D0, 0x0171, 0x11D0, 0x0172, 0x09D0, 0x0174, 0x05D0,
- 0x0178, 0x03D0, 0x0187, 0x1C30, 0x018B, 0x1A30, 0x018D, 0x1630, 0x018E, 0x0E30,
- 0x0193, 0x1930, 0x0195, 0x1530, 0x0196, 0x0D30, 0x0199, 0x1330, 0x019A, 0x0B30,
- 0x019C, 0x0730, 0x01A3, 0x18B0, 0x01A5, 0x14B0, 0x01A6, 0x0CB0, 0x01A9, 0x12B0,
- 0x01AA, 0x0AB0, 0x01AC, 0x06B0, 0x01B1, 0x11B0, 0x01B2, 0x09B0, 0x01B4, 0x05B0,
- 0x01B8, 0x03B0, 0x01C3, 0x1870, 0x01C5, 0x1470, 0x01C6, 0x0C70, 0x01C9, 0x1270,
- 0x01CA, 0x0A70, 0x01CC, 0x0670, 0x01D1, 0x1170, 0x01D2, 0x0970, 0x01D4, 0x0570,
- 0x01D8, 0x0370, 0x01E1, 0x10F0, 0x01E2, 0x08F0, 0x01E4, 0x04F0, 0x01E8, 0x02F0,
- 0x020F, 0x1E08, 0x0217, 0x1D08, 0x021B, 0x1B08, 0x021D, 0x1708, 0x021E, 0x0F08,
- 0x0227, 0x1C88, 0x022B, 0x1A88, 0x022D, 0x1688, 0x022E, 0x0E88, 0x0233, 0x1988,
- 0x0235, 0x1588, 0x0236, 0x0D88, 0x0239, 0x1388, 0x023A, 0x0B88, 0x023C, 0x0788,
- 0x0247, 0x1C48, 0x024B, 0x1A48, 0x024D, 0x1648, 0x024E, 0x0E48, 0x0253, 0x1948,
- 0x0255, 0x1548, 0x0256, 0x0D48, 0x0259, 0x1348, 0x025A, 0x0B48, 0x025C, 0x0748,
- 0x0263, 0x18C8, 0x0265, 0x14C8, 0x0266, 0x0CC8, 0x0269, 0x12C8, 0x026A, 0x0AC8,
- 0x026C, 0x06C8, 0x0271, 0x11C8, 0x0272, 0x09C8, 0x0274, 0x05C8, 0x0278, 0x03C8,
- 0x0287, 0x1C28, 0x028B, 0x1A28, 0x028D, 0x1628, 0x028E, 0x0E28, 0x0293, 0x1928,
- 0x0295, 0x1528, 0x0296, 0x0D28, 0x0299, 0x1328, 0x029A, 0x0B28, 0x029C, 0x0728,
- 0x02A3, 0x18A8, 0x02A5, 0x14A8, 0x02A6, 0x0CA8, 0x02A9, 0x12A8, 0x02AA, 0x0AA8,
- 0x02AC, 0x06A8, 0x02B1, 0x11A8, 0x02B2, 0x09A8, 0x02B4, 0x05A8, 0x02B8, 0x03A8,
- 0x02C3, 0x1868, 0x02C5, 0x1468, 0x02C6, 0x0C68, 0x02C9, 0x1268, 0x02CA, 0x0A68,
- 0x02CC, 0x0668, 0x02D1, 0x1168, 0x02D2, 0x0968, 0x02D4, 0x0568, 0x02D8, 0x0368,
- 0x02E1, 0x10E8, 0x02E2, 0x08E8, 0x02E4, 0x04E8, 0x0307, 0x1C18, 0x030B, 0x1A18,
- 0x030D, 0x1618, 0x030E, 0x0E18, 0x0313, 0x1918, 0x0315, 0x1518, 0x0316, 0x0D18,
- 0x0319, 0x1318, 0x031A, 0x0B18, 0x031C, 0x0718, 0x0323, 0x1898, 0x0325, 0x1498,
- 0x0326, 0x0C98, 0x0329, 0x1298, 0x032A, 0x0A98, 0x032C, 0x0698, 0x0331, 0x1198,
- 0x0332, 0x0998, 0x0334, 0x0598, 0x0338, 0x0398, 0x0343, 0x1858, 0x0345, 0x1458,
- 0x0346, 0x0C58, 0x0349, 0x1258, 0x034A, 0x0A58, 0x034C, 0x0658, 0x0351, 0x1158,
- 0x0352, 0x0958, 0x0354, 0x0558, 0x0361, 0x10D8, 0x0362, 0x08D8, 0x0364, 0x04D8,
- 0x0383, 0x1838, 0x0385, 0x1438, 0x0386, 0x0C38, 0x0389, 0x1238, 0x038A, 0x0A38,
- 0x038C, 0x0638, 0x0391, 0x1138, 0x0392, 0x0938, 0x0394, 0x0538, 0x03A1, 0x10B8,
- 0x03A2, 0x08B8, 0x03A4, 0x04B8, 0x03C1, 0x1078, 0x03C2, 0x0878, 0x03C4, 0x0478,
- 0x040F, 0x1E04, 0x0417, 0x1D04, 0x041B, 0x1B04, 0x041D, 0x1704, 0x041E, 0x0F04,
- 0x0427, 0x1C84, 0x042B, 0x1A84, 0x042D, 0x1684, 0x042E, 0x0E84, 0x0433, 0x1984,
- 0x0435, 0x1584, 0x0436, 0x0D84, 0x0439, 0x1384, 0x043A, 0x0B84, 0x043C, 0x0784,
- 0x0447, 0x1C44, 0x044B, 0x1A44, 0x044D, 0x1644, 0x044E, 0x0E44, 0x0453, 0x1944,
- 0x0455, 0x1544, 0x0456, 0x0D44, 0x0459, 0x1344, 0x045A, 0x0B44, 0x045C, 0x0744,
- 0x0463, 0x18C4, 0x0465, 0x14C4, 0x0466, 0x0CC4, 0x0469, 0x12C4, 0x046A, 0x0AC4,
- 0x046C, 0x06C4, 0x0471, 0x11C4, 0x0472, 0x09C4, 0x0474, 0x05C4, 0x0487, 0x1C24,
- 0x048B, 0x1A24, 0x048D, 0x1624, 0x048E, 0x0E24, 0x0493, 0x1924, 0x0495, 0x1524,
- 0x0496, 0x0D24, 0x0499, 0x1324, 0x049A, 0x0B24, 0x049C, 0x0724, 0x04A3, 0x18A4,
- 0x04A5, 0x14A4, 0x04A6, 0x0CA4, 0x04A9, 0x12A4, 0x04AA, 0x0AA4, 0x04AC, 0x06A4,
- 0x04B1, 0x11A4, 0x04B2, 0x09A4, 0x04B4, 0x05A4, 0x04C3, 0x1864, 0x04C5, 0x1464,
- 0x04C6, 0x0C64, 0x04C9, 0x1264, 0x04CA, 0x0A64, 0x04CC, 0x0664, 0x04D1, 0x1164,
- 0x04D2, 0x0964, 0x04D4, 0x0564, 0x04E1, 0x10E4, 0x04E2, 0x08E4, 0x0507, 0x1C14,
- 0x050B, 0x1A14, 0x050D, 0x1614, 0x050E, 0x0E14, 0x0513, 0x1914, 0x0515, 0x1514,
- 0x0516, 0x0D14, 0x0519, 0x1314, 0x051A, 0x0B14, 0x051C, 0x0714, 0x0523, 0x1894,
- 0x0525, 0x1494, 0x0526, 0x0C94, 0x0529, 0x1294, 0x052A, 0x0A94, 0x052C, 0x0694,
- 0x0531, 0x1194, 0x0532, 0x0994, 0x0534, 0x0594, 0x0543, 0x1854, 0x0545, 0x1454,
- 0x0546, 0x0C54, 0x0549, 0x1254, 0x054A, 0x0A54, 0x054C, 0x0654, 0x0551, 0x1154,
- 0x0552, 0x0954, 0x0561, 0x10D4, 0x0562, 0x08D4, 0x0583, 0x1834, 0x0585, 0x1434,
- 0x0586, 0x0C34, 0x0589, 0x1234, 0x058A, 0x0A34, 0x058C, 0x0634, 0x0591, 0x1134,
- 0x0592, 0x0934, 0x05A1, 0x10B4, 0x05A2, 0x08B4, 0x05C1, 0x1074, 0x05C2, 0x0874,
- 0x0607, 0x1C0C, 0x060B, 0x1A0C, 0x060D, 0x160C, 0x060E, 0x0E0C, 0x0613, 0x190C,
- 0x0615, 0x150C, 0x0616, 0x0D0C, 0x0619, 0x130C, 0x061A, 0x0B0C, 0x061C, 0x070C,
- 0x0623, 0x188C, 0x0625, 0x148C, 0x0626, 0x0C8C, 0x0629, 0x128C, 0x062A, 0x0A8C,
- 0x062C, 0x068C, 0x0631, 0x118C, 0x0632, 0x098C, 0x0643, 0x184C, 0x0645, 0x144C,
- 0x0646, 0x0C4C, 0x0649, 0x124C, 0x064A, 0x0A4C, 0x0651, 0x114C, 0x0652, 0x094C,
- 0x0661, 0x10CC, 0x0662, 0x08CC, 0x0683, 0x182C, 0x0685, 0x142C, 0x0686, 0x0C2C,
- 0x0689, 0x122C, 0x068A, 0x0A2C, 0x0691, 0x112C, 0x0692, 0x092C, 0x06A1, 0x10AC,
- 0x06A2, 0x08AC, 0x06C1, 0x106C, 0x06C2, 0x086C, 0x0703, 0x181C, 0x0705, 0x141C,
- 0x0706, 0x0C1C, 0x0709, 0x121C, 0x070A, 0x0A1C, 0x0711, 0x111C, 0x0712, 0x091C,
- 0x0721, 0x109C, 0x0722, 0x089C, 0x0741, 0x105C, 0x0742, 0x085C, 0x0781, 0x103C,
- 0x0782, 0x083C, 0x080F, 0x1E02, 0x0817, 0x1D02, 0x081B, 0x1B02, 0x081D, 0x1702,
- 0x081E, 0x0F02, 0x0827, 0x1C82, 0x082B, 0x1A82, 0x082D, 0x1682, 0x082E, 0x0E82,
- 0x0833, 0x1982, 0x0835, 0x1582, 0x0836, 0x0D82, 0x0839, 0x1382, 0x083A, 0x0B82,
- 0x0847, 0x1C42, 0x084B, 0x1A42, 0x084D, 0x1642, 0x084E, 0x0E42, 0x0853, 0x1942,
- 0x0855, 0x1542, 0x0856, 0x0D42, 0x0859, 0x1342, 0x085A, 0x0B42, 0x0863, 0x18C2,
- 0x0865, 0x14C2, 0x0866, 0x0CC2, 0x0869, 0x12C2, 0x086A, 0x0AC2, 0x0871, 0x11C2,
- 0x0872, 0x09C2, 0x0887, 0x1C22, 0x088B, 0x1A22, 0x088D, 0x1622, 0x088E, 0x0E22,
- 0x0893, 0x1922, 0x0895, 0x1522, 0x0896, 0x0D22, 0x0899, 0x1322, 0x089A, 0x0B22,
- 0x08A3, 0x18A2, 0x08A5, 0x14A2, 0x08A6, 0x0CA2, 0x08A9, 0x12A2, 0x08AA, 0x0AA2,
- 0x08B1, 0x11A2, 0x08B2, 0x09A2, 0x08C3, 0x1862, 0x08C5, 0x1462, 0x08C6, 0x0C62,
- 0x08C9, 0x1262, 0x08CA, 0x0A62, 0x08D1, 0x1162, 0x08D2, 0x0962, 0x08E1, 0x10E2,
- 0x0907, 0x1C12, 0x090B, 0x1A12, 0x090D, 0x1612, 0x090E, 0x0E12, 0x0913, 0x1912,
- 0x0915, 0x1512, 0x0916, 0x0D12, 0x0919, 0x1312, 0x091A, 0x0B12, 0x0923, 0x1892,
- 0x0925, 0x1492, 0x0926, 0x0C92, 0x0929, 0x1292, 0x092A, 0x0A92, 0x0931, 0x1192,
- 0x0932, 0x0992, 0x0943, 0x1852, 0x0945, 0x1452, 0x0946, 0x0C52, 0x0949, 0x1252,
- 0x094A, 0x0A52, 0x0951, 0x1152, 0x0961, 0x10D2, 0x0983, 0x1832, 0x0985, 0x1432,
- 0x0986, 0x0C32, 0x0989, 0x1232, 0x098A, 0x0A32, 0x0991, 0x1132, 0x09A1, 0x10B2,
- 0x09C1, 0x1072, 0x0A07, 0x1C0A, 0x0A0B, 0x1A0A, 0x0A0D, 0x160A, 0x0A0E, 0x0E0A,
- 0x0A13, 0x190A, 0x0A15, 0x150A, 0x0A16, 0x0D0A, 0x0A19, 0x130A, 0x0A1A, 0x0B0A,
- 0x0A23, 0x188A, 0x0A25, 0x148A, 0x0A26, 0x0C8A, 0x0A29, 0x128A, 0x0A2A, 0x0A8A,
- 0x0A31, 0x118A, 0x0A43, 0x184A, 0x0A45, 0x144A, 0x0A46, 0x0C4A, 0x0A49, 0x124A,
- 0x0A51, 0x114A, 0x0A61, 0x10CA, 0x0A83, 0x182A, 0x0A85, 0x142A, 0x0A86, 0x0C2A,
- 0x0A89, 0x122A, 0x0A91, 0x112A, 0x0AA1, 0x10AA, 0x0AC1, 0x106A, 0x0B03, 0x181A,
- 0x0B05, 0x141A, 0x0B06, 0x0C1A, 0x0B09, 0x121A, 0x0B11, 0x111A, 0x0B21, 0x109A,
- 0x0B41, 0x105A, 0x0B81, 0x103A, 0x0C07, 0x1C06, 0x0C0B, 0x1A06, 0x0C0D, 0x1606,
- 0x0C0E, 0x0E06, 0x0C13, 0x1906, 0x0C15, 0x1506, 0x0C16, 0x0D06, 0x0C19, 0x1306,
- 0x0C23, 0x1886, 0x0C25, 0x1486, 0x0C26, 0x0C86, 0x0C29, 0x1286, 0x0C31, 0x1186,
- 0x0C43, 0x1846, 0x0C45, 0x1446, 0x0C49, 0x1246, 0x0C51, 0x1146, 0x0C61, 0x10C6,
- 0x0C83, 0x1826, 0x0C85, 0x1426, 0x0C89, 0x1226, 0x0C91, 0x1126, 0x0CA1, 0x10A6,
- 0x0CC1, 0x1066, 0x0D03, 0x1816, 0x0D05, 0x1416, 0x0D09, 0x1216, 0x0D11, 0x1116,
- 0x0D21, 0x1096, 0x0D41, 0x1056, 0x0D81, 0x1036, 0x0E03, 0x180E, 0x0E05, 0x140E,
- 0x0E09, 0x120E, 0x0E11, 0x110E, 0x0E21, 0x108E, 0x0E41, 0x104E, 0x0E81, 0x102E,
- 0x0F01, 0x101E, 0x100F, 0x1E01, 0x1017, 0x1D01, 0x101B, 0x1B01, 0x101D, 0x1701,
- 0x1027, 0x1C81, 0x102B, 0x1A81, 0x102D, 0x1681, 0x1033, 0x1981, 0x1035, 0x1581,
- 0x1039, 0x1381, 0x1047, 0x1C41, 0x104B, 0x1A41, 0x104D, 0x1641, 0x1053, 0x1941,
- 0x1055, 0x1541, 0x1059, 0x1341, 0x1063, 0x18C1, 0x1065, 0x14C1, 0x1069, 0x12C1,
- 0x1071, 0x11C1, 0x1087, 0x1C21, 0x108B, 0x1A21, 0x108D, 0x1621, 0x1093, 0x1921,
- 0x1095, 0x1521, 0x1099, 0x1321, 0x10A3, 0x18A1, 0x10A5, 0x14A1, 0x10A9, 0x12A1,
- 0x10B1, 0x11A1, 0x10C3, 0x1861, 0x10C5, 0x1461, 0x10C9, 0x1261, 0x10D1, 0x1161,
- 0x1107, 0x1C11, 0x110B, 0x1A11, 0x110D, 0x1611, 0x1113, 0x1911, 0x1115, 0x1511,
- 0x1119, 0x1311, 0x1123, 0x1891, 0x1125, 0x1491, 0x1129, 0x1291, 0x1131, 0x1191,
- 0x1143, 0x1851, 0x1145, 0x1451, 0x1149, 0x1251, 0x1183, 0x1831, 0x1185, 0x1431,
- 0x1189, 0x1231, 0x1207, 0x1C09, 0x120B, 0x1A09, 0x120D, 0x1609, 0x1213, 0x1909,
- 0x1215, 0x1509, 0x1219, 0x1309, 0x1223, 0x1889, 0x1225, 0x1489, 0x1229, 0x1289,
- 0x1243, 0x1849, 0x1245, 0x1449, 0x1283, 0x1829, 0x1285, 0x1429, 0x1303, 0x1819,
- 0x1305, 0x1419, 0x1407, 0x1C05, 0x140B, 0x1A05, 0x140D, 0x1605, 0x1413, 0x1905,
- 0x1415, 0x1505, 0x1423, 0x1885, 0x1425, 0x1485, 0x1443, 0x1845, 0x1483, 0x1825,
- 0x1503, 0x1815, 0x1603, 0x180D, 0x1807, 0x1C03, 0x180B, 0x1A03, 0x1813, 0x1903,
- 0x1823, 0x1883, 0x1843, 0x1445, 0x1249, 0x1151, 0x10E1, 0x0C46, 0x0A4A, 0x0952,
- 0x08E2, 0x064C, 0x0554, 0x04E4, 0x0358, 0x02E8, 0x01F0 };
-
-static unsigned short AppxD_II[78] = { /* Appendix D Table II - 2 of 13 characters */
- 0x0003, 0x1800, 0x0005, 0x1400, 0x0006, 0x0C00, 0x0009, 0x1200, 0x000A, 0x0A00,
- 0x000C, 0x0600, 0x0011, 0x1100, 0x0012, 0x0900, 0x0014, 0x0500, 0x0018, 0x0300,
- 0x0021, 0x1080, 0x0022, 0x0880, 0x0024, 0x0480, 0x0028, 0x0280, 0x0030, 0x0180,
- 0x0041, 0x1040, 0x0042, 0x0840, 0x0044, 0x0440, 0x0048, 0x0240, 0x0050, 0x0140,
- 0x0060, 0x00C0, 0x0081, 0x1020, 0x0082, 0x0820, 0x0084, 0x0420, 0x0088, 0x0220,
- 0x0090, 0x0120, 0x0101, 0x1010, 0x0102, 0x0810, 0x0104, 0x0410, 0x0108, 0x0210,
- 0x0201, 0x1008, 0x0202, 0x0808, 0x0204, 0x0408, 0x0401, 0x1004, 0x0402, 0x0804,
- 0x0801, 0x1002, 0x1001, 0x0802, 0x0404, 0x0208, 0x0110, 0x00A0 };
-
-static int AppxD_IV[130] = { /* Appendix D Table IV - Bar-to-Character Mapping (reverse lookup) */
- 67, 6, 78, 16, 86, 95, 34, 40, 45, 113, 117, 121, 62, 87, 18, 104, 41, 76, 57, 119, 115, 72, 97,
- 2, 127, 26, 105, 35, 122, 52, 114, 7, 24, 82, 68, 63, 94, 44, 77, 112, 70, 100, 39, 30, 107,
- 15, 125, 85, 10, 65, 54, 88, 20, 106, 46, 66, 8, 116, 29, 61, 99, 80, 90, 37, 123, 51, 25, 84,
- 129, 56, 4, 109, 96, 28, 36, 47, 11, 71, 33, 102, 21, 9, 17, 49, 124, 79, 64, 91, 42, 69, 53,
- 60, 14, 1, 27, 103, 126, 75, 89, 50, 120, 19, 32, 110, 92, 111, 130, 59, 31, 12, 81, 43, 55,
- 5, 74, 22, 101, 128, 58, 118, 48, 108, 38, 98, 93, 23, 83, 13, 73, 3 };
-
-/***************************************************************************
- ** USPS_MSB_Math_CRC11GenerateFrameCheckSequence
- **
- ** Inputs:
- ** ByteAttayPtr is the address of a 13 byte array holding 102 bytes which
- ** are right justified - ie: the leftmost 2 bits of the first byte do not
- ** hold data and must be set to zero.
- **
- ** Outputs:
- ** return unsigned short - 11 bit Frame Check Sequence (right justified)
-***************************************************************************/
-extern unsigned short
- USPS_MSB_Math_CRC11GenerateFrameCheckSequence( unsigned char *ByteArrayPtr )
-
-{
- unsigned short GeneratorPolynomial = 0x0F35;
- unsigned short FrameCheckSequence = 0x07FF;
- unsigned short Data;
- int ByteIndex, Bit;
-
- /* Do most significant byte skipping the 2 most significant bits */
- Data = *ByteArrayPtr << 5;
- ByteArrayPtr++;
- for ( Bit = 2; Bit < 8; Bit++ )
- {
- if ( (FrameCheckSequence ^ Data) & 0x400 )
- FrameCheckSequence = (FrameCheckSequence << 1) ^ GeneratorPolynomial;
- else
- FrameCheckSequence = (FrameCheckSequence << 1);
- FrameCheckSequence &= 0x7FF;
- Data <<= 1;
- }
- /* Do rest of the bytes */
- for ( ByteIndex = 1; ByteIndex < 13; ByteIndex++ )
- {
- Data = *ByteArrayPtr << 3;
- ByteArrayPtr++;
- for ( Bit = 0; Bit < 8; Bit++ )
- {
- if ( (FrameCheckSequence ^ Data) & 0x0400 ) {
- FrameCheckSequence = (FrameCheckSequence << 1) ^ GeneratorPolynomial;
- } else {
- FrameCheckSequence = (FrameCheckSequence << 1);
- }
- FrameCheckSequence &= 0x7FF;
- Data <<= 1;
- }
- }
- return FrameCheckSequence;
-}
-
-void breakup(short int fcs_bit[], unsigned short usps_crc)
-{
- int i;
-
- for(i = 0; i < 13; i++) {
- fcs_bit[i] = 0;
- }
-
- if(usps_crc >= 4096) {
- fcs_bit[12] = 1;
- usps_crc -= 4096;
- }
- if(usps_crc >= 2048) {
- fcs_bit[11] = 1;
- usps_crc -= 2048;
- }
- if(usps_crc >= 1024) {
- fcs_bit[10] = 1;
- usps_crc -= 1024;
- }
- if(usps_crc >= 512) {
- fcs_bit[9] = 1;
- usps_crc -= 512;
- }
- if(usps_crc >= 256) {
- fcs_bit[8] = 1;
- usps_crc -= 256;
- }
- if(usps_crc >= 128) {
- fcs_bit[7] = 1;
- usps_crc -= 128;
- }
- if(usps_crc >= 64) {
- fcs_bit[6] = 1;
- usps_crc -= 64;
- }
- if(usps_crc >= 32) {
- fcs_bit[5] = 1;
- usps_crc -= 32;
- }
- if(usps_crc >= 16) {
- fcs_bit[4] = 1;
- usps_crc -= 16;
- }
- if(usps_crc >= 8) {
- fcs_bit[3] = 1;
- usps_crc -= 8;
- }
- if(usps_crc >= 4) {
- fcs_bit[2] = 1;
- usps_crc -= 4;
- }
- if(usps_crc >= 2) {
- fcs_bit[1] = 1;
- usps_crc -= 2;
- }
- if(usps_crc == 1) {
- fcs_bit[0] = 1;
- }
-}
-
-int imail(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- char data_pattern[200];
- int error_number;
- int i, j, read;
- char zip[35], tracker[35], zip_adder[11], temp[2];
- short int accum[112], x_reg[112], y_reg[112];
- unsigned char byte_array[13];
- unsigned short usps_crc;
- int codeword[10];
- unsigned short characters[10];
- short int bit_pattern[13], bar_map[130];
-
- error_number = 0;
-
- if(length > 32) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(SODIUM, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- strcpy(zip, "");
- strcpy(tracker, "");
-
- /* separate the tracking code from the routing code */
-
- read = 0;
- j = 0;
- for(i = 0; i < length; i++) {
- if(source[i] == '-') {
- tracker[read] = '\0';
- j = 1;
- read = 0;
- } else {
- if(j == 0) {
- /* reading tracker */
- tracker[read] = source[i];
- read++;
- } else {
- /* reading zip code */
- zip[read] = source[i];
- read++;
- }
- }
- }
- if(j == 0) {
- tracker[read] = '\0';
- } else {
- zip[read] = '\0';
- }
-
- if(strlen(tracker) != 20) {
- strcpy(symbol->errtxt, "Invalid length tracking code");
- return ERROR_INVALID_DATA1;
- }
- if(strlen(zip) > 11) {
- strcpy(symbol->errtxt, "Invalid ZIP code");
- return ERROR_INVALID_DATA1;
- }
-
- /* *** Step 1 - Conversion of Data Fields into Binary Data *** */
-
- /* Routing code first */
-
- for(i = 0; i < 112; i++) {
- accum[i] = 0;
- }
-
- for(read = 0; read < strlen(zip); read++) {
-
- for(i = 0; i < 112; i++) {
- x_reg[i] = accum[i];
- }
-
- for(i = 0; i < 9; i++) {
- binary_add(accum, x_reg);
- }
-
- x_reg[0] = BCD[ctoi(zip[read]) * 4];
- x_reg[1] = BCD[(ctoi(zip[read]) * 4) + 1];
- x_reg[2] = BCD[(ctoi(zip[read]) * 4) + 2];
- x_reg[3] = BCD[(ctoi(zip[read]) * 4) + 3];
- for(i = 4; i < 112; i++) {
- x_reg[i] = 0;
- }
-
- binary_add(accum, x_reg);
- }
-
- /* add weight to routing code */
-
- for(i = 0; i < 112; i++) {
- x_reg[i] = accum[i];
- }
-
- if(strlen(zip) > 9) {
- strcpy(zip_adder, "1000100001");
- } else {
- if(strlen(zip) > 5) {
- strcpy(zip_adder, "100001");
- } else {
- if(strlen(zip) > 0) {
- strcpy(zip_adder, "1");
- } else {
- strcpy(zip_adder, "0");
- }
- }
- }
-
- for(i = 0; i < 112; i++) {
- accum[i] = 0;
- }
-
- for(read = 0; read < strlen(zip_adder); read++) {
-
- for(i = 0; i < 112; i++) {
- y_reg[i] = accum[i];
- }
-
- for(i = 0; i < 9; i++) {
- binary_add(accum, y_reg);
- }
-
- y_reg[0] = BCD[ctoi(zip_adder[read]) * 4];
- y_reg[1] = BCD[(ctoi(zip_adder[read]) * 4) + 1];
- y_reg[2] = BCD[(ctoi(zip_adder[read]) * 4) + 2];
- y_reg[3] = BCD[(ctoi(zip_adder[read]) * 4) + 3];
- for(i = 4; i < 112; i++) {
- y_reg[i] = 0;
- }
-
- binary_add(accum, y_reg);
- }
-
- binary_add(accum, x_reg);
-
- /* tracking code */
-
- /* multiply by 10 */
- for(i = 0; i < 112; i++) {
- y_reg[i] = accum[i];
- }
-
- for(i = 0; i < 9; i++) {
- binary_add(accum, y_reg);
- }
-
- /* add first digit of tracker */
- y_reg[0] = BCD[ctoi(tracker[0]) * 4];
- y_reg[1] = BCD[(ctoi(tracker[0]) * 4) + 1];
- y_reg[2] = BCD[(ctoi(tracker[0]) * 4) + 2];
- y_reg[3] = BCD[(ctoi(tracker[0]) * 4) + 3];
- for(i = 4; i < 112; i++) {
- y_reg[i] = 0;
- }
-
- binary_add(accum, y_reg);
-
- /* multiply by 5 */
- for(i = 0; i < 112; i++) {
- y_reg[i] = accum[i];
- }
-
- for(i = 0; i < 4; i++) {
- binary_add(accum, y_reg);
- }
-
- /* add second digit */
- y_reg[0] = BCD[ctoi(tracker[1]) * 4];
- y_reg[1] = BCD[(ctoi(tracker[1]) * 4) + 1];
- y_reg[2] = BCD[(ctoi(tracker[1]) * 4) + 2];
- y_reg[3] = BCD[(ctoi(tracker[1]) * 4) + 3];
- for(i = 4; i < 112; i++) {
- y_reg[i] = 0;
- }
-
- binary_add(accum, y_reg);
-
- /* and then the rest */
-
- for(read = 2; read < strlen(tracker); read++) {
-
- for(i = 0; i < 112; i++) {
- y_reg[i] = accum[i];
- }
-
- for(i = 0; i < 9; i++) {
- binary_add(accum, y_reg);
- }
-
- y_reg[0] = BCD[ctoi(tracker[read]) * 4];
- y_reg[1] = BCD[(ctoi(tracker[read]) * 4) + 1];
- y_reg[2] = BCD[(ctoi(tracker[read]) * 4) + 2];
- y_reg[3] = BCD[(ctoi(tracker[read]) * 4) + 3];
- for(i = 4; i < 112; i++) {
- y_reg[i] = 0;
- }
-
- binary_add(accum, y_reg);
- }
-
- /* printf("Binary data 1: ");
- hex_dump(accum); */
-
- /* *** Step 2 - Generation of 11-bit CRC on Binary Data *** */
-
- accum[103] = 0;
- accum[102] = 0;
-
- memset(byte_array, 0, 13);
- for(j = 0; j < 13; j++) {
- i = 96 - (8 * j);
- byte_array[j] = 0;
- byte_array[j] += accum[i];
- byte_array[j] += 2 * accum[i + 1];
- byte_array[j] += 4 * accum[i + 2];
- byte_array[j] += 8 * accum[i + 3];
- byte_array[j] += 16 * accum[i + 4];
- byte_array[j] += 32 * accum[i + 5];
- byte_array[j] += 64 * accum[i + 6];
- byte_array[j] += 128 * accum[i + 7];
- }
-
- usps_crc = USPS_MSB_Math_CRC11GenerateFrameCheckSequence(byte_array);
- /* printf("FCS 2: %4.4X\n", usps_crc); */
-
- /* *** Step 3 - Conversion from Binary Data to Codewords *** */
-
- /* start with codeword J which is base 636 */
- for(i = 0; i < 112; i++) {
- x_reg[i] = 0;
- y_reg[i] = 0;
- }
-
- x_reg[101] = 1;
- x_reg[98] = 1;
- x_reg[97] = 1;
- x_reg[96] = 1;
- x_reg[95] = 1;
- x_reg[94] = 1;
-
- for(i = 92; i >= 0; i--) {
- y_reg[i] = islarger(accum, x_reg);
- if(y_reg[i] == 1) {
- binary_subtract(accum, x_reg);
- }
- shiftdown(x_reg);
- }
-
- codeword[9] = (accum[9] * 512) + (accum[8] * 256) + (accum[7] * 128) + (accum[6] * 64) +
- (accum[5] * 32) + (accum[4] * 16) + (accum[3] * 8) + (accum[2] * 4) +
- (accum[1] * 2) + accum[0];
-
- /* then codewords I to B with base 1365 */
-
- for(j = 8; j > 0; j--) {
- for(i = 0; i < 112; i++) {
- accum[i] = y_reg[i];
- y_reg[i] = 0;
- x_reg[i] = 0;
- }
- x_reg[101] = 1;
- x_reg[99] = 1;
- x_reg[97] = 1;
- x_reg[95] = 1;
- x_reg[93] = 1;
- x_reg[91] = 1;
- for(i = 91; i >= 0; i--) {
- y_reg[i] = islarger(accum, x_reg);
- if(y_reg[i] == 1) {
- binary_subtract(accum, x_reg);
- }
- shiftdown(x_reg);
- }
-
- codeword[j] = (accum[10] * 1024) + (accum[9] * 512) + (accum[8] * 256) +
- (accum[7] * 128) + (accum[6] * 64) + (accum[5] * 32) +
- (accum[4] * 16) + (accum[3] * 8) + (accum[2] * 4) +
- (accum[1] * 2) + accum[0];
- }
-
- codeword[0] = (y_reg[10] * 1024) + (y_reg[9] * 512) + (y_reg[8] * 256) +
- (y_reg[7] * 128) + (y_reg[6] * 64) + (y_reg[5] * 32) +
- (y_reg[4] * 16) + (y_reg[3] * 8) + (y_reg[2] * 4) +
- (y_reg[1] * 2) + y_reg[0];
-
- for(i = 0; i < 8; i++) {
- if(codeword[i] == 1365) {
- codeword[i] = 0;
- codeword[i + 1]++;
- }
- }
-
- /* printf("Codewords 3: ");
- for(i = 0; i < 10; i++) {
- printf("%d ", codeword[i]);
- }
- printf("\n"); */
-
- /* *** Step 4 - Inserting Additional Information into Codewords *** */
-
- codeword[9] = codeword[9] * 2;
-
- if(usps_crc >= 1024) {
- codeword[0] += 659;
- }
-
- /* printf("Codewords 4b: ");
- for(i = 0; i < 10; i++) {
- printf("%d ", codeword[i]);
- }
- printf("\n"); */
-
- /* *** Step 5 - Conversion from Codewords to Characters *** */
-
- for(i = 0; i < 10; i++) {
- if(codeword[i] < 1287) {
- characters[i] = AppxD_I[codeword[i]];
- } else {
- characters[i] = AppxD_II[codeword[i] - 1287];
- }
- }
-
- /* printf("Characters 5a: ");
- for(i = 0; i < 10; i++) {
- printf("%4.4X ", characters[i]);
- }
- printf("\n"); */
-
- breakup(bit_pattern, usps_crc);
-
- for(i = 0; i < 10; i++) {
- if(bit_pattern[i] == 1) {
- characters[i] = 0x1FFF - characters[i];
- }
- }
-
- /* printf("Characters 5b: ");
- for(i = 0; i < 10; i++) {
- printf("%4.4X ", characters[i]);
- }
- printf("\n"); */
-
- /* *** Step 6 - Conversion from Characters to the Intelligent Mail Barcode *** */
-
- for(i = 0; i < 10; i++) {
- breakup(bit_pattern, characters[i]);
- for(j = 0; j < 13; j++) {
- bar_map[AppxD_IV[(13 * i) + j] - 1] = bit_pattern[j];
- }
- }
-
- strcpy(data_pattern, "");
- temp[1] = '\0';
- for(i = 0; i < 65; i++) {
- j = 0;
- if(bar_map[i] == 0)
- j += 1;
- if(bar_map[i + 65] == 0)
- j += 2;
- temp[0] = itoc(j);
- concat(data_pattern, temp);
- }
-
- /* Translate 4-state data pattern to symbol */
- read = 0;
- for(i = 0; i < strlen(data_pattern); i++)
- {
- if((data_pattern[i] == '1') || (data_pattern[i] == '0'))
- {
- set_module(symbol, 0, read);
- }
- set_module(symbol, 1, read);
- if((data_pattern[i] == '2') || (data_pattern[i] == '0'))
- {
- set_module(symbol, 2, read);
- }
- read += 2;
- }
-
- symbol->row_height[0] = 3;
- symbol->row_height[1] = 2;
- symbol->row_height[2] = 3;
-
- symbol->rows = 3;
- symbol->width = read - 1;
- return error_number;
-}
diff --git a/3rdparty/zint-2.4.4/backend/large.c b/3rdparty/zint-2.4.4/backend/large.c
deleted file mode 100644
index e3f0453..0000000
--- a/3rdparty/zint-2.4.4/backend/large.c
+++ /dev/null
@@ -1,227 +0,0 @@
-/* large.c - Handles binary manipulation of large numbers */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include
-#include
-#include "common.h"
-#include "large.h"
-
-static short int BCD[40] = {
- 0, 0, 0, 0,
- 1, 0, 0, 0,
- 0, 1, 0, 0,
- 1, 1, 0, 0,
- 0, 0, 1, 0,
- 1, 0, 1, 0,
- 0, 1, 1, 0,
- 1, 1, 1, 0,
- 0, 0, 0, 1,
- 1, 0, 0, 1 };
-
-void binary_add(short int accumulator[], short int input_buffer[])
-{ /* Binary addition */
- int i, carry, done;
- carry = 0;
-
- for(i = 0; i < 112; i++) {
- done = 0;
- if(((input_buffer[i] == 0) && (accumulator[i] == 0)) && ((carry == 0) && (done == 0))) {
- accumulator[i] = 0;
- carry = 0;
- done = 1;
- }
- if(((input_buffer[i] == 0) && (accumulator[i] == 0)) && ((carry == 1) && (done == 0))) {
- accumulator[i] = 1;
- carry = 0;
- done = 1;
- }
- if(((input_buffer[i] == 0) && (accumulator[i] == 1)) && ((carry == 0) && (done == 0))) {
- accumulator[i] = 1;
- carry = 0;
- done = 1;
- }
- if(((input_buffer[i] == 0) && (accumulator[i] == 1)) && ((carry == 1) && (done == 0))) {
- accumulator[i] = 0;
- carry = 1;
- done = 1;
- }
- if(((input_buffer[i] == 1) && (accumulator[i] == 0)) && ((carry == 0) && (done == 0))) {
- accumulator[i] = 1;
- carry = 0;
- done = 1;
- }
- if(((input_buffer[i] == 1) && (accumulator[i] == 0)) && ((carry == 1) && (done == 0))) {
- accumulator[i] = 0;
- carry = 1;
- done = 1;
- }
- if(((input_buffer[i] == 1) && (accumulator[i] == 1)) && ((carry == 0) && (done == 0))) {
- accumulator[i] = 0;
- carry = 1;
- done = 1;
- }
- if(((input_buffer[i] == 1) && (accumulator[i] == 1)) && ((carry == 1) && (done == 0))) {
- accumulator[i] = 1;
- carry = 1;
- done = 1;
- }
- }
-}
-
-void binary_subtract(short int accumulator[], short int input_buffer[])
-{ /* 2's compliment subtraction */
- /* take input_buffer from accumulator and put answer in accumulator */
- int i;
- short int sub_buffer[112];
-
- for(i = 0; i < 112; i++) {
- if(input_buffer[i] == 0) {
- sub_buffer[i] = 1;
- } else {
- sub_buffer[i] = 0;
- }
- }
- binary_add(accumulator, sub_buffer);
-
- sub_buffer[0] = 1;
-
- for(i = 1; i < 112; i++) {
- sub_buffer[i] = 0;
- }
- binary_add(accumulator, sub_buffer);
-}
-
-void shiftdown(short int buffer[])
-{
- int i;
-
- buffer[102] = 0;
- buffer[103] = 0;
-
- for(i = 0; i < 102; i++) {
- buffer[i] = buffer[i + 1];
- }
-}
-
-void shiftup(short int buffer[])
-{
- int i;
-
- for(i = 102; i > 0; i--) {
- buffer[i] = buffer[i - 1];
- }
-
- buffer[0] = 0;
-}
-
-short int islarger(short int accum[], short int reg[])
-{
- /* Returns 1 if accum[] is larger than reg[], else 0 */
- int i, latch, larger;
- latch = 0;
- i = 103;
- larger = 0;
-
-
- do {
- if((accum[i] == 1) && (reg[i] == 0)) {
- latch = 1;
- larger = 1;
- }
- if((accum[i] == 0) && (reg[i] == 1)) {
- latch = 1;
- }
- i--;
- } while ((latch == 0) && (i >= -1));
-
- return larger;
-}
-
-void binary_load(short int reg[], char data[], const unsigned int src_len)
-{
- int read, i;
- short int temp[112] = { 0 };
-
- for(i = 0; i < 112; i++) {
- reg[i] = 0;
- }
-
- for(read = 0; read < (int)src_len; read++) {
-
- for(i = 0; i < 112; i++) {
- temp[i] = reg[i];
- }
-
- for(i = 0; i < 9; i++) {
- binary_add(reg, temp);
- }
-
- temp[0] = BCD[ctoi(data[read]) * 4];
- temp[1] = BCD[(ctoi(data[read]) * 4) + 1];
- temp[2] = BCD[(ctoi(data[read]) * 4) + 2];
- temp[3] = BCD[(ctoi(data[read]) * 4) + 3];
- for(i = 4; i < 112; i++) {
- temp[i] = 0;
- }
-
- binary_add(reg, temp);
- }
-}
-
-void hex_dump(short int input_buffer[])
-{
- int i, digit, byte_space;
-
- byte_space = 1;
- for(i = 100; i >= 0; i-=4) {
- digit = 0;
- digit += 1 * input_buffer[i];
- digit += 2 * input_buffer[i + 1];
- digit += 4 * input_buffer[i + 2];
- digit += 8 * input_buffer[i + 3];
-
- switch(digit) {
- case 0: printf("0"); break;
- case 1: printf("1"); break;
- case 2: printf("2"); break;
- case 3: printf("3"); break;
- case 4: printf("4"); break;
- case 5: printf("5"); break;
- case 6: printf("6"); break;
- case 7: printf("7"); break;
- case 8: printf("8"); break;
- case 9: printf("9"); break;
- case 10: printf("A"); break;
- case 11: printf("B"); break;
- case 12: printf("C"); break;
- case 13: printf("D"); break;
- case 14: printf("E"); break;
- case 15: printf("F"); break;
- }
- if(byte_space == 1) {
- byte_space = 0;
- } else {
- byte_space = 1;
- printf(" ");
- }
- }
- printf("\n");
-}
diff --git a/3rdparty/zint-2.4.4/backend/large.h b/3rdparty/zint-2.4.4/backend/large.h
deleted file mode 100644
index 72076b0..0000000
--- a/3rdparty/zint-2.4.4/backend/large.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* large.h - Handles binary manipulation of large numbers */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-#ifndef __LARGE_H
-#define __LARGE_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif /* __cplusplus */
-
-extern void binary_load(short int reg[], char data[], const unsigned int src_len);
-extern void binary_add(short int accumulator[], short int input_buffer[]);
-extern void binary_subtract(short int accumulator[], short int input_buffer[]);
-extern void shiftdown(short int buffer[]);
-extern void shiftup(short int buffer[]);
-extern short int islarger(short int accum[], short int reg[]);
-extern void hex_dump(short int input_buffer[]);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __LARGE_H */
diff --git a/3rdparty/zint-2.4.4/backend/library.c b/3rdparty/zint-2.4.4/backend/library.c
deleted file mode 100644
index f769a46..0000000
--- a/3rdparty/zint-2.4.4/backend/library.c
+++ /dev/null
@@ -1,908 +0,0 @@
-/* library.c - external functions of libzint
-
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include
-#include
-#include
-#include
-#ifdef _MSC_VER
-#include
-#endif
-#include "common.h"
-#include "gs1.h"
-
-#define TECHNETIUM "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ-. $/+%"
-
-struct zint_symbol *ZBarcode_Create()
-{
- struct zint_symbol *symbol;
- int i;
-
- symbol = (struct zint_symbol*)malloc(sizeof(*symbol));
- if (!symbol) return NULL;
-
- memset(symbol, 0, sizeof(*symbol));
- symbol->symbology = BARCODE_CODE128;
- symbol->height = 0;
- symbol->whitespace_width = 0;
- symbol->border_width = 0;
- symbol->output_options = 0;
- symbol->rows = 0;
- symbol->width = 0;
- strcpy(symbol->fgcolour, "000000");
- strcpy(symbol->bgcolour, "ffffff");
- strcpy(symbol->outfile, "");
- symbol->scale = 1.0;
- symbol->option_1 = -1;
- symbol->option_2 = 0;
- symbol->option_3 = 928; // PDF_MAX
- symbol->show_hrt = 1; // Show human readable text
- symbol->input_mode = DATA_MODE;
- strcpy(symbol->primary, "");
- memset(&(symbol->encoded_data[0][0]),0,sizeof(symbol->encoded_data));
- for(i = 0; i < 178; i++) {
- symbol->row_height[i] = 0;
- }
- symbol->bitmap = NULL;
- symbol->bitmap_width = 0;
- symbol->bitmap_height = 0;
- return symbol;
-}
-
-void ZBarcode_Clear(struct zint_symbol *symbol)
-{
- int i, j;
-
- for(i = 0; i < symbol->rows; i++) {
- for(j = 0; j < symbol->width; j++) {
- unset_module(symbol, i, j);
- }
- }
- symbol->rows = 0;
- symbol->width = 0;
- symbol->text[0] = '\0';
- symbol->errtxt[0] = '\0';
- if (symbol->bitmap != NULL)
- free(symbol->bitmap);
- symbol->bitmap = NULL;
- symbol->bitmap_width = 0;
- symbol->bitmap_height = 0;
-}
-
-void ZBarcode_Delete(struct zint_symbol *symbol)
-{
- if (symbol->bitmap != NULL)
- free(symbol->bitmap);
-
- // If there is a rendered version, ensure it's memory is released
- if (symbol->rendered != NULL) {
- struct zint_render_line *line, *l;
- struct zint_render_string *string, *s;
-
- // Free lines
- line = symbol->rendered->lines;
- while(line) {
- l = line;
- line = line->next;
- free(l);
- }
- // Free Strings
- string = symbol->rendered->strings;
- while (string) {
- s = string;
- string = string->next;
- free(s->text);
- free(s);
- }
-
- // Free Render
- free(symbol->rendered);
- }
- free(symbol);
-}
-
-extern int eanx(struct zint_symbol *symbol, unsigned char source[], int length); /* EAN system barcodes */
-extern int c39(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 3 from 9 (or Code 39) */
-extern int pharmazentral(struct zint_symbol *symbol, unsigned char source[], int length); /* Pharmazentral Nummer (PZN) */
-extern int ec39(struct zint_symbol *symbol, unsigned char source[], int length); /* Extended Code 3 from 9 (or Code 39+) */
-extern int codabar(struct zint_symbol *symbol, unsigned char source[], int length); /* Codabar - a simple substitution cipher */
-extern int matrix_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 2 of 5 Standard (& Matrix) */
-extern int industrial_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 2 of 5 Industrial */
-extern int iata_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 2 of 5 IATA */
-extern int interleaved_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 2 of 5 Interleaved */
-extern int logic_two_of_five(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 2 of 5 Data Logic */
-extern int itf14(struct zint_symbol *symbol, unsigned char source[], int length); /* ITF-14 */
-extern int dpleit(struct zint_symbol *symbol, unsigned char source[], int length); /* Deutsche Post Leitcode */
-extern int dpident(struct zint_symbol *symbol, unsigned char source[], int length); /* Deutsche Post Identcode */
-extern int c93(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 93 - a re-working of Code 39+, generates 2 check digits */
-extern int code_128(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 128 and NVE-18 */
-extern int ean_128(struct zint_symbol *symbol, unsigned char source[], int length); /* EAN-128 (GS1-128) */
-extern int code_11(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 11 */
-extern int msi_handle(struct zint_symbol *symbol, unsigned char source[], int length); /* MSI Plessey */
-extern int telepen(struct zint_symbol *symbol, unsigned char source[], int length); /* Telepen ASCII */
-extern int telepen_num(struct zint_symbol *symbol, unsigned char source[], int length); /* Telepen Numeric */
-extern int plessey(struct zint_symbol *symbol, unsigned char source[], int length); /* Plessey Code */
-extern int pharma_one(struct zint_symbol *symbol, unsigned char source[], int length); /* Pharmacode One Track */
-extern int flattermarken(struct zint_symbol *symbol, unsigned char source[], int length); /* Flattermarken */
-extern int fim(struct zint_symbol *symbol, unsigned char source[], int length); /* Facing Identification Mark */
-extern int pharma_two(struct zint_symbol *symbol, unsigned char source[], int length); /* Pharmacode Two Track */
-extern int post_plot(struct zint_symbol *symbol, unsigned char source[], int length); /* Postnet */
-extern int planet_plot(struct zint_symbol *symbol, unsigned char source[], int length); /* PLANET */
-extern int imail(struct zint_symbol *symbol, unsigned char source[], int length); /* Intelligent Mail (aka USPS OneCode) */
-extern int royal_plot(struct zint_symbol *symbol, unsigned char source[], int length); /* RM4SCC */
-extern int australia_post(struct zint_symbol *symbol, unsigned char source[], int length); /* Australia Post 4-state */
-extern int code16k(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 16k */
-extern int pdf417enc(struct zint_symbol *symbol, unsigned char source[], int length); /* PDF417 */
-extern int dmatrix(struct zint_symbol *symbol, unsigned char source[], int length); /* Data Matrix (IEC16022) */
-extern int qr_code(struct zint_symbol *symbol, unsigned char source[], int length); /* QR Code */
-extern int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], int length); /* Micro PDF417 */
-extern int maxicode(struct zint_symbol *symbol, unsigned char source[], int length); /* Maxicode */
-extern int rss14(struct zint_symbol *symbol, unsigned char source[], int length); /* RSS-14 */
-extern int rsslimited(struct zint_symbol *symbol, unsigned char source[], int length); /* RSS Limited */
-extern int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int length); /* RSS Expanded */
-extern int composite(struct zint_symbol *symbol, unsigned char source[], int length); /* Composite Symbology */
-extern int kix_code(struct zint_symbol *symbol, unsigned char source[], int length); /* TNT KIX Code */
-extern int aztec(struct zint_symbol *symbol, unsigned char source[], int length); /* Aztec Code */
-extern int code32(struct zint_symbol *symbol, unsigned char source[], int length); /* Italian Pharmacode */
-extern int daft_code(struct zint_symbol *symbol, unsigned char source[], int length); /* DAFT Code */
-extern int ean_14(struct zint_symbol *symbol, unsigned char source[], int length); /* EAN-14 */
-extern int nve_18(struct zint_symbol *symbol, unsigned char source[], int length); /* NVE-18 */
-extern int microqr(struct zint_symbol *symbol, unsigned char source[], int length); /* Micro QR Code */
-extern int aztec_runes(struct zint_symbol *symbol, unsigned char source[], int length); /* Aztec Runes */
-extern int korea_post(struct zint_symbol *symbol, unsigned char source[], int length); /* Korea Post */
-extern int japan_post(struct zint_symbol *symbol, unsigned char source[], int length); /* Japanese Post */
-extern int code_49(struct zint_symbol *symbol, unsigned char source[], int length); /* Code 49 */
-extern int channel_code(struct zint_symbol *symbol, unsigned char source[], int length); /* Channel Code */
-extern int code_one(struct zint_symbol *symbol, unsigned char source[], int length); /* Code One */
-extern int grid_matrix(struct zint_symbol *symbol, unsigned char source[], int length); /* Grid Matrix */
-
-#ifndef NO_PNG
-extern int png_handle(struct zint_symbol *symbol, int rotate_angle);
-#endif
-
-extern int render_plot(struct zint_symbol *symbol, float width, float height);
-
-extern int bmp_handle(struct zint_symbol *symbol, int rotate_angle);
-extern int ps_plot(struct zint_symbol *symbol);
-extern int svg_plot(struct zint_symbol *symbol);
-
-void error_tag(char error_string[], int error_number)
-{
- char error_buffer[100];
-
- if(error_number != 0) {
- strcpy(error_buffer, error_string);
-
- if(error_number > 4) {
- strcpy(error_string, "error: ");
- } else {
- strcpy(error_string, "warning: ");
- }
-
- concat(error_string, error_buffer);
- }
-}
-
-int dump_plot(struct zint_symbol *symbol)
-{
- FILE *f;
- int i, r;
-
- if(symbol->output_options & BARCODE_STDOUT) {
- f = stdout;
- } else {
- f = fopen(symbol->outfile, "w");
- if(!f) {
- strcpy(symbol->errtxt, "Could not open output file");
- return ERROR_FILE_ACCESS;
- }
- }
-
- fputs("[\n", f);
- for (r = 0; r < symbol->rows; r++) {
- fputs(" [ ", f);
- for (i = 0; i < symbol->width; i++) {
- fputs(module_is_set(symbol, r, i) ? "1 " : "0 ", f);
- }
- fputs("]\n", f);
- }
- fputs("]\n", f);
-
- fclose(f);
-
- return 0;
-}
-
-int hibc(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- int counter, error_number, i;
- char to_process[40], temp[2], check_digit;
-
- if(length > 36) {
- strcpy(symbol->errtxt, "Data too long for HIBC LIC");
- return ERROR_TOO_LONG;
- }
- to_upper(source);
- error_number = is_sane(TECHNETIUM , source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- strcpy(to_process, "+");
- counter = 41;
- for(i = 0; i < length; i++) {
- counter += posn(TECHNETIUM, source[i]);
- }
- counter = counter % 43;
-
- if(counter < 10) {
- check_digit = itoc(counter);
- } else {
- if(counter < 36) {
- check_digit = (counter - 10) + 'A';
- } else {
- switch(counter) {
- case 36: check_digit = '-'; break;
- case 37: check_digit = '.'; break;
- case 38: check_digit = ' '; break;
- case 39: check_digit = '$'; break;
- case 40: check_digit = '/'; break;
- case 41: check_digit = '+'; break;
- case 42: check_digit = '%'; break;
- default: check_digit = ' '; break; /* Keep compiler happy */
- }
- }
- }
-
- temp[0] = check_digit;
- temp[1] = '\0';
-
- concat(to_process, (char *)source);
- concat(to_process, temp);
- length = strlen(to_process);
-
- switch(symbol->symbology) {
- case BARCODE_HIBC_128:
- error_number = code_128(symbol, (unsigned char *)to_process, length);
- ustrcpy(symbol->text, (unsigned char*)"*");
- uconcat(symbol->text, (unsigned char*)to_process);
- uconcat(symbol->text, (unsigned char*)"*");
- break;
- case BARCODE_HIBC_39:
- symbol->option_2 = 0;
- error_number = c39(symbol, (unsigned char *)to_process, length);
- ustrcpy(symbol->text, (unsigned char*)"*");
- uconcat(symbol->text, (unsigned char*)to_process);
- uconcat(symbol->text, (unsigned char*)"*");
- break;
- case BARCODE_HIBC_DM:
- error_number = dmatrix(symbol, (unsigned char *)to_process, length);
- break;
- case BARCODE_HIBC_QR:
- error_number = qr_code(symbol, (unsigned char *)to_process, length);
- break;
- case BARCODE_HIBC_PDF:
- error_number = pdf417enc(symbol, (unsigned char *)to_process, length);
- break;
- case BARCODE_HIBC_MICPDF:
- error_number = micro_pdf417(symbol, (unsigned char *)to_process, length);
- break;
- case BARCODE_HIBC_AZTEC:
- error_number = aztec(symbol, (unsigned char *)to_process, length);
- break;
- }
-
- return error_number;
-}
-
-int gs1_compliant(int symbology)
-{
- /* Returns 1 if symbology supports GS1 data */
-
- int result = 0;
-
- switch(symbology) {
- case BARCODE_EAN128:
- case BARCODE_RSS_EXP:
- case BARCODE_RSS_EXPSTACK:
- case BARCODE_EANX_CC:
- case BARCODE_EAN128_CC:
- case BARCODE_RSS14_CC:
- case BARCODE_RSS_LTD_CC:
- case BARCODE_RSS_EXP_CC:
- case BARCODE_UPCA_CC:
- case BARCODE_UPCE_CC:
- case BARCODE_RSS14STACK_CC:
- case BARCODE_RSS14_OMNI_CC:
- case BARCODE_RSS_EXPSTACK_CC:
- case BARCODE_CODE16K:
- case BARCODE_AZTEC:
- case BARCODE_DATAMATRIX:
- case BARCODE_CODEONE:
- case BARCODE_CODE49:
- case BARCODE_QRCODE:
- result = 1;
- break;
- }
-
- return result;
-}
-
-int ZBarcode_ValidID(int symbol_id)
-{
- /* Checks whether a symbology is supported */
-
- int result = 0;
-
- switch(symbol_id) {
- case BARCODE_CODE11:
- case BARCODE_C25MATRIX:
- case BARCODE_C25INTER:
- case BARCODE_C25IATA:
- case BARCODE_C25LOGIC:
- case BARCODE_C25IND:
- case BARCODE_CODE39:
- case BARCODE_EXCODE39:
- case BARCODE_EANX:
- case BARCODE_EAN128:
- case BARCODE_CODABAR:
- case BARCODE_CODE128:
- case BARCODE_DPLEIT:
- case BARCODE_DPIDENT:
- case BARCODE_CODE16K:
- case BARCODE_CODE49:
- case BARCODE_CODE93:
- case BARCODE_FLAT:
- case BARCODE_RSS14:
- case BARCODE_RSS_LTD:
- case BARCODE_RSS_EXP:
- case BARCODE_TELEPEN:
- case BARCODE_UPCA:
- case BARCODE_UPCE:
- case BARCODE_POSTNET:
- case BARCODE_MSI_PLESSEY:
- case BARCODE_FIM:
- case BARCODE_LOGMARS:
- case BARCODE_PHARMA:
- case BARCODE_PZN:
- case BARCODE_PHARMA_TWO:
- case BARCODE_PDF417:
- case BARCODE_PDF417TRUNC:
- case BARCODE_MAXICODE:
- case BARCODE_QRCODE:
- case BARCODE_CODE128B:
- case BARCODE_AUSPOST:
- case BARCODE_AUSREPLY:
- case BARCODE_AUSROUTE:
- case BARCODE_AUSREDIRECT:
- case BARCODE_ISBNX:
- case BARCODE_RM4SCC:
- case BARCODE_DATAMATRIX:
- case BARCODE_EAN14:
- case BARCODE_NVE18:
- case BARCODE_JAPANPOST:
- case BARCODE_KOREAPOST:
- case BARCODE_RSS14STACK:
- case BARCODE_RSS14STACK_OMNI:
- case BARCODE_RSS_EXPSTACK:
- case BARCODE_PLANET:
- case BARCODE_MICROPDF417:
- case BARCODE_ONECODE:
- case BARCODE_PLESSEY:
- case BARCODE_TELEPEN_NUM:
- case BARCODE_ITF14:
- case BARCODE_KIX:
- case BARCODE_AZTEC:
- case BARCODE_DAFT:
- case BARCODE_MICROQR:
- case BARCODE_HIBC_128:
- case BARCODE_HIBC_39:
- case BARCODE_HIBC_DM:
- case BARCODE_HIBC_QR:
- case BARCODE_HIBC_PDF:
- case BARCODE_HIBC_MICPDF:
- case BARCODE_HIBC_AZTEC:
- case BARCODE_AZRUNE:
- case BARCODE_CODE32:
- case BARCODE_EANX_CC:
- case BARCODE_EAN128_CC:
- case BARCODE_RSS14_CC:
- case BARCODE_RSS_LTD_CC:
- case BARCODE_RSS_EXP_CC:
- case BARCODE_UPCA_CC:
- case BARCODE_UPCE_CC:
- case BARCODE_RSS14STACK_CC:
- case BARCODE_RSS14_OMNI_CC:
- case BARCODE_RSS_EXPSTACK_CC:
- case BARCODE_CHANNEL:
- case BARCODE_CODEONE:
- case BARCODE_GRIDMATRIX:
- result = 1;
- break;
- }
-
- return result;
-}
-
-int extended_charset(struct zint_symbol *symbol, unsigned char *source, int length)
-{
- int error_number = 0;
-
- /* These are the "elite" standards which can support multiple character sets */
- switch(symbol->symbology) {
- case BARCODE_QRCODE: error_number = qr_code(symbol, source, length); break;
- case BARCODE_MICROQR: error_number = microqr(symbol, source, length); break;
- case BARCODE_GRIDMATRIX: error_number = grid_matrix(symbol, source, length); break;
- }
-
- return error_number;
-}
-
-int reduced_charset(struct zint_symbol *symbol, unsigned char *source, int length)
-{
- /* These are the "norm" standards which only support Latin-1 at most */
- int error_number = 0;
-
-#ifndef _MSC_VER
- unsigned char preprocessed[length + 1];
-#else
- unsigned char* preprocessed = (unsigned char*)_alloca(length + 1);
-#endif
-
- if(symbol->symbology == BARCODE_CODE16K) {
- symbol->whitespace_width = 16;
- symbol->border_width = 2;
- symbol->output_options = BARCODE_BIND;
- }
-
- if(symbol->symbology == BARCODE_ITF14) {
- symbol->whitespace_width = 20;
- symbol->border_width = 8;
- symbol->output_options = BARCODE_BOX;
- }
-
- switch(symbol->input_mode) {
- case DATA_MODE:
- case GS1_MODE:
- memcpy(preprocessed, source, length);
- preprocessed[length] = '\0';
- break;
- case UNICODE_MODE:
- error_number = latin1_process(symbol, source, preprocessed, &length);
- if(error_number != 0) { return error_number; }
- break;
- }
-
- switch(symbol->symbology) {
- case BARCODE_C25MATRIX: error_number = matrix_two_of_five(symbol, preprocessed, length); break;
- case BARCODE_C25IND: error_number = industrial_two_of_five(symbol, preprocessed, length); break;
- case BARCODE_C25INTER: error_number = interleaved_two_of_five(symbol, preprocessed, length); break;
- case BARCODE_C25IATA: error_number = iata_two_of_five(symbol, preprocessed, length); break;
- case BARCODE_C25LOGIC: error_number = logic_two_of_five(symbol, preprocessed, length); break;
- case BARCODE_DPLEIT: error_number = dpleit(symbol, preprocessed, length); break;
- case BARCODE_DPIDENT: error_number = dpident(symbol, preprocessed, length); break;
- case BARCODE_UPCA: error_number = eanx(symbol, preprocessed, length); break;
- case BARCODE_UPCE: error_number = eanx(symbol, preprocessed, length); break;
- case BARCODE_EANX: error_number = eanx(symbol, preprocessed, length); break;
- case BARCODE_EAN128: error_number = ean_128(symbol, preprocessed, length); break;
- case BARCODE_CODE39: error_number = c39(symbol, preprocessed, length); break;
- case BARCODE_PZN: error_number = pharmazentral(symbol, preprocessed, length); break;
- case BARCODE_EXCODE39: error_number = ec39(symbol, preprocessed, length); break;
- case BARCODE_CODABAR: error_number = codabar(symbol, preprocessed, length); break;
- case BARCODE_CODE93: error_number = c93(symbol, preprocessed, length); break;
- case BARCODE_LOGMARS: error_number = c39(symbol, preprocessed, length); break;
- case BARCODE_CODE128: error_number = code_128(symbol, preprocessed, length); break;
- case BARCODE_CODE128B: error_number = code_128(symbol, preprocessed, length); break;
- case BARCODE_NVE18: error_number = nve_18(symbol, preprocessed, length); break;
- case BARCODE_CODE11: error_number = code_11(symbol, preprocessed, length); break;
- case BARCODE_MSI_PLESSEY: error_number = msi_handle(symbol, preprocessed, length); break;
- case BARCODE_TELEPEN: error_number = telepen(symbol, preprocessed, length); break;
- case BARCODE_TELEPEN_NUM: error_number = telepen_num(symbol, preprocessed, length); break;
- case BARCODE_PHARMA: error_number = pharma_one(symbol, preprocessed, length); break;
- case BARCODE_PLESSEY: error_number = plessey(symbol, preprocessed, length); break;
- case BARCODE_ITF14: error_number = itf14(symbol, preprocessed, length); break;
- case BARCODE_FLAT: error_number = flattermarken(symbol, preprocessed, length); break;
- case BARCODE_FIM: error_number = fim(symbol, preprocessed, length); break;
- case BARCODE_POSTNET: error_number = post_plot(symbol, preprocessed, length); break;
- case BARCODE_PLANET: error_number = planet_plot(symbol, preprocessed, length); break;
- case BARCODE_RM4SCC: error_number = royal_plot(symbol, preprocessed, length); break;
- case BARCODE_AUSPOST: error_number = australia_post(symbol, preprocessed, length); break;
- case BARCODE_AUSREPLY: error_number = australia_post(symbol, preprocessed, length); break;
- case BARCODE_AUSROUTE: error_number = australia_post(symbol, preprocessed, length); break;
- case BARCODE_AUSREDIRECT: error_number = australia_post(symbol, preprocessed, length); break;
- case BARCODE_CODE16K: error_number = code16k(symbol, preprocessed, length); break;
- case BARCODE_PHARMA_TWO: error_number = pharma_two(symbol, preprocessed, length); break;
- case BARCODE_ONECODE: error_number = imail(symbol, preprocessed, length); break;
- case BARCODE_ISBNX: error_number = eanx(symbol, preprocessed, length); break;
- case BARCODE_RSS14: error_number = rss14(symbol, preprocessed, length); break;
- case BARCODE_RSS14STACK: error_number = rss14(symbol, preprocessed, length); break;
- case BARCODE_RSS14STACK_OMNI: error_number = rss14(symbol, preprocessed, length); break;
- case BARCODE_RSS_LTD: error_number = rsslimited(symbol, preprocessed, length); break;
- case BARCODE_RSS_EXP: error_number = rssexpanded(symbol, preprocessed, length); break;
- case BARCODE_RSS_EXPSTACK: error_number = rssexpanded(symbol, preprocessed, length); break;
- case BARCODE_EANX_CC: error_number = composite(symbol, preprocessed, length); break;
- case BARCODE_EAN128_CC: error_number = composite(symbol, preprocessed, length); break;
- case BARCODE_RSS14_CC: error_number = composite(symbol, preprocessed, length); break;
- case BARCODE_RSS_LTD_CC: error_number = composite(symbol, preprocessed, length); break;
- case BARCODE_RSS_EXP_CC: error_number = composite(symbol, preprocessed, length); break;
- case BARCODE_UPCA_CC: error_number = composite(symbol, preprocessed, length); break;
- case BARCODE_UPCE_CC: error_number = composite(symbol, preprocessed, length); break;
- case BARCODE_RSS14STACK_CC: error_number = composite(symbol, preprocessed, length); break;
- case BARCODE_RSS14_OMNI_CC: error_number = composite(symbol, preprocessed, length); break;
- case BARCODE_RSS_EXPSTACK_CC: error_number = composite(symbol, preprocessed, length); break;
- case BARCODE_KIX: error_number = kix_code(symbol, preprocessed, length); break;
- case BARCODE_CODE32: error_number = code32(symbol, preprocessed, length); break;
- case BARCODE_DAFT: error_number = daft_code(symbol, preprocessed, length); break;
- case BARCODE_EAN14: error_number = ean_14(symbol, preprocessed, length); break;
- case BARCODE_AZRUNE: error_number = aztec_runes(symbol, preprocessed, length); break;
- case BARCODE_KOREAPOST: error_number = korea_post(symbol, preprocessed, length); break;
- case BARCODE_HIBC_128: error_number = hibc(symbol, preprocessed, length); break;
- case BARCODE_HIBC_39: error_number = hibc(symbol, preprocessed, length); break;
- case BARCODE_HIBC_DM: error_number = hibc(symbol, preprocessed, length); break;
- case BARCODE_HIBC_QR: error_number = hibc(symbol, preprocessed, length); break;
- case BARCODE_HIBC_PDF: error_number = hibc(symbol, preprocessed, length); break;
- case BARCODE_HIBC_MICPDF: error_number = hibc(symbol, preprocessed, length); break;
- case BARCODE_HIBC_AZTEC: error_number = hibc(symbol, preprocessed, length); break;
- case BARCODE_JAPANPOST: error_number = japan_post(symbol, preprocessed, length); break;
- case BARCODE_CODE49: error_number = code_49(symbol, preprocessed, length); break;
- case BARCODE_CHANNEL: error_number = channel_code(symbol, preprocessed, length); break;
- case BARCODE_CODEONE: error_number = code_one(symbol, preprocessed, length); break;
- case BARCODE_DATAMATRIX: error_number = dmatrix(symbol, preprocessed, length); break;
- case BARCODE_PDF417: error_number = pdf417enc(symbol, preprocessed, length); break;
- case BARCODE_PDF417TRUNC: error_number = pdf417enc(symbol, preprocessed, length); break;
- case BARCODE_MICROPDF417: error_number = micro_pdf417(symbol, preprocessed, length); break;
- case BARCODE_MAXICODE: error_number = maxicode(symbol, preprocessed, length); break;
- case BARCODE_AZTEC: error_number = aztec(symbol, preprocessed, length); break;
- }
-
- return error_number;
-}
-
-int ZBarcode_Encode(struct zint_symbol *symbol, unsigned char *source, int length)
-{
-#ifdef _MSC_VER
- unsigned char* local_source;
-#endif
- int error_number, error_buffer, i;
- error_number = 0;
-
- if(length == 0) {
- length = ustrlen(source);
- }
- if(length == 0) {
- strcpy(symbol->errtxt, "No input data");
- error_tag(symbol->errtxt, ERROR_INVALID_DATA1);
- return ERROR_INVALID_DATA1;
- }
-
- if(strcmp(symbol->outfile, "") == 0) {
- strcpy(symbol->outfile, "out.png");
- }
-#ifndef _MSC_VER
- unsigned char local_source[length + 1];
-#else
- local_source = (unsigned char*)_alloca(length + 1);
-#endif
-
- /* First check the symbology field */
- if(symbol->symbology < 1) { strcpy(symbol->errtxt, "Symbology out of range, using Code 128"); symbol->symbology = BARCODE_CODE128; error_number = WARN_INVALID_OPTION; }
-
- /* symbol->symbologys 1 to 86 are defined by tbarcode */
- if(symbol->symbology == 5) { symbol->symbology = BARCODE_C25MATRIX; }
- if((symbol->symbology >= 10) && (symbol->symbology <= 12)) { symbol->symbology = BARCODE_EANX; }
- if((symbol->symbology == 14) || (symbol->symbology == 15)) { symbol->symbology = BARCODE_EANX; }
- if(symbol->symbology == 17) { symbol->symbology = BARCODE_UPCA; }
- if(symbol->symbology == 19) { strcpy(symbol->errtxt, "Codabar 18 not supported, using Codabar"); symbol->symbology = BARCODE_CODABAR; error_number = WARN_INVALID_OPTION; }
- if(symbol->symbology == 26) { symbol->symbology = BARCODE_UPCA; }
- if(symbol->symbology == 27) { strcpy(symbol->errtxt, "UPCD1 not supported"); error_number = ERROR_INVALID_OPTION; }
- if(symbol->symbology == 33) { symbol->symbology = BARCODE_EAN128; }
- if((symbol->symbology == 35) || (symbol->symbology == 36)) { symbol->symbology = BARCODE_UPCA; }
- if((symbol->symbology == 38) || (symbol->symbology == 39)) { symbol->symbology = BARCODE_UPCE; }
- if((symbol->symbology >= 41) && (symbol->symbology <= 45)) { symbol->symbology = BARCODE_POSTNET; }
- if(symbol->symbology == 46) { symbol->symbology = BARCODE_PLESSEY; }
- if(symbol->symbology == 48) { symbol->symbology = BARCODE_NVE18; }
- if(symbol->symbology == 54) { strcpy(symbol->errtxt, "General Parcel Code not supported, using Code 128"); symbol->symbology = BARCODE_CODE128; error_number = WARN_INVALID_OPTION; }
- if((symbol->symbology == 59) || (symbol->symbology == 61)) { symbol->symbology = BARCODE_CODE128; }
- if(symbol->symbology == 62) { symbol->symbology = BARCODE_CODE93; }
- if((symbol->symbology == 64) || (symbol->symbology == 65)) { symbol->symbology = BARCODE_AUSPOST; }
- if(symbol->symbology == 73) { strcpy(symbol->errtxt, "Codablock E not supported"); error_number = ERROR_INVALID_OPTION; }
- if(symbol->symbology == 78) { symbol->symbology = BARCODE_RSS14; }
- if(symbol->symbology == 83) { symbol->symbology = BARCODE_PLANET; }
- if(symbol->symbology == 88) { symbol->symbology = BARCODE_EAN128; }
- if(symbol->symbology == 91) { strcpy(symbol->errtxt, "Symbology out of range, using Code 128"); symbol->symbology = BARCODE_CODE128; error_number = WARN_INVALID_OPTION; }
- if((symbol->symbology >= 94) && (symbol->symbology <= 96)) { strcpy(symbol->errtxt, "Symbology out of range, using Code 128"); symbol->symbology = BARCODE_CODE128; error_number = WARN_INVALID_OPTION; }
- if(symbol->symbology == 100) { symbol->symbology = BARCODE_HIBC_128; }
- if(symbol->symbology == 101) { symbol->symbology = BARCODE_HIBC_39; }
- if(symbol->symbology == 103) { symbol->symbology = BARCODE_HIBC_DM; }
- if(symbol->symbology == 105) { symbol->symbology = BARCODE_HIBC_QR; }
- if(symbol->symbology == 107) { symbol->symbology = BARCODE_HIBC_PDF; }
- if(symbol->symbology == 109) { symbol->symbology = BARCODE_HIBC_MICPDF; }
- if(symbol->symbology == 111) { symbol->symbology = BARCODE_HIBC_BLOCKF; }
- if((symbol->symbology >= 113) && (symbol->symbology <= 127)) { strcpy(symbol->errtxt, "Symbology out of range, using Code 128"); symbol->symbology = BARCODE_CODE128; error_number = WARN_INVALID_OPTION; }
- /* Everything from 128 up is Zint-specific */
- if(symbol->symbology >= 143) { strcpy(symbol->errtxt, "Symbology out of range, using Code 128"); symbol->symbology = BARCODE_CODE128; error_number = WARN_INVALID_OPTION; }
- if((symbol->symbology == BARCODE_CODABLOCKF) || (symbol->symbology == BARCODE_HIBC_BLOCKF)) { strcpy(symbol->errtxt, "Codablock F not supported"); error_number = ERROR_INVALID_OPTION; }
-
- if(error_number > 4) {
- error_tag(symbol->errtxt, error_number);
- return error_number;
- } else {
- error_buffer = error_number;
- }
-
- if((symbol->input_mode < 0) || (symbol->input_mode > 2)) { symbol->input_mode = DATA_MODE; }
-
- if(symbol->input_mode == GS1_MODE) {
- for(i = 0; i < length; i++) {
- if(source[i] == '\0') {
- strcpy(symbol->errtxt, "NULL characters not permitted in GS1 mode");
- return ERROR_INVALID_DATA1;
- }
- }
- if(gs1_compliant(symbol->symbology) == 1) {
- error_number = ugs1_verify(symbol, source, length, local_source);
- if(error_number != 0) { return error_number; }
- length = ustrlen(local_source);
- } else {
- strcpy(symbol->errtxt, "Selected symbology does not support GS1 mode");
- return ERROR_INVALID_OPTION;
- }
- } else {
- memcpy(local_source, source, length);
- local_source[length] = '\0';
- }
-
- switch(symbol->symbology) {
- case BARCODE_QRCODE:
- case BARCODE_MICROQR:
- case BARCODE_GRIDMATRIX:
- error_number = extended_charset(symbol, local_source, length);
- break;
- default:
- error_number = reduced_charset(symbol, local_source, length);
- break;
- }
-
- if((symbol->symbology == BARCODE_CODE128) || (symbol->symbology == BARCODE_CODE128B)) {
- for(i = 0; i < length; i++) {
- if(local_source[i] == '\0') {
- symbol->text[i] = ' ';
- } else {
- symbol->text[i] = local_source[i];
- }
- }
- }
-
- if(error_number == 0) {
- error_number = error_buffer;
- }
- error_tag(symbol->errtxt, error_number);
- /*printf("%s\n",symbol->text);*/
- return error_number;
-}
-
-int ZBarcode_Print(struct zint_symbol *symbol, int rotate_angle)
-{
- int error_number;
- char output[4];
-
- switch(rotate_angle) {
- case 0:
- case 90:
- case 180:
- case 270:
- break;
- default:
- strcpy(symbol->errtxt, "Invalid rotation angle");
- return ERROR_INVALID_OPTION;
- break;
- }
-
- if(strlen(symbol->outfile) > 3) {
- output[0] = symbol->outfile[strlen(symbol->outfile) - 3];
- output[1] = symbol->outfile[strlen(symbol->outfile) - 2];
- output[2] = symbol->outfile[strlen(symbol->outfile) - 1];
- output[3] = '\0';
- to_upper((unsigned char*)output);
-
-#ifndef NO_PNG
- if(!(strcmp(output, "PNG"))) {
- if(symbol->scale < 1.0) { symbol->text[0] = '\0'; }
- error_number = png_handle(symbol, rotate_angle);
- } else
-#endif
- if(!(strcmp(output, "TXT"))) {
- error_number = dump_plot(symbol);
- } else
- if(!(strcmp(output, "EPS"))) {
- error_number = ps_plot(symbol);
- } else
- if(!(strcmp(output, "SVG"))) {
- error_number = svg_plot(symbol);
- } else
- {
- strcpy(symbol->errtxt, "Unknown output format");
- error_tag(symbol->errtxt, ERROR_INVALID_OPTION);
- return ERROR_INVALID_OPTION;
- }
- } else {
- strcpy(symbol->errtxt, "Unknown output format");
- error_tag(symbol->errtxt, ERROR_INVALID_OPTION);
- return ERROR_INVALID_OPTION;
- }
-
- error_tag(symbol->errtxt, error_number);
- return error_number;
-}
-
-int ZBarcode_Buffer(struct zint_symbol *symbol, int rotate_angle)
-{
- int error_number;
-
- switch(rotate_angle) {
- case 0:
- case 90:
- case 180:
- case 270:
- break;
- default:
- strcpy(symbol->errtxt, "Invalid rotation angle");
- return ERROR_INVALID_OPTION;
- break;
- }
-
- error_number = bmp_handle(symbol, rotate_angle);
- error_tag(symbol->errtxt, error_number);
- return error_number;
-}
-
-int ZBarcode_Encode_and_Print(struct zint_symbol *symbol, unsigned char *input, int length, int rotate_angle)
-{
- int error_number;
-
- error_number = 0;
-
- error_number = ZBarcode_Encode(symbol, input, length);
- if(error_number != 0) {
- return error_number;
- }
-
- error_number = ZBarcode_Print(symbol, rotate_angle);
- return error_number;
-}
-
-int ZBarcode_Encode_and_Buffer(struct zint_symbol *symbol, unsigned char *input, int length, int rotate_angle)
-{
- int error_number;
-
- error_number = 0;
-
- error_number = ZBarcode_Encode(symbol, input, length);
- if(error_number != 0) {
- return error_number;
- }
-
- error_number = ZBarcode_Buffer(symbol, rotate_angle);
- return error_number;
-}
-
-int ZBarcode_Encode_File(struct zint_symbol *symbol, char *filename)
-{
- FILE *file;
- unsigned char *buffer;
- unsigned long fileLen;
- unsigned int nRead = 0, n = 0;
- int ret;
-
- if (!strcmp(filename, "-")) {
- file = stdin;
- fileLen = 7100;
- } else {
- file = fopen(filename, "rb");
- if (!file) {
- strcpy(symbol->errtxt, "Unable to read input file");
- return ERROR_INVALID_DATA1;
- }
-
- /* Get file length */
- fseek(file, 0, SEEK_END);
- fileLen = ftell(file);
- fseek(file, 0, SEEK_SET);
-
- if(fileLen > 7100) {
- /* The largest amount of data that can be encoded is 7089 numeric digits in QR Code */
- strcpy(symbol->errtxt, "Input file too long");
- fclose(file);
- return ERROR_INVALID_DATA1;
- }
- }
-
- /* Allocate memory */
- buffer = (unsigned char *)malloc(fileLen * sizeof(unsigned char));
- if(!buffer) {
- strcpy(symbol->errtxt, "Internal memory error");
- fclose(file);
- return ERROR_MEMORY;
- }
-
- /* Read file contents into buffer */
-
- do
- {
- n = fread(buffer + nRead, 1, fileLen - nRead, file);
- if (ferror(file))
- {
- strcpy(symbol->errtxt, strerror(errno));
- nRead = 0;
- return ERROR_INVALID_DATA1;
- }
- nRead += n;
- } while (!feof(file) && (0 < n) && (nRead < fileLen));
-
- fclose(file);
- ret = ZBarcode_Encode(symbol, buffer, nRead);
- free(buffer);
- return ret;
-}
-
-int ZBarcode_Encode_File_and_Print(struct zint_symbol *symbol, char *filename, int rotate_angle)
-{
- int error_number;
-
- error_number = 0;
-
- error_number = ZBarcode_Encode_File(symbol, filename);
- if(error_number != 0) {
- return error_number;
- }
-
- return ZBarcode_Print(symbol, rotate_angle);
-}
-
-int ZBarcode_Encode_File_and_Buffer(struct zint_symbol *symbol, char *filename, int rotate_angle)
-{
- int error_number;
-
- error_number = 0;
-
- error_number = ZBarcode_Encode_File(symbol, filename);
- if(error_number != 0) {
- return error_number;
- }
-
- return ZBarcode_Buffer(symbol, rotate_angle);
-}
-
-/*
- * Rendering support, initially added by Sam Lown.
- *
- * Converts encoded data into an intermediate format to be interpreted
- * in other applications using this library.
- *
- * If the width and height are not set to zero, the barcode will be resized to those
- * dimensions. The symbol->scale and symbol->height values are totally ignored in this case.
- *
- */
-int ZBarcode_Render(struct zint_symbol *symbol, float width, float height)
-{
- // Send the request to the render_plot method
- return render_plot(symbol, width, height);
-}
diff --git a/3rdparty/zint-2.4.4/backend/maxicode.c b/3rdparty/zint-2.4.4/backend/maxicode.c
deleted file mode 100644
index 53ce12e..0000000
--- a/3rdparty/zint-2.4.4/backend/maxicode.c
+++ /dev/null
@@ -1,709 +0,0 @@
-/* maxicode.c - Handles Maxicode */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2010 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-/* Includes corrections thanks to Monica Swanson @ Source Technologies */
-
-#include "common.h"
-#include "maxicode.h"
-#include "reedsol.h"
-#include
-#include
-#ifdef __APPLE__
-#include
-#else
-#include
-#endif
-
-int maxi_codeword[144];
-
-void maxi_do_primary_check( )
-{
- /* Handles error correction of primary message */
- unsigned char data[15];
- unsigned char results[15];
- int j;
- int datalen = 10;
- int ecclen = 10;
-
- rs_init_gf(0x43);
- rs_init_code(ecclen, 1);
-
- for(j = 0; j < datalen; j += 1)
- data[j] = maxi_codeword[j];
-
- rs_encode(datalen, data, results);
-
- for ( j = 0; j < ecclen; j += 1)
- maxi_codeword[ datalen + j] = results[ecclen - 1 - j];
- rs_free();
-}
-
-void maxi_do_secondary_chk_odd( int ecclen )
-{
- /* Handles error correction of odd characters in secondary */
- unsigned char data[100];
- unsigned char results[30];
- int j;
- int datalen = 68;
-
- rs_init_gf(0x43);
- rs_init_code(ecclen, 1);
-
- if (ecclen == 20)
- datalen = 84;
-
- for(j = 0; j < datalen; j += 1)
- if (j & 1) // odd
- data[(j-1)/2] = maxi_codeword[j + 20];
-
- rs_encode(datalen/2, data, results);
-
- for ( j = 0; j < (ecclen); j += 1)
- maxi_codeword[ datalen + (2 *j) + 1 + 20 ] = results[ecclen - 1 - j];
- rs_free();
-}
-
-void maxi_do_secondary_chk_even(int ecclen )
-{
- /* Handles error correction of even characters in secondary */
- unsigned char data[100];
- unsigned char results[30];
- int j;
- int datalen = 68;
-
- if (ecclen == 20)
- datalen = 84;
-
- rs_init_gf(0x43);
- rs_init_code(ecclen, 1);
-
- for(j = 0; j < datalen + 1; j += 1)
- if (!(j & 1)) // even
- data[j/2] = maxi_codeword[j + 20];
-
- rs_encode(datalen/2, data, results);
-
- for ( j = 0; j < (ecclen); j += 1)
- maxi_codeword[ datalen + (2 *j) + 20] = results[ecclen - 1 - j];
- rs_free();
-}
-
-void maxi_bump(int set[], int character[], int bump_posn)
-{
- /* Moves everything up so that a shift or latch can be inserted */
- int i;
-
- for(i = 143; i > bump_posn; i--) {
- set[i] = set[i - 1];
- character[i] = character[i - 1];
- }
-}
-
-int maxi_text_process(int mode, unsigned char source[], int length)
-{
- /* Format text according to Appendix A */
-
- /* This code doesn't make use of [Lock in C], [Lock in D]
- and [Lock in E] and so is not always the most efficient at
- compressing data, but should suffice for most applications */
-
- int set[144], character[144], i, j, done, count, current_set;
-
- if(length > 138) {
- return ERROR_TOO_LONG;
- }
-
- for(i = 0; i < 144; i++) {
- set[i] = -1;
- character[i] = 0;
- }
-
- for (i = 0; i < length; i++) {
- /* Look up characters in table from Appendix A - this gives
- value and code set for most characters */
- set[i] = maxiCodeSet[source[i]];
- character[i] = maxiSymbolChar[source[i]];
- }
-
- /* If a character can be represented in more than one code set,
- pick which version to use */
- if(set[0] == 0) {
- if(character[0] == 13) {
- character[0] = 0;
- }
- set[0] = 1;
- }
-
- for(i = 1; i < length; i++) {
- if(set[i] == 0) {
- done = 0;
- /* Special character */
- if(character[i] == 13) {
- /* Carriage Return */
- if(set[i - 1] == 5) {
- character[i] = 13;
- set[i] = 5;
- } else {
- if((i != length - 1) && (set[i + 1] == 5)) {
- character[i] = 13;
- set[i] = 5;
- } else {
- character[i] = 0;
- set[i] = 1;
- }
- }
- done = 1;
- }
-
- if((character[i] == 28) && (done == 0)) {
- /* FS */
- if(set[i - 1] == 5) {
- character[i] = 32;
- set[i] = 5;
- } else {
- set[i] = set[i - 1];
- }
- done = 1;
- }
-
- if((character[i] == 29) && (done == 0)) {
- /* GS */
- if(set[i - 1] == 5) {
- character[i] = 33;
- set[i] = 5;
- } else {
- set[i] = set[i - 1];
- }
- done = 1;
- }
-
- if((character[i] == 30) && (done == 0)) {
- /* RS */
- if(set[i - 1] == 5) {
- character[i] = 34;
- set[i] = 5;
- } else {
- set[i] = set[i - 1];
- }
- done = 1;
- }
-
- if((character[i] == 32) && (done == 0)) {
- /* Space */
- if(set[i - 1] == 1) {
- character[i] = 32;
- set[i] = 1;
- }
- if(set[i - 1] == 2) {
- character[i] = 47;
- set[i] = 2;
- }
- if(set[i - 1] >= 3) {
- if(i != length - 1) {
- if(set[i + 1] == 1) {
- character[i] = 32;
- set[i] = 1;
- }
- if(set[i + 1] == 2) {
- character[i] = 47;
- set[i] = 2;
- }
- if(set[i + 1] >= 3) {
- character[i] = 59;
- set[i] = set[i - 1];
- }
- } else {
- character[i] = 59;
- set[i] = set[i - 1];
- }
- }
- done = 1;
- }
-
- if((character[i] == 44) && (done == 0)) {
- /* Comma */
- if(set[i - 1] == 2) {
- character[i] = 48;
- set[i] = 2;
- } else {
- if((i != length - 1) && (set[i + 1] == 2)) {
- character[i] = 48;
- set[i] = 2;
- } else {
- set[i] = 1;
- }
- }
- done = 1;
- }
-
- if((character[i] == 46) && (done == 0)) {
- /* Full Stop */
- if(set[i - 1] == 2) {
- character[i] = 49;
- set[i] = 2;
- } else {
- if((i != length - 1) && (set[i + 1] == 2)) {
- character[i] = 49;
- set[i] = 2;
- } else {
- set[i] = 1;
- }
- }
- done = 1;
- }
-
- if((character[i] == 47) && (done == 0)) {
- /* Slash */
- if(set[i - 1] == 2) {
- character[i] = 50;
- set[i] = 2;
- } else {
- if((i != length - 1) && (set[i + 1] == 2)) {
- character[i] = 50;
- set[i] = 2;
- } else {
- set[i] = 1;
- }
- }
- done = 1;
- }
-
- if((character[i] == 58) && (done == 0)) {
- /* Colon */
- if(set[i - 1] == 2) {
- character[i] = 51;
- set[i] = 2;
- } else {
- if((i != length - 1) && (set[i + 1] == 2)) {
- character[i] = 51;
- set[i] = 2;
- } else {
- set[i] = 1;
- }
- }
- done = 1;
- }
- }
- }
-
- for(i = length; i < 144; i++) {
- /* Add the padding */
- if(set[length - 1] == 2) {
- set[i] = 2;
- } else {
- set[i] = 1;
- }
- character[i] = 33;
- }
-
- /* Find candidates for number compression */
- if((mode == 2) || (mode ==3)) { j = 0; } else { j = 9; }
- /* Number compression not allowed in primary message */
- count = 0;
- for(i = j; i < 143; i++) {
- if((set[i] == 1) && ((character[i] >= 48) && (character[i] <= 57))) {
- /* Character is a number */
- count++;
- } else {
- count = 0;
- }
- if(count == 9) {
- /* Nine digits in a row can be compressed */
- set[i] = 6;
- set[i - 1] = 6;
- set[i - 2] = 6;
- set[i - 3] = 6;
- set[i - 4] = 6;
- set[i - 5] = 6;
- set[i - 6] = 6;
- set[i - 7] = 6;
- set[i - 8] = 6;
- count = 0;
- }
- }
-
- /* Add shift and latch characters */
- current_set = 1;
- i = 0;
- do {
-
- if(set[i] != current_set) {
- switch(set[i]) {
- case 1:
- if(set[i + 1] == 1) {
- if(set[i + 2] == 1) {
- if(set[i + 3] == 1) {
- /* Latch A */
- maxi_bump(set, character, i);
- character[i] = 63;
- current_set = 1;
- length++;
- } else {
- /* 3 Shift A */
- maxi_bump(set, character, i);
- character[i] = 57;
- length++;
- i += 2;
- }
- } else {
- /* 2 Shift A */
- maxi_bump(set, character, i);
- character[i] = 56;
- length++;
- i++;
- }
- } else {
- /* Shift A */
- maxi_bump(set, character, i);
- character[i] = 59;
- length++;
- }
- break;
- case 2:
- if(set[i + 1] == 2) {
- /* Latch B */
- maxi_bump(set, character, i);
- character[i] = 63;
- current_set = 2;
- length++;
- } else {
- /* Shift B */
- maxi_bump(set, character, i);
- character[i] = 59;
- length++;
- }
- break;
- case 3:
- /* Shift C */
- maxi_bump(set, character, i);
- character[i] = 60;
- length++;
- break;
- case 4:
- /* Shift D */
- maxi_bump(set, character, i);
- character[i] = 61;
- length++;
- break;
- case 5:
- /* Shift E */
- maxi_bump(set, character, i);
- character[i] = 62;
- length++;
- break;
- case 6:
- /* Number Compressed */
- /* Do nothing */
- break;
- }
- i++;
- }
- i++;
- } while(i < 145);
-
- /* Number compression has not been forgotten! - It's handled below */
- i = 0;
- do {
- if (set[i] == 6) {
- /* Number compression */
- char substring[11];
- int value;
-
- for(j = 0; j < 10; j++) {
- substring[j] = character[i + j];
- }
- substring[10] = '\0';
- value = atoi(substring);
-
- character[i] = 31; /* NS */
- character[i + 1] = (value & 0x3f000000) >> 24;
- character[i + 2] = (value & 0xfc0000) >> 18;
- character[i + 3] = (value & 0x3f000) >> 12;
- character[i + 4] = (value & 0xfc0) >> 6;
- character[i + 5] = (value & 0x3f);
-
- i += 6;
- for(j = i; j < 140; j++) {
- set[j] = set[j + 3];
- character[j] = character[j + 3];
- }
- length -= 3;
- } else {
- i++;
- }
- } while (i <= 143);
-
- if(((mode ==2) || (mode == 3)) && (length > 84)) {
- return ERROR_TOO_LONG;
- }
-
- if(((mode == 4) || (mode == 6)) && (length > 93)) {
- return ERROR_TOO_LONG;
- }
-
- if((mode == 5) && (length > 77)) {
- return ERROR_TOO_LONG;
- }
-
-
- /* Copy the encoded text into the codeword array */
- if((mode == 2) || (mode == 3)) {
- for(i = 0; i < 84; i++) { /* secondary only */
- maxi_codeword[i + 20] = character[i];
- }
- }
-
- if((mode == 4) || (mode == 6)) {
- for(i = 0; i < 9; i++) { /* primary */
- maxi_codeword[i + 1] = character[i];
- }
- for(i = 0; i < 84; i++) { /* secondary */
- maxi_codeword[i + 20] = character[i + 9];
- }
- }
-
- if(mode == 5) {
- for(i = 0; i < 9; i++) { /* primary */
- maxi_codeword[i + 1] = character[i];
- }
- for(i = 0; i < 68; i++) { /* secondary */
- maxi_codeword[i + 20] = character[i + 9];
- }
- }
-
- return 0;
-}
-
-void maxi_do_primary_2(char postcode[], int country, int service)
-{
- /* Format structured primary for Mode 2 */
- int postcode_length, postcode_num, i;
-
- for(i = 0; i < 10; i++) {
- if((postcode[i] < '0') || (postcode[i] > '9')) {
- postcode[i] = '\0';
- }
- }
-
- postcode_length = strlen(postcode);
- postcode_num = atoi(postcode);
-
- maxi_codeword[0] = ((postcode_num & 0x03) << 4) | 2;
- maxi_codeword[1] = ((postcode_num & 0xfc) >> 2);
- maxi_codeword[2] = ((postcode_num & 0x3f00) >> 8);
- maxi_codeword[3] = ((postcode_num & 0xfc000) >> 14);
- maxi_codeword[4] = ((postcode_num & 0x3f00000) >> 20);
- maxi_codeword[5] = ((postcode_num & 0x3c000000) >> 26) | ((postcode_length & 0x3) << 4);
- maxi_codeword[6] = ((postcode_length & 0x3c) >> 2) | ((country & 0x3) << 4);
- maxi_codeword[7] = (country & 0xfc) >> 2;
- maxi_codeword[8] = ((country & 0x300) >> 8) | ((service & 0xf) << 2);
- maxi_codeword[9] = ((service & 0x3f0) >> 4);
-}
-
-void maxi_do_primary_3(char postcode[], int country, int service)
-{
- /* Format structured primary for Mode 3 */
- int i, h;
-
- h = strlen(postcode);
- to_upper((unsigned char*)postcode);
- for(i = 0; i < h; i++) {
- if((postcode[i] >= 'A') && (postcode[i] <= 'Z')) {
- /* (Capital) letters shifted to Code Set A values */
- postcode[i] -= 64;
- }
- if(((postcode[i] == 27) || (postcode[i] == 31)) || ((postcode[i] == 33) || (postcode[i] >= 59))) {
- /* Not a valid postcode character */
- postcode[i] = ' ';
- }
- /* Input characters lower than 27 (NUL - SUB) in postcode are
- interpreted as capital letters in Code Set A (e.g. LF becomes 'J') */
- }
-
- maxi_codeword[0] = ((postcode[5] & 0x03) << 4) | 3;
- maxi_codeword[1] = ((postcode[4] & 0x03) << 4) | ((postcode[5] & 0x3c) >> 2);
- maxi_codeword[2] = ((postcode[3] & 0x03) << 4) | ((postcode[4] & 0x3c) >> 2);
- maxi_codeword[3] = ((postcode[2] & 0x03) << 4) | ((postcode[3] & 0x3c) >> 2);
- maxi_codeword[4] = ((postcode[1] & 0x03) << 4) | ((postcode[2] & 0x3c) >> 2);
- maxi_codeword[5] = ((postcode[0] & 0x03) << 4) | ((postcode[1] & 0x3c) >> 2);
- maxi_codeword[6] = ((postcode[0] & 0x3c) >> 2) | ((country & 0x3) << 4);
- maxi_codeword[7] = (country & 0xfc) >> 2;
- maxi_codeword[8] = ((country & 0x300) >> 8) | ((service & 0xf) << 2);
- maxi_codeword[9] = ((service & 0x3f0) >> 4);
-}
-
-int maxicode(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- int i, j, block, bit, mode, countrycode = 0, service = 0, lp = 0;
- int bit_pattern[7], internal_error = 0, eclen, error_number;
- char postcode[12], countrystr[4], servicestr[4];
-
-#ifndef _MSC_VER
- unsigned char local_source[length + 1];
-#else
- unsigned char* local_source = (unsigned char*)_alloca(length + 1);
-#endif
-
- mode = symbol->option_1;
- strcpy(postcode, "");
- strcpy(countrystr, "");
- strcpy(servicestr, "");
-
- /* The following to be replaced by ECI handling */
- switch(symbol->input_mode) {
- case DATA_MODE:
- case GS1_MODE:
- memcpy(local_source, source, length);
- local_source[length] = '\0';
- break;
- case UNICODE_MODE:
- error_number = latin1_process(symbol, source, local_source, &length);
- if(error_number != 0) { return error_number; }
- break;
- }
- memset(maxi_codeword, 0, sizeof(maxi_codeword));
-
- if(mode == -1) { /* If mode is unspecified */
- lp = strlen(symbol->primary);
- if(lp == 0) {
- mode = 4;
- } else {
- mode = 2;
- for(i = 0; i < 10 && i < lp; i++) {
- if((symbol->primary[i] < 48) || (symbol->primary[i] > 57)) {
- mode = 3;
- break;
- }
- }
- }
- }
-
- if((mode < 2) || (mode > 6)) { /* Only codes 2 to 6 supported */
- strcpy(symbol->errtxt, "Invalid Maxicode Mode");
- return ERROR_INVALID_OPTION;
- }
-
- if((mode == 2) || (mode == 3)) { /* Modes 2 and 3 need data in symbol->primary */
- if(lp == 0){ /* Mode set manually means lp doesn't get set */
- lp = strlen( symbol->primary );
- }
- if(lp != 15) {
- strcpy(symbol->errtxt, "Invalid Primary String");
- return ERROR_INVALID_DATA1;
- }
-
- for(i = 9; i < 15; i++) { /* check that country code and service are numeric */
- if((symbol->primary[i] < '0') || (symbol->primary[i] > '9')) {
- strcpy(symbol->errtxt, "Invalid Primary String");
- return ERROR_INVALID_DATA1;
- }
- }
-
- memcpy(postcode, symbol->primary, 9);
- postcode[9] = '\0';
-
- if(mode == 2) {
- for(i = 0; i < 10; i++) {
- if(postcode[i] == ' ') {
- postcode[i] = '\0';
- }
- }
- }
- else if(mode == 3) { postcode[6] = '\0'; }
-
- countrystr[0] = symbol->primary[9];
- countrystr[1] = symbol->primary[10];
- countrystr[2] = symbol->primary[11];
- countrystr[3] = '\0';
-
- servicestr[0] = symbol->primary[12];
- servicestr[1] = symbol->primary[13];
- servicestr[2] = symbol->primary[14];
- servicestr[3] = '\0';
-
- countrycode = atoi(countrystr);
- service = atoi(servicestr);
-
- if(mode == 2) { maxi_do_primary_2(postcode, countrycode, service); }
- if(mode == 3) { maxi_do_primary_3(postcode, countrycode, service); }
- } else {
- maxi_codeword[0] = mode;
- }
-
- i = maxi_text_process(mode, local_source, length);
- if(i == ERROR_TOO_LONG ) {
- strcpy(symbol->errtxt, "Input data too long");
- return i;
- }
-
- /* All the data is sorted - now do error correction */
- maxi_do_primary_check(); /* always EEC */
-
- if ( mode == 5 )
- eclen = 56; // 68 data codewords , 56 error corrections
- else
- eclen = 40; // 84 data codewords, 40 error corrections
-
- maxi_do_secondary_chk_even(eclen/2); // do error correction of even
- maxi_do_secondary_chk_odd(eclen/2); // do error correction of odd
-
- /* Copy data into symbol grid */
- for(i = 0; i < 33; i++) {
- for(j = 0; j < 30; j++) {
- block = (MaxiGrid[(i * 30) + j] + 5) / 6;
- bit = (MaxiGrid[(i * 30) + j] + 5) % 6;
-
- if(block != 0) {
-
- bit_pattern[0] = (maxi_codeword[block - 1] & 0x20) >> 5;
- bit_pattern[1] = (maxi_codeword[block - 1] & 0x10) >> 4;
- bit_pattern[2] = (maxi_codeword[block - 1] & 0x8) >> 3;
- bit_pattern[3] = (maxi_codeword[block - 1] & 0x4) >> 2;
- bit_pattern[4] = (maxi_codeword[block - 1] & 0x2) >> 1;
- bit_pattern[5] = (maxi_codeword[block - 1] & 0x1);
-
- if(bit_pattern[bit] != 0) {
- set_module(symbol, i, j);
- }
- }
- }
- }
-
- /* Add orientation markings */
- set_module(symbol, 0, 28); // Top right filler
- set_module(symbol, 0, 29);
- set_module(symbol, 9, 10); // Top left marker
- set_module(symbol, 9, 11);
- set_module(symbol, 10, 11);
- set_module(symbol, 15, 7); // Left hand marker
- set_module(symbol, 16, 8);
- set_module(symbol, 16, 20); // Right hand marker
- set_module(symbol, 17, 20);
- set_module(symbol, 22, 10); // Bottom left marker
- set_module(symbol, 23, 10);
- set_module(symbol, 22, 17); // Bottom right marker
- set_module(symbol, 23, 17);
-
- symbol->width = 30;
- symbol->rows = 33;
-
- return internal_error;
-}
diff --git a/3rdparty/zint-2.4.4/backend/maxicode.h b/3rdparty/zint-2.4.4/backend/maxicode.h
deleted file mode 100644
index f03a902..0000000
--- a/3rdparty/zint-2.4.4/backend/maxicode.h
+++ /dev/null
@@ -1,90 +0,0 @@
-/* maxicode.h - Handles Maxicode */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-static int MaxiGrid[] = { /* ISO/IEC 16023 Figure 5 - MaxiCode Module Sequence */ /* 30 x 33 data grid */
- 122, 121, 128, 127, 134, 133, 140, 139, 146, 145, 152, 151, 158, 157, 164, 163, 170, 169, 176, 175, 182, 181, 188, 187, 194, 193, 200, 199, 0, 0,
- 124, 123, 130, 129, 136, 135, 142, 141, 148, 147, 154, 153, 160, 159, 166, 165, 172, 171, 178, 177, 184, 183, 190, 189, 196, 195, 202, 201, 817, 0,
- 126, 125, 132, 131, 138, 137, 144, 143, 150, 149, 156, 155, 162, 161, 168, 167, 174, 173, 180, 179, 186, 185, 192, 191, 198, 197, 204, 203, 819, 818,
- 284, 283, 278, 277, 272, 271, 266, 265, 260, 259, 254, 253, 248, 247, 242, 241, 236, 235, 230, 229, 224, 223, 218, 217, 212, 211, 206, 205, 820, 0,
- 286, 285, 280, 279, 274, 273, 268, 267, 262, 261, 256, 255, 250, 249, 244, 243, 238, 237, 232, 231, 226, 225, 220, 219, 214, 213, 208, 207, 822, 821,
- 288, 287, 282, 281, 276, 275, 270, 269, 264, 263, 258, 257, 252, 251, 246, 245, 240, 239, 234, 233, 228, 227, 222, 221, 216, 215, 210, 209, 823, 0,
- 290, 289, 296, 295, 302, 301, 308, 307, 314, 313, 320, 319, 326, 325, 332, 331, 338, 337, 344, 343, 350, 349, 356, 355, 362, 361, 368, 367, 825, 824,
- 292, 291, 298, 297, 304, 303, 310, 309, 316, 315, 322, 321, 328, 327, 334, 333, 340, 339, 346, 345, 352, 351, 358, 357, 364, 363, 370, 369, 826, 0,
- 294, 293, 300, 299, 306, 305, 312, 311, 318, 317, 324, 323, 330, 329, 336, 335, 342, 341, 348, 347, 354, 353, 360, 359, 366, 365, 372, 371, 828, 827,
- 410, 409, 404, 403, 398, 397, 392, 391, 80, 79, 0, 0, 14, 13, 38, 37, 3, 0, 45, 44, 110, 109, 386, 385, 380, 379, 374, 373, 829, 0,
- 412, 411, 406, 405, 400, 399, 394, 393, 82, 81, 41, 0, 16, 15, 40, 39, 4, 0, 0, 46, 112, 111, 388, 387, 382, 381, 376, 375, 831, 830,
- 414, 413, 408, 407, 402, 401, 396, 395, 84, 83, 42, 0, 0, 0, 0, 0, 6, 5, 48, 47, 114, 113, 390, 389, 384, 383, 378, 377, 832, 0,
- 416, 415, 422, 421, 428, 427, 104, 103, 56, 55, 17, 0, 0, 0, 0, 0, 0, 0, 21, 20, 86, 85, 434, 433, 440, 439, 446, 445, 834, 833,
- 418, 417, 424, 423, 430, 429, 106, 105, 58, 57, 0, 0, 0, 0, 0, 0, 0, 0, 23, 22, 88, 87, 436, 435, 442, 441, 448, 447, 835, 0,
- 420, 419, 426, 425, 432, 431, 108, 107, 60, 59, 0, 0, 0, 0, 0, 0, 0, 0, 0, 24, 90, 89, 438, 437, 444, 443, 450, 449, 837, 836,
- 482, 481, 476, 475, 470, 469, 49, 0, 31, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 54, 53, 464, 463, 458, 457, 452, 451, 838, 0,
- 484, 483, 478, 477, 472, 471, 50, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 466, 465, 460, 459, 454, 453, 840, 839,
- 486, 485, 480, 479, 474, 473, 52, 51, 32, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 43, 468, 467, 462, 461, 456, 455, 841, 0,
- 488, 487, 494, 493, 500, 499, 98, 97, 62, 61, 0, 0, 0, 0, 0, 0, 0, 0, 0, 27, 92, 91, 506, 505, 512, 511, 518, 517, 843, 842,
- 490, 489, 496, 495, 502, 501, 100, 99, 64, 63, 0, 0, 0, 0, 0, 0, 0, 0, 29, 28, 94, 93, 508, 507, 514, 513, 520, 519, 844, 0,
- 492, 491, 498, 497, 504, 503, 102, 101, 66, 65, 18, 0, 0, 0, 0, 0, 0, 0, 19, 30, 96, 95, 510, 509, 516, 515, 522, 521, 846, 845,
- 560, 559, 554, 553, 548, 547, 542, 541, 74, 73, 33, 0, 0, 0, 0, 0, 0, 11, 68, 67, 116, 115, 536, 535, 530, 529, 524, 523, 847, 0,
- 562, 561, 556, 555, 550, 549, 544, 543, 76, 75, 0, 0, 8, 7, 36, 35, 12, 0, 70, 69, 118, 117, 538, 537, 532, 531, 526, 525, 849, 848,
- 564, 563, 558, 557, 552, 551, 546, 545, 78, 77, 0, 34, 10, 9, 26, 25, 0, 0, 72, 71, 120, 119, 540, 539, 534, 533, 528, 527, 850, 0,
- 566, 565, 572, 571, 578, 577, 584, 583, 590, 589, 596, 595, 602, 601, 608, 607, 614, 613, 620, 619, 626, 625, 632, 631, 638, 637, 644, 643, 852, 851,
- 568, 567, 574, 573, 580, 579, 586, 585, 592, 591, 598, 597, 604, 603, 610, 609, 616, 615, 622, 621, 628, 627, 634, 633, 640, 639, 646, 645, 853, 0,
- 570, 569, 576, 575, 582, 581, 588, 587, 594, 593, 600, 599, 606, 605, 612, 611, 618, 617, 624, 623, 630, 629, 636, 635, 642, 641, 648, 647, 855, 854,
- 728, 727, 722, 721, 716, 715, 710, 709, 704, 703, 698, 697, 692, 691, 686, 685, 680, 679, 674, 673, 668, 667, 662, 661, 656, 655, 650, 649, 856, 0,
- 730, 729, 724, 723, 718, 717, 712, 711, 706, 705, 700, 699, 694, 693, 688, 687, 682, 681, 676, 675, 670, 669, 664, 663, 658, 657, 652, 651, 858, 857,
- 732, 731, 726, 725, 720, 719, 714, 713, 708, 707, 702, 701, 696, 695, 690, 689, 684, 683, 678, 677, 672, 671, 666, 665, 660, 659, 654, 653, 859, 0,
- 734, 733, 740, 739, 746, 745, 752, 751, 758, 757, 764, 763, 770, 769, 776, 775, 782, 781, 788, 787, 794, 793, 800, 799, 806, 805, 812, 811, 861, 860,
- 736, 735, 742, 741, 748, 747, 754, 753, 760, 759, 766, 765, 772, 771, 778, 777, 784, 783, 790, 789, 796, 795, 802, 801, 808, 807, 814, 813, 862, 0,
- 738, 737, 744, 743, 750, 749, 756, 755, 762, 761, 768, 767, 774, 773, 780, 779, 786, 785, 792, 791, 798, 797, 804, 803, 810, 809, 816, 815, 864, 863
-};
-
-int maxiCodeSet[256] = { /* from Appendix A - ASCII character to Code Set (e.g. 2 = Set B) */
- /* set 0 refers to special characters that fit into more than one set (e.g. GS) */
- 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 0, 5, 5, 5, 5, 5, 5,
- 5, 5, 5, 5, 5, 5, 5, 5, 0, 0, 0, 5, 0, 2, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 0, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 2,
- 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5,
- 5, 4, 5, 5, 5, 5, 5, 5, 4, 5, 3, 4, 3, 5, 5, 4, 4, 3, 3, 3,
- 4, 3, 5, 4, 4, 3, 3, 4, 3, 3, 3, 4, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3,
- 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4
-};
-
-int maxiSymbolChar[256] = { /* from Appendix A - ASCII character to symbol value */
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
- 20, 21, 22, 23, 24, 25, 26, 30, 28, 29, 30, 35, 32, 53, 34, 35, 36, 37, 38, 39,
- 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 37,
- 38, 39, 40, 41, 52, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 42, 43, 44, 45, 46, 0, 1, 2, 3,
- 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23,
- 24, 25, 26, 32, 54, 34, 35, 36, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 47, 48,
- 49, 50, 51, 52, 53, 54, 55, 56, 57, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 36,
- 37, 37, 38, 39, 40, 41, 42, 43, 38, 44, 37, 39, 38, 45, 46, 40, 41, 39, 40, 41,
- 42, 42, 47, 43, 44, 43, 44, 45, 45, 46, 47, 46, 0, 1, 2, 3, 4, 5, 6, 7,
- 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 32,
- 33, 34, 35, 36, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 32, 33, 34, 35, 36
-};
-
diff --git a/3rdparty/zint-2.4.4/backend/maxipng.h b/3rdparty/zint-2.4.4/backend/maxipng.h
deleted file mode 100644
index d7beb6c..0000000
--- a/3rdparty/zint-2.4.4/backend/maxipng.h
+++ /dev/null
@@ -1,138 +0,0 @@
-/* maxipng.h - Shapes for Maxicode output to PNG file */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-/* This file contains the pixel-by-pixel representation of maxicode glyphs
- at a resolution of 12 pixels per millimeter. hexagon[] is taken directly
- from ISO 16023 Annex J. bullseye[] was calculated by the Gimp */
-
-#define SSET "0123456789ABCDEF"
-
-static int hexagon[120] = {
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 0, 0, 0, 1, 1, 1, 0, 0, 0,
- 0, 0, 0, 1, 1, 1, 1, 1, 0, 0,
- 0, 0, 1, 1, 1, 1, 1, 1, 1, 0,
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 0, 0, 1, 1, 1, 1, 1, 1, 1, 0,
- 0, 0, 0, 1, 1, 1, 1, 1, 0, 0,
- 0, 0, 0, 0, 1, 1, 1, 0, 0, 0,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
-};
-
-static unsigned int bullseye_compressed[] = {
- 0,0,0,0,0,255,248,0,0,0,0,0,
- 0,0,0,0,31,255,255,192,0,0,0,0,
- 0,0,0,1,255,255,255,252,0,0,0,0,
- 0,0,0,7,255,255,255,255,0,0,0,0,
- 0,0,0,31,255,255,255,255,192,0,0,0,
- 0,0,0,127,255,255,255,255,240,0,0,0,
- 0,0,1,255,255,255,255,255,252,0,0,0,
- 0,0,7,255,255,255,255,255,255,0,0,0,
- 0,0,15,255,255,0,7,255,255,128,0,0,
- 0,0,63,255,240,0,0,127,255,224,0,0,
- 0,0,127,255,128,0,0,15,255,240,0,0,
- 0,0,255,252,0,0,0,1,255,248,0,0,
- 0,1,255,240,0,0,0,0,127,252,0,0,
- 0,3,255,224,0,0,0,0,63,254,0,0,
- 0,7,255,128,0,0,0,0,15,255,0,0,
- 0,15,255,0,0,0,0,0,7,255,128,0,
- 0,31,252,0,0,127,240,0,1,255,192,0,
- 0,63,248,0,7,255,255,0,0,255,224,0,
- 0,127,240,0,63,255,255,224,0,127,240,0,
- 0,127,224,0,255,255,255,248,0,63,240,0,
- 0,255,192,1,255,255,255,252,0,31,248,0,
- 1,255,128,7,255,255,255,255,0,15,252,0,
- 1,255,0,15,255,255,255,255,128,7,252,0,
- 3,255,0,63,255,255,255,255,224,7,254,0,
- 3,254,0,127,255,192,31,255,240,3,254,0,
- 7,252,0,255,252,0,1,255,248,1,255,0,
- 7,252,1,255,240,0,0,127,252,1,255,0,
- 15,248,1,255,192,0,0,31,252,0,255,128,
- 15,240,3,255,128,0,0,15,254,0,127,128,
- 31,240,7,255,0,0,0,7,255,0,127,192,
- 31,224,7,254,0,0,0,3,255,0,63,192,
- 63,224,15,252,0,0,0,1,255,128,63,224,
- 63,224,31,248,0,63,192,0,255,192,63,224,
- 63,192,31,240,0,255,240,0,127,192,31,224,
- 63,192,63,224,3,255,252,0,63,224,31,224,
- 127,192,63,224,7,255,254,0,63,224,31,240,
- 127,128,63,192,15,255,255,0,31,224,15,240,
- 127,128,127,192,31,255,255,128,31,240,15,240,
- 127,128,127,128,63,255,255,192,15,240,15,240,
- 127,128,127,128,63,255,255,192,15,240,15,240,
- 255,0,127,128,127,240,255,224,15,240,7,240,
- 255,0,255,128,127,192,63,224,15,248,7,240,
- 255,0,255,0,255,128,31,240,7,248,7,240,
- 255,0,255,0,255,128,31,240,7,248,7,240,
- 255,0,255,0,255,0,15,240,7,248,7,240,
- 255,0,255,0,255,0,15,240,7,248,7,240,
- 255,0,255,0,255,0,15,240,7,248,7,240,
- 255,0,255,0,255,0,15,240,7,248,7,240,
- 255,0,255,0,255,128,31,240,7,248,7,240,
- 255,0,255,0,255,128,31,240,7,248,7,240,
- 255,0,255,0,127,192,63,224,7,248,7,240,
- 255,0,255,128,127,240,255,224,15,248,7,240,
- 255,0,127,128,63,255,255,192,15,240,7,240,
- 127,128,127,128,63,255,255,192,15,240,15,240,
- 127,128,127,128,31,255,255,128,15,240,15,240,
- 127,128,127,192,15,255,255,0,31,240,15,240,
- 127,128,63,192,7,255,254,0,31,224,15,240,
- 127,192,63,224,3,255,252,0,63,224,31,240,
- 63,192,63,224,0,255,240,0,63,224,31,224,
- 63,192,31,240,0,63,192,0,127,192,31,224,
- 63,224,31,248,0,0,0,0,255,192,63,224,
- 63,224,15,252,0,0,0,1,255,128,63,224,
- 31,224,7,254,0,0,0,3,255,0,63,192,
- 31,240,7,255,0,0,0,7,255,0,127,192,
- 15,240,3,255,128,0,0,15,254,0,127,128,
- 15,248,1,255,192,0,0,31,252,0,255,128,
- 7,252,1,255,240,0,0,127,252,1,255,0,
- 7,252,0,255,252,0,1,255,248,1,255,0,
- 3,254,0,127,255,192,31,255,240,3,254,0,
- 3,255,0,63,255,255,255,255,224,7,254,0,
- 1,255,0,15,255,255,255,255,128,7,252,0,
- 1,255,128,7,255,255,255,255,0,15,252,0,
- 0,255,192,1,255,255,255,252,0,31,248,0,
- 0,127,224,0,255,255,255,248,0,63,240,0,
- 0,127,240,0,63,255,255,224,0,127,240,0,
- 0,63,248,0,7,255,255,0,0,255,224,0,
- 0,31,252,0,0,127,240,0,1,255,192,0,
- 0,15,255,0,0,0,0,0,7,255,128,0,
- 0,7,255,128,0,0,0,0,15,255,0,0,
- 0,3,255,224,0,0,0,0,63,254,0,0,
- 0,1,255,240,0,0,0,0,127,252,0,0,
- 0,0,255,252,0,0,0,1,255,248,0,0,
- 0,0,127,255,128,0,0,15,255,240,0,0,
- 0,0,63,255,240,0,0,127,255,224,0,0,
- 0,0,15,255,255,0,7,255,255,128,0,0,
- 0,0,7,255,255,255,255,255,255,0,0,0,
- 0,0,1,255,255,255,255,255,252,0,0,0,
- 0,0,0,127,255,255,255,255,240,0,0,0,
- 0,0,0,31,255,255,255,255,192,0,0,0,
- 0,0,0,7,255,255,255,255,0,0,0,0,
- 0,0,0,1,255,255,255,252,0,0,0,0,
- 0,0,0,0,31,255,255,192,0,0,0,0,
- 0,0,0,0,0,255,248,0,0,0,0,0
-};
-
diff --git a/3rdparty/zint-2.4.4/backend/medical.c b/3rdparty/zint-2.4.4/backend/medical.c
deleted file mode 100644
index e26c410..0000000
--- a/3rdparty/zint-2.4.4/backend/medical.c
+++ /dev/null
@@ -1,308 +0,0 @@
-/* medical.c - Handles 1 track and 2 track pharmacode and Codabar */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include
-#include
-#include
-#include "common.h"
-
-extern int c39(struct zint_symbol *symbol, unsigned char source[], int length);
-/* Codabar table checked against EN 798:1995 */
-
-#define CALCIUM "0123456789-$:/.+ABCD"
-
-static char *CodaTable[20] = {"11111221", "11112211", "11121121", "22111111", "11211211", "21111211",
- "12111121", "12112111", "12211111", "21121111", "11122111", "11221111", "21112121", "21211121",
- "21212111", "11212121", "11221211", "12121121", "11121221", "11122211"};
-
-int pharma_one(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- /* "Pharmacode can represent only a single integer from 3 to 131070. Unlike other
- commonly used one-dimensional barcode schemes, pharmacode does not store the data in a
- form corresponding to the human-readable digits; the number is encoded in binary, rather
- than decimal. Pharmacode is read from right to left: with n as the bar position starting
- at 0 on the right, each narrow bar adds 2n to the value and each wide bar adds 2(2^n).
- The minimum barcode is 2 bars and the maximum 16, so the smallest number that could
- be encoded is 3 (2 narrow bars) and the biggest is 131070 (16 wide bars)."
- - http://en.wikipedia.org/wiki/Pharmacode */
-
- /* This code uses the One Track Pharamacode calculating algorithm as recommended by
- the specification at http://www.laetus.com/laetus.php?request=file&id=69 */
-
- unsigned long int tester;
- int counter, error_number, h;
- char inter[18] = { 0 }; /* 131070 -> 17 bits */
- char dest[64]; /* 17 * 2 + 1 */
-
- error_number = 0;
-
- if(length > 6) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- tester = atoi((char*)source);
-
- if((tester < 3) || (tester > 131070)) {
- strcpy(symbol->errtxt, "Data out of range");
- return ERROR_INVALID_DATA1;
- }
-
- do
- {
- if(!(tester & 1)) {
- concat(inter, "W");
- tester = (tester - 2) / 2;
- } else {
- concat(inter, "N");
- tester = (tester - 1) / 2;
- }
- }
- while(tester != 0);
-
- h = strlen(inter) - 1;
- *dest = '\0';
- for(counter = h; counter >= 0; counter--) {
- if(inter[counter] == 'W') {
- concat(dest, "32");
- } else {
- concat(dest, "12");
- }
- }
-
- expand(symbol, dest);
-
- return error_number;
-}
-
-int pharma_two_calc(struct zint_symbol *symbol, unsigned char source[], char dest[])
-{
- /* This code uses the Two Track Pharamacode defined in the document at
- http://www.laetus.com/laetus.php?request=file&id=69 and using a modified
- algorithm from the One Track system. This standard accepts integet values
- from 4 to 64570080. */
-
- unsigned long int tester;
- int counter, h;
- char inter[17];
- int error_number;
-
- tester = atoi((char*)source);
-
- if((tester < 4) || (tester > 64570080))
- {
- strcpy(symbol->errtxt, "Data out of range");
- return ERROR_INVALID_DATA1;
- }
- error_number = 0;
- strcpy(inter, "");
- do
- {
- switch(tester%3) {
- case 0:
- concat(inter, "3");
- tester = (tester - 3) / 3;
- break;
- case 1:
- concat(inter, "1");
- tester = (tester - 1) / 3;
- break;
- case 2:
- concat(inter, "2");
- tester = (tester - 2) / 3;
- break;
- }
- }
- while(tester != 0);
-
- h = strlen(inter) - 1;
- for(counter = h; counter >= 0; counter--)
- {
- dest[h - counter] = inter[counter];
- }
- dest[h + 1] = '\0';
-
- return error_number;
-}
-
-int pharma_two(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- /* Draws the patterns for two track pharmacode */
- char height_pattern[200];
- unsigned int loopey, h;
- int writer;
- int error_number = 0;
- strcpy(height_pattern, "");
-
- if(length > 8) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
- error_number = pharma_two_calc(symbol, source, height_pattern);
- if(error_number != 0) {
- return error_number;
- }
-
- writer = 0;
- h = strlen(height_pattern);
- for(loopey = 0; loopey < h; loopey++)
- {
- if((height_pattern[loopey] == '2') || (height_pattern[loopey] == '3'))
- {
- set_module(symbol, 0, writer);
- }
- if((height_pattern[loopey] == '1') || (height_pattern[loopey] == '3'))
- {
- set_module(symbol, 1, writer);
- }
- writer += 2;
- }
- symbol->rows = 2;
- symbol->width = writer - 1;
-
-
- return error_number;
-}
-
-int codabar(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* The Codabar system consisting of simple substitution */
-
- int i, error_number;
- char dest[512];
-
- error_number = 0;
- strcpy(dest, "");
-
- if(length > 60) { /* No stack smashing please */
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- to_upper(source);
- error_number = is_sane(CALCIUM, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
- /* Codabar must begin and end with the characters A, B, C or D */
- if((source[0] != 'A') && (source[0] != 'B') && (source[0] != 'C') && (source[0] != 'D'))
- {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return ERROR_INVALID_DATA1;
- }
-
- if((source[length - 1] != 'A') && (source[length - 1] != 'B') &&
- (source[length - 1] != 'C') && (source[length - 1] != 'D'))
- {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return ERROR_INVALID_DATA1;
- }
-
- for(i = 0; i < length; i++)
- {
- lookup(CALCIUM, CodaTable, source[i], dest);
- }
-
- expand(symbol, dest);
- ustrcpy(symbol->text, source);
- return error_number;
-}
-
-int code32(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Italian Pharmacode */
- int i, zeroes, error_number, checksum, checkpart, checkdigit;
- char localstr[10], risultante[7];
- long int pharmacode, remainder, devisor;
- int codeword[6];
- char tabella[34];
-
- /* Validate the input */
- if(length > 8) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- /* Add leading zeros as required */
- zeroes = 8 - length;
- memset(localstr, '0', zeroes);
- strcpy(localstr + zeroes, (char*)source);
-
- /* Calculate the check digit */
- checksum = 0;
- checkpart = 0;
- for(i = 0; i < 4; i++) {
- checkpart = ctoi(localstr[i * 2]);
- checksum += checkpart;
- checkpart = 2 * (ctoi(localstr[(i * 2) + 1]));
- if(checkpart >= 10) {
- checksum += (checkpart - 10) + 1;
- } else {
- checksum += checkpart;
- }
- }
-
- /* Add check digit to data string */
- checkdigit = checksum % 10;
- localstr[8] = itoc(checkdigit);
- localstr[9] = '\0';
-
- /* Convert string into an integer value */
- pharmacode = atoi(localstr);
-
- /* Convert from decimal to base-32 */
- devisor = 33554432;
- for(i = 5; i >= 0; i--) {
- codeword[i] = pharmacode / devisor;
- remainder = pharmacode % devisor;
- pharmacode = remainder;
- devisor /= 32;
- }
-
- /* Look up values in 'Tabella di conversione' */
- strcpy(tabella, "0123456789BCDFGHJKLMNPQRSTUVWXYZ");
- for(i = 5; i >= 0; i--) {
- risultante[5 - i] = tabella[codeword[i]];
- }
- risultante[6] = '\0';
- /* Plot the barcode using Code 39 */
- error_number = c39(symbol, (unsigned char*)risultante, strlen(risultante));
- if(error_number != 0) { return error_number; }
-
- /* Override the normal text output with the Pharmacode number */
- ustrcpy(symbol->text, (unsigned char*)"A");
- uconcat(symbol->text, (unsigned char*)localstr);
-
- return error_number;
-}
diff --git a/3rdparty/zint-2.4.4/backend/ms_stdint.h b/3rdparty/zint-2.4.4/backend/ms_stdint.h
deleted file mode 100644
index 76987ab..0000000
--- a/3rdparty/zint-2.4.4/backend/ms_stdint.h
+++ /dev/null
@@ -1,234 +0,0 @@
-// ISO C9x compliant stdint.h for Microsoft Visual Studio
-// Based on ISO/IEC 9899:TC2 Committee draft (May 6, 2005) WG14/N1124
-//
-// Copyright (c) 2006-2008 Alexander Chemeris
-//
-// Redistribution and use in source and binary forms, with or without
-// modification, are permitted provided that the following conditions are met:
-//
-// 1. Redistributions of source code must retain the above copyright notice,
-// this list of conditions and the following disclaimer.
-//
-// 2. Redistributions in binary form must reproduce the above copyright
-// notice, this list of conditions and the following disclaimer in the
-// documentation and/or other materials provided with the distribution.
-//
-// 3. The name of the author may be used to endorse or promote products
-// derived from this software without specific prior written permission.
-//
-// THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
-// WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-// MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
-// EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
-// OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
-// WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
-// OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
-// ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-///////////////////////////////////////////////////////////////////////////////
-
-/* @(#) $Id: ms_stdint.h,v 1.1 2009/09/19 08:16:21 hooper114 Exp $ */
-
-#ifndef _MSC_VER // [
-#error "Use this header only with Microsoft Visual C++ compilers!"
-#endif // _MSC_VER ]
-
-#ifndef _MSC_STDINT_H_ // [
-#define _MSC_STDINT_H_
-
-#if _MSC_VER > 1000
-#pragma once
-#endif
-
-#include
-
-// For Visual Studio 6 in C++ mode wrap include with 'extern "C++" {}'
-// or compiler give many errors like this:
-// error C2733: second C linkage of overloaded function 'wmemchr' not allowed
-#if (_MSC_VER < 1300) && defined(__cplusplus)
- extern "C++" {
-#endif
-# include
-#if (_MSC_VER < 1300) && defined(__cplusplus)
- }
-#endif
-
-// Define _W64 macros to mark types changing their size, like intptr_t.
-#ifndef _W64
-# if !defined(__midl) && (defined(_X86_) || defined(_M_IX86)) && _MSC_VER >= 1300
-# define _W64 __w64
-# else
-# define _W64
-# endif
-#endif
-
-
-// 7.18.1 Integer types
-
-// 7.18.1.1 Exact-width integer types
-typedef __int8 int8_t;
-typedef __int16 int16_t;
-typedef __int32 int32_t;
-typedef __int64 int64_t;
-typedef unsigned __int8 uint8_t;
-typedef unsigned __int16 uint16_t;
-typedef unsigned __int32 uint32_t;
-typedef unsigned __int64 uint64_t;
-
-// 7.18.1.2 Minimum-width integer types
-typedef int8_t int_least8_t;
-typedef int16_t int_least16_t;
-typedef int32_t int_least32_t;
-typedef int64_t int_least64_t;
-typedef uint8_t uint_least8_t;
-typedef uint16_t uint_least16_t;
-typedef uint32_t uint_least32_t;
-typedef uint64_t uint_least64_t;
-
-// 7.18.1.3 Fastest minimum-width integer types
-typedef int8_t int_fast8_t;
-typedef int16_t int_fast16_t;
-typedef int32_t int_fast32_t;
-typedef int64_t int_fast64_t;
-typedef uint8_t uint_fast8_t;
-typedef uint16_t uint_fast16_t;
-typedef uint32_t uint_fast32_t;
-typedef uint64_t uint_fast64_t;
-
-// 7.18.1.4 Integer types capable of holding object pointers
-#ifdef _WIN64 // [
- typedef __int64 intptr_t;
- typedef unsigned __int64 uintptr_t;
-#else // _WIN64 ][
- typedef _W64 int intptr_t;
- typedef _W64 unsigned int uintptr_t;
-#endif // _WIN64 ]
-
-// 7.18.1.5 Greatest-width integer types
-typedef int64_t intmax_t;
-typedef uint64_t uintmax_t;
-
-
-// 7.18.2 Limits of specified-width integer types
-
-#if !defined(__cplusplus) || defined(__STDC_LIMIT_MACROS) // [ See footnote 220 at page 257 and footnote 221 at page 259
-
-// 7.18.2.1 Limits of exact-width integer types
-#define INT8_MIN ((int8_t)_I8_MIN)
-#define INT8_MAX _I8_MAX
-#define INT16_MIN ((int16_t)_I16_MIN)
-#define INT16_MAX _I16_MAX
-#define INT32_MIN ((int32_t)_I32_MIN)
-#define INT32_MAX _I32_MAX
-#define INT64_MIN ((int64_t)_I64_MIN)
-#define INT64_MAX _I64_MAX
-#define UINT8_MAX _UI8_MAX
-#define UINT16_MAX _UI16_MAX
-#define UINT32_MAX _UI32_MAX
-#define UINT64_MAX _UI64_MAX
-
-// 7.18.2.2 Limits of minimum-width integer types
-#define INT_LEAST8_MIN INT8_MIN
-#define INT_LEAST8_MAX INT8_MAX
-#define INT_LEAST16_MIN INT16_MIN
-#define INT_LEAST16_MAX INT16_MAX
-#define INT_LEAST32_MIN INT32_MIN
-#define INT_LEAST32_MAX INT32_MAX
-#define INT_LEAST64_MIN INT64_MIN
-#define INT_LEAST64_MAX INT64_MAX
-#define UINT_LEAST8_MAX UINT8_MAX
-#define UINT_LEAST16_MAX UINT16_MAX
-#define UINT_LEAST32_MAX UINT32_MAX
-#define UINT_LEAST64_MAX UINT64_MAX
-
-// 7.18.2.3 Limits of fastest minimum-width integer types
-#define INT_FAST8_MIN INT8_MIN
-#define INT_FAST8_MAX INT8_MAX
-#define INT_FAST16_MIN INT16_MIN
-#define INT_FAST16_MAX INT16_MAX
-#define INT_FAST32_MIN INT32_MIN
-#define INT_FAST32_MAX INT32_MAX
-#define INT_FAST64_MIN INT64_MIN
-#define INT_FAST64_MAX INT64_MAX
-#define UINT_FAST8_MAX UINT8_MAX
-#define UINT_FAST16_MAX UINT16_MAX
-#define UINT_FAST32_MAX UINT32_MAX
-#define UINT_FAST64_MAX UINT64_MAX
-
-// 7.18.2.4 Limits of integer types capable of holding object pointers
-#ifdef _WIN64 // [
-# define INTPTR_MIN INT64_MIN
-# define INTPTR_MAX INT64_MAX
-# define UINTPTR_MAX UINT64_MAX
-#else // _WIN64 ][
-# define INTPTR_MIN INT32_MIN
-# define INTPTR_MAX INT32_MAX
-# define UINTPTR_MAX UINT32_MAX
-#endif // _WIN64 ]
-
-// 7.18.2.5 Limits of greatest-width integer types
-#define INTMAX_MIN INT64_MIN
-#define INTMAX_MAX INT64_MAX
-#define UINTMAX_MAX UINT64_MAX
-
-// 7.18.3 Limits of other integer types
-
-#ifdef _WIN64 // [
-# define PTRDIFF_MIN _I64_MIN
-# define PTRDIFF_MAX _I64_MAX
-#else // _WIN64 ][
-# define PTRDIFF_MIN _I32_MIN
-# define PTRDIFF_MAX _I32_MAX
-#endif // _WIN64 ]
-
-#define SIG_ATOMIC_MIN INT_MIN
-#define SIG_ATOMIC_MAX INT_MAX
-
-#ifndef SIZE_MAX // [
-# ifdef _WIN64 // [
-# define SIZE_MAX _UI64_MAX
-# else // _WIN64 ][
-# define SIZE_MAX _UI32_MAX
-# endif // _WIN64 ]
-#endif // SIZE_MAX ]
-
-// WCHAR_MIN and WCHAR_MAX are also defined in
-#ifndef WCHAR_MIN // [
-# define WCHAR_MIN 0
-#endif // WCHAR_MIN ]
-#ifndef WCHAR_MAX // [
-# define WCHAR_MAX _UI16_MAX
-#endif // WCHAR_MAX ]
-
-#define WINT_MIN 0
-#define WINT_MAX _UI16_MAX
-
-#endif // __STDC_LIMIT_MACROS ]
-
-
-// 7.18.4 Limits of other integer types
-
-#if !defined(__cplusplus) || defined(__STDC_CONSTANT_MACROS) // [ See footnote 224 at page 260
-
-// 7.18.4.1 Macros for minimum-width integer constants
-
-#define INT8_C(val) val##i8
-#define INT16_C(val) val##i16
-#define INT32_C(val) val##i32
-#define INT64_C(val) val##i64
-
-#define UINT8_C(val) val##ui8
-#define UINT16_C(val) val##ui16
-#define UINT32_C(val) val##ui32
-#define UINT64_C(val) val##ui64
-
-// 7.18.4.2 Macros for greatest-width integer constants
-#define INTMAX_C INT64_C
-#define UINTMAX_C UINT64_C
-
-#endif // __STDC_CONSTANT_MACROS ]
-
-
-#endif // _MSC_STDINT_H_ ]
diff --git a/3rdparty/zint-2.4.4/backend/pdf417.c b/3rdparty/zint-2.4.4/backend/pdf417.c
deleted file mode 100644
index 91d47e6..0000000
--- a/3rdparty/zint-2.4.4/backend/pdf417.c
+++ /dev/null
@@ -1,1069 +0,0 @@
-/* pdf417.c - Handles PDF417 stacked symbology */
-
-/* Zint - A barcode generating program using libpng
- Copyright (C) 2008 Robin Stuart
- Portions Copyright (C) 2004 Grandzebu
- Bug Fixes thanks to KL Chin
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-/* This code is adapted from "Code barre PDF 417 / PDF 417 barcode" v2.5.0
- which is Copyright (C) 2004 (Grandzebu).
- The original code can be downloaded from http://grandzebu.net/index.php */
-
-/* NOTE: symbol->option_1 is used to specify the security level (i.e. control the
- number of check codewords)
-
- symbol->option_2 is used to adjust the width of the resulting symbol (i.e. the
- number of codeword columns not including row start and end data) */
-
-/* @(#) $Id: pdf417.c,v 1.21 2010/01/28 17:55:59 hooper114 Exp $ */
-
-#include
-#include
-#include
-#include
-#ifndef _MSC_VER
-#include
-#else
-#include
-#include "ms_stdint.h"
-#endif
-#include "pdf417.h"
-#include "common.h"
-#include "large.h"
-
-/*
- Three figure numbers in comments give the location of command equivalents in the
- original Visual Basic source code file pdf417.frm
- this code retains some original (French) procedure and variable names to ease conversion */
-
-/* text mode processing tables */
-
-static int asciix[95] = { 7, 8, 8, 4, 12, 4, 4, 8, 8, 8, 12, 4, 12, 12, 12, 12, 4, 4, 4, 4, 4, 4, 4, 4,
- 4, 4, 12, 8, 8, 4, 8, 8, 8, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
- 1, 1, 1, 1, 8, 8, 8, 4, 8, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
- 2, 2, 2, 2, 8, 8, 8, 8 };
-
-static int asciiy[95] = { 26, 10, 20, 15, 18, 21, 10, 28, 23, 24, 22, 20, 13, 16, 17, 19, 0, 1, 2, 3,
- 4, 5, 6, 7, 8, 9, 14, 0, 1, 23, 2, 25, 3, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15,
- 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 4, 5, 6, 24, 7, 8, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,
- 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 21, 27, 9 };
-
-/* Automatic sizing table */
-
-static int MicroAutosize[56] =
-{ 4, 6, 7, 8, 10, 12, 13, 14, 16, 18, 19, 20, 24, 29, 30, 33, 34, 37, 39, 46, 54, 58, 70, 72, 82, 90, 108, 126,
- 1, 14, 2, 7, 3, 25, 8, 16, 5, 17, 9, 6, 10, 11, 28, 12, 19, 13, 29, 20, 30, 21, 22, 31, 23, 32, 33, 34
-};
-
-int liste[2][1000]; /* global - okay, so I got _almost_ everything local! */
-
-/* 866 */
-
-int quelmode(char codeascii)
-{
- int mode = BYT;
- if ((codeascii == '\t') || (codeascii == '\n') || (codeascii == '\r') || ((codeascii >= ' ') && (codeascii <= '~'))) { mode = TEX; }
- else if((codeascii >= '0') && (codeascii <= '9')) { mode = NUM; }
- /* 876 */
-
- return mode;
-}
-
-/* 844 */
-void regroupe(int *indexliste)
-{
- int i, j;
-
- /* bring together same type blocks */
- if(*(indexliste) > 1) {
- i = 1;
- while(i < *(indexliste)) {
- if(liste[1][i - 1] == liste[1][i]) {
- /* bring together */
- liste[0][i - 1] = liste[0][i - 1] + liste[0][i];
- j = i + 1;
-
- /* decreace the list */
- while(j < *(indexliste)) {
- liste[0][j - 1] = liste[0][j];
- liste[1][j - 1] = liste[1][j];
- j++;
- }
- *(indexliste) = *(indexliste) - 1;
- i--;
- }
- i++;
- }
- }
- /* 865 */
-}
-
-/* 478 */
-void pdfsmooth(int *indexliste)
-{
- int i, crnt, last, next, length;
-
- for(i = 0; i < *(indexliste); i++) {
- crnt = liste[1][i];
- length = liste[0][i];
- if(i != 0) { last = liste[1][i - 1]; } else { last = FALSE; }
- if(i != *(indexliste) - 1) { next = liste[1][i + 1]; } else { next = FALSE; }
-
- if(crnt == NUM) {
- if(i == 0) { /* first block */
- if(*(indexliste) > 1) { /* and there are others */
- if((next == TEX) && (length < 8)) { liste[1][i] = TEX;}
- if((next == BYT) && (length == 1)) { liste[1][i] = BYT; }
- }
- } else {
- if(i == *(indexliste) - 1) { /* last block */
- if((last == TEX) && (length < 7)) { liste[1][i] = TEX; }
- if((last == BYT) && (length == 1)) { liste[1][i] = BYT; }
- } else { /* not first or last block */
- if(((last == BYT) && (next == BYT)) && (length < 4)) { liste[1][i] = BYT; }
- if(((last == BYT) && (next == TEX)) && (length < 4)) { liste[1][i] = TEX; }
- if(((last == TEX) && (next == BYT)) && (length < 5)) { liste[1][i] = TEX; }
- if(((last == TEX) && (next == TEX)) && (length < 8)) { liste[1][i] = TEX; }
- }
- }
- }
- }
- regroupe(indexliste);
- /* 520 */
- for(i = 0; i < *(indexliste); i++) {
- crnt = liste[1][i];
- length = liste[0][i];
- if(i != 0) { last = liste[1][i - 1]; } else { last = FALSE; }
- if(i != *(indexliste) - 1) { next = liste[1][i + 1]; } else { next = FALSE; }
-
- if((crnt == TEX) && (i > 0)) { /* not the first */
- if(i == *(indexliste) - 1) { /* the last one */
- if((last == BYT) && (length == 1)) { liste[1][i] = BYT; }
- } else { /* not the last one */
- if(((last == BYT) && (next == BYT)) && (length < 5)) { liste[1][i] = BYT; }
- if((((last == BYT) && (next != BYT)) || ((last != BYT) && (next == BYT))) && (length < 3)) {
- liste[1][i] = BYT;
- }
- }
- }
- }
- /* 540 */
- regroupe(indexliste);
-}
-
-/* 547 */
-void textprocess(int *chainemc, int *mclength, char chaine[], int start, int length, int block)
-{
- int j, indexlistet, curtable, listet[2][5000], chainet[5000], wnet;
- char codeascii;
-
- codeascii = 0;
- wnet = 0;
-
- for(j = 0; j < 1000; j++) {
- listet[0][j] = 0;
- }
- /* listet will contain the table numbers and the value of each characters */
- for(indexlistet = 0; indexlistet < length; indexlistet++) {
- codeascii = chaine[start + indexlistet];
- switch(codeascii) {
- case '\t': listet[0][indexlistet] = 12; listet[1][indexlistet] = 12; break;
- case '\n': listet[0][indexlistet] = 8; listet[1][indexlistet] = 15; break;
- case 13: listet[0][indexlistet] = 12; listet[1][indexlistet] = 11; break;
- default: listet[0][indexlistet] = asciix[codeascii - 32];
- listet[1][indexlistet] = asciiy[codeascii - 32]; break;
- }
- }
-
- /* 570 */
- curtable = 1; /* default table */
- for(j = 0; j < length; j++) {
- if(listet[0][j] & curtable) { /* The character is in the current table */
- chainet[wnet] = listet[1][j];
- wnet++;
- } else { /* Obliged to change table */
- int flag = FALSE; /* True if we change table for only one character */
- if (j == (length - 1)) {
- flag = TRUE;
- } else {
- if(!(listet[0][j] & listet[0][j + 1])) { flag = TRUE; }
- }
-
- if (flag) { /* we change only one character - look for temporary switch */
- if((listet[0][j] & 1) && (curtable == 2)) { /* T_UPP */
- chainet[wnet] = 27;
- chainet[wnet + 1] = listet[1][j];
- wnet += 2;
- }
- if(listet[0][j] & 8) { /* T_PUN */
- chainet[wnet] = 29;
- chainet[wnet + 1] = listet[1][j];
- wnet += 2;
- }
- if(!(((listet[0][j] & 1) && (curtable == 2)) || (listet[0][j] & 8))) {
- /* No temporary switch available */
- flag = FALSE;
- }
- }
-
- /* 599 */
- if (!(flag)) {
- int newtable;
-
- if(j == (length - 1)) {
- newtable = listet[0][j];
- } else {
- if(!(listet[0][j] & listet[0][j + 1])) {
- newtable = listet[0][j];
- } else {
- newtable = listet[0][j] & listet[0][j + 1];
- }
- }
-
- /* Maintain the first if several tables are possible */
- switch (newtable) {
- case 3:
- case 5:
- case 7:
- case 9:
- case 11:
- case 13:
- case 15:
- newtable = 1; break;
- case 6:
- case 10:
- case 14:
- newtable = 2; break;
- case 12:
- newtable = 4; break;
- }
-
- /* 619 - select the switch */
- switch (curtable) {
- case 1:
- switch (newtable) {
- case 2: chainet[wnet] = 27; wnet++; break;
- case 4: chainet[wnet] = 28; wnet++; break;
- case 8: chainet[wnet] = 28; wnet++; chainet[wnet] = 25; wnet++; break;
- } break;
- case 2:
- switch (newtable) {
- case 1: chainet[wnet] = 28; wnet++; chainet[wnet] = 28; wnet++; break;
- case 4: chainet[wnet] = 28; wnet++; break;
- case 8: chainet[wnet] = 28; wnet++; chainet[wnet] = 25; wnet++; break;
- } break;
- case 4:
- switch (newtable) {
- case 1: chainet[wnet] = 28; wnet++; break;
- case 2: chainet[wnet] = 27; wnet++; break;
- case 8: chainet[wnet] = 25; wnet++; break;
- } break;
- case 8:
- switch (newtable) {
- case 1: chainet[wnet] = 29; wnet++; break;
- case 2: chainet[wnet] = 29; wnet++; chainet[wnet] = 27; wnet++; break;
- case 4: chainet[wnet] = 29; wnet++; chainet[wnet] = 28; wnet++; break;
- } break;
- }
- curtable = newtable;
- /* 659 - at last we add the character */
- chainet[wnet] = listet[1][j];
- wnet++;
- }
- }
- }
-
- /* 663 */
- if (wnet & 1) {
- chainet[wnet] = 29;
- wnet++;
- }
- /* Now translate the string chainet into codewords */
- chainemc[*(mclength)] = 900;
- *(mclength) = *(mclength) + 1;
-
- for(j = 0; j < wnet; j+= 2) {
- int cw_number;
-
- cw_number = (30 * chainet[j]) + chainet[j + 1];
- chainemc[*(mclength)] = cw_number;
- *(mclength) = *(mclength) + 1;
-
- }
-}
-
-/* 671 */
-void byteprocess(int *chainemc, int *mclength, unsigned char chaine[], int start, int length, int block)
-{
- int debug = 0;
- int len = 0;
- unsigned int chunkLen = 0;
- uint64_t mantisa = 0ULL;
- uint64_t total = 0ULL;
-
- if(debug) printf("\nEntering byte mode at position %d\n", start);
-
- if(length == 1) {
- chainemc[(*mclength)++] = 913;
- chainemc[(*mclength)++] = chaine[start];
- if(debug) { printf("913 %d\n", chainemc[*mclength - 1]); }
- } else {
- /* select the switch for multiple of 6 bytes */
- if (length % 6 == 0) {
- chainemc[(*mclength)++] = 924;
- if(debug) printf("924 ");
- } else {
- chainemc[(*mclength)++] = 901;
- if(debug) printf("901 ");
- }
-
- while (len < length)
- {
- chunkLen = length - len;
- if (6 <= chunkLen) /* Take groups of 6 */
- {
- chunkLen = 6;
- len += chunkLen;
- total = 0ULL;
-
- while (chunkLen--)
- {
- mantisa = chaine[start++];
- total |= mantisa << (uint64_t)(chunkLen * 8ULL);
- }
-
- chunkLen = 5;
-
- while (chunkLen--)
- {
- chainemc[*mclength + chunkLen] = (int)(total % 900ULL);
- total /= 900ULL;
- }
- *mclength += 5;
- }
- else /* If it remain a group of less than 6 bytes */
- {
- len += chunkLen;
- while (chunkLen--)
- {
- chainemc[(*mclength)++] = chaine[start++];
- }
- }
- }
- }
-}
-
-/* 712 */
-void numbprocess(int *chainemc, int *mclength, char chaine[], int start, int length, int block)
-{
- int j, loop, longueur, dummy[100], dumlength, diviseur, nombre;
- char chainemod[50], chainemult[100], temp;
-
- strcpy(chainemod, "");
- for(loop = 0; loop <= 50; loop++) {
- dummy[loop] = 0;
- }
-
- chainemc[*(mclength)] = 902;
- *(mclength) = *(mclength) + 1;
-
- j = 0;
- while(j < length) {
- dumlength = 0;
- strcpy(chainemod, "");
- longueur = length - j;
- if(longueur > 44) { longueur = 44; }
- concat(chainemod, "1");
- for(loop = 1; loop <= longueur; loop++) {
- chainemod[loop] = chaine[start + loop + j - 1];
- }
- chainemod[longueur + 1] = '\0';
- do {
- diviseur = 900;
-
- /* 877 - gosub Modulo */
- strcpy(chainemult, "");
- nombre = 0;
- while(strlen(chainemod) != 0) {
- nombre *= 10;
- nombre += ctoi(chainemod[0]);
- for(loop = 0; loop < strlen(chainemod); loop++) {
- chainemod[loop] = chainemod[loop + 1];
- }
- if (nombre < diviseur) {
- if (strlen(chainemult) != 0) { concat(chainemult, "0"); }
- } else {
- temp = (nombre / diviseur) + '0';
- chainemult[strlen(chainemult) + 1] = '\0';
- chainemult[strlen(chainemult)] = temp;
- }
- nombre = nombre % diviseur;
- }
- diviseur = nombre;
- /* return to 723 */
-
- for(loop = dumlength; loop > 0; loop--) {
- dummy[loop] = dummy[loop - 1];
- }
- dummy[0] = diviseur;
- dumlength++;
- strcpy(chainemod, chainemult);
- } while(strlen(chainemult) != 0);
- for(loop = 0; loop < dumlength; loop++) {
- chainemc[*(mclength)] = dummy[loop];
- *(mclength) = *(mclength) + 1;
- }
- j += longueur;
- }
-}
-
-/* 366 */
-int pdf417(struct zint_symbol *symbol, unsigned char chaine[], int length)
-{
- int i, k, j, indexchaine, indexliste, mode, longueur, loop, mccorrection[520], offset;
- int total, chainemc[2700], mclength, c1, c2, c3, dummy[35], codeerr;
- char codebarre[140], pattern[580];
- int debug = 0;
-
- codeerr = 0;
-
- /* 456 */
- indexliste = 0;
- indexchaine = 0;
-
- mode = quelmode(chaine[indexchaine]);
-
- for(i = 0; i < 1000; i++) {
- liste[0][i] = 0;
- }
-
- /* 463 */
- do {
- liste[1][indexliste] = mode;
- while ((liste[1][indexliste] == mode) && (indexchaine < length)) {
- liste[0][indexliste]++;
- indexchaine++;
- mode = quelmode(chaine[indexchaine]);
- }
- indexliste++;
- } while (indexchaine < length);
-
- /* 474 */
- pdfsmooth(&indexliste);
-
- if(debug) {
- printf("Initial block pattern:\n");
- for(i = 0; i < indexliste; i++) {
- printf("Len: %d Type: ", liste[0][i]);
- switch(liste[1][i]) {
- case TEX: printf("Text\n"); break;
- case BYT: printf("Byte\n"); break;
- case NUM: printf("Number\n"); break;
- default: printf("ERROR\n"); break;
- }
- }
- }
-
- /* 541 - now compress the data */
- indexchaine = 0;
- mclength = 0;
- if(symbol->output_options & READER_INIT) {
- chainemc[mclength] = 921; /* Reader Initialisation */
- mclength++;
- }
- for(i = 0; i < indexliste; i++) {
- switch(liste[1][i]) {
- case TEX: /* 547 - text mode */
- textprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i);
- break;
- case BYT: /* 670 - octet stream mode */
- byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], i);
- break;
- case NUM: /* 712 - numeric mode */
- numbprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i);
- break;
- }
- indexchaine = indexchaine + liste[0][i];
- }
-
- if(debug) {
- printf("\nCompressed data stream:\n");
- for(i = 0; i < mclength; i++) {
- printf("%d ", chainemc[i]);
- }
- printf("\n\n");
- }
-
- /* 752 - Now take care of the number of CWs per row */
- if (symbol->option_1 < 0) {
- symbol->option_1 = 6;
- if(mclength <= 863) { symbol->option_1 = 5; }
- if(mclength <= 320) { symbol->option_1 = 4; }
- if(mclength <= 160) { symbol->option_1 = 3; }
- if(mclength <= 40) { symbol->option_1 = 2; }
- }
- k = 1;
- for(loop = 1; loop <= (symbol->option_1 + 1); loop++)
- {
- k *= 2;
- }
- longueur = mclength;
- if(symbol->option_2 > 30) { symbol->option_2 = 30; }
- if(symbol->option_2 < 1) {
- symbol->option_2 = 0.5 + sqrt((longueur + k) / 3.0);
- }
- if(((longueur + k) / symbol->option_2) > 90) {
- /* stop the symbol from becoming too high */
- symbol->option_2 = symbol->option_2 + 1;
- }
-
- if(longueur + k > 928) {
- /* Enforce maximum codeword limit */
- return 2;
- }
-
- if(((longueur + k) / symbol->option_2) > 90) {
- return 4;
- }
-
- /* 781 - Padding calculation */
- longueur = mclength + 1 + k;
- i = 0;
- if ((longueur / symbol->option_2) < 3) {
- i = (symbol->option_2 * 3) - longueur; /* A bar code must have at least three rows */
- } else {
- if((longueur % symbol->option_2) > 0) { i = symbol->option_2 - (longueur % symbol->option_2); }
- }
- /* We add the padding */
- while (i > 0) {
- chainemc[mclength] = 900;
- mclength++;
- i--;
- }
- /* we add the length descriptor */
- for(i = mclength; i > 0; i--) {
- chainemc[i] = chainemc[i - 1];
- }
- chainemc[0] = mclength + 1;
- mclength++;
-
- /* 796 - we now take care of the Reed Solomon codes */
- switch(symbol->option_1) {
- case 1: offset = 2; break;
- case 2: offset = 6; break;
- case 3: offset = 14; break;
- case 4: offset = 30; break;
- case 5: offset = 62; break;
- case 6: offset = 126; break;
- case 7: offset = 254; break;
- case 8: offset = 510; break;
- default: offset = 0; break;
- }
-
- longueur = mclength;
- for(loop = 0; loop < 520; loop++) {
- mccorrection[loop] = 0;
- }
- total = 0;
- for(i = 0; i < longueur; i++) {
- total = (chainemc[i] + mccorrection[k - 1]) % 929;
- for(j = k - 1; j > 0; j--) {
- mccorrection[j] = (mccorrection[j - 1] + 929 - (total * coefrs[offset + j]) % 929) % 929;
- }
- mccorrection[0] = (929 - (total * coefrs[offset + j]) % 929) % 929;
- }
-
- /* we add these codes to the string */
- for(i = k - 1; i >= 0; i--) {
- chainemc[mclength++] = mccorrection[i] ? 929 - mccorrection[i] : 0;
- }
-
- /* 818 - The CW string is finished */
- c1 = (mclength / symbol->option_2 - 1) / 3;
- c2 = symbol->option_1 * 3 + (mclength / symbol->option_2 - 1) % 3;
- c3 = symbol->option_2 - 1;
-
- /* we now encode each row */
- for(i = 0; i <= (mclength / symbol->option_2) - 1; i++) {
- for(j = 0; j < symbol->option_2 ; j++) {
- dummy[j + 1] = chainemc[i * symbol->option_2 + j];
- }
- k = (i / 3) * 30;
- switch(i % 3) {
- /* follows this pattern from US Patent 5,243,655:
- Row 0: L0 (row #, # of rows) R0 (row #, # of columns)
- Row 1: L1 (row #, security level) R1 (row #, # of rows)
- Row 2: L2 (row #, # of columns) R2 (row #, security level)
- Row 3: L3 (row #, # of rows) R3 (row #, # of columns)
- etc. */
- case 0:
- dummy[0] = k + c1;
- dummy[symbol->option_2 + 1] = k + c3;
- break;
- case 1:
- dummy[0] = k + c2;
- dummy[symbol->option_2 + 1] = k + c1;
- break;
- case 2:
- dummy[0] = k + c3;
- dummy[symbol->option_2 + 1] = k + c2;
- break;
- }
- strcpy(codebarre, "+*"); /* Start with a start char and a separator */
- if(symbol->symbology == BARCODE_PDF417TRUNC) {
- /* truncated - so same as before except knock off the last 5 chars */
- for(j = 0; j <= symbol->option_2; j++) {
- switch(i % 3) {
- case 1: offset = 929; break;
- case 2: offset = 1858; break;
- default: offset = 0; break;
- }
- concat(codebarre, codagemc[offset + dummy[j]]);
- concat(codebarre, "*");
- }
- } else {
- /* normal PDF417 symbol */
- for(j = 0; j <= symbol->option_2 + 1; j++) {
- switch(i % 3) {
- case 1: offset = 929; /* cluster(3) */ break;
- case 2: offset = 1858; /* cluster(6) */ break;
- default: offset = 0; /* cluster(0) */ break;
- }
- concat(codebarre, codagemc[offset + dummy[j]]);
- concat(codebarre, "*");
- }
- concat(codebarre, "-");
- }
-
- strcpy(pattern, "");
- for(loop = 0; loop < strlen(codebarre); loop++) {
- lookup(BRSET, PDFttf, codebarre[loop], pattern);
- }
- for(loop = 0; loop < strlen(pattern); loop++) {
- if(pattern[loop] == '1') { set_module(symbol, i, loop); }
- }
- if(symbol->height == 0) {
- symbol->row_height[i] = 3;
- }
- }
- symbol->rows = (mclength / symbol->option_2);
- symbol->width = strlen(pattern);
-
- /* 843 */
- return codeerr;
-}
-
-/* 345 */
-int pdf417enc(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- int codeerr, error_number;
-
- error_number = 0;
-
- if((symbol->option_1 < -1) || (symbol->option_1 > 8)) {
- strcpy(symbol->errtxt, "Security value out of range");
- symbol->option_1 = -1;
- error_number = WARN_INVALID_OPTION;
- }
- if((symbol->option_2 < 0) || (symbol->option_2 > 30)) {
- strcpy(symbol->errtxt, "Number of columns out of range");
- symbol->option_2 = 0;
- error_number = WARN_INVALID_OPTION;
- }
-
- /* 349 */
- codeerr = pdf417(symbol, source, length);
-
- /* 352 */
- if(codeerr != 0) {
- switch(codeerr) {
- case 1:
- strcpy(symbol->errtxt, "No such file or file unreadable");
- error_number = ERROR_INVALID_OPTION;
- break;
- case 2:
- strcpy(symbol->errtxt, "Input string too long");
- error_number = ERROR_TOO_LONG;
- break;
- case 3:
- strcpy(symbol->errtxt, "Number of codewords per row too small");
- error_number = WARN_INVALID_OPTION;
- break;
- case 4:
- strcpy(symbol->errtxt, "Data too long for specified number of columns");
- error_number = ERROR_TOO_LONG;
- break;
- default:
- strcpy(symbol->errtxt, "Something strange happened");
- error_number = ERROR_ENCODING_PROBLEM;
- break;
- }
- }
-
- /* 364 */
- return error_number;
-}
-
-
-int micro_pdf417(struct zint_symbol *symbol, unsigned char chaine[], int length)
-{ /* like PDF417 only much smaller! */
-
- int i, k, j, indexchaine, indexliste, mode, longueur, mccorrection[50], offset;
- int total, chainemc[2700], mclength, dummy[5], codeerr;
- char codebarre[100], pattern[580];
- int variant, LeftRAPStart, CentreRAPStart, RightRAPStart, StartCluster;
- int LeftRAP, CentreRAP, RightRAP, Cluster, writer, flip, loop;
- int debug = 0;
-
- /* Encoding starts out the same as PDF417, so use the same code */
- codeerr = 0;
-
- /* 456 */
- indexliste = 0;
- indexchaine = 0;
-
- mode = quelmode(chaine[indexchaine]);
-
- for(i = 0; i < 1000; i++) {
- liste[0][i] = 0;
- }
-
- /* 463 */
- do {
- liste[1][indexliste] = mode;
- while ((liste[1][indexliste] == mode) && (indexchaine < length)) {
- liste[0][indexliste]++;
- indexchaine++;
- mode = quelmode(chaine[indexchaine]);
- }
- indexliste++;
- } while (indexchaine < length);
-
- /* 474 */
- pdfsmooth(&indexliste);
-
- if(debug) {
- printf("Initial mapping:\n");
- for(i = 0; i < indexliste; i++) {
- printf("len: %d type: ", liste[0][i]);
- switch(liste[1][i]) {
- case TEX: printf("TEXT\n"); break;
- case BYT: printf("BYTE\n"); break;
- case NUM: printf("NUMBER\n"); break;
- default: printf("*ERROR*\n"); break;
- }
- }
- }
-
- /* 541 - now compress the data */
- indexchaine = 0;
- mclength = 0;
- if(symbol->output_options & READER_INIT) {
- chainemc[mclength] = 921; /* Reader Initialisation */
- mclength++;
- }
- for(i = 0; i < indexliste; i++) {
- switch(liste[1][i]) {
- case TEX: /* 547 - text mode */
- textprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i);
- break;
- case BYT: /* 670 - octet stream mode */
- byteprocess(chainemc, &mclength, chaine, indexchaine, liste[0][i], i);
- break;
- case NUM: /* 712 - numeric mode */
- numbprocess(chainemc, &mclength, (char*)chaine, indexchaine, liste[0][i], i);
- break;
- }
- indexchaine = indexchaine + liste[0][i];
- }
-
- /* This is where it all changes! */
-
- if(mclength > 126) {
- strcpy(symbol->errtxt, "Input data too long");
- return ERROR_TOO_LONG;
- }
- if(symbol->option_2 > 4) {
- strcpy(symbol->errtxt, "Specified width out of range");
- symbol->option_2 = 0;
- codeerr = WARN_INVALID_OPTION;
- }
-
- if(debug) {
- printf("\nEncoded Data Stream:\n");
- for(i = 0; i < mclength; i++) {
- printf("0x%02X ", chainemc[i]);
- }
- printf("\n");
- }
-
- /* Now figure out which variant of the symbol to use and load values accordingly */
-
- variant = 0;
-
- if((symbol->option_2 == 1) && (mclength > 20)) {
- /* the user specified 1 column but the data doesn't fit - go to automatic */
- symbol->option_2 = 0;
- strcpy(symbol->errtxt, "Specified symbol size too small for data");
- codeerr = WARN_INVALID_OPTION;
- }
-
- if((symbol->option_2 == 2) && (mclength > 37)) {
- /* the user specified 2 columns but the data doesn't fit - go to automatic */
- symbol->option_2 = 0;
- strcpy(symbol->errtxt, "Specified symbol size too small for data");
- codeerr = WARN_INVALID_OPTION;
- }
-
- if((symbol->option_2 == 3) && (mclength > 82)) {
- /* the user specified 3 columns but the data doesn't fit - go to automatic */
- symbol->option_2 = 0;
- strcpy(symbol->errtxt, "Specified symbol size too small for data");
- codeerr = WARN_INVALID_OPTION;
- }
-
- if(symbol->option_2 == 1) {
- /* the user specified 1 column and the data does fit */
- variant = 6;
- if(mclength <= 16) { variant = 5; }
- if(mclength <= 12) { variant = 4; }
- if(mclength <= 10) { variant = 3; }
- if(mclength <= 7) { variant = 2; }
- if(mclength <= 4) { variant = 1; }
- }
-
- if(symbol->option_2 == 2) {
- /* the user specified 2 columns and the data does fit */
- variant = 13;
- if(mclength <= 33) { variant = 12; }
- if(mclength <= 29) { variant = 11; }
- if(mclength <= 24) { variant = 10; }
- if(mclength <= 19) { variant = 9; }
- if(mclength <= 13) { variant = 8; }
- if(mclength <= 8) { variant = 7; }
- }
-
- if(symbol->option_2 == 3) {
- /* the user specified 3 columns and the data does fit */
- variant = 23;
- if(mclength <= 70) { variant = 22; }
- if(mclength <= 58) { variant = 21; }
- if(mclength <= 46) { variant = 20; }
- if(mclength <= 34) { variant = 19; }
- if(mclength <= 24) { variant = 18; }
- if(mclength <= 18) { variant = 17; }
- if(mclength <= 14) { variant = 16; }
- if(mclength <= 10) { variant = 15; }
- if(mclength <= 6) { variant = 14; }
- }
-
- if(symbol->option_2 == 4) {
- /* the user specified 4 columns and the data does fit */
- variant = 34;
- if(mclength <= 108) { variant = 33; }
- if(mclength <= 90) { variant = 32; }
- if(mclength <= 72) { variant = 31; }
- if(mclength <= 54) { variant = 30; }
- if(mclength <= 39) { variant = 29; }
- if(mclength <= 30) { variant = 28; }
- if(mclength <= 24) { variant = 27; }
- if(mclength <= 18) { variant = 26; }
- if(mclength <= 12) { variant = 25; }
- if(mclength <= 8) { variant = 24; }
- }
-
- if(variant == 0) {
- /* Zint can choose automatically from all available variations */
- for(i = 27; i >= 0; i--) {
-
- if(MicroAutosize[i] >= mclength) {
- variant = MicroAutosize[i + 28];
- }
- }
- }
-
- /* Now we have the variant we can load the data */
- variant --;
- symbol->option_2 = MicroVariants[variant]; /* columns */
- symbol->rows = MicroVariants[variant + 34]; /* rows */
- k = MicroVariants[variant + 68]; /* number of EC CWs */
- longueur = (symbol->option_2 * symbol->rows) - k; /* number of non-EC CWs */
- i = longueur - mclength; /* amount of padding required */
- offset = MicroVariants[variant + 102]; /* coefficient offset */
-
- if(debug) {
- printf("\nChoose symbol size:\n");
- printf("%d columns x %d rows\n", symbol->option_2, symbol->rows);
- printf("%d data codewords (including %d pads), %d ecc codewords\n", longueur, i, k);
- printf("\n");
- }
-
- /* We add the padding */
- while (i > 0) {
- chainemc[mclength] = 900;
- mclength++;
- i--;
- }
-
- /* Reed-Solomon error correction */
- longueur = mclength;
- for(loop = 0; loop < 50; loop++) {
- mccorrection[loop] = 0;
- }
- total = 0;
- for(i = 0; i < longueur; i++) {
- total = (chainemc[i] + mccorrection[k - 1]) % 929;
- for(j = k - 1; j >= 0; j--) {
- if(j == 0) {
- mccorrection[j] = (929 - (total * Microcoeffs[offset + j]) % 929) % 929;
- } else {
- mccorrection[j] = (mccorrection[j - 1] + 929 - (total * Microcoeffs[offset + j]) % 929) % 929;
- }
- }
- }
-
- for(j = 0; j < k; j++) {
- if(mccorrection[j] != 0) { mccorrection[j] = 929 - mccorrection[j]; }
- }
- /* we add these codes to the string */
- for(i = k - 1; i >= 0; i--) {
- chainemc[mclength] = mccorrection[i];
- mclength++;
- }
-
- if(debug) {
- printf("Encoded Data Stream with ECC:\n");
- for(i = 0; i < mclength; i++) {
- printf("0x%02X ", chainemc[i]);
- }
- printf("\n");
- }
-
- /* Now get the RAP (Row Address Pattern) start values */
- LeftRAPStart = RAPTable[variant];
- CentreRAPStart = RAPTable[variant + 34];
- RightRAPStart = RAPTable[variant + 68];
- StartCluster = RAPTable[variant + 102] / 3;
-
- /* That's all values loaded, get on with the encoding */
-
- LeftRAP = LeftRAPStart;
- CentreRAP = CentreRAPStart;
- RightRAP = RightRAPStart;
- Cluster = StartCluster; /* Cluster can be 0, 1 or 2 for Cluster(0), Cluster(3) and Cluster(6) */
-
- if(debug) printf("\nInternal row representation:\n");
- for(i = 0; i < symbol->rows; i++) {
- if(debug) printf("row %d: ", i);
- strcpy(codebarre, "");
- offset = 929 * Cluster;
- for(j = 0; j < 5; j++) {
- dummy[j] = 0;
- }
- for(j = 0; j < symbol->option_2 ; j++) {
- dummy[j + 1] = chainemc[i * symbol->option_2 + j];
- if(debug) printf("[%d] ", dummy[j + 1]);
- }
-
- /* Copy the data into codebarre */
- concat(codebarre, RAPLR[LeftRAP]);
- concat(codebarre, "1");
- concat(codebarre, codagemc[offset + dummy[1]]);
- concat(codebarre, "1");
- if(symbol->option_2 == 3) {
- concat(codebarre, RAPC[CentreRAP]);
- }
- if(symbol->option_2 >= 2) {
- concat(codebarre, "1");
- concat(codebarre, codagemc[offset + dummy[2]]);
- concat(codebarre, "1");
- }
- if(symbol->option_2 == 4) {
- concat(codebarre, RAPC[CentreRAP]);
- }
- if(symbol->option_2 >= 3) {
- concat(codebarre, "1");
- concat(codebarre, codagemc[offset + dummy[3]]);
- concat(codebarre, "1");
- }
- if(symbol->option_2 == 4) {
- concat(codebarre, "1");
- concat(codebarre, codagemc[offset + dummy[4]]);
- concat(codebarre, "1");
- }
- concat(codebarre, RAPLR[RightRAP]);
- concat(codebarre, "1"); /* stop */
- if(debug) printf("%s\n", codebarre);
-
- /* Now codebarre is a mixture of letters and numbers */
-
- writer = 0;
- flip = 1;
- strcpy(pattern, "");
- for(loop = 0; loop < strlen(codebarre); loop++) {
- if((codebarre[loop] >= '0') && (codebarre[loop] <= '9')) {
- for(k = 0; k < ctoi(codebarre[loop]); k++) {
- if(flip == 0) {
- pattern[writer] = '0';
- } else {
- pattern[writer] = '1';
- }
- writer++;
- }
- pattern[writer] = '\0';
- if(flip == 0) {
- flip = 1;
- } else {
- flip = 0;
- }
- } else {
- lookup(BRSET, PDFttf, codebarre[loop], pattern);
- writer += 5;
- }
- }
- symbol->width = writer;
-
- /* so now pattern[] holds the string of '1's and '0's. - copy this to the symbol */
- for(loop = 0; loop < strlen(pattern); loop++) {
- if(pattern[loop] == '1') { set_module(symbol, i, loop); }
- }
- symbol->row_height[i] = 2;
-
- /* Set up RAPs and Cluster for next row */
- LeftRAP++;
- CentreRAP++;
- RightRAP++;
- Cluster++;
-
- if(LeftRAP == 53) {
- LeftRAP = 1;
- }
- if(CentreRAP == 53) {
- CentreRAP = 1;
- }
- if(RightRAP == 53) {
- RightRAP = 1;
- }
- if(Cluster == 3) {
- Cluster = 0;
- }
- }
-
- return codeerr;
-}
-
diff --git a/3rdparty/zint-2.4.4/backend/pdf417.h b/3rdparty/zint-2.4.4/backend/pdf417.h
deleted file mode 100644
index 4e65ecf..0000000
--- a/3rdparty/zint-2.4.4/backend/pdf417.h
+++ /dev/null
@@ -1,438 +0,0 @@
-/* pdf417.h - PDF417 tables and coefficients */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
- Portions Copyright (C) 2004 Grandzebu
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-/* this file contains the character table, the pre-calculated coefficients and the
- codeword patterns taken from lines 416 to 454 of pdf417.frm */
-
-#define TRUE 1
-#define FALSE 0
-#define TEX 900
-#define BYT 901
-#define NUM 902
-
-#define BRSET "ABCDEFabcdefghijklmnopqrstuvwxyz*+-"
-
-/* PDF417 error correction coefficients from Grand Zebu */
-static int coefrs[1022] = {
- /* k = 2 */
- 27, 917,
-
- /* k = 4 */
- 522, 568, 723, 809,
-
- /* k = 8 */
- 237, 308, 436, 284, 646, 653, 428, 379,
-
- /* k = 16 */
- 274, 562, 232, 755, 599, 524, 801, 132, 295, 116, 442, 428, 295, 42, 176, 65,
-
- /* k = 32 */
- 361, 575, 922, 525, 176, 586, 640, 321, 536, 742, 677, 742, 687, 284, 193, 517,
- 273, 494, 263, 147, 593, 800, 571, 320, 803, 133, 231, 390, 685, 330, 63, 410,
-
- /* k = 64 */
- 539, 422, 6, 93, 862, 771, 453, 106, 610, 287, 107, 505, 733, 877, 381, 612,
- 723, 476, 462, 172, 430, 609, 858, 822, 543, 376, 511, 400, 672, 762, 283, 184,
- 440, 35, 519, 31, 460, 594, 225, 535, 517, 352, 605, 158, 651, 201, 488, 502,
- 648, 733, 717, 83, 404, 97, 280, 771, 840, 629, 4, 381, 843, 623, 264, 543,
-
- /* k = 128 */
- 521, 310, 864, 547, 858, 580, 296, 379, 53, 779, 897, 444, 400, 925, 749, 415,
- 822, 93, 217, 208, 928, 244, 583, 620, 246, 148, 447, 631, 292, 908, 490, 704,
- 516, 258, 457, 907, 594, 723, 674, 292, 272, 96, 684, 432, 686, 606, 860, 569,
- 193, 219, 129, 186, 236, 287, 192, 775, 278, 173, 40, 379, 712, 463, 646, 776,
- 171, 491, 297, 763, 156, 732, 95, 270, 447, 90, 507, 48, 228, 821, 808, 898,
- 784, 663, 627, 378, 382, 262, 380, 602, 754, 336, 89, 614, 87, 432, 670, 616,
- 157, 374, 242, 726, 600, 269, 375, 898, 845, 454, 354, 130, 814, 587, 804, 34,
- 211, 330, 539, 297, 827, 865, 37, 517, 834, 315, 550, 86, 801, 4, 108, 539,
-
- /* k = 256 */
- 524, 894, 75, 766, 882, 857, 74, 204, 82, 586, 708, 250, 905, 786, 138, 720,
- 858, 194, 311, 913, 275, 190, 375, 850, 438, 733, 194, 280, 201, 280, 828, 757,
- 710, 814, 919, 89, 68, 569, 11, 204, 796, 605, 540, 913, 801, 700, 799, 137,
- 439, 418, 592, 668, 353, 859, 370, 694, 325, 240, 216, 257, 284, 549, 209, 884,
- 315, 70, 329, 793, 490, 274, 877, 162, 749, 812, 684, 461, 334, 376, 849, 521,
- 307, 291, 803, 712, 19, 358, 399, 908, 103, 511, 51, 8, 517, 225, 289, 470,
- 637, 731, 66, 255, 917, 269, 463, 830, 730, 433, 848, 585, 136, 538, 906, 90,
- 2, 290, 743, 199, 655, 903, 329, 49, 802, 580, 355, 588, 188, 462, 10, 134,
- 628, 320, 479, 130, 739, 71, 263, 318, 374, 601, 192, 605, 142, 673, 687, 234,
- 722, 384, 177, 752, 607, 640, 455, 193, 689, 707, 805, 641, 48, 60, 732, 621,
- 895, 544, 261, 852, 655, 309, 697, 755, 756, 60, 231, 773, 434, 421, 726, 528,
- 503, 118, 49, 795, 32, 144, 500, 238, 836, 394, 280, 566, 319, 9, 647, 550,
- 73, 914, 342, 126, 32, 681, 331, 792, 620, 60, 609, 441, 180, 791, 893, 754,
- 605, 383, 228, 749, 760, 213, 54, 297, 134, 54, 834, 299, 922, 191, 910, 532,
- 609, 829, 189, 20, 167, 29, 872, 449, 83, 402, 41, 656, 505, 579, 481, 173,
- 404, 251, 688, 95, 497, 555, 642, 543, 307, 159, 924, 558, 648, 55, 497, 10,
-
- /* k = 512 */
- 352, 77, 373, 504, 35, 599, 428, 207, 409, 574, 118, 498, 285, 380, 350, 492,
- 197, 265, 920, 155, 914, 299, 229, 643, 294, 871, 306, 88, 87, 193, 352, 781,
- 846, 75, 327, 520, 435, 543, 203, 666, 249, 346, 781, 621, 640, 268, 794, 534,
- 539, 781, 408, 390, 644, 102, 476, 499, 290, 632, 545, 37, 858, 916, 552, 41,
- 542, 289, 122, 272, 383, 800, 485, 98, 752, 472, 761, 107, 784, 860, 658, 741,
- 290, 204, 681, 407, 855, 85, 99, 62, 482, 180, 20, 297, 451, 593, 913, 142,
- 808, 684, 287, 536, 561, 76, 653, 899, 729, 567, 744, 390, 513, 192, 516, 258,
- 240, 518, 794, 395, 768, 848, 51, 610, 384, 168, 190, 826, 328, 596, 786, 303,
- 570, 381, 415, 641, 156, 237, 151, 429, 531, 207, 676, 710, 89, 168, 304, 402,
- 40, 708, 575, 162, 864, 229, 65, 861, 841, 512, 164, 477, 221, 92, 358, 785,
- 288, 357, 850, 836, 827, 736, 707, 94, 8, 494, 114, 521, 2, 499, 851, 543,
- 152, 729, 771, 95, 248, 361, 578, 323, 856, 797, 289, 51, 684, 466, 533, 820,
- 669, 45, 902, 452, 167, 342, 244, 173, 35, 463, 651, 51, 699, 591, 452, 578,
- 37, 124, 298, 332, 552, 43, 427, 119, 662, 777, 475, 850, 764, 364, 578, 911,
- 283, 711, 472, 420, 245, 288, 594, 394, 511, 327, 589, 777, 699, 688, 43, 408,
- 842, 383, 721, 521, 560, 644, 714, 559, 62, 145, 873, 663, 713, 159, 672, 729,
- 624, 59, 193, 417, 158, 209, 563, 564, 343, 693, 109, 608, 563, 365, 181, 772,
- 677, 310, 248, 353, 708, 410, 579, 870, 617, 841, 632, 860, 289, 536, 35, 777,
- 618, 586, 424, 833, 77, 597, 346, 269, 757, 632, 695, 751, 331, 247, 184, 45,
- 787, 680, 18, 66, 407, 369, 54, 492, 228, 613, 830, 922, 437, 519, 644, 905,
- 789, 420, 305, 441, 207, 300, 892, 827, 141, 537, 381, 662, 513, 56, 252, 341,
- 242, 797, 838, 837, 720, 224, 307, 631, 61, 87, 560, 310, 756, 665, 397, 808,
- 851, 309, 473, 795, 378, 31, 647, 915, 459, 806, 590, 731, 425, 216, 548, 249,
- 321, 881, 699, 535, 673, 782, 210, 815, 905, 303, 843, 922, 281, 73, 469, 791,
- 660, 162, 498, 308, 155, 422, 907, 817, 187, 62, 16, 425, 535, 336, 286, 437,
- 375, 273, 610, 296, 183, 923, 116, 667, 751, 353, 62, 366, 691, 379, 687, 842,
- 37, 357, 720, 742, 330, 5, 39, 923, 311, 424, 242, 749, 321, 54, 669, 316,
- 342, 299, 534, 105, 667, 488, 640, 672, 576, 540, 316, 486, 721, 610, 46, 656,
- 447, 171, 616, 464, 190, 531, 297, 321, 762, 752, 533, 175, 134, 14, 381, 433,
- 717, 45, 111, 20, 596, 284, 736, 138, 646, 411, 877, 669, 141, 919, 45, 780,
- 407, 164, 332, 899, 165, 726, 600, 325, 498, 655, 357, 752, 768, 223, 849, 647,
- 63, 310, 863, 251, 366, 304, 282, 738, 675, 410, 389, 244, 31, 121, 303, 263 };
-
-
-static char *codagemc[2787] = { "urA", "xfs", "ypy", "unk", "xdw", "yoz", "pDA", "uls", "pBk", "eBA",
- "pAs", "eAk", "prA", "uvs", "xhy", "pnk", "utw", "xgz", "fDA", "pls", "fBk", "frA", "pvs",
- "uxy", "fnk", "ptw", "uwz", "fls", "psy", "fvs", "pxy", "ftw", "pwz", "fxy", "yrx", "ufk",
- "xFw", "ymz", "onA", "uds", "xEy", "olk", "ucw", "dBA", "oks", "uci", "dAk", "okg", "dAc",
- "ovk", "uhw", "xaz", "dnA", "ots", "ugy", "dlk", "osw", "ugj", "dks", "osi", "dvk", "oxw",
- "uiz", "dts", "owy", "dsw", "owj", "dxw", "oyz", "dwy", "dwj", "ofA", "uFs", "xCy", "odk",
- "uEw", "xCj", "clA", "ocs", "uEi", "ckk", "ocg", "ckc", "ckE", "cvA", "ohs", "uay", "ctk",
- "ogw", "uaj", "css", "ogi", "csg", "csa", "cxs", "oiy", "cww", "oij", "cwi", "cyy", "oFk",
- "uCw", "xBj", "cdA", "oEs", "uCi", "cck", "oEg", "uCb", "ccc", "oEa", "ccE", "oED", "chk",
- "oaw", "uDj", "cgs", "oai", "cgg", "oab", "cga", "cgD", "obj", "cib", "cFA", "oCs", "uBi",
- "cEk", "oCg", "uBb", "cEc", "oCa", "cEE", "oCD", "cEC", "cas", "cag", "caa", "cCk", "uAr",
- "oBa", "oBD", "cCB", "tfk", "wpw", "yez", "mnA", "tds", "woy", "mlk", "tcw", "woj", "FBA",
- "mks", "FAk", "mvk", "thw", "wqz", "FnA", "mts", "tgy", "Flk", "msw", "Fks", "Fkg", "Fvk",
- "mxw", "tiz", "Fts", "mwy", "Fsw", "Fsi", "Fxw", "myz", "Fwy", "Fyz", "vfA", "xps", "yuy",
- "vdk", "xow", "yuj", "qlA", "vcs", "xoi", "qkk", "vcg", "xob", "qkc", "vca", "mfA", "tFs",
- "wmy", "qvA", "mdk", "tEw", "wmj", "qtk", "vgw", "xqj", "hlA", "Ekk", "mcg", "tEb", "hkk",
- "qsg", "hkc", "EvA", "mhs", "tay", "hvA", "Etk", "mgw", "taj", "htk", "qww", "vij", "hss",
- "Esg", "hsg", "Exs", "miy", "hxs", "Eww", "mij", "hww", "qyj", "hwi", "Eyy", "hyy", "Eyj",
- "hyj", "vFk", "xmw", "ytj", "qdA", "vEs", "xmi", "qck", "vEg", "xmb", "qcc", "vEa", "qcE",
- "qcC", "mFk", "tCw", "wlj", "qhk", "mEs", "tCi", "gtA", "Eck", "vai", "tCb", "gsk", "Ecc",
- "mEa", "gsc", "qga", "mED", "EcC", "Ehk", "maw", "tDj", "gxk", "Egs", "mai", "gws", "qii",
- "mab", "gwg", "Ega", "EgD", "Eiw", "mbj", "gyw", "Eii", "gyi", "Eib", "gyb", "gzj", "qFA",
- "vCs", "xli", "qEk", "vCg", "xlb", "qEc", "vCa", "qEE", "vCD", "qEC", "qEB", "EFA", "mCs",
- "tBi", "ghA", "EEk", "mCg", "tBb", "ggk", "qag", "vDb", "ggc", "EEE", "mCD", "ggE", "qaD",
- "ggC", "Eas", "mDi", "gis", "Eag", "mDb", "gig", "qbb", "gia", "EaD", "giD", "gji", "gjb",
- "qCk", "vBg", "xkr", "qCc", "vBa", "qCE", "vBD", "qCC", "qCB", "ECk", "mBg", "tAr", "gak",
- "ECc", "mBa", "gac", "qDa", "mBD", "gaE", "ECC", "gaC", "ECB", "EDg", "gbg", "gba", "gbD",
- "vAq", "vAn", "qBB", "mAq", "EBE", "gDE", "gDC", "gDB", "lfA", "sps", "wey", "ldk", "sow",
- "ClA", "lcs", "soi", "Ckk", "lcg", "Ckc", "CkE", "CvA", "lhs", "sqy", "Ctk", "lgw", "sqj",
- "Css", "lgi", "Csg", "Csa", "Cxs", "liy", "Cww", "lij", "Cwi", "Cyy", "Cyj", "tpk", "wuw",
- "yhj", "ndA", "tos", "wui", "nck", "tog", "wub", "ncc", "toa", "ncE", "toD", "lFk", "smw",
- "wdj", "nhk", "lEs", "smi", "atA", "Cck", "tqi", "smb", "ask", "ngg", "lEa", "asc", "CcE",
- "asE", "Chk", "law", "snj", "axk", "Cgs", "trj", "aws", "nii", "lab", "awg", "Cga", "awa",
- "Ciw", "lbj", "ayw", "Cii", "ayi", "Cib", "Cjj", "azj", "vpA", "xus", "yxi", "vok", "xug",
- "yxb", "voc", "xua", "voE", "xuD", "voC", "nFA", "tms", "wti", "rhA", "nEk", "xvi", "wtb",
- "rgk", "vqg", "xvb", "rgc", "nEE", "tmD", "rgE", "vqD", "nEB", "CFA", "lCs", "sli", "ahA",
- "CEk", "lCg", "slb", "ixA", "agk", "nag", "tnb", "iwk", "rig", "vrb", "lCD", "iwc", "agE",
- "naD", "iwE", "CEB", "Cas", "lDi", "ais", "Cag", "lDb", "iys", "aig", "nbb", "iyg", "rjb",
- "CaD", "aiD", "Cbi", "aji", "Cbb", "izi", "ajb", "vmk", "xtg", "ywr", "vmc", "xta", "vmE",
- "xtD", "vmC", "vmB", "nCk", "tlg", "wsr", "rak", "nCc", "xtr", "rac", "vna", "tlD", "raE",
- "nCC", "raC", "nCB", "raB", "CCk", "lBg", "skr", "aak", "CCc", "lBa", "iik", "aac", "nDa",
- "lBD", "iic", "rba", "CCC", "iiE", "aaC", "CCB", "aaB", "CDg", "lBr", "abg", "CDa", "ijg",
- "aba", "CDD", "ija", "abD", "CDr", "ijr", "vlc", "xsq", "vlE", "xsn", "vlC", "vlB", "nBc",
- "tkq", "rDc", "nBE", "tkn", "rDE", "vln", "rDC", "nBB", "rDB", "CBc", "lAq", "aDc", "CBE",
- "lAn", "ibc", "aDE", "nBn", "ibE", "rDn", "CBB", "ibC", "aDB", "ibB", "aDq", "ibq", "ibn",
- "xsf", "vkl", "tkf", "nAm", "nAl", "CAo", "aBo", "iDo", "CAl", "aBl", "kpk", "BdA", "kos",
- "Bck", "kog", "seb", "Bcc", "koa", "BcE", "koD", "Bhk", "kqw", "sfj", "Bgs", "kqi", "Bgg",
- "kqb", "Bga", "BgD", "Biw", "krj", "Bii", "Bib", "Bjj", "lpA", "sus", "whi", "lok", "sug",
- "loc", "sua", "loE", "suD", "loC", "BFA", "kms", "sdi", "DhA", "BEk", "svi", "sdb", "Dgk",
- "lqg", "svb", "Dgc", "BEE", "kmD", "DgE", "lqD", "BEB", "Bas", "kni", "Dis", "Bag", "knb",
- "Dig", "lrb", "Dia", "BaD", "Bbi", "Dji", "Bbb", "Djb", "tuk", "wxg", "yir", "tuc", "wxa",
- "tuE", "wxD", "tuC", "tuB", "lmk", "stg", "nqk", "lmc", "sta", "nqc", "tva", "stD", "nqE",
- "lmC", "nqC", "lmB", "nqB", "BCk", "klg", "Dak", "BCc", "str", "bik", "Dac", "lna", "klD",
- "bic", "nra", "BCC", "biE", "DaC", "BCB", "DaB", "BDg", "klr", "Dbg", "BDa", "bjg", "Dba",
- "BDD", "bja", "DbD", "BDr", "Dbr", "bjr", "xxc", "yyq", "xxE", "yyn", "xxC", "xxB", "ttc",
- "wwq", "vvc", "xxq", "wwn", "vvE", "xxn", "vvC", "ttB", "vvB", "llc", "ssq", "nnc", "llE",
- "ssn", "rrc", "nnE", "ttn", "rrE", "vvn", "llB", "rrC", "nnB", "rrB", "BBc", "kkq", "DDc",
- "BBE", "kkn", "bbc", "DDE", "lln", "jjc", "bbE", "nnn", "BBB", "jjE", "rrn", "DDB", "jjC",
- "BBq", "DDq", "BBn", "bbq", "DDn", "jjq", "bbn", "jjn", "xwo", "yyf", "xwm", "xwl", "tso",
- "wwf", "vto", "xwv", "vtm", "tsl", "vtl", "lko", "ssf", "nlo", "lkm", "rno", "nlm", "lkl",
- "rnm", "nll", "rnl", "BAo", "kkf", "DBo", "lkv", "bDo", "DBm", "BAl", "jbo", "bDm", "DBl",
- "jbm", "bDl", "jbl", "DBv", "jbv", "xwd", "vsu", "vst", "nku", "rlu", "rlt", "DAu", "bBu",
- "jDu", "jDt", "ApA", "Aok", "keg", "Aoc", "AoE", "AoC", "Aqs", "Aqg", "Aqa", "AqD", "Ari",
- "Arb", "kuk", "kuc", "sha", "kuE", "shD", "kuC", "kuB", "Amk", "kdg", "Bqk", "kvg", "kda",
- "Bqc", "kva", "BqE", "kvD", "BqC", "AmB", "BqB", "Ang", "kdr", "Brg", "kvr", "Bra", "AnD",
- "BrD", "Anr", "Brr", "sxc", "sxE", "sxC", "sxB", "ktc", "lvc", "sxq", "sgn", "lvE", "sxn",
- "lvC", "ktB", "lvB", "Alc", "Bnc", "AlE", "kcn", "Drc", "BnE", "AlC", "DrE", "BnC", "AlB",
- "DrC", "BnB", "Alq", "Bnq", "Aln", "Drq", "Bnn", "Drn", "wyo", "wym", "wyl", "swo", "txo",
- "wyv", "txm", "swl", "txl", "kso", "sgf", "lto", "swv", "nvo", "ltm", "ksl", "nvm", "ltl",
- "nvl", "Ako", "kcf", "Blo", "ksv", "Dno", "Blm", "Akl", "bro", "Dnm", "Bll", "brm", "Dnl",
- "Akv", "Blv", "Dnv", "brv", "yze", "yzd", "wye", "xyu", "wyd", "xyt", "swe", "twu", "swd",
- "vxu", "twt", "vxt", "kse", "lsu", "ksd", "ntu", "lst", "rvu", "ypk", "zew", "xdA", "yos",
- "zei", "xck", "yog", "zeb", "xcc", "yoa", "xcE", "yoD", "xcC", "xhk", "yqw", "zfj", "utA",
- "xgs", "yqi", "usk", "xgg", "yqb", "usc", "xga", "usE", "xgD", "usC", "uxk", "xiw", "yrj",
- "ptA", "uws", "xii", "psk", "uwg", "xib", "psc", "uwa", "psE", "uwD", "psC", "pxk", "uyw",
- "xjj", "ftA", "pws", "uyi", "fsk", "pwg", "uyb", "fsc", "pwa", "fsE", "pwD", "fxk", "pyw",
- "uzj", "fws", "pyi", "fwg", "pyb", "fwa", "fyw", "pzj", "fyi", "fyb", "xFA", "yms", "zdi",
- "xEk", "ymg", "zdb", "xEc", "yma", "xEE", "ymD", "xEC", "xEB", "uhA", "xas", "yni", "ugk",
- "xag", "ynb", "ugc", "xaa", "ugE", "xaD", "ugC", "ugB", "oxA", "uis", "xbi", "owk", "uig",
- "xbb", "owc", "uia", "owE", "uiD", "owC", "owB", "dxA", "oys", "uji", "dwk", "oyg", "ujb",
- "dwc", "oya", "dwE", "oyD", "dwC", "dys", "ozi", "dyg", "ozb", "dya", "dyD", "dzi", "dzb",
- "xCk", "ylg", "zcr", "xCc", "yla", "xCE", "ylD", "xCC", "xCB", "uak", "xDg", "ylr", "uac",
- "xDa", "uaE", "xDD", "uaC", "uaB", "oik", "ubg", "xDr", "oic", "uba", "oiE", "ubD", "oiC",
- "oiB", "cyk", "ojg", "ubr", "cyc", "oja", "cyE", "ojD", "cyC", "cyB", "czg", "ojr", "cza",
- "czD", "czr", "xBc", "ykq", "xBE", "ykn", "xBC", "xBB", "uDc", "xBq", "uDE", "xBn", "uDC",
- "uDB", "obc", "uDq", "obE", "uDn", "obC", "obB", "cjc", "obq", "cjE", "obn", "cjC", "cjB",
- "cjq", "cjn", "xAo", "ykf", "xAm", "xAl", "uBo", "xAv", "uBm", "uBl", "oDo", "uBv", "oDm",
- "oDl", "cbo", "oDv", "cbm", "cbl", "xAe", "xAd", "uAu", "uAt", "oBu", "oBt", "wpA", "yes",
- "zFi", "wok", "yeg", "zFb", "woc", "yea", "woE", "yeD", "woC", "woB", "thA", "wqs", "yfi",
- "tgk", "wqg", "yfb", "tgc", "wqa", "tgE", "wqD", "tgC", "tgB", "mxA", "tis", "wri", "mwk",
- "tig", "wrb", "mwc", "tia", "mwE", "tiD", "mwC", "mwB", "FxA", "mys", "tji", "Fwk", "myg",
- "tjb", "Fwc", "mya", "FwE", "myD", "FwC", "Fys", "mzi", "Fyg", "mzb", "Fya", "FyD", "Fzi",
- "Fzb", "yuk", "zhg", "hjs", "yuc", "zha", "hbw", "yuE", "zhD", "hDy", "yuC", "yuB", "wmk",
- "ydg", "zEr", "xqk", "wmc", "zhr", "xqc", "yva", "ydD", "xqE", "wmC", "xqC", "wmB", "xqB",
- "tak", "wng", "ydr", "vik", "tac", "wna", "vic", "xra", "wnD", "viE", "taC", "viC", "taB",
- "viB", "mik", "tbg", "wnr", "qyk", "mic", "tba", "qyc", "vja", "tbD", "qyE", "miC", "qyC",
- "miB", "qyB", "Eyk", "mjg", "tbr", "hyk", "Eyc", "mja", "hyc", "qza", "mjD", "hyE", "EyC",
- "hyC", "EyB", "Ezg", "mjr", "hzg", "Eza", "hza", "EzD", "hzD", "Ezr", "ytc", "zgq", "grw",
- "ytE", "zgn", "gny", "ytC", "glz", "ytB", "wlc", "ycq", "xnc", "wlE", "ycn", "xnE", "ytn",
- "xnC", "wlB", "xnB", "tDc", "wlq", "vbc", "tDE", "wln", "vbE", "xnn", "vbC", "tDB", "vbB",
- "mbc", "tDq", "qjc", "mbE", "tDn", "qjE", "vbn", "qjC", "mbB", "qjB", "Ejc", "mbq", "gzc",
- "EjE", "mbn", "gzE", "qjn", "gzC", "EjB", "gzB", "Ejq", "gzq", "Ejn", "gzn", "yso", "zgf",
- "gfy", "ysm", "gdz", "ysl", "wko", "ycf", "xlo", "ysv", "xlm", "wkl", "xll", "tBo", "wkv",
- "vDo", "tBm", "vDm", "tBl", "vDl", "mDo", "tBv", "qbo", "vDv", "qbm", "mDl", "qbl", "Ebo",
- "mDv", "gjo", "Ebm", "gjm", "Ebl", "gjl", "Ebv", "gjv", "yse", "gFz", "ysd", "wke", "xku",
- "wkd", "xkt", "tAu", "vBu", "tAt", "vBt", "mBu", "qDu", "mBt", "qDt", "EDu", "gbu", "EDt",
- "gbt", "ysF", "wkF", "xkh", "tAh", "vAx", "mAx", "qBx", "wek", "yFg", "zCr", "wec", "yFa",
- "weE", "yFD", "weC", "weB", "sqk", "wfg", "yFr", "sqc", "wfa", "sqE", "wfD", "sqC", "sqB",
- "lik", "srg", "wfr", "lic", "sra", "liE", "srD", "liC", "liB", "Cyk", "ljg", "srr", "Cyc",
- "lja", "CyE", "ljD", "CyC", "CyB", "Czg", "ljr", "Cza", "CzD", "Czr", "yhc", "zaq", "arw",
- "yhE", "zan", "any", "yhC", "alz", "yhB", "wdc", "yEq", "wvc", "wdE", "yEn", "wvE", "yhn",
- "wvC", "wdB", "wvB", "snc", "wdq", "trc", "snE", "wdn", "trE", "wvn", "trC", "snB", "trB",
- "lbc", "snq", "njc", "lbE", "snn", "njE", "trn", "njC", "lbB", "njB", "Cjc", "lbq", "azc",
- "CjE", "lbn", "azE", "njn", "azC", "CjB", "azB", "Cjq", "azq", "Cjn", "azn", "zio", "irs",
- "rfy", "zim", "inw", "rdz", "zil", "ily", "ikz", "ygo", "zaf", "afy", "yxo", "ziv", "ivy",
- "adz", "yxm", "ygl", "itz", "yxl", "wco", "yEf", "wto", "wcm", "xvo", "yxv", "wcl", "xvm",
- "wtl", "xvl", "slo", "wcv", "tno", "slm", "vro", "tnm", "sll", "vrm", "tnl", "vrl", "lDo",
- "slv", "nbo", "lDm", "rjo", "nbm", "lDl", "rjm", "nbl", "rjl", "Cbo", "lDv", "ajo", "Cbm",
- "izo", "ajm", "Cbl", "izm", "ajl", "izl", "Cbv", "ajv", "zie", "ifw", "rFz", "zid", "idy",
- "icz", "yge", "aFz", "ywu", "ygd", "ihz", "ywt", "wce", "wsu", "wcd", "xtu", "wst", "xtt",
- "sku", "tlu", "skt", "vnu", "tlt", "vnt", "lBu", "nDu", "lBt", "rbu", "nDt", "rbt", "CDu",
- "abu", "CDt", "iju", "abt", "ijt", "ziF", "iFy", "iEz", "ygF", "ywh", "wcF", "wsh", "xsx",
- "skh", "tkx", "vlx", "lAx", "nBx", "rDx", "CBx", "aDx", "ibx", "iCz", "wFc", "yCq", "wFE",
- "yCn", "wFC", "wFB", "sfc", "wFq", "sfE", "wFn", "sfC", "sfB", "krc", "sfq", "krE", "sfn",
- "krC", "krB", "Bjc", "krq", "BjE", "krn", "BjC", "BjB", "Bjq", "Bjn", "yao", "zDf", "Dfy",
- "yam", "Ddz", "yal", "wEo", "yCf", "who", "wEm", "whm", "wEl", "whl", "sdo", "wEv", "svo",
- "sdm", "svm", "sdl", "svl", "kno", "sdv", "lro", "knm", "lrm", "knl", "lrl", "Bbo", "knv",
- "Djo", "Bbm", "Djm", "Bbl", "Djl", "Bbv", "Djv", "zbe", "bfw", "npz", "zbd", "bdy", "bcz",
- "yae", "DFz", "yiu", "yad", "bhz", "yit", "wEe", "wgu", "wEd", "wxu", "wgt", "wxt", "scu",
- "stu", "sct", "tvu", "stt", "tvt", "klu", "lnu", "klt", "nru", "lnt", "nrt", "BDu", "Dbu",
- "BDt", "bju", "Dbt", "bjt", "jfs", "rpy", "jdw", "roz", "jcy", "jcj", "zbF", "bFy", "zjh",
- "jhy", "bEz", "jgz", "yaF", "yih", "yyx", "wEF", "wgh", "wwx", "xxx", "sch", "ssx", "ttx",
- "vvx", "kkx", "llx", "nnx", "rrx", "BBx", "DDx", "bbx", "jFw", "rmz", "jEy", "jEj", "bCz",
- "jaz", "jCy", "jCj", "jBj", "wCo", "wCm", "wCl", "sFo", "wCv", "sFm", "sFl", "kfo", "sFv",
- "kfm", "kfl", "Aro", "kfv", "Arm", "Arl", "Arv", "yDe", "Bpz", "yDd", "wCe", "wau", "wCd",
- "wat", "sEu", "shu", "sEt", "sht", "kdu", "kvu", "kdt", "kvt", "Anu", "Bru", "Ant", "Brt",
- "zDp", "Dpy", "Doz", "yDF", "ybh", "wCF", "wah", "wix", "sEh", "sgx", "sxx", "kcx", "ktx",
- "lvx", "Alx", "Bnx", "Drx", "bpw", "nuz", "boy", "boj", "Dmz", "bqz", "jps", "ruy", "jow",
- "ruj", "joi", "job", "bmy", "jqy", "bmj", "jqj", "jmw", "rtj", "jmi", "jmb", "blj", "jnj",
- "jli", "jlb", "jkr", "sCu", "sCt", "kFu", "kFt", "Afu", "Aft", "wDh", "sCh", "sax", "kEx",
- "khx", "Adx", "Avx", "Buz", "Duy", "Duj", "buw", "nxj", "bui", "bub", "Dtj", "bvj", "jus",
- "rxi", "jug", "rxb", "jua", "juD", "bti", "jvi", "btb", "jvb", "jtg", "rwr", "jta", "jtD",
- "bsr", "jtr", "jsq", "jsn", "Bxj", "Dxi", "Dxb", "bxg", "nyr", "bxa", "bxD", "Dwr", "bxr",
- "bwq", "bwn", "pjk", "urw", "ejA", "pbs", "uny", "ebk", "pDw", "ulz", "eDs", "pBy", "eBw",
- "zfc", "fjk", "prw", "zfE", "fbs", "pny", "zfC", "fDw", "plz", "zfB", "fBy", "yrc", "zfq",
- "frw", "yrE", "zfn", "fny", "yrC", "flz", "yrB", "xjc", "yrq", "xjE", "yrn", "xjC", "xjB",
- "uzc", "xjq", "uzE", "xjn", "uzC", "uzB", "pzc", "uzq", "pzE", "uzn", "pzC", "djA", "ors",
- "ufy", "dbk", "onw", "udz", "dDs", "oly", "dBw", "okz", "dAy", "zdo", "drs", "ovy", "zdm",
- "dnw", "otz", "zdl", "dly", "dkz", "yno", "zdv", "dvy", "ynm", "dtz", "ynl", "xbo", "ynv",
- "xbm", "xbl", "ujo", "xbv", "ujm", "ujl", "ozo", "ujv", "ozm", "ozl", "crk", "ofw", "uFz",
- "cns", "ody", "clw", "ocz", "cky", "ckj", "zcu", "cvw", "ohz", "zct", "cty", "csz", "ylu",
- "cxz", "ylt", "xDu", "xDt", "ubu", "ubt", "oju", "ojt", "cfs", "oFy", "cdw", "oEz", "ccy",
- "ccj", "zch", "chy", "cgz", "ykx", "xBx", "uDx", "cFw", "oCz", "cEy", "cEj", "caz", "cCy",
- "cCj", "FjA", "mrs", "tfy", "Fbk", "mnw", "tdz", "FDs", "mly", "FBw", "mkz", "FAy", "zFo",
- "Frs", "mvy", "zFm", "Fnw", "mtz", "zFl", "Fly", "Fkz", "yfo", "zFv", "Fvy", "yfm", "Ftz",
- "yfl", "wro", "yfv", "wrm", "wrl", "tjo", "wrv", "tjm", "tjl", "mzo", "tjv", "mzm", "mzl",
- "qrk", "vfw", "xpz", "hbA", "qns", "vdy", "hDk", "qlw", "vcz", "hBs", "qky", "hAw", "qkj",
- "hAi", "Erk", "mfw", "tFz", "hrk", "Ens", "mdy", "hns", "qty", "mcz", "hlw", "Eky", "hky",
- "Ekj", "hkj", "zEu", "Evw", "mhz", "zhu", "zEt", "hvw", "Ety", "zht", "hty", "Esz", "hsz",
- "ydu", "Exz", "yvu", "ydt", "hxz", "yvt", "wnu", "xru", "wnt", "xrt", "tbu", "vju", "tbt",
- "vjt", "mju", "mjt", "grA", "qfs", "vFy", "gnk", "qdw", "vEz", "gls", "qcy", "gkw", "qcj",
- "gki", "gkb", "Efs", "mFy", "gvs", "Edw", "mEz", "gtw", "qgz", "gsy", "Ecj", "gsj", "zEh",
- "Ehy", "zgx", "gxy", "Egz", "gwz", "ycx", "ytx", "wlx", "xnx", "tDx", "vbx", "mbx", "gfk",
- "qFw", "vCz", "gds", "qEy", "gcw", "qEj", "gci", "gcb", "EFw", "mCz", "ghw", "EEy", "ggy",
- "EEj", "ggj", "Eaz", "giz", "gFs", "qCy", "gEw", "qCj", "gEi", "gEb", "ECy", "gay", "ECj",
- "gaj", "gCw", "qBj", "gCi", "gCb", "EBj", "gDj", "gBi", "gBb", "Crk", "lfw", "spz", "Cns",
- "ldy", "Clw", "lcz", "Cky", "Ckj", "zCu", "Cvw", "lhz", "zCt", "Cty", "Csz", "yFu", "Cxz",
- "yFt", "wfu", "wft", "sru", "srt", "lju", "ljt", "arA", "nfs", "tpy", "ank", "ndw", "toz",
- "als", "ncy", "akw", "ncj", "aki", "akb", "Cfs", "lFy", "avs", "Cdw", "lEz", "atw", "ngz",
- "asy", "Ccj", "asj", "zCh", "Chy", "zax", "axy", "Cgz", "awz", "yEx", "yhx", "wdx", "wvx",
- "snx", "trx", "lbx", "rfk", "vpw", "xuz", "inA", "rds", "voy", "ilk", "rcw", "voj", "iks",
- "rci", "ikg", "rcb", "ika", "afk", "nFw", "tmz", "ivk", "ads", "nEy", "its", "rgy", "nEj",
- "isw", "aci", "isi", "acb", "isb", "CFw", "lCz", "ahw", "CEy", "ixw", "agy", "CEj", "iwy",
- "agj", "iwj", "Caz", "aiz", "iyz", "ifA", "rFs", "vmy", "idk", "rEw", "vmj", "ics", "rEi",
- "icg", "rEb", "ica", "icD", "aFs", "nCy", "ihs", "aEw", "nCj", "igw", "raj", "igi", "aEb",
- "igb", "CCy", "aay", "CCj", "iiy", "aaj", "iij", "iFk", "rCw", "vlj", "iEs", "rCi", "iEg",
- "rCb", "iEa", "iED", "aCw", "nBj", "iaw", "aCi", "iai", "aCb", "iab", "CBj", "aDj", "ibj",
- "iCs", "rBi", "iCg", "rBb", "iCa", "iCD", "aBi", "iDi", "aBb", "iDb", "iBg", "rAr", "iBa",
- "iBD", "aAr", "iBr", "iAq", "iAn", "Bfs", "kpy", "Bdw", "koz", "Bcy", "Bcj", "Bhy", "Bgz",
- "yCx", "wFx", "sfx", "krx", "Dfk", "lpw", "suz", "Dds", "loy", "Dcw", "loj", "Dci", "Dcb",
- "BFw", "kmz", "Dhw", "BEy", "Dgy", "BEj", "Dgj", "Baz", "Diz", "bfA", "nps", "tuy", "bdk",
- "now", "tuj", "bcs", "noi", "bcg", "nob", "bca", "bcD", "DFs", "lmy", "bhs", "DEw", "lmj",
- "bgw", "DEi", "bgi", "DEb", "bgb", "BCy", "Day", "BCj", "biy", "Daj", "bij", "rpk", "vuw",
- "xxj", "jdA", "ros", "vui", "jck", "rog", "vub", "jcc", "roa", "jcE", "roD", "jcC", "bFk",
- "nmw", "ttj", "jhk", "bEs", "nmi", "jgs", "rqi", "nmb", "jgg", "bEa", "jga", "bED", "jgD",
- "DCw", "llj", "baw", "DCi", "jiw", "bai", "DCb", "jii", "bab", "jib", "BBj", "DDj", "bbj",
- "jjj", "jFA", "rms", "vti", "jEk", "rmg", "vtb", "jEc", "rma", "jEE", "rmD", "jEC", "jEB",
- "bCs", "nli", "jas", "bCg", "nlb", "jag", "rnb", "jaa", "bCD", "jaD", "DBi", "bDi", "DBb",
- "jbi", "bDb", "jbb", "jCk", "rlg", "vsr", "jCc", "rla", "jCE", "rlD", "jCC", "jCB", "bBg",
- "nkr", "jDg", "bBa", "jDa", "bBD", "jDD", "DAr", "bBr", "jDr", "jBc", "rkq", "jBE", "rkn",
- "jBC", "jBB", "bAq", "jBq", "bAn", "jBn", "jAo", "rkf", "jAm", "jAl", "bAf", "jAv", "Apw",
- "kez", "Aoy", "Aoj", "Aqz", "Bps", "kuy", "Bow", "kuj", "Boi", "Bob", "Amy", "Bqy", "Amj",
- "Bqj", "Dpk", "luw", "sxj", "Dos", "lui", "Dog", "lub", "Doa", "DoD", "Bmw", "ktj", "Dqw",
- "Bmi", "Dqi", "Bmb", "Dqb", "Alj", "Bnj", "Drj", "bpA", "nus", "txi", "bok", "nug", "txb",
- "boc", "nua", "boE", "nuD", "boC", "boB", "Dms", "lti", "bqs", "Dmg", "ltb", "bqg", "nvb",
- "bqa", "DmD", "bqD", "Bli", "Dni", "Blb", "bri", "Dnb", "brb", "ruk", "vxg", "xyr", "ruc",
- "vxa", "ruE", "vxD", "ruC", "ruB", "bmk", "ntg", "twr", "jqk", "bmc", "nta", "jqc", "rva",
- "ntD", "jqE", "bmC", "jqC", "bmB", "jqB", "Dlg", "lsr", "bng", "Dla", "jrg", "bna", "DlD",
- "jra", "bnD", "jrD", "Bkr", "Dlr", "bnr", "jrr", "rtc", "vwq", "rtE", "vwn", "rtC", "rtB",
- "blc", "nsq", "jnc", "blE", "nsn", "jnE", "rtn", "jnC", "blB", "jnB", "Dkq", "blq", "Dkn",
- "jnq", "bln", "jnn", "rso", "vwf", "rsm", "rsl", "bko", "nsf", "jlo", "bkm", "jlm", "bkl",
- "jll", "Dkf", "bkv", "jlv", "rse", "rsd", "bke", "jku", "bkd", "jkt", "Aey", "Aej", "Auw",
- "khj", "Aui", "Aub", "Adj", "Avj", "Bus", "kxi", "Bug", "kxb", "Bua", "BuD", "Ati", "Bvi",
- "Atb", "Bvb", "Duk", "lxg", "syr", "Duc", "lxa", "DuE", "lxD", "DuC", "DuB", "Btg", "kwr",
- "Dvg", "lxr", "Dva", "BtD", "DvD", "Asr", "Btr", "Dvr", "nxc", "tyq", "nxE", "tyn", "nxC",
- "nxB", "Dtc", "lwq", "bvc", "nxq", "lwn", "bvE", "DtC", "bvC", "DtB", "bvB", "Bsq", "Dtq",
- "Bsn", "bvq", "Dtn", "bvn", "vyo", "xzf", "vym", "vyl", "nwo", "tyf", "rxo", "nwm", "rxm",
- "nwl", "rxl", "Dso", "lwf", "bto", "Dsm", "jvo", "btm", "Dsl", "jvm", "btl", "jvl", "Bsf",
- "Dsv", "btv", "jvv", "vye", "vyd", "nwe", "rwu", "nwd", "rwt", "Dse", "bsu", "Dsd", "jtu",
- "bst", "jtt", "vyF", "nwF", "rwh", "DsF", "bsh", "jsx", "Ahi", "Ahb", "Axg", "kir", "Axa",
- "AxD", "Agr", "Axr", "Bxc", "kyq", "BxE", "kyn", "BxC", "BxB", "Awq", "Bxq", "Awn", "Bxn",
- "lyo", "szf", "lym", "lyl", "Bwo", "kyf", "Dxo", "lyv", "Dxm", "Bwl", "Dxl", "Awf", "Bwv",
- "Dxv", "tze", "tzd", "lye", "nyu", "lyd", "nyt", "Bwe", "Dwu", "Bwd", "bxu", "Dwt", "bxt",
- "tzF", "lyF", "nyh", "BwF", "Dwh", "bwx", "Aiq", "Ain", "Ayo", "kjf", "Aym", "Ayl", "Aif",
- "Ayv", "kze", "kzd", "Aye", "Byu", "Ayd", "Byt", "szp" };
-
-/* converts values into bar patterns - replacing Grand Zebu's true type font */
-static char *PDFttf[35] = { "00000", "00001", "00010", "00011", "00100", "00101", "00110", "00111",
- "01000", "01001", "01010", "01011", "01100", "01101", "01110", "01111", "10000", "10001",
- "10010", "10011", "10100", "10101", "10110", "10111", "11000", "11001", "11010",
- "11011", "11100", "11101", "11110", "11111", "01", "1111111101010100", "11111101000101001"};
-
-/* MicroPDF417 coefficients from ISO/IEC 24728:2006 Annex F */
-static int Microcoeffs[344] = {
- /* k = 7 */
- 76, 925, 537, 597, 784, 691, 437,
-
- /* k = 8 */
- 237, 308, 436, 284, 646, 653, 428, 379,
-
- /* k = 9 */
- 567, 527, 622, 257, 289, 362, 501, 441, 205,
-
- /* k = 10 */
- 377, 457, 64, 244, 826, 841, 818, 691, 266, 612,
-
- /* k = 11 */
- 462, 45, 565, 708, 825, 213, 15, 68, 327, 602, 904,
-
- /* k = 12 */
- 597, 864, 757, 201, 646, 684, 347, 127, 388, 7, 69, 851,
-
- /* k = 13 */
- 764, 713, 342, 384, 606, 583, 322, 592, 678, 204, 184, 394, 692,
-
- /* k = 14 */
- 669, 677, 154, 187, 241, 286, 274, 354, 478, 915, 691, 833, 105, 215,
-
- /* k = 15 */
- 460, 829, 476, 109, 904, 664, 230, 5, 80, 74, 550, 575, 147, 868, 642,
-
- /* k = 16 */
- 274, 562, 232, 755, 599, 524, 801, 132, 295, 116, 442, 428, 295, 42, 176, 65,
-
- /* k = 18 */
- 279, 577, 315, 624, 37, 855, 275, 739, 120, 297, 312, 202, 560, 321, 233, 756,
- 760, 573,
-
- /* k = 21 */
- 108, 519, 781, 534, 129, 425, 681, 553, 422, 716, 763, 693, 624, 610, 310, 691,
- 347, 165, 193, 259, 568,
-
- /* k = 26 */
- 443, 284, 887, 544, 788, 93, 477, 760, 331, 608, 269, 121, 159, 830, 446, 893,
- 699, 245, 441, 454, 325, 858, 131, 847, 764, 169,
-
- /* k = 32 */
- 361, 575, 922, 525, 176, 586, 640, 321, 536, 742, 677, 742, 687, 284, 193, 517,
- 273, 494, 263, 147, 593, 800, 571, 320, 803, 133, 231, 390, 685, 330, 63, 410,
-
- /* k = 38 */
- 234, 228, 438, 848, 133, 703, 529, 721, 788, 322, 280, 159, 738, 586, 388, 684,
- 445, 680, 245, 595, 614, 233, 812, 32, 284, 658, 745, 229, 95, 689, 920, 771,
- 554, 289, 231, 125, 117, 518,
-
- /* k = 44 */
- 476, 36, 659, 848, 678, 64, 764, 840, 157, 915, 470, 876, 109, 25, 632, 405,
- 417, 436, 714, 60, 376, 97, 413, 706, 446, 21, 3, 773, 569, 267, 272, 213,
- 31, 560, 231, 758, 103, 271, 572, 436, 339, 730, 82, 285,
-
- /* k = 50 */
- 923, 797, 576, 875, 156, 706, 63, 81, 257, 874, 411, 416, 778, 50, 205, 303,
- 188, 535, 909, 155, 637, 230, 534, 96, 575, 102, 264, 233, 919, 593, 865, 26,
- 579, 623, 766, 146, 10, 739, 246, 127, 71, 244, 211, 477, 920, 876, 427, 820,
- 718, 435 };
-
-/* rows, columns, error codewords, k-offset of valid MicroPDF417 sizes from ISO/IEC 24728:2006 */
-static int MicroVariants[170] =
-{ 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
- 11, 14, 17, 20, 24, 28, 8, 11, 14, 17, 20, 23, 26, 6, 8, 10, 12, 15, 20, 26, 32, 38, 44, 4, 6, 8, 10, 12, 15, 20, 26, 32, 38, 44,
- 7, 7, 7, 8, 8, 8, 8, 9, 9, 10, 11, 13, 15, 12, 14, 16, 18, 21, 26, 32, 38, 44, 50, 8, 12, 14, 16, 18, 21, 26, 32, 38, 44, 50,
- 0, 0, 0, 7, 7, 7, 7, 15, 15, 24, 34, 57, 84, 45, 70, 99, 115, 133, 154, 180, 212, 250, 294, 7, 45, 70, 99, 115, 133, 154, 180, 212, 250, 294 };
-/* rows, columns, error codewords, k-offset */
-
-/* following is Left RAP, Centre RAP, Right RAP and Start Cluster from ISO/IEC 24728:2006 tables 10, 11 and 12 */
-static int RAPTable[136] =
-{ 1, 8, 36, 19, 9, 25, 1, 1, 8, 36, 19, 9, 27, 1, 7, 15, 25, 37, 1, 1, 21, 15, 1, 47, 1, 7, 15, 25, 37, 1, 1, 21, 15, 1,
- 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 7, 15, 25, 37, 17, 9, 29, 31, 25, 19, 1, 7, 15, 25, 37, 17, 9, 29, 31, 25,
- 9, 8, 36, 19, 17, 33, 1, 9, 8, 36, 19, 17, 35, 1, 7, 15, 25, 37, 33, 17, 37, 47, 49, 43, 1, 7, 15, 25, 37, 33, 17, 37, 47, 49,
- 0, 3, 6, 0, 6, 0, 0, 0, 3, 6, 0, 6, 6, 0, 0, 6, 0, 0, 0, 0, 6, 6, 0, 3, 0, 0, 6, 0, 0, 0, 0, 6, 6, 0 };
-
-/* Left and Right Row Address Pattern from Table 2 */
-static char *RAPLR[53] = {"", "221311", "311311", "312211", "222211", "213211", "214111", "223111",
- "313111", "322111", "412111", "421111", "331111", "241111", "232111", "231211", "321211",
- "411211", "411121", "411112", "321112", "312112", "311212", "311221", "311131", "311122",
- "311113", "221113", "221122", "221131", "221221", "222121", "312121", "321121", "231121",
- "231112", "222112", "213112", "212212", "212221", "212131", "212122", "212113", "211213",
- "211123", "211132", "211141", "211231", "211222", "211312", "211321", "211411", "212311" };
-
-/* Centre Row Address Pattern from Table 2 */
-static char *RAPC[53] = {"", "112231", "121231", "122131", "131131", "131221", "132121", "141121",
- "141211", "142111", "133111", "132211", "131311", "122311", "123211", "124111", "115111",
- "114211", "114121", "123121", "123112", "122212", "122221", "121321", "121411", "112411",
- "113311", "113221", "113212", "113122", "122122", "131122", "131113", "122113", "113113",
- "112213", "112222", "112312", "112321", "111421", "111331", "111322", "111232", "111223",
- "111133", "111124", "111214", "112114", "121114", "121123", "121132", "112132", "112141" };
-
-void byteprocess(int *chainemc, int *mclength, unsigned char chaine[], int start, int length, int block);
\ No newline at end of file
diff --git a/3rdparty/zint-2.4.4/backend/plessey.c b/3rdparty/zint-2.4.4/backend/plessey.c
deleted file mode 100644
index 3c4cb5f..0000000
--- a/3rdparty/zint-2.4.4/backend/plessey.c
+++ /dev/null
@@ -1,498 +0,0 @@
-/* plessey.c - Handles Plessey and MSI Plessey */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include
-#include
-#include
-#include "common.h"
-
-
-#define SSET "0123456789ABCDEF"
-static char *PlessTable[16] = {"13131313", "31131313", "13311313", "31311313", "13133113", "31133113",
- "13313113", "31313113", "13131331", "31131331", "13311331", "31311331", "13133131",
- "31133131", "13313131", "31313131"};
-
-static char *MSITable[10] = {"12121212", "12121221", "12122112", "12122121", "12211212", "12211221",
- "12212112", "12212121", "21121212", "21121221"};
-
-
-int plessey(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Not MSI/Plessey but the older Plessey standard */
-
- unsigned int i, check;
- unsigned char *checkptr;
- static char grid[9] = {1,1,1,1,0,1,0,0,1};
- char dest[1024]; /* 8 + 65 * 8 + 8 * 2 + 9 + 1 ~ 1024 */
- int error_number;
-
- error_number = 0;
-
- if(length > 65) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(SSET, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
- checkptr = (unsigned char *)calloc (1, length * 4 + 8);
-
- /* Start character */
- strcpy(dest, "31311331");
-
- /* Data area */
- for(i = 0; i < length; i++)
- {
- check = posn(SSET, source[i]);
- lookup(SSET, PlessTable, source[i], dest);
- checkptr[4*i] = check & 1;
- checkptr[4*i+1] = (check >> 1) & 1;
- checkptr[4*i+2] = (check >> 2) & 1;
- checkptr[4*i+3] = (check >> 3) & 1;
- }
-
- /* CRC check digit code adapted from code by Leonid A. Broukhis
- used in GNU Barcode */
-
- for (i = 0; i < (4 * length); i++) {
- int j;
- if (checkptr[i])
- for (j = 0; j < 9; j++)
- checkptr[i+j] ^= grid[j];
- }
-
- for (i = 0; i < 8; i++) {
- switch(checkptr[length * 4 + i])
- {
- case 0: concat(dest, "13"); break;
- case 1: concat(dest, "31"); break;
- }
- }
-
- /* Stop character */
- concat(dest, "331311313");
-
- expand(symbol, dest);
- ustrcpy(symbol->text, source);
- free(checkptr);
- return error_number;
-}
-
-int msi_plessey(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Plain MSI Plessey - does not calculate any check character */
-
- unsigned int i;
- char dest[512]; /* 2 + 55 * 8 + 3 + 1 ~ 512 */
-
- if(length > 55) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- /* start character */
- strcpy(dest, "21");
-
- for(i = 0; i < length; i++)
- {
- lookup(NEON, MSITable, source[i], dest);
- }
-
- /* Stop character */
- concat (dest, "121");
-
- expand(symbol, dest);
- ustrcpy(symbol->text, source);
- return 0;
-}
-
-int msi_plessey_mod10(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* MSI Plessey with Modulo 10 check digit - algorithm from Barcode Island
- http://www.barcodeisland.com/ */
-
- int i;
- unsigned long wright, dau, pedwar, pump, n;
- char un[200], tri[32];
- int error_number, h;
- char dest[1000];
-
- error_number = 0;
-
- if(length > 18) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- /* start character */
- strcpy(dest, "21");
-
- /* draw data section */
- for(i = 0; i < length; i++)
- {
- lookup(NEON, MSITable, source[i], dest);
- }
-
- /* caluculate check digit */
- wright = 0;
- n = !(length & 1);
- for(i = n; i < length; i += 2)
- {
- un[wright++] = source[i];
- }
- un[wright] = '\0';
-
- dau = strtoul(un, NULL, 10);
- dau *= 2;
-
- sprintf(tri, "%ld", dau);
-
- pedwar = 0;
- h = strlen(tri);
- for(i = 0; i < h; i++)
- {
- pedwar += ctoi(tri[i]);
- }
-
- n = length & 1;
- for(i = n; i < length; i+=2)
- {
- pedwar += ctoi(source[i]);
- }
-
- pump = (10 - pedwar % 10);
- if(pump == 10)
- {
- pump = 0;
- }
-
- /* draw check digit */
- lookup(NEON, MSITable, itoc(pump), dest);
-
- /* Stop character */
- concat (dest, "121");
- expand(symbol, dest);
-
- ustrcpy(symbol->text, source);
- symbol->text[length] = itoc(pump);
- symbol->text[length + 1] = '\0';
- return error_number;
-}
-
-int msi_plessey_mod1010(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len)
-{ /* MSI Plessey with two Modulo 10 check digits - algorithm from
- Barcode Island http://www.barcodeisland.com/ */
-
- unsigned long i, n, wright, dau, pedwar, pump, chwech;
- char un[16], tri[32];
- int error_number, h;
- char dest[1000];
-
- error_number = 0;
-
- if(src_len > 18) { /* No Entry Stack Smashers! limit because of str->number conversion*/
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- /* start character */
- strcpy(dest, "21");
-
- /* draw data section */
- for(i = 0; i < src_len; i++)
- {
- lookup(NEON, MSITable, source[i], dest);
- }
-
- /* calculate first check digit */
- wright = 0;
-
- n = !(src_len & 1);
- for(i = n; i < src_len; i += 2)
- {
- un[wright++] = source[i];
- }
- un[wright] = '\0';
-
- dau = strtoul(un, NULL, 10);
- dau *= 2;
-
- sprintf(tri, "%ld", dau);
-
- pedwar = 0;
- h = strlen(tri);
- for(i = 0; i < h; i++)
- {
- pedwar += ctoi(tri[i]);
- }
-
- n = src_len & 1;
- for(i = n; i < src_len; i += 2)
- {
- pedwar += ctoi(source[i]);
- }
-
- pump = 10 - pedwar % 10;
- if(pump == 10)
- {
- pump = 0;
- }
-
- /* calculate second check digit */
- wright = 0;
- n = src_len & 1;
- for(i = n; i < src_len; i += 2)
- {
- un[wright++] = source[i];
- }
- un[wright++] = itoc(pump);
- un[wright] = '\0';
-
- dau = strtoul(un, NULL, 10);
- dau *= 2;
-
- sprintf(tri, "%ld", dau);
-
- pedwar = 0;
- h = strlen(tri);
- for(i = 0; i < h; i++)
- {
- pedwar += ctoi(tri[i]);
- }
-
-
- i = !(src_len & 1);
- for(; i < src_len; i += 2)
- {
- pedwar += ctoi(source[i]);
- }
-
- chwech = 10 - pedwar % 10;
- if(chwech == 10)
- {
- chwech = 0;
- }
-
- /* Draw check digits */
- lookup(NEON, MSITable, itoc(pump), dest);
- lookup(NEON, MSITable, itoc(chwech), dest);
-
- /* Stop character */
- concat (dest, "121");
-
- expand(symbol, dest);
-
- ustrcpy(symbol->text, source);
- symbol->text[src_len] = itoc(pump);
- symbol->text[src_len + 1] = itoc(chwech);
- symbol->text[src_len + 2] = '\0';
-
- return error_number;
-}
-
-
-int msi_plessey_mod11(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len)
-{
- /* Calculate a Modulo 11 check digit using the system discussed on Wikipedia -
- see http://en.wikipedia.org/wiki/Talk:MSI_Barcode */
- /* uses the IBM weight system */
-
- int i, weight, x, check;
- int error_number;
- char dest[1000];
-
- error_number = 0;
-
- if(src_len > 55) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- /* start character */
- strcpy(dest, "21");
-
- /* draw data section */
- for(i = 0; i < src_len; i++)
- {
- lookup(NEON, MSITable, source[i], dest);
- }
-
- /* calculate check digit */
- x = 0;
- weight = 2;
- for(i = src_len - 1; i >= 0; i--) {
- x += weight * ctoi(source[i]);
- weight++;
- if(weight > 7) {
- weight = 2;
- }
- }
-
- check = (11 - (x % 11)) % 11;
- if(check == 10) {
- lookup(NEON, MSITable, '1', dest);
- lookup(NEON, MSITable, '0', dest);
- } else {
- lookup(NEON, MSITable, itoc(check), dest);
- }
-
- /* stop character */
- concat (dest, "121");
-
- expand(symbol, dest);
-
- ustrcpy(symbol->text, source);
- if(check == 10) {
- concat((char* )symbol->text, "10");
- } else {
- symbol->text[src_len] = itoc(check);
- symbol->text[src_len + 1] = '\0';
- }
-
- return error_number;
-}
-
-int msi_plessey_mod1110(struct zint_symbol *symbol, unsigned char source[], const unsigned int src_len)
-{
- /* Combining the Barcode Island and Wikipedia code */
- /* Verified against http://www.bokai.com/BarcodeJSP/applet/BarcodeSampleApplet.htm */
- /* Weighted using the IBM system */
-
- int i;
- unsigned long weight, x, check, wright, dau, pedwar, pump, h;
- char un[16], tri[16];
- int error_number;
- char dest[1000];
- unsigned char temp[32];
- unsigned int temp_len;
-
- error_number = 0;
-
- if(src_len > 18) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- /* start character */
- strcpy(dest, "21");
-
- /* draw data section */
- for(i = 0; i < src_len; i++)
- {
- lookup(NEON, MSITable, source[i], dest);
- }
-
- /* calculate first (mod 11) digit */
- x = 0;
- weight = 2;
- for(i = src_len - 1; i >= 0; i--) {
- x += weight * ctoi(source[i]);
- weight++;
- if(weight > 7) {
- weight = 2;
- }
- }
-
- check = (11 - (x % 11)) % 11;
- ustrcpy(temp, source);
- temp_len = src_len;
- if(check == 10) {
- lookup(NEON, MSITable, '1', dest);
- lookup(NEON, MSITable, '0', dest);
- uconcat(temp, (unsigned char *)"10");
- temp_len += 2;
- } else {
- lookup(NEON, MSITable, itoc(check), dest);
- temp[temp_len++] = itoc(check);
- temp[temp_len] = '\0';
- }
-
- /* caluculate second (mod 10) check digit */
- wright = 0;
- i = !(temp_len & 1);
- for(; i < temp_len; i += 2)
- {
- un[wright++] = temp[i];
- }
- un[wright] = '\0';
-
- dau = strtoul(un, NULL, 10);
- dau *= 2;
-
- sprintf(tri, "%ld", dau);
-
- pedwar = 0;
- h = strlen(tri);
- for(i = 0; i < h; i++)
- {
- pedwar += ctoi(tri[i]);
- }
-
- i = temp_len & 1;
- for(; i < temp_len; i+=2)
- {
- pedwar += ctoi(temp[i]);
- }
-
- pump = 10 - pedwar % 10;
- if(pump == 10)
- {
- pump = 0;
- }
-
- /* draw check digit */
- lookup(NEON, MSITable, itoc(pump), dest);
-
- /* stop character */
- concat (dest, "121");
- expand(symbol, dest);
-
- temp[temp_len++] = itoc(pump);
- temp[temp_len] = '\0';
-
-
- ustrcpy(symbol->text, temp);
- return error_number;
-}
-
-int msi_handle(struct zint_symbol *symbol, unsigned char source[], int length) {
- int error_number;
-
- error_number = is_sane(NEON, source, length);
- if(error_number != 0) {
- strcpy(symbol->errtxt, "Invalid characters in input data");
- return ERROR_INVALID_DATA1;
- }
-
-
- if((symbol->option_2 < 0) || (symbol->option_2 > 4)) {
- symbol->option_2 = 0;
- }
-
- switch(symbol->option_2) {
- case 0: error_number = msi_plessey(symbol, source, length); break;
- case 1: error_number = msi_plessey_mod10(symbol, source, length); break;
- case 2: error_number = msi_plessey_mod1010(symbol, source, length); break;
- case 3: error_number = msi_plessey_mod11(symbol, source, length); break;
- case 4: error_number = msi_plessey_mod1110(symbol, source, length); break;
- }
-
- return error_number;
-}
diff --git a/3rdparty/zint-2.4.4/backend/png.c b/3rdparty/zint-2.4.4/backend/png.c
deleted file mode 100644
index 251df8b..0000000
--- a/3rdparty/zint-2.4.4/backend/png.c
+++ /dev/null
@@ -1,1146 +0,0 @@
-/* png.c - Handles output to PNG file */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include
-#ifdef _MSC_VER
-#include
-#include
-#endif
-#include
-#include
-#include "common.h"
-
-#ifdef _MSC_VER
-#include
-#endif /* _MSC_VER */
-
-#ifndef NO_PNG
-#include "png.h" /* libpng header; includes zlib.h and setjmp.h */
-#endif /* NO_PNG */
-#include "maxipng.h" /* Maxicode shapes */
-
-#include "font.h" /* Font for human readable text */
-
-#define SSET "0123456789ABCDEF"
-
-#define PNG_DATA 100
-#define BMP_DATA 200
-
-#ifndef NO_PNG
-struct mainprog_info_type {
- long width;
- long height;
- FILE *outfile;
- jmp_buf jmpbuf;
-};
-
-static void writepng_error_handler(png_structp png_ptr, png_const_charp msg)
-{
- struct mainprog_info_type *graphic;
-
- fprintf(stderr, "writepng libpng error: %s\n", msg);
- fflush(stderr);
-
- graphic = (struct mainprog_info_type*)png_get_error_ptr(png_ptr);
- if (graphic == NULL) { /* we are completely hosed now */
- fprintf(stderr,
- "writepng severe error: jmpbuf not recoverable; terminating.\n");
- fflush(stderr);
- return;
- }
- longjmp(graphic->jmpbuf, 1);
-}
-
-int png_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width, char *pixelbuf, int rotate_angle)
-{
- struct mainprog_info_type wpng_info;
- struct mainprog_info_type *graphic;
-
-#ifndef _MSC_VER
- unsigned char outdata[image_width * 3];
-#else
- unsigned char* outdata = (unsigned char*)_alloca(image_width * 3);
-#endif
- png_structp png_ptr;
- png_infop info_ptr;
- graphic = &wpng_info;
- unsigned long rowbytes;
- unsigned char *image_data;
- int i, row, column, errno;
- int fgred, fggrn, fgblu, bgred, bggrn, bgblu;
-
- switch(rotate_angle) {
- case 0:
- case 180:
- graphic->width = image_width;
- graphic->height = image_height;
- break;
- case 90:
- case 270:
- graphic->width = image_height;
- graphic->height = image_width;
- break;
- }
-
- /* sort out colour options */
- to_upper((unsigned char*)symbol->fgcolour);
- to_upper((unsigned char*)symbol->bgcolour);
-
- if(strlen(symbol->fgcolour) != 6) {
- strcpy(symbol->errtxt, "Malformed foreground colour target");
- return ERROR_INVALID_OPTION;
- }
- if(strlen(symbol->bgcolour) != 6) {
- strcpy(symbol->errtxt, "Malformed background colour target");
- return ERROR_INVALID_OPTION;
- }
- errno = is_sane(SSET, (unsigned char*)symbol->fgcolour, strlen(symbol->fgcolour));
- if (errno == ERROR_INVALID_DATA) {
- strcpy(symbol->errtxt, "Malformed foreground colour target");
- return ERROR_INVALID_OPTION;
- }
- errno = is_sane(SSET, (unsigned char*)symbol->bgcolour, strlen(symbol->bgcolour));
- if (errno == ERROR_INVALID_DATA) {
- strcpy(symbol->errtxt, "Malformed background colour target");
- return ERROR_INVALID_OPTION;
- }
-
- fgred = (16 * ctoi(symbol->fgcolour[0])) + ctoi(symbol->fgcolour[1]);
- fggrn = (16 * ctoi(symbol->fgcolour[2])) + ctoi(symbol->fgcolour[3]);
- fgblu = (16 * ctoi(symbol->fgcolour[4])) + ctoi(symbol->fgcolour[5]);
- bgred = (16 * ctoi(symbol->bgcolour[0])) + ctoi(symbol->bgcolour[1]);
- bggrn = (16 * ctoi(symbol->bgcolour[2])) + ctoi(symbol->bgcolour[3]);
- bgblu = (16 * ctoi(symbol->bgcolour[4])) + ctoi(symbol->bgcolour[5]);
-
- /* Open output file in binary mode */
- if((symbol->output_options & BARCODE_STDOUT) != 0) {
-#ifdef _MSC_VER
- if (-1 == _setmode(_fileno(stdout), _O_BINARY)) {
- strcpy(symbol->errtxt, "Can't open output file");
- return ERROR_FILE_ACCESS;
- }
-#endif
- graphic->outfile = stdout;
- } else {
- if (!(graphic->outfile = fopen(symbol->outfile, "wb"))) {
- strcpy(symbol->errtxt, "Can't open output file");
- return ERROR_FILE_ACCESS;
- }
- }
-
- /* Set up error handling routine as proc() above */
- png_ptr = png_create_write_struct(PNG_LIBPNG_VER_STRING, graphic, writepng_error_handler, NULL);
- if (!png_ptr) {
- strcpy(symbol->errtxt, "Out of memory");
- return ERROR_MEMORY;
- }
-
- info_ptr = png_create_info_struct(png_ptr);
- if (!info_ptr) {
- png_destroy_write_struct(&png_ptr, NULL);
- strcpy(symbol->errtxt, "Out of memory");
- return ERROR_MEMORY;
- }
-
- /* catch jumping here */
- if (setjmp(graphic->jmpbuf)) {
- png_destroy_write_struct(&png_ptr, &info_ptr);
- strcpy(symbol->errtxt, "libpng error occurred");
- return ERROR_MEMORY;
- }
-
- /* open output file with libpng */
- png_init_io(png_ptr, graphic->outfile);
-
- /* set compression */
- png_set_compression_level(png_ptr, Z_BEST_COMPRESSION);
-
- /* set Header block */
- png_set_IHDR(png_ptr, info_ptr, graphic->width, graphic->height,
- 8, PNG_COLOR_TYPE_RGB, PNG_INTERLACE_NONE,
- PNG_COMPRESSION_TYPE_DEFAULT, PNG_FILTER_TYPE_DEFAULT);
-
- /* write all chunks up to (but not including) first IDAT */
- png_write_info(png_ptr, info_ptr);
-
- /* set up the transformations: for now, just pack low-bit-depth pixels
- into bytes (one, two or four pixels per byte) */
- png_set_packing(png_ptr);
-
- /* set rowbytes - depends on picture depth */
- rowbytes = wpng_info.width * 3;
-
- /* Pixel Plotting */
-
- switch(rotate_angle) {
- case 0: /* Plot the right way up */
- for(row = 0; row < image_height; row++) {
- for(column = 0; column < image_width; column++) {
- i = column * 3;
- switch(*(pixelbuf + (image_width * row) + column))
- {
- case '1':
- outdata[i] = fgred;
- outdata[i + 1] = fggrn;
- outdata[i + 2] = fgblu;
- break;
- default:
- outdata[i] = bgred;
- outdata[i + 1] = bggrn;
- outdata[i + 2] = bgblu;
- break;
-
- }
- }
- /* write row contents to file */
- image_data = outdata;
- png_write_row(png_ptr, image_data);
- }
- break;
- case 90: /* Plot 90 degrees clockwise */
- for(row = 0; row < image_width; row++) {
- for(column = 0; column < image_height; column++) {
- i = column * 3;
- switch(*(pixelbuf + (image_width * (image_height - column - 1)) + row))
- {
- case '1':
- outdata[i] = fgred;
- outdata[i + 1] = fggrn;
- outdata[i + 2] = fgblu;
- break;
- default:
- outdata[i] = bgred;
- outdata[i + 1] = bggrn;
- outdata[i + 2] = bgblu;
- break;
-
- }
- }
-
- /* write row contents to file */
- image_data = outdata;
- png_write_row(png_ptr, image_data);
- }
- break;
- case 180: /* Plot upside down */
- for(row = 0; row < image_height; row++) {
- for(column = 0; column < image_width; column++) {
- i = column * 3;
- switch(*(pixelbuf + (image_width * (image_height - row - 1)) + (image_width - column - 1)))
- {
- case '1':
- outdata[i] = fgred;
- outdata[i + 1] = fggrn;
- outdata[i + 2] = fgblu;
- break;
- default:
- outdata[i] = bgred;
- outdata[i + 1] = bggrn;
- outdata[i + 2] = bgblu;
- break;
-
- }
- }
-
- /* write row contents to file */
- image_data = outdata;
- png_write_row(png_ptr, image_data);
- }
- break;
- case 270: /* Plot 90 degrees anti-clockwise */
- for(row = 0; row < image_width; row++) {
- for(column = 0; column < image_height; column++) {
- i = column * 3;
- switch(*(pixelbuf + (image_width * column) + (image_width - row - 1)))
- {
- case '1':
- outdata[i] = fgred;
- outdata[i + 1] = fggrn;
- outdata[i + 2] = fgblu;
- break;
- default:
- outdata[i] = bgred;
- outdata[i + 1] = bggrn;
- outdata[i + 2] = bgblu;
- break;
-
- }
- }
-
- /* write row contents to file */
- image_data = outdata;
- png_write_row(png_ptr, image_data);
- }
- break;
- }
-
- /* End the file */
- png_write_end(png_ptr, NULL);
-
- /* make sure we have disengaged */
- if (png_ptr && info_ptr) png_destroy_write_struct(&png_ptr, &info_ptr);
- fclose(wpng_info.outfile);
- return 0;
-}
-#endif /* NO_PNG */
-
-int bmp_pixel_plot(struct zint_symbol *symbol, int image_height, int image_width, char *pixelbuf, int rotate_angle)
-{
- unsigned long rowbytes;
- int i, row, column, errno;
- int fgred, fggrn, fgblu, bgred, bggrn, bgblu;
-
- switch(rotate_angle) {
- case 0:
- case 180:
- symbol->bitmap_width = image_width;
- symbol->bitmap_height = image_height;
- break;
- case 90:
- case 270:
- symbol->bitmap_width = image_height;
- symbol->bitmap_height = image_width;
- break;
- }
-
- if (symbol->bitmap != NULL)
- free(symbol->bitmap);
-
- symbol->bitmap = (char *) malloc(image_width * image_height * 3);
-
-
- /* sort out colour options */
- to_upper((unsigned char*)symbol->fgcolour);
- to_upper((unsigned char*)symbol->bgcolour);
-
- if(strlen(symbol->fgcolour) != 6) {
- strcpy(symbol->errtxt, "Malformed foreground colour target");
- return ERROR_INVALID_OPTION;
- }
- if(strlen(symbol->bgcolour) != 6) {
- strcpy(symbol->errtxt, "Malformed background colour target");
- return ERROR_INVALID_OPTION;
- }
- errno = is_sane(SSET, (unsigned char*)symbol->fgcolour, strlen(symbol->fgcolour));
- if (errno == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Malformed foreground colour target");
- return ERROR_INVALID_OPTION;
- }
- errno = is_sane(SSET, (unsigned char*)symbol->bgcolour, strlen(symbol->fgcolour));
- if (errno == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Malformed background colour target");
- return ERROR_INVALID_OPTION;
- }
-
- fgred = (16 * ctoi(symbol->fgcolour[0])) + ctoi(symbol->fgcolour[1]);
- fggrn = (16 * ctoi(symbol->fgcolour[2])) + ctoi(symbol->fgcolour[3]);
- fgblu = (16 * ctoi(symbol->fgcolour[4])) + ctoi(symbol->fgcolour[5]);
- bgred = (16 * ctoi(symbol->bgcolour[0])) + ctoi(symbol->bgcolour[1]);
- bggrn = (16 * ctoi(symbol->bgcolour[2])) + ctoi(symbol->bgcolour[3]);
- bgblu = (16 * ctoi(symbol->bgcolour[4])) + ctoi(symbol->bgcolour[5]);
-
- /* set rowbytes - depends on picture depth */
- rowbytes = symbol->bitmap_width * 3;
-
- /* Pixel Plotting */
- i = 0;
- switch(rotate_angle) {
- case 0: /* Plot the right way up */
- for(row = 0; row < image_height; row++) {
- for(column = 0; column < image_width; column++) {
- switch(*(pixelbuf + (image_width * row) + column))
- {
- case '1':
- symbol->bitmap[i++] = fgred;
- symbol->bitmap[i++] = fggrn;
- symbol->bitmap[i++] = fgblu;
- break;
- default:
- symbol->bitmap[i++] = bgred;
- symbol->bitmap[i++] = bggrn;
- symbol->bitmap[i++] = bgblu;
- break;
-
- }
- }
- }
- break;
- case 90: /* Plot 90 degrees clockwise */
- for(row = 0; row < image_width; row++) {
- for(column = 0; column < image_height; column++) {
- switch(*(pixelbuf + (image_width * (image_height - column - 1)) + row))
- {
- case '1':
- symbol->bitmap[i++] = fgred;
- symbol->bitmap[i++] = fggrn;
- symbol->bitmap[i++] = fgblu;
- break;
- default:
- symbol->bitmap[i++] = bgred;
- symbol->bitmap[i++] = bggrn;
- symbol->bitmap[i++] = bgblu;
- break;
-
- }
- }
- }
- break;
- case 180: /* Plot upside down */
- for(row = 0; row < image_height; row++) {
- for(column = 0; column < image_width; column++) {
- switch(*(pixelbuf + (image_width * (image_height - row - 1)) + (image_width - column - 1)))
- {
- case '1':
- symbol->bitmap[i++] = fgred;
- symbol->bitmap[i++] = fggrn;
- symbol->bitmap[i++] = fgblu;
- break;
- default:
- symbol->bitmap[i++] = bgred;
- symbol->bitmap[i++] = bggrn;
- symbol->bitmap[i++] = bgblu;
- break;
-
- }
- }
- }
- break;
- case 270: /* Plot 90 degrees anti-clockwise */
- for(row = 0; row < image_width; row++) {
- for(column = 0; column < image_height; column++) {
- switch(*(pixelbuf + (image_width * column) + (image_width - row - 1)))
- {
- case '1':
- symbol->bitmap[i++] = fgred;
- symbol->bitmap[i++] = fggrn;
- symbol->bitmap[i++] = fgblu;
- break;
- default:
- symbol->bitmap[i++] = bgred;
- symbol->bitmap[i++] = bggrn;
- symbol->bitmap[i++] = bgblu;
- break;
-
- }
- }
- }
- break;
- }
-
- return 0;
-}
-
-int png_to_file(struct zint_symbol *symbol, int image_height, int image_width, char *pixelbuf, int rotate_angle, int image_type)
-{
- int error_number;
- float scaler = symbol->scale;
- char *scaled_pixelbuf;
- int horiz, vert, i;
- int scale_width, scale_height;
-
- if(scaler == 0) { scaler = 0.5; }
- scale_width = image_width * scaler;
- scale_height = image_height * scaler;
-
- /* Apply scale options by creating another pixel buffer */
- if (!(scaled_pixelbuf = (char *) malloc(scale_width * scale_height))) {
- printf("Insufficient memory for pixel buffer");
- return ERROR_ENCODING_PROBLEM;
- } else {
- for(i = 0; i < (scale_width * scale_height); i++) {
- *(scaled_pixelbuf + i) = '0';
- }
- }
-
- for(vert = 0; vert < scale_height; vert++) {
- for(horiz = 0; horiz < scale_width; horiz++) {
- *(scaled_pixelbuf + (vert * scale_width) + horiz) = *(pixelbuf + ((int)(vert / scaler) * image_width) + (int)(horiz / scaler));
- }
- }
-
- if(image_type == PNG_DATA) {
-#ifndef NO_PNG
- error_number = png_pixel_plot(symbol, scale_height, scale_width, scaled_pixelbuf, rotate_angle);
-#else
- return ERROR_INVALID_OPTION;
-#endif
- } else {
- error_number = bmp_pixel_plot(symbol, scale_height, scale_width, scaled_pixelbuf, rotate_angle);
- }
-
- free(scaled_pixelbuf);
-
- return error_number;
-}
-
-void draw_bar(char *pixelbuf, int xpos, int xlen, int ypos, int ylen, int image_width, int image_height)
-{
- /* Draw a rectangle */
- int i, j, png_ypos;
-
- png_ypos = image_height - ypos - ylen;
- /* This fudge is needed because EPS measures height from the bottom up but
- PNG measures y position from the top down */
-
- for(i = (xpos); i < (xpos + xlen); i++) {
- for( j = (png_ypos); j < (png_ypos + ylen); j++) {
- *(pixelbuf + (image_width * j) + i) = '1';
- }
- }
-}
-
-int bullseye_pixel(int row, int col) {
- int block_val, block_pos, return_val;
-
- block_val = bullseye_compressed[(row * 12) + (col / 8)];
- return_val = 0;
- block_pos = col % 8;
-
- switch(block_pos) {
- case 0: if((block_val & 0x80) != 0) { return_val = 1; } break;
- case 1: if((block_val & 0x40) != 0) { return_val = 1; } break;
- case 2: if((block_val & 0x20) != 0) { return_val = 1; } break;
- case 3: if((block_val & 0x10) != 0) { return_val = 1; } break;
- case 4: if((block_val & 0x08) != 0) { return_val = 1; } break;
- case 5: if((block_val & 0x04) != 0) { return_val = 1; } break;
- case 6: if((block_val & 0x02) != 0) { return_val = 1; } break;
- case 7: if((block_val & 0x01) != 0) { return_val = 1; } break;
- }
-
- return return_val;
-}
-
-void draw_bullseye(char *pixelbuf, int image_width, int xoffset, int yoffset)
-{
- /* Central bullseye in Maxicode symbols */
- int i, j;
-
- for(j = 103; j < 196; j++) {
- for(i = 0; i < 93; i++) {
- if(bullseye_pixel(j - 103, i)) {
- /* if(bullseye[(((j - 103) * 93) + i)] == 1) { */
- *(pixelbuf + (image_width * j) + (image_width * yoffset) + i + 99 + xoffset) = '1';
- }
- }
- }
-}
-
-void draw_hexagon(char *pixelbuf, int image_width, int xposn, int yposn)
-{
- /* Put a hexagon into the pixel buffer */
- int i, j;
-
- for(i = 0; i < 12; i++) {
- for(j = 0; j < 10; j++) {
- if(hexagon[(i * 10) + j] == 1) {
- *(pixelbuf + (image_width * i) + (image_width * yposn) + xposn + j) = '1';
- }
- }
- }
-}
-
-void draw_letter(char *pixelbuf, unsigned char letter, int xposn, int yposn, int smalltext, int image_width, int image_height)
-{
- /* Put a letter into a position */
- int skip, i, j, glyph_no, alphabet;
-
- skip = 0;
- alphabet = 0;
-
- if(letter < 33) { skip = 1; }
- if((letter > 127) && (letter < 161)) { skip = 1; }
-
- if(skip == 0) {
- if(letter > 128) {
- alphabet = 1;
- glyph_no = letter - 161;
- } else {
- glyph_no = letter - 33;
- }
-
- if(smalltext) {
- for(i = 0; i <= 8; i++) {
- for(j = 0; j < 5; j++) {
- if(alphabet == 0) {
- if(small_font[(glyph_no * 5) + (i * 475) + j - 1] == 1) {
- *(pixelbuf + (i * image_width) + (yposn * image_width) + xposn + j) = '1';
- }
- } else {
- if(small_font_extended[(glyph_no * 5) + (i * 475) + j - 1] == 1) {
- *(pixelbuf + (i * image_width) + (yposn * image_width) + xposn + j) = '1';
- }
- }
- }
- }
- } else {
- for(i = 0; i <= 13; i++) {
- for(j = 0; j < 7 ; j++) {
- if(alphabet == 0) {
- if(ascii_font[(glyph_no * 7) + (i * 665) + j - 1] == 1) {
- *(pixelbuf + (i * image_width) + (yposn * image_width) + xposn + j) = '1';
- }
- } else {
- if(ascii_ext_font[(glyph_no * 7) + (i * 665) + j - 1] == 1) {
- *(pixelbuf + (i * image_width) + (yposn * image_width) + xposn + j) = '1';
- }
- }
- }
- }
- }
- }
-}
-
-void draw_string(char *pixbuf, char input_string[], int xposn, int yposn, int smalltext, int image_width, int image_height)
-{
- /* Plot a string into the pixel buffer */
- int i, string_length, string_left_hand;
-
- string_length = strlen(input_string);
- string_left_hand = xposn - ((7 * string_length) / 2);
-
- for(i = 0; i < string_length; i++) {
- draw_letter(pixbuf, input_string[i], string_left_hand + (i * 7), yposn, smalltext, image_width, image_height);
- }
-
-}
-
-int maxi_png_plot(struct zint_symbol *symbol, int rotate_angle, int data_type)
-{
- int i, row, column, xposn, yposn;
- int image_height, image_width;
- char *pixelbuf;
- int error_number;
- int xoffset, yoffset;
-
- xoffset = symbol->border_width + symbol->whitespace_width;
- yoffset = symbol->border_width;
- image_width = 300 + (2 * xoffset * 2);
- image_height = 300 + (2 * yoffset * 2);
-
- if (!(pixelbuf = (char *) malloc(image_width * image_height))) {
- printf("Insifficient memory for pixel buffer");
- return ERROR_ENCODING_PROBLEM;
- } else {
- for(i = 0; i < (image_width * image_height); i++) {
- *(pixelbuf + i) = '0';
- }
- }
-
- draw_bullseye(pixelbuf, image_width, (2 * xoffset), (2 * yoffset));
-
- for(row = 0; row < symbol->rows; row++) {
- yposn = row * 9;
- for(column = 0; column < symbol->width; column++) {
- xposn = column * 10;
- if(module_is_set(symbol, row, column)) {
- if(row & 1) {
- /* Odd (reduced) row */
- xposn += 5;
- draw_hexagon(pixelbuf, image_width, xposn + (2 * xoffset), yposn + (2 * yoffset));
- } else {
- /* Even (full) row */
- draw_hexagon(pixelbuf, image_width, xposn + (2 * xoffset), yposn + (2 * yoffset));
- }
- }
- }
- }
-
- if(((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) {
- /* boundary bars */
- draw_bar(pixelbuf, 0, image_width, 0, symbol->border_width * 2, image_width, image_height);
- draw_bar(pixelbuf, 0, image_width, 300 + (symbol->border_width * 2), symbol->border_width * 2, image_width, image_height);
- }
-
- if((symbol->output_options & BARCODE_BOX) != 0) {
- /* side bars */
- draw_bar(pixelbuf, 0, symbol->border_width * 2, 0, image_height, image_width, image_height);
- draw_bar(pixelbuf, 300 + ((symbol->border_width + symbol->whitespace_width + symbol->whitespace_width) * 2), symbol->border_width * 2, 0, image_height, image_width, image_height);
- }
-
- error_number=png_to_file(symbol, image_height, image_width, pixelbuf, rotate_angle, data_type);
- free(pixelbuf);
- return error_number;
-}
-
-void to_latin1(unsigned char source[], unsigned char preprocessed[])
-{
- int j, i, input_length;
-
- input_length = ustrlen(source);
-
- j = 0;
- i = 0;
- do {
- if(source[i] < 128) {
- preprocessed[j] = source[i];
- j++;
- i++;
- } else {
- if(source[i] == 0xC2) {
- preprocessed[j] = source[i + 1];
- j++;
- i += 2;
- }
- if(source[i] == 0xC3) {
- preprocessed[j] = source[i + 1] + 64;
- j++;
- i += 2;
- }
- }
- } while (i < input_length);
- preprocessed[j] = '\0';
-
- return;
-}
-
-int png_plot(struct zint_symbol *symbol, int rotate_angle, int data_type)
-{
- int textdone, main_width, comp_offset, large_bar_count;
- char textpart[10], addon[6];
- float addon_text_posn, preset_height, large_bar_height;
- int i, r, textoffset, yoffset, xoffset, latch, image_width, image_height;
- char *pixelbuf;
- int addon_latch = 0, smalltext = 0;
- int this_row, block_width, plot_height, plot_yposn, textpos;
- float row_height, row_posn;
- int error_number;
- int default_text_posn;
- int next_yposn;
-#ifndef _MSC_VER
- unsigned char local_text[ustrlen(symbol->text) + 1];
-#else
- unsigned char* local_text = (unsigned char*)_alloca(ustrlen(symbol->text) + 1);
-#endif
-
- if(symbol->show_hrt != 0) {
- to_latin1(symbol->text, local_text);
- } else {
- local_text[0] = '\0';
- }
-
- textdone = 0;
- main_width = symbol->width;
- strcpy(addon, "");
- comp_offset = 0;
- addon_text_posn = 0.0;
- row_height = 0;
- if(symbol->output_options & SMALL_TEXT) {
- smalltext = 1;
- }
-
- if (symbol->height == 0) {
- symbol->height = 50;
- }
-
- large_bar_count = 0;
- preset_height = 0.0;
- for(i = 0; i < symbol->rows; i++) {
- preset_height += symbol->row_height[i];
- if(symbol->row_height[i] == 0) {
- large_bar_count++;
- }
- }
-
- if (large_bar_count == 0) {
- symbol->height = preset_height;
- large_bar_height = 10;
- } else {
- large_bar_height = (symbol->height - preset_height) / large_bar_count;
- }
-
- while(!(module_is_set(symbol, symbol->rows - 1, comp_offset))) {
- comp_offset++;
- }
-
- /* Certain symbols need whitespace otherwise characters get chopped off the sides */
- if ((((symbol->symbology == BARCODE_EANX) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_EANX_CC))
- || (symbol->symbology == BARCODE_ISBNX)) {
- switch(ustrlen(local_text)) {
- case 13: /* EAN 13 */
- case 16:
- case 19:
- if(symbol->whitespace_width == 0) {
- symbol->whitespace_width = 10;
- }
- main_width = 96 + comp_offset;
- break;
- default:
- main_width = 68 + comp_offset;
- }
- }
-
- if (((symbol->symbology == BARCODE_UPCA) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCA_CC)) {
- if(symbol->whitespace_width == 0) {
- symbol->whitespace_width = 10;
- main_width = 96 + comp_offset;
- }
- }
-
- if (((symbol->symbology == BARCODE_UPCE) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCE_CC)) {
- if(symbol->whitespace_width == 0) {
- symbol->whitespace_width = 10;
- main_width = 51 + comp_offset;
- }
- }
-
- latch = 0;
- r = 0;
- /* Isolate add-on text */
- if(is_extendable(symbol->symbology)) {
- for(i = 0; i < ustrlen(local_text); i++) {
- if (latch == 1) {
- addon[r] = local_text[i];
- r++;
- }
- if (symbol->text[i] == '+') {
- latch = 1;
- }
- }
- }
- addon[r] = '\0';
-
- if(ustrlen(local_text) != 0) {
- textoffset = 9;
- } else {
- textoffset = 0;
- }
- xoffset = symbol->border_width + symbol->whitespace_width;
- yoffset = symbol->border_width;
- image_width = 2 * (symbol->width + xoffset + xoffset);
- image_height = 2 * (symbol->height + textoffset + yoffset + yoffset);
-
- if (!(pixelbuf = (char *) malloc(image_width * image_height))) {
- printf("Insufficient memory for pixel buffer");
- return ERROR_ENCODING_PROBLEM;
- } else {
- for(i = 0; i < (image_width * image_height); i++) {
- *(pixelbuf + i) = '0';
- }
- }
-
- if(((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) {
- default_text_posn = image_height - 17;
- } else {
- default_text_posn = image_height - 17 - symbol->border_width - symbol->border_width;
- }
-
- row_posn = textoffset + yoffset;
- next_yposn = textoffset + yoffset;
- row_height = 0;
-
- /* Plot the body of the symbol to the pixel buffer */
- for(r = 0; r < symbol->rows; r++) {
- this_row = symbol->rows - r - 1; /* invert r otherwise plots upside down */
- row_posn += row_height;
- plot_yposn = next_yposn;
- if(symbol->row_height[this_row] == 0) {
- row_height = large_bar_height;
- } else {
- row_height = symbol->row_height[this_row];
- }
- next_yposn = (int)(row_posn + row_height);
- plot_height = next_yposn - plot_yposn;
-
- i = 0;
- if(module_is_set(symbol, this_row, 0)) {
- latch = 1;
- } else {
- latch = 0;
- }
-
- do {
- block_width = 0;
- do {
- block_width++;
- } while (module_is_set(symbol, this_row, i + block_width) == module_is_set(symbol, this_row, i));
- if((addon_latch == 0) && (r == 0) && (i > main_width)) {
- plot_height = (int)(row_height - 5.0);
- plot_yposn = (int)(row_posn - 5.0);
- addon_text_posn = row_posn + row_height - 8.0;
- addon_latch = 1;
- }
- if(latch == 1) {
- /* a bar */
- draw_bar(pixelbuf, (i + xoffset) * 2, block_width * 2, plot_yposn * 2, plot_height * 2, image_width, image_height);
- latch = 0;
- } else {
- /* a space */
- latch = 1;
- }
- i += block_width;
-
- } while (i < symbol->width);
- }
-
- xoffset += comp_offset;
-
- if ((((symbol->symbology == BARCODE_EANX) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_EANX_CC)) || (symbol->symbology == BARCODE_ISBNX)) {
- /* guard bar extensions and text formatting for EAN8 and EAN13 */
- switch(ustrlen(local_text)) {
- case 8: /* EAN-8 */
- case 11:
- case 14:
- draw_bar(pixelbuf, (0 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- draw_bar(pixelbuf, (2 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- draw_bar(pixelbuf, (32 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- draw_bar(pixelbuf, (34 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- draw_bar(pixelbuf, (64 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- draw_bar(pixelbuf, (66 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- for(i = 0; i < 4; i++) {
- textpart[i] = symbol->text[i];
- }
- textpart[4] = '\0';
- textpos = 2 * (17 + xoffset);
-
- draw_string(pixelbuf, textpart, textpos, default_text_posn, smalltext, image_width, image_height);
- for(i = 0; i < 4; i++) {
- textpart[i] = symbol->text[i + 4];
- }
- textpart[4] = '\0';
- textpos = 2 * (50 + xoffset);
- draw_string(pixelbuf, textpart, textpos, default_text_posn, smalltext, image_width, image_height);
- textdone = 1;
- switch(strlen(addon)) {
- case 2:
- textpos = 2 * (xoffset + 86);
- draw_string(pixelbuf, addon, textpos, image_height - (addon_text_posn * 2) - 13, smalltext, image_width, image_height);
- break;
- case 5:
- textpos = 2 * (xoffset + 100);
- draw_string(pixelbuf, addon, textpos, image_height - (addon_text_posn * 2) - 13, smalltext, image_width, image_height);
- break;
- }
-
- break;
- case 13: /* EAN 13 */
- case 16:
- case 19:
- draw_bar(pixelbuf, (0 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- draw_bar(pixelbuf, (2 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- draw_bar(pixelbuf, (46 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- draw_bar(pixelbuf, (48 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- draw_bar(pixelbuf, (92 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- draw_bar(pixelbuf, (94 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
-
- textpart[0] = symbol->text[0];
- textpart[1] = '\0';
- textpos = 2 * (-7 + xoffset);
- draw_string(pixelbuf, textpart, textpos, default_text_posn, smalltext, image_width, image_height);
- for(i = 0; i < 6; i++) {
- textpart[i] = symbol->text[i + 1];
- }
- textpart[6] = '\0';
- textpos = 2 * (24 + xoffset);
- draw_string(pixelbuf, textpart, textpos, default_text_posn, smalltext, image_width, image_height);
- for(i = 0; i < 6; i++) {
- textpart[i] = symbol->text[i + 7];
- }
- textpart[6] = '\0';
- textpos = 2 * (71 + xoffset);
- draw_string(pixelbuf, textpart, textpos, default_text_posn, smalltext, image_width, image_height);
- textdone = 1;
- switch(strlen(addon)) {
- case 2:
- textpos = 2 * (xoffset + 114);
- draw_string(pixelbuf, addon, textpos, image_height - (addon_text_posn * 2) - 13, smalltext, image_width, image_height);
- break;
- case 5:
- textpos = 2 * (xoffset + 128);
- draw_string(pixelbuf, addon, textpos, image_height - (addon_text_posn * 2) - 13, smalltext, image_width, image_height);
- break;
- }
- break;
-
- }
- }
-
- if (((symbol->symbology == BARCODE_UPCA) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCA_CC)) {
- /* guard bar extensions and text formatting for UPCA */
- latch = 1;
-
- i = 0 + comp_offset;
- do {
- block_width = 0;
- do {
- block_width++;
- } while (module_is_set(symbol, symbol->rows - 1, i + block_width) == module_is_set(symbol, symbol->rows - 1, i));
- if(latch == 1) {
- /* a bar */
- draw_bar(pixelbuf, (i + xoffset - comp_offset) * 2, block_width * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- latch = 0;
- } else {
- /* a space */
- latch = 1;
- }
- i += block_width;
- } while (i < 11 + comp_offset);
- draw_bar(pixelbuf, (46 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- draw_bar(pixelbuf, (48 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- latch = 1;
- i = 85 + comp_offset;
- do {
- block_width = 0;
- do {
- block_width++;
- } while (module_is_set(symbol, symbol->rows - 1, i + block_width) == module_is_set(symbol, symbol->rows - 1, i));
- if(latch == 1) {
- /* a bar */
- draw_bar(pixelbuf, (i + xoffset - comp_offset) * 2, block_width * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- latch = 0;
- } else {
- /* a space */
- latch = 1;
- }
- i += block_width;
- } while (i < 96 + comp_offset);
- textpart[0] = symbol->text[0];
- textpart[1] = '\0';
- textpos = 2 * (-5 + xoffset);
- draw_string(pixelbuf, textpart, textpos, default_text_posn, smalltext, image_width, image_height);
- for(i = 0; i < 5; i++) {
- textpart[i] = symbol->text[i + 1];
- }
- textpart[5] = '\0';
- textpos = 2 * (27 + xoffset);
- draw_string(pixelbuf, textpart, textpos, default_text_posn, smalltext, image_width, image_height);
- for(i = 0; i < 5; i++) {
- textpart[i] = symbol->text[i + 6];
- }
- textpart[6] = '\0';
- textpos = 2 * (68 + xoffset);
- draw_string(pixelbuf, textpart, textpos, default_text_posn, smalltext, image_width, image_height);
- textpart[0] = symbol->text[11];
- textpart[1] = '\0';
- textpos = 2 * (100 + xoffset);
- draw_string(pixelbuf, textpart, textpos, default_text_posn, smalltext, image_width, image_height);
- textdone = 1;
- switch(strlen(addon)) {
- case 2:
- textpos = 2 * (xoffset + 116);
- draw_string(pixelbuf, addon, textpos, image_height - (addon_text_posn * 2) - 13, smalltext, image_width, image_height);
- break;
- case 5:
- textpos = 2 * (xoffset + 130);
- draw_string(pixelbuf, addon, textpos, image_height - (addon_text_posn * 2) - 13, smalltext, image_width, image_height);
- break;
- }
-
- }
-
- if (((symbol->symbology == BARCODE_UPCE) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCE_CC)) {
- /* guard bar extensions and text formatting for UPCE */
- draw_bar(pixelbuf, (0 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- draw_bar(pixelbuf, (2 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- draw_bar(pixelbuf, (46 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- draw_bar(pixelbuf, (48 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
- draw_bar(pixelbuf, (50 + xoffset) * 2, 1 * 2, (4 + (int)yoffset) * 2, 5 * 2, image_width, image_height);
-
- textpart[0] = symbol->text[0];
- textpart[1] = '\0';
- textpos = 2 * (-5 + xoffset);
- draw_string(pixelbuf, textpart, textpos, default_text_posn, smalltext, image_width, image_height);
- for(i = 0; i < 6; i++) {
- textpart[i] = symbol->text[i + 1];
- }
- textpart[6] = '\0';
- textpos = 2 * (24 + xoffset);
- draw_string(pixelbuf, textpart, textpos, default_text_posn, smalltext, image_width, image_height);
- textpart[0] = symbol->text[7];
- textpart[1] = '\0';
- textpos = 2 * (55 + xoffset);
- draw_string(pixelbuf, textpart, textpos, default_text_posn, smalltext, image_width, image_height);
- textdone = 1;
- switch(strlen(addon)) {
- case 2:
- textpos = 2 * (xoffset + 70);
- draw_string(pixelbuf, addon, textpos, image_height - (addon_text_posn * 2) - 13, smalltext, image_width, image_height);
- break;
- case 5:
- textpos = 2 * (xoffset + 84);
- draw_string(pixelbuf, addon, textpos, image_height - (addon_text_posn * 2) - 13, smalltext, image_width, image_height);
- break;
- }
-
- }
-
- xoffset -= comp_offset;
-
- /* Put boundary bars or box around symbol */
- if(((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) {
- /* boundary bars */
- draw_bar(pixelbuf, 0, (symbol->width + xoffset + xoffset) * 2, textoffset * 2, symbol->border_width * 2, image_width, image_height);
- draw_bar(pixelbuf, 0, (symbol->width + xoffset + xoffset) * 2, (textoffset + symbol->height + symbol->border_width) * 2, symbol->border_width * 2, image_width, image_height);
- if((symbol->output_options & BARCODE_BIND) != 0) {
- if((symbol->rows > 1) && (is_stackable(symbol->symbology) == 1)) {
- /* row binding */
- for(r = 1; r < symbol->rows; r++) {
- draw_bar(pixelbuf, xoffset * 2, symbol->width * 2, ((r * row_height) + textoffset + yoffset - 1) * 2, 2 * 2, image_width, image_height);
- }
- }
- }
- }
-
- if((symbol->output_options & BARCODE_BOX) != 0) {
- /* side bars */
- draw_bar(pixelbuf, 0, symbol->border_width * 2, textoffset * 2, (symbol->height + (2 * symbol->border_width)) * 2, image_width, image_height);
- draw_bar(pixelbuf, (symbol->width + xoffset + xoffset - symbol->border_width) * 2, symbol->border_width * 2, textoffset * 2, (symbol->height + (2 * symbol->border_width)) * 2, image_width, image_height);
- }
-
- /* Put the human readable text at the bottom */
- if((textdone == 0) && (ustrlen(local_text) != 0)) {
- textpos = (image_width / 2);
- draw_string(pixelbuf, (char*)local_text, textpos, default_text_posn, smalltext, image_width, image_height);
- }
-
- error_number=png_to_file(symbol, image_height, image_width, pixelbuf, rotate_angle, data_type);
- free(pixelbuf);
- return error_number;
-}
-
-#ifndef NO_PNG
-int png_handle(struct zint_symbol *symbol, int rotate_angle)
-{
- int error;
-
- if(symbol->symbology == BARCODE_MAXICODE) {
- error = maxi_png_plot(symbol, rotate_angle, PNG_DATA);
- } else {
-
- error = png_plot(symbol, rotate_angle, PNG_DATA);
- }
-
- return error;
-}
-#endif /* NO_PNG */
-
-int bmp_handle(struct zint_symbol *symbol, int rotate_angle)
-{
- int error;
-
- if(symbol->symbology == BARCODE_MAXICODE) {
- error = maxi_png_plot(symbol, rotate_angle, BMP_DATA);
- } else {
- error = png_plot(symbol, rotate_angle, BMP_DATA);
- }
-
- return error;
-}
-
diff --git a/3rdparty/zint-2.4.4/backend/postal.c b/3rdparty/zint-2.4.4/backend/postal.c
deleted file mode 100644
index f6a480f..0000000
--- a/3rdparty/zint-2.4.4/backend/postal.c
+++ /dev/null
@@ -1,594 +0,0 @@
-/* postal.c - Handles PostNet, PLANET, FIM. RM4SCC and Flattermarken */
-
-/* Zint - A barcode generating program using libpng
- Copyright (C) 2008 Robin Stuart
- Including bug fixes by Bryan Hatton
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include
-#include
-#include
-#ifdef _MSC_VER
-#include
-#endif
-#include "common.h"
-
-#define DAFTSET "DAFT"
-#define KRSET "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-#define KASUTSET "1234567890-abcdefgh"
-#define CHKASUTSET "0123456789-abcdefgh"
-#define SHKASUTSET "1234567890-ABCDEFGHIJKLMNOPQRSTUVWXYZ"
-
-/* PostNet number encoding table - In this table L is long as S is short */
-static char *PNTable[10] = {"LLSSS", "SSSLL", "SSLSL", "SSLLS", "SLSSL", "SLSLS", "SLLSS", "LSSSL",
- "LSSLS", "LSLSS"};
-static char *PLTable[10] = {"SSLLL", "LLLSS", "LLSLS", "LLSSL", "LSLLS", "LSLSL", "LSSLL", "SLLLS",
- "SLLSL", "SLSLL"};
-
-static char *RoyalValues[36] = {"11", "12", "13", "14", "15", "10", "21", "22", "23", "24", "25",
- "20", "31", "32", "33", "34", "35", "30", "41", "42", "43", "44", "45", "40", "51", "52",
- "53", "54", "55", "50", "01", "02", "03", "04", "05", "00"};
-
-/* 0 = Full, 1 = Ascender, 2 = Descender, 3 = Tracker */
-static char *RoyalTable[36] = {"3300", "3210", "3201", "2310", "2301", "2211", "3120", "3030", "3021",
- "2130", "2121", "2031", "3102", "3012", "3003", "2112", "2103", "2013", "1320", "1230",
- "1221", "0330", "0321", "0231", "1302", "1212", "1203", "0312", "0303", "0213", "1122",
- "1032", "1023", "0132", "0123", "0033"};
-
-static char *FlatTable[10] = {"0504", "18", "0117", "0216", "0315", "0414", "0513", "0612", "0711",
- "0810"};
-
-static char *KoreaTable[10] = {"1313150613", "0713131313", "0417131313", "1506131313",
- "0413171313", "17171313", "1315061313", "0413131713", "17131713", "13171713"};
-
-static char *JapanTable[19] = {"114", "132", "312", "123", "141", "321", "213", "231", "411", "144",
- "414", "324", "342", "234", "432", "243", "423", "441", "111"};
-
-int postnet(struct zint_symbol *symbol, unsigned char source[], char dest[], int length)
-{
- /* Handles the PostNet system used for Zip codes in the US */
- unsigned int sum, check_digit;
- int i, error_number;
-
- error_number = 0;
-
- if(length > 38) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
- sum = 0;
-
- /* start character */
- strcpy(dest, "L");
-
- for (i=0; i < length; i++)
- {
- lookup(NEON, PNTable, source[i], dest);
- sum += ctoi(source[i]);
- }
-
- check_digit = (10 - (sum % 10)) % 10;
- concat(dest, PNTable[check_digit]);
-
- /* stop character */
- concat (dest, "L");
-
- return error_number;
-}
-
-int post_plot(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- /* Puts PostNet barcodes into the pattern matrix */
- char height_pattern[256]; /* 5 + 38 * 5 + 5 + 5 + 1 ~ 256 */
- unsigned int loopey, h;
- int writer;
- int error_number;
-
- error_number = 0;
-
- error_number = postnet(symbol, source, height_pattern, length);
- if(error_number != 0) {
- return error_number;
- }
-
- writer = 0;
- h = strlen(height_pattern);
- for(loopey = 0; loopey < h; loopey++)
- {
- if(height_pattern[loopey] == 'L')
- {
- set_module(symbol, 0, writer);
- }
- set_module(symbol, 1, writer);
- writer += 3;
- }
- symbol->row_height[0] = 6;
- symbol->row_height[1] = 6;
- symbol->rows = 2;
- symbol->width = writer - 1;
-
- return error_number;
-}
-
-int planet(struct zint_symbol *symbol, unsigned char source[], char dest[], int length)
-{
- /* Handles the PLANET system used for item tracking in the US */
- unsigned int sum, check_digit;
- int i, error_number;
-
- error_number = 0;
-
- if(length > 38) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
- sum = 0;
-
- /* start character */
- strcpy(dest, "L");
-
- for (i=0; i < length; i++) {
- lookup(NEON, PLTable, source[i], dest);
- sum += ctoi(source[i]);
- }
-
- check_digit = (10 - (sum % 10)) % 10;
- concat(dest, PLTable[check_digit]);
-
- /* stop character */
- concat (dest, "L");
-
- return error_number;
-}
-
-int planet_plot(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- /* Puts PLANET barcodes into the pattern matrix */
- char height_pattern[256]; /* 5 + 38 * 5 + 5 + 5 + 1 ~ 256 */
- unsigned int loopey, h;
- int writer;
- int error_number;
-
- error_number = 0;
-
- error_number = planet(symbol, source, height_pattern, length);
- if(error_number != 0) {
- return error_number;
- }
-
- writer = 0;
- h = strlen(height_pattern);
- for(loopey = 0; loopey < h; loopey++)
- {
- if(height_pattern[loopey] == 'L')
- {
- set_module(symbol, 0, writer);
- }
- set_module(symbol, 1, writer);
- writer += 3;
- }
- symbol->row_height[0] = 6;
- symbol->row_height[1] = 6;
- symbol->rows = 2;
- symbol->width = writer - 1;
- return error_number;
-}
-
-int korea_post(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Korean Postal Authority */
-
- int total, loop, check, zeroes, error_number;
- char localstr[8], dest[80];
-
- error_number = 0;
- if(length > 6) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
- zeroes = 6 - length;
- memset(localstr, '0', zeroes);
- strcpy(localstr + zeroes, (char *)source);
-
- total = 0;
- for(loop = 0; loop < 6; loop++) {
- total += ctoi(localstr[loop]);
- }
- check = 10 - (total % 10);
- if(check == 10) { check = 0; }
- localstr[6] = itoc(check);
- localstr[7] = '\0';
- *dest = '\0';
- for(loop = 5; loop >= 0; loop--) {
- lookup(NEON, KoreaTable, localstr[loop], dest);
- }
- lookup(NEON, KoreaTable, localstr[6], dest);
- expand(symbol, dest);
- ustrcpy(symbol->text, (unsigned char*)localstr);
- return error_number;
-}
-
-int fim(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- /* The simplest barcode symbology ever! Supported by MS Word, so here it is! */
- /* glyphs from http://en.wikipedia.org/wiki/Facing_Identification_Mark */
-
- char dest[16] = { 0 };
-
- if(length > 1) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- switch((char)source[0]) {
- case 'a':
- case 'A':
- strcpy(dest, "111515111");
- break;
- case 'b':
- case 'B':
- strcpy(dest, "13111311131");
- break;
- case 'c':
- case 'C':
- strcpy(dest, "11131313111");
- break;
- case 'd':
- case 'D':
- strcpy(dest, "1111131311111");
- break;
- default:
- strcpy(symbol->errtxt, "Invalid characters in data");
- return ERROR_INVALID_DATA1;
- break;
- }
-
- expand(symbol, dest);
- return 0;
-}
-
-char rm4scc(char source[], unsigned char dest[], int length)
-{
- /* Handles the 4 State barcodes used in the UK by Royal Mail */
- unsigned int i;
- int top, bottom, row, column, check_digit;
- char values[3], set_copy[] = KRSET;
-
- top = 0;
- bottom = 0;
-
- /* start character */
- strcpy((char*)dest, "1");
-
- for (i = 0; i < length; i++) {
- lookup(KRSET, RoyalTable, source[i], (char*)dest);
- strcpy(values, RoyalValues[posn(KRSET, source[i])]);
- top += ctoi(values[0]);
- bottom += ctoi(values[1]);
- }
-
- /* Calculate the check digit */
- row = (top % 6) - 1;
- column = (bottom % 6) - 1;
- if(row == -1) { row = 5; }
- if(column == -1) { column = 5; }
- check_digit = (6 * row) + column;
- concat((char*)dest, RoyalTable[check_digit]);
-
- /* stop character */
- concat ((char*)dest, "0");
-
- return set_copy[check_digit];
-}
-
-int royal_plot(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- /* Puts RM4SCC into the data matrix */
- char height_pattern[200], check;
- int loopey, h, writer;
- int error_number;
- strcpy(height_pattern, "");
-
- error_number = 0;
-
- if(length > 120) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- to_upper(source);
- error_number = is_sane(KRSET, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
- check = rm4scc((char*)source, (unsigned char*)height_pattern, length);
-
- writer = 0;
- h = strlen(height_pattern);
- for(loopey = 0; loopey < h; loopey++) {
- if((height_pattern[loopey] == '1') || (height_pattern[loopey] == '0')) {
- set_module(symbol, 0, writer);
- }
- set_module(symbol, 1, writer);
- if((height_pattern[loopey] == '2') || (height_pattern[loopey] == '0')) {
- set_module(symbol, 2, writer);
- }
- writer += 2;
- }
-
- symbol->row_height[0] = 3;
- symbol->row_height[1] = 2;
- symbol->row_height[2] = 3;
- symbol->rows = 3;
- symbol->width = writer - 1;
-
- return error_number;
-}
-
-int kix_code(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- /* Handles Dutch Post TNT KIX symbols */
- /* The same as RM4SCC but without check digit */
- /* Specification at http://www.tntpost.nl/zakelijk/klantenservice/downloads/kIX_code/download.aspx */
- char height_pattern[50], localstr[20];
- int loopey, writer, i, h;
- int error_number; /* zeroes; */
- strcpy(height_pattern, "");
-
- error_number = 0;
-
- if(length > 18) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- to_upper(source);
- error_number = is_sane(KRSET, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- /* Add leading zeroes */
- /* zeroes = 11 - length;
- memset(localstr, '0', zeroes);
- strcpy(localstr + zeroes, (char *)source);*/
- strcpy(localstr, (char *)source);
-
- /* Encode data */
- for (i = 0; i < 18; i++) {
- lookup(KRSET, RoyalTable, localstr[i], height_pattern);
- }
-
- writer = 0;
- h = strlen(height_pattern);
- for(loopey = 0; loopey < h; loopey++) {
- if((height_pattern[loopey] == '1') || (height_pattern[loopey] == '0')) {
- set_module(symbol, 0, writer);
- }
- set_module(symbol, 1, writer);
- if((height_pattern[loopey] == '2') || (height_pattern[loopey] == '0')) {
- set_module(symbol, 2, writer);
- }
- writer += 2;
- }
-
- symbol->row_height[0] = 3;
- symbol->row_height[1] = 2;
- symbol->row_height[2] = 3;
- symbol->rows = 3;
- symbol->width = writer - 1;
-
- return error_number;
-}
-
-int daft_code(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- /* Handles DAFT Code symbols */
- /* Presumably 'daft' doesn't mean the same thing in Germany as it does in the UK! */
- char height_pattern[100];
- unsigned int loopey, h;
- int writer, i, error_number;
- strcpy(height_pattern, "");
-
- error_number = 0;
- if(length > 50) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- to_upper((unsigned char*)source);
- error_number = is_sane(DAFTSET, (unsigned char*)source, length);
-
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- for (i = 0; i < length; i++) {
- if(source[i] == 'D') { concat(height_pattern, "2"); }
- if(source[i] == 'A') { concat(height_pattern, "1"); }
- if(source[i] == 'F') { concat(height_pattern, "0"); }
- if(source[i] == 'T') { concat(height_pattern, "3"); }
- }
-
- writer = 0;
- h = strlen(height_pattern);
- for(loopey = 0; loopey < h; loopey++)
- {
- if((height_pattern[loopey] == '1') || (height_pattern[loopey] == '0'))
- {
- set_module(symbol, 0, writer);
- }
- set_module(symbol, 1, writer);
- if((height_pattern[loopey] == '2') || (height_pattern[loopey] == '0'))
- {
- set_module(symbol, 2, writer);
- }
- writer += 2;
- }
-
- symbol->row_height[0] = 3;
- symbol->row_height[1] = 2;
- symbol->row_height[2] = 3;
- symbol->rows = 3;
- symbol->width = writer - 1;
-
- return error_number;
-}
-
-int flattermarken(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Flattermarken - Not really a barcode symbology and (in my opinion) probably not much use
- but it's supported by TBarCode so it's supported by Zint! */
- int loop, error_number;
- char dest[512]; /* 90 * 4 + 1 ~ */
-
- error_number = 0;
-
- if(length > 90) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, length);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
- *dest = '\0';
- for(loop = 0; loop < length; loop++) {
- lookup(NEON, FlatTable, source[loop], dest);
- }
-
- expand(symbol, dest);
- return error_number;
-}
-
-int japan_post(struct zint_symbol *symbol, unsigned char source[], int length)
-{ /* Japanese Postal Code (Kasutama Barcode) */
- int error_number, h;
- char pattern[69];
- int writer, loopey, inter_posn, i, sum, check;
- char check_char;
- char inter[23];
-
-#ifndef _MSC_VER
- char local_source[length + 1];
-#else
- char* local_source = (char*)_alloca(length + 1);
-#endif
-
- inter_posn = 0;
- error_number = 0;
-
- strcpy(local_source, (char*)source);
- for(i = 0; i < length; i++) {
- local_source[i] = source[i];
- }
- to_upper((unsigned char*)local_source);
- error_number = is_sane(SHKASUTSET, (unsigned char*)local_source, length);
-
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
- memset(inter, 'd', 20);/* Pad character CC4 */
- inter[20] = '\0';
-
- i = 0;
- inter_posn = 0;
- do {
- if(((local_source[i] >= '0') && (local_source[i] <= '9')) || (local_source[i] == '-')) {
- inter[inter_posn] = local_source[i];
- inter_posn++;
- } else {
- if((local_source[i] >= 'A') && (local_source[i] <= 'J')) {
- inter[inter_posn] = 'a';
- inter[inter_posn + 1] = local_source[i] - 'A' + '0';
- inter_posn += 2;
- }
- if((local_source[i] >= 'K') && (local_source[i] <= 'T')) {
- inter[inter_posn] = 'b';
- inter[inter_posn + 1] = local_source[i] - 'K' + '0';
- inter_posn += 2;
- }
- if((local_source[i] >= 'U') && (local_source[i] <= 'Z')) {
- inter[inter_posn] = 'c';
- inter[inter_posn + 1] = local_source[i] - 'U' + '0';
- inter_posn += 2;
- }
- }
- i++;
- }while((i < length) && (inter_posn < 20));
- inter[20] = '\0';
-
- strcpy(pattern, "13"); /* Start */
-
- sum = 0;
- for(i = 0; i < 20; i++) {
- concat(pattern, JapanTable[posn(KASUTSET, inter[i])]);
- sum += posn(CHKASUTSET, inter[i]);
- /* printf("%c (%d)\n", inter[i], posn(CHKASUTSET, inter[i])); */
- }
-
- /* Calculate check digit */
- check = 19 - (sum % 19);
- if(check == 19) { check = 0; }
- if(check <= 9) { check_char = check + '0'; }
- if(check == 10) { check_char = '-'; }
- if(check >= 11) { check_char = (check - 11) + 'a'; }
- concat(pattern, JapanTable[posn(KASUTSET, check_char)]);
- /* printf("check %c (%d)\n", check_char, check); */
-
- concat(pattern, "31"); /* Stop */
-
- /* Resolve pattern to 4-state symbols */
- writer = 0;
- h = strlen(pattern);
- for(loopey = 0; loopey < h; loopey++)
- {
- if((pattern[loopey] == '2') || (pattern[loopey] == '1'))
- {
- set_module(symbol, 0, writer);
- }
- set_module(symbol, 1, writer);
- if((pattern[loopey] == '3') || (pattern[loopey] == '1'))
- {
- set_module(symbol, 2, writer);
- }
- writer += 2;
- }
-
- symbol->row_height[0] = 3;
- symbol->row_height[1] = 2;
- symbol->row_height[2] = 3;
- symbol->rows = 3;
- symbol->width = writer - 1;
-
- return error_number;
-}
diff --git a/3rdparty/zint-2.4.4/backend/ps.c b/3rdparty/zint-2.4.4/backend/ps.c
deleted file mode 100644
index 7543561..0000000
--- a/3rdparty/zint-2.4.4/backend/ps.c
+++ /dev/null
@@ -1,761 +0,0 @@
-/* ps.c - Post Script output */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include
-#include
-#include
-#include
-#include "common.h"
-
-#define SSET "0123456789ABCDEF"
-
-/* This file has expanded quite a bit since version 1.5 in order to accomodate
- the formatting rules for EAN and UPC symbols as set out in EN 797:1995 - the
- down side of this support is that the code is now vertually unreadable! */
-
-int ps_plot(struct zint_symbol *symbol)
-{
- int i, block_width, latch, r, this_row;
- float textpos, large_bar_height, preset_height, row_height, row_posn;
- FILE *feps;
- int fgred, fggrn, fgblu, bgred, bggrn, bgblu;
- float red_ink, green_ink, blue_ink, red_paper, green_paper, blue_paper;
- int error_number = 0;
- int textoffset, xoffset, yoffset, textdone, main_width;
- char textpart[10], addon[6];
- int large_bar_count, comp_offset;
- float addon_text_posn;
- float scaler = symbol->scale;
- float default_text_posn;
- int plot_text = 1;
- const char *locale = NULL;
-
- row_height=0;
- textdone = 0;
- main_width = symbol->width;
- strcpy(addon, "");
- comp_offset = 0;
- addon_text_posn = 0.0;
-
- if((symbol->output_options & BARCODE_STDOUT) != 0) {
- feps = stdout;
- } else {
- feps = fopen(symbol->outfile, "w");
- }
- if(feps == NULL) {
- strcpy(symbol->errtxt, "Could not open output file");
- return ERROR_FILE_ACCESS;
- }
-
- /* sort out colour options */
- to_upper((unsigned char*)symbol->fgcolour);
- to_upper((unsigned char*)symbol->bgcolour);
-
- if(strlen(symbol->fgcolour) != 6) {
- strcpy(symbol->errtxt, "Malformed foreground colour target");
- return ERROR_INVALID_OPTION;
- }
- if(strlen(symbol->bgcolour) != 6) {
- strcpy(symbol->errtxt, "Malformed background colour target");
- return ERROR_INVALID_OPTION;
- }
- error_number = is_sane(SSET, (unsigned char*)symbol->fgcolour, strlen(symbol->fgcolour));
- if (error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Malformed foreground colour target");
- return ERROR_INVALID_OPTION;
- }
- error_number = is_sane(SSET, (unsigned char*)symbol->bgcolour, strlen(symbol->bgcolour));
- if (error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Malformed background colour target");
- return ERROR_INVALID_OPTION;
- }
- locale = setlocale(LC_ALL, "C");
-
- fgred = (16 * ctoi(symbol->fgcolour[0])) + ctoi(symbol->fgcolour[1]);
- fggrn = (16 * ctoi(symbol->fgcolour[2])) + ctoi(symbol->fgcolour[3]);
- fgblu = (16 * ctoi(symbol->fgcolour[4])) + ctoi(symbol->fgcolour[5]);
- bgred = (16 * ctoi(symbol->bgcolour[0])) + ctoi(symbol->bgcolour[1]);
- bggrn = (16 * ctoi(symbol->bgcolour[2])) + ctoi(symbol->bgcolour[3]);
- bgblu = (16 * ctoi(symbol->bgcolour[4])) + ctoi(symbol->bgcolour[5]);
- red_ink = fgred / 256.0;
- green_ink = fggrn / 256.0;
- blue_ink = fgblu / 256.0;
- red_paper = bgred / 256.0;
- green_paper = bggrn / 256.0;
- blue_paper = bgblu / 256.0;
-
- if (symbol->height == 0) {
- symbol->height = 50;
- }
-
- large_bar_count = 0;
- preset_height = 0.0;
- for(i = 0; i < symbol->rows; i++) {
- preset_height += symbol->row_height[i];
- if(symbol->row_height[i] == 0) {
- large_bar_count++;
- }
- }
- large_bar_height = (symbol->height - preset_height) / large_bar_count;
-
- if (large_bar_count == 0) {
- symbol->height = preset_height;
- }
-
- while(!(module_is_set(symbol, symbol->rows - 1, comp_offset))) {
- comp_offset++;
- }
-
- /* Certain symbols need whitespace otherwise characters get chopped off the sides */
- if ((((symbol->symbology == BARCODE_EANX) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_EANX_CC))
- || (symbol->symbology == BARCODE_ISBNX)) {
- switch(ustrlen(symbol->text)) {
- case 13: /* EAN 13 */
- case 16:
- case 19:
- if(symbol->whitespace_width == 0) {
- symbol->whitespace_width = 10;
- }
- main_width = 96 + comp_offset;
- break;
- default:
- main_width = 68 + comp_offset;
- }
- }
-
- if (((symbol->symbology == BARCODE_UPCA) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCA_CC)) {
- if(symbol->whitespace_width == 0) {
- symbol->whitespace_width = 10;
- main_width = 96 + comp_offset;
- }
- }
-
- if (((symbol->symbology == BARCODE_UPCE) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCE_CC)) {
- if(symbol->whitespace_width == 0) {
- symbol->whitespace_width = 10;
- main_width = 51 + comp_offset;
- }
- }
-
- latch = 0;
- r = 0;
- /* Isolate add-on text */
- if(is_extendable(symbol->symbology)) {
- for(i = 0; i < ustrlen(symbol->text); i++) {
- if (latch == 1) {
- addon[r] = symbol->text[i];
- r++;
- }
- if (symbol->text[i] == '+') {
- latch = 1;
- }
- }
- }
- addon[r] = '\0';
-
- if((symbol->show_hrt == 0) || (ustrlen(symbol->text) == 0)) {
- plot_text = 0;
- }
- if(plot_text) {
- textoffset = 9;
- } else {
- textoffset = 0;
- }
- xoffset = symbol->border_width + symbol->whitespace_width;
- yoffset = symbol->border_width;
-
- /* Start writing the header */
- fprintf(feps, "%%!PS-Adobe-3.0 EPSF-3.0\n");
- fprintf(feps, "%%%%Creator: Zint %s\n", ZINT_VERSION);
- if(ustrlen(symbol->text) != 0) {
- fprintf(feps, "%%%%Title: %s\n",symbol->text);
- } else {
- fprintf(feps, "%%%%Title: Zint Generated Symbol\n");
- }
- fprintf(feps, "%%%%Pages: 0\n");
- if(symbol->symbology != BARCODE_MAXICODE) {
- fprintf(feps, "%%%%BoundingBox: 0 0 %d %d\n", roundup((symbol->width + xoffset + xoffset) * scaler), roundup((symbol->height + textoffset + yoffset + yoffset) * scaler));
- } else {
- fprintf(feps, "%%%%BoundingBox: 0 0 %d %d\n", roundup((74.0 + xoffset + xoffset) * scaler), roundup((72.0 + yoffset + yoffset) * scaler));
- }
- fprintf(feps, "%%%%EndComments\n");
-
- /* Definitions */
- fprintf(feps, "/TL { setlinewidth moveto lineto stroke } bind def\n");
- fprintf(feps, "/TC { moveto 0 360 arc 360 0 arcn fill } bind def\n");
- fprintf(feps, "/TH { 0 setlinewidth moveto lineto lineto lineto lineto lineto closepath fill } bind def\n");
- fprintf(feps, "/TB { 2 copy } bind def\n");
- fprintf(feps, "/TR { newpath 4 1 roll exch moveto 1 index 0 rlineto 0 exch rlineto neg 0 rlineto closepath fill } bind def\n");
- fprintf(feps, "/TE { pop pop } bind def\n");
-
- fprintf(feps, "newpath\n");
-
- /* Now the actual representation */
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_paper, green_paper, blue_paper);
- fprintf(feps, "%.2f 0.00 TB 0.00 %.2f TR\n", (symbol->height + textoffset + yoffset + yoffset) * scaler, (symbol->width + xoffset + xoffset) * scaler);
-
- if(((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) {
- default_text_posn = 0.5 * scaler;
- } else {
- default_text_posn = (symbol->border_width + 0.5) * scaler;
- }
-
- if(symbol->symbology == BARCODE_MAXICODE) {
- /* Maxicode uses hexagons */
- float ax, ay, bx, by, cx, cy, dx, dy, ex, ey, fx, fy, mx, my;
-
-
- textoffset = 0.0;
- if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) {
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", symbol->border_width * scaler, textoffset * scaler, 0.0, (74.0 + xoffset + xoffset) * scaler);
- fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", symbol->border_width * scaler, (textoffset + 72.0 + symbol->border_width) * scaler, 0.0, (74.0 + xoffset + xoffset) * scaler);
- }
- if((symbol->output_options & BARCODE_BOX) != 0) {
- /* side bars */
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", (72.0 + (2 * symbol->border_width)) * scaler, textoffset * scaler, 0.0, symbol->border_width * scaler);
- fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", (72.0 + (2 * symbol->border_width)) * scaler, textoffset * scaler, (74.0 + xoffset + xoffset - symbol->border_width) * scaler, symbol->border_width * scaler);
- }
-
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TC\n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 10.85 * scaler, (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 8.97 * scaler, (44.73 + xoffset) * scaler, (35.60 + yoffset) * scaler);
- fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TC\n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 7.10 * scaler, (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 5.22 * scaler, (40.98 + xoffset) * scaler, (35.60 + yoffset) * scaler);
- fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TC\n", (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 3.31 * scaler, (35.76 + xoffset) * scaler, (35.60 + yoffset) * scaler, 1.43 * scaler, (37.19 + xoffset) * scaler, (35.60 + yoffset) * scaler);
- for(r = 0; r < symbol->rows; r++) {
- for(i = 0; i < symbol->width; i++) {
- if(module_is_set(symbol, r, i)) {
- /* Dump a hexagon */
- my = ((symbol->rows - r - 1)) * 2.135 + 1.43;
- ay = my + 1.0 + yoffset;
- by = my + 0.5 + yoffset;
- cy = my - 0.5 + yoffset;
- dy = my - 1.0 + yoffset;
- ey = my - 0.5 + yoffset;
- fy = my + 0.5 + yoffset;
-
- mx = 2.46 * i + 1.23 + (r & 1 ? 1.23 : 0);
-
- ax = mx + xoffset;
- bx = mx + 0.86 + xoffset;
- cx = mx + 0.86 + xoffset;
- dx = mx + xoffset;
- ex = mx - 0.86 + xoffset;
- fx = mx - 0.86 + xoffset;
- fprintf(feps, "%.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f %.2f TH\n", ax * scaler, ay * scaler, bx * scaler, by * scaler, cx * scaler, cy * scaler, dx * scaler, dy * scaler, ex * scaler, ey * scaler, fx * scaler, fy * scaler);
- }
- }
- }
- }
-
- if(symbol->symbology != BARCODE_MAXICODE) {
- /* everything else uses rectangles (or squares) */
- /* Works from the bottom of the symbol up */
- int addon_latch = 0;
-
- for(r = 0; r < symbol->rows; r++) {
- this_row = symbol->rows - r - 1; /* invert r otherwise plots upside down */
- if(symbol->row_height[this_row] == 0) {
- row_height = large_bar_height;
- } else {
- row_height = symbol->row_height[this_row];
- }
- row_posn = 0;
- for(i = 0; i < r; i++) {
- if(symbol->row_height[symbol->rows - i - 1] == 0) {
- row_posn += large_bar_height;
- } else {
- row_posn += symbol->row_height[symbol->rows - i - 1];
- }
- }
- row_posn += (textoffset + yoffset);
-
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "%.2f %.2f ", row_height * scaler, row_posn * scaler);
- i = 0;
- if(module_is_set(symbol, this_row, 0)) {
- latch = 1;
- } else {
- latch = 0;
- }
-
- do {
- block_width = 0;
- do {
- block_width++;
- } while (module_is_set(symbol, this_row, i + block_width) == module_is_set(symbol, this_row, i));
- if((addon_latch == 0) && (r == 0) && (i > main_width)) {
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "%.2f %.2f ", (row_height - 5.0) * scaler, (row_posn - 5.0) * scaler);
- addon_text_posn = row_posn + row_height - 8.0;
- addon_latch = 1;
- }
- if(latch == 1) {
- /* a bar */
- fprintf(feps, "TB %.2f %.2f TR\n", (i + xoffset) * scaler, block_width * scaler);
- latch = 0;
- } else {
- /* a space */
- latch = 1;
- }
- i += block_width;
-
- } while (i < symbol->width);
- }
- }
- /* That's done the actual data area, everything else is human-friendly */
-
- xoffset += comp_offset;
-
- if (plot_text) {
- if ((((symbol->symbology == BARCODE_EANX) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_EANX_CC)) ||
- (symbol->symbology == BARCODE_ISBNX)) {
- /* guard bar extensions and text formatting for EAN8 and EAN13 */
- switch(ustrlen(symbol->text)) {
- case 8: /* EAN-8 */
- case 11:
- case 14:
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "%.2f %.2f ", 5.0 * scaler, (4.0 + yoffset) * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (0 + xoffset) * scaler, 1 * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (2 + xoffset) * scaler, 1 * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (32 + xoffset) * scaler, 1 * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (34 + xoffset) * scaler, 1 * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (64 + xoffset) * scaler, 1 * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (66 + xoffset) * scaler, 1 * scaler);
- for(i = 0; i < 4; i++) {
- textpart[i] = symbol->text[i];
- }
- textpart[4] = '\0';
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = 17;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn);
- fprintf(feps, " (%s) stringwidth\n", textpart);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", textpart);
- fprintf(feps, "setmatrix\n");
- for(i = 0; i < 4; i++) {
- textpart[i] = symbol->text[i + 4];
- }
- textpart[4] = '\0';
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = 50;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn);
- fprintf(feps, " (%s) stringwidth\n", textpart);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", textpart);
- fprintf(feps, "setmatrix\n");
- textdone = 1;
- switch(strlen(addon)) {
- case 2:
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = xoffset + 86;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler);
- fprintf(feps, " (%s) stringwidth\n", addon);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", addon);
- fprintf(feps, "setmatrix\n");
- break;
- case 5:
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = xoffset + 100;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler);
- fprintf(feps, " (%s) stringwidth\n", addon);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", addon);
- fprintf(feps, "setmatrix\n");
- break;
- }
-
- break;
- case 13: /* EAN 13 */
- case 16:
- case 19:
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "%.2f %.2f ", 5.0 * scaler, (4.0 + yoffset) * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (0 + xoffset) * scaler, 1 * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (2 + xoffset) * scaler, 1 * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (46 + xoffset) * scaler, 1 * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (48 + xoffset) * scaler, 1 * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (92 + xoffset) * scaler, 1 * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (94 + xoffset) * scaler, 1 * scaler);
- textpart[0] = symbol->text[0];
- textpart[1] = '\0';
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = -7;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn);
- fprintf(feps, " (%s) stringwidth\n", textpart);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", textpart);
- fprintf(feps, "setmatrix\n");
- for(i = 0; i < 6; i++) {
- textpart[i] = symbol->text[i + 1];
- }
- textpart[6] = '\0';
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = 24;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn);
- fprintf(feps, " (%s) stringwidth\n", textpart);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", textpart);
- fprintf(feps, "setmatrix\n");
- for(i = 0; i < 6; i++) {
- textpart[i] = symbol->text[i + 7];
- }
- textpart[6] = '\0';
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = 71;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn);
- fprintf(feps, " (%s) stringwidth\n", textpart);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", textpart);
- fprintf(feps, "setmatrix\n");
- textdone = 1;
- switch(strlen(addon)) {
- case 2:
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = xoffset + 114;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler);
- fprintf(feps, " (%s) stringwidth\n", addon);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", addon);
- fprintf(feps, "setmatrix\n");
- break;
- case 5:
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = xoffset + 128;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler);
- fprintf(feps, " (%s) stringwidth\n", addon);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", addon);
- fprintf(feps, "setmatrix\n");
- break;
- }
- break;
-
- }
- }
-
- if (((symbol->symbology == BARCODE_UPCA) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCA_CC)) {
- /* guard bar extensions and text formatting for UPCA */
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "%.2f %.2f ", 5.0 * scaler, (4.0 + yoffset) * scaler);
- latch = 1;
-
- i = 0 + comp_offset;
- do {
- block_width = 0;
- do {
- block_width++;
- } while (module_is_set(symbol, symbol->rows - 1, i + block_width) == module_is_set(symbol, symbol->rows - 1, i));
- if(latch == 1) {
- /* a bar */
- fprintf(feps, "TB %.2f %.2f TR\n", (i + xoffset - comp_offset) * scaler, block_width * scaler);
- latch = 0;
- } else {
- /* a space */
- latch = 1;
- }
- i += block_width;
- } while (i < 11 + comp_offset);
- fprintf(feps, "TB %.2f %.2f TR\n", (46 + xoffset) * scaler, 1 * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (48 + xoffset) * scaler, 1 * scaler);
- latch = 1;
- i = 85 + comp_offset;
- do {
- block_width = 0;
- do {
- block_width++;
- } while (module_is_set(symbol, symbol->rows - 1, i + block_width) == module_is_set(symbol, symbol->rows - 1, i));
- if(latch == 1) {
- /* a bar */
- fprintf(feps, "TB %.2f %.2f TR\n", (i + xoffset - comp_offset) * scaler, block_width * scaler);
- latch = 0;
- } else {
- /* a space */
- latch = 1;
- }
- i += block_width;
- } while (i < 96 + comp_offset);
- textpart[0] = symbol->text[0];
- textpart[1] = '\0';
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 8.0 * scaler);
- textpos = -5;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn);
- fprintf(feps, " (%s) stringwidth\n", textpart);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", textpart);
- fprintf(feps, "setmatrix\n");
- for(i = 0; i < 5; i++) {
- textpart[i] = symbol->text[i + 1];
- }
- textpart[5] = '\0';
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = 27;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn);
- fprintf(feps, " (%s) stringwidth\n", textpart);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", textpart);
- fprintf(feps, "setmatrix\n");
- for(i = 0; i < 5; i++) {
- textpart[i] = symbol->text[i + 6];
- }
- textpart[6] = '\0';
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = 68;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn);
- fprintf(feps, " (%s) stringwidth\n", textpart);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", textpart);
- fprintf(feps, "setmatrix\n");
- textpart[0] = symbol->text[11];
- textpart[1] = '\0';
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 8.0 * scaler);
- textpos = 100;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn);
- fprintf(feps, " (%s) stringwidth\n", textpart);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", textpart);
- fprintf(feps, "setmatrix\n");
- textdone = 1;
- switch(strlen(addon)) {
- case 2:
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = xoffset + 116;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler);
- fprintf(feps, " (%s) stringwidth\n", addon);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", addon);
- fprintf(feps, "setmatrix\n");
- break;
- case 5:
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = xoffset + 130;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler);
- fprintf(feps, " (%s) stringwidth\n", addon);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", addon);
- fprintf(feps, "setmatrix\n");
- break;
- }
-
- }
-
- if (((symbol->symbology == BARCODE_UPCE) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCE_CC)) {
- /* guard bar extensions and text formatting for UPCE */
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "%.2f %.2f ", 5.0 * scaler, (4.0 + yoffset) * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (0 + xoffset) * scaler, 1 * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (2 + xoffset) * scaler, 1 * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (46 + xoffset) * scaler, 1 * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (48 + xoffset) * scaler, 1 * scaler);
- fprintf(feps, "TB %.2f %.2f TR\n", (50 + xoffset) * scaler, 1 * scaler);
- textpart[0] = symbol->text[0];
- textpart[1] = '\0';
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 8.0 * scaler);
- textpos = -5;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn);
- fprintf(feps, " (%s) stringwidth\n", textpart);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", textpart);
- fprintf(feps, "setmatrix\n");
- for(i = 0; i < 6; i++) {
- textpart[i] = symbol->text[i + 1];
- }
- textpart[6] = '\0';
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = 24;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn);
- fprintf(feps, " (%s) stringwidth\n", textpart);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", textpart);
- fprintf(feps, "setmatrix\n");
- textpart[0] = symbol->text[7];
- textpart[1] = '\0';
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 8.0 * scaler);
- textpos = 55;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn);
- fprintf(feps, " (%s) stringwidth\n", textpart);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", textpart);
- fprintf(feps, "setmatrix\n");
- textdone = 1;
- switch(strlen(addon)) {
- case 2:
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = xoffset + 70;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler);
- fprintf(feps, " (%s) stringwidth\n", addon);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", addon);
- fprintf(feps, "setmatrix\n");
- break;
- case 5:
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 11.0 * scaler);
- textpos = xoffset + 84;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", textpos * scaler, addon_text_posn * scaler);
- fprintf(feps, " (%s) stringwidth\n", addon);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", addon);
- fprintf(feps, "setmatrix\n");
- break;
- }
-
- }
- } /* if (plot_text) */
-
- xoffset -= comp_offset;
-
- switch(symbol->symbology) {
- case BARCODE_MAXICODE:
- /* Do nothing! (It's already been done) */
- break;
- default:
- if((symbol->output_options & BARCODE_BIND) != 0) {
- if((symbol->rows > 1) && (is_stackable(symbol->symbology) == 1)) {
- /* row binding */
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- for(r = 1; r < symbol->rows; r++) {
- fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", 2.0 * scaler, ((r * row_height) + textoffset + yoffset - 1) * scaler, xoffset * scaler, symbol->width * scaler);
- }
- }
- }
- if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) {
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", symbol->border_width * scaler, textoffset * scaler, 0.0, (symbol->width + xoffset + xoffset) * scaler);
- fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", symbol->border_width * scaler, (textoffset + symbol->height + symbol->border_width) * scaler, 0.0, (symbol->width + xoffset + xoffset) * scaler);
- }
- if((symbol->output_options & BARCODE_BOX) != 0) {
- /* side bars */
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", (symbol->height + (2 * symbol->border_width)) * scaler, textoffset * scaler, 0.0, symbol->border_width * scaler);
- fprintf(feps, "%.2f %.2f TB %.2f %.2f TR\n", (symbol->height + (2 * symbol->border_width)) * scaler, textoffset * scaler, (symbol->width + xoffset + xoffset - symbol->border_width) * scaler, symbol->border_width * scaler);
- }
- break;
- }
-
- /* Put the human readable text at the bottom */
- if(plot_text && (textdone == 0)) {
- fprintf(feps, "TE\n");
- fprintf(feps, "%.2f %.2f %.2f setrgbcolor\n", red_ink, green_ink, blue_ink);
- fprintf(feps, "matrix currentmatrix\n");
- fprintf(feps, "/Helvetica findfont\n");
- fprintf(feps, "%.2f scalefont setfont\n", 8.0 * scaler);
- textpos = symbol->width / 2.0;
- fprintf(feps, " 0 0 moveto %.2f %.2f translate 0.00 rotate 0 0 moveto\n", (textpos + xoffset) * scaler, default_text_posn);
- fprintf(feps, " (%s) stringwidth\n", symbol->text);
- fprintf(feps, "pop\n");
- fprintf(feps, "-2 div 0 rmoveto\n");
- fprintf(feps, " (%s) show\n", symbol->text);
- fprintf(feps, "setmatrix\n");
- }
- fprintf(feps, "\nshowpage\n");
-
- fclose(feps);
-
- if (locale)
- setlocale(LC_ALL, locale);
-
- return error_number;
-}
-
diff --git a/3rdparty/zint-2.4.4/backend/qr.c b/3rdparty/zint-2.4.4/backend/qr.c
deleted file mode 100644
index 23b4743..0000000
--- a/3rdparty/zint-2.4.4/backend/qr.c
+++ /dev/null
@@ -1,2244 +0,0 @@
-/* qr.c Handles QR Code */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include
-#ifdef _MSC_VER
-#include
-#endif
-#include "common.h"
-#include
-#include "sjis.h"
-#include "qr.h"
-#include "reedsol.h"
-
-int in_alpha(int glyph) {
- /* Returns true if input glyph is in the Alphanumeric set */
- int retval = 0;
- char cglyph = (char) glyph;
-
- if((cglyph >= '0') && (cglyph <= '9')) {
- retval = 1;
- }
- if((cglyph >= 'A') && (cglyph <= 'Z')) {
- retval = 1;
- }
- switch (cglyph) {
- case ' ':
- case '$':
- case '%':
- case '*':
- case '+':
- case '-':
- case '.':
- case '/':
- case ':':
- retval = 1;
- break;
- }
-
- return retval;
-}
-
-void define_mode(char mode[], int jisdata[], int length, int gs1)
-{
- /* Values placed into mode[] are: K = Kanji, B = Binary, A = Alphanumeric, N = Numeric */
- int i, mlen, j;
-
- for(i = 0; i < length; i++) {
- if(jisdata[i] > 0xff) {
- mode[i] = 'K';
- } else {
- mode[i] = 'B';
- if(in_alpha(jisdata[i])) { mode[i] = 'A'; }
- if(gs1 && (jisdata[i] == '[')) { mode[i] = 'A'; }
- if((jisdata[i] >= '0') && (jisdata[i] <= '9')) { mode[i] = 'N'; }
- }
- }
-
- /* If less than 6 numeric digits together then don't use numeric mode */
- for(i = 0; i < length; i++) {
- if(mode[i] == 'N') {
- if(((i != 0) && (mode[i - 1] != 'N')) || (i == 0)) {
- mlen = 0;
- while (((mlen + i) < length) && (mode[mlen + i] == 'N')) {
- mlen++;
- };
- if(mlen < 6) {
- for(j = 0; j < mlen; j++) {
- mode[i + j] = 'A';
- }
- }
- }
- }
- }
-
- /* If less than 4 alphanumeric characters together then don't use alphanumeric mode */
- for(i = 0; i < length; i++) {
- if(mode[i] == 'A') {
- if(((i != 0) && (mode[i - 1] != 'A')) || (i == 0)) {
- mlen = 0;
- while (((mlen + i) < length) && (mode[mlen + i] == 'A')) {
- mlen++;
- };
- if(mlen < 6) {
- for(j = 0; j < mlen; j++) {
- mode[i + j] = 'B';
- }
- }
- }
- }
- }
-}
-
-int estimate_binary_length(char mode[], int length, int gs1)
-{
- /* Make an estimate (worst case scenario) of how long the binary string will be */
- int i, count = 0;
- char current = 0;
- int a_count = 0;
- int n_count = 0;
-
- if(gs1) { count += 4; }
-
- for(i = 0; i < length; i++) {
- if(mode[i] != current) {
- switch(mode[i]) {
- case 'K': count += 12 + 4; current = 'K'; break;
- case 'B': count += 16 + 4; current = 'B'; break;
- case 'A': count += 13 + 4; current = 'A'; a_count = 0; break;
- case 'N': count += 14 + 4; current = 'N'; n_count = 0; break;
- }
- }
-
- switch(mode[i]) {
- case 'K': count += 13; break;
- case 'B': count += 8; break;
- case 'A':
- a_count++;
- if((a_count & 1) == 0) {
- count += 5; // 11 in total
- a_count = 0;
- }
- else
- count += 6;
- break;
- case 'N':
- n_count++;
- if((n_count % 3) == 0) {
- count += 3; // 10 in total
- n_count = 0;
- }
- else if ((n_count & 1) == 0)
- count += 3; // 7 in total
- else
- count += 4;
- break;
- }
- }
-
- return count;
-}
-
-static void qr_bscan(char *binary, int data, int h)
-{
- for (; h; h>>=1) {
- concat(binary, data & h ? "1" : "0");
- }
-}
-
-void qr_binary(int datastream[], int version, int target_binlen, char mode[], int jisdata[], int length, int gs1, int est_binlen)
-{
- /* Convert input data to a binary stream and add padding */
- int position = 0, debug = 0;
- int short_data_block_length, i, scheme = 1;
- char data_block, padbits;
- int current_binlen, current_bytes;
- int toggle, percent;
-
-#ifndef _MSC_VER
- char binary[est_binlen + 12];
-#else
- char* binary = (char *)_alloca(est_binlen + 12);
-#endif
- strcpy(binary, "");
-
- if(gs1) {
- concat(binary, "0101"); /* FNC1 */
- }
-
- if(version <= 9) {
- scheme = 1;
- } else if((version >= 10) && (version <= 26)) {
- scheme = 2;
- } else if(version >= 27) {
- scheme = 3;
- }
-
- if(debug) {
- for(i = 0; i < length; i++) {
- printf("%c", mode[i]);
- }
- printf("\n");
- }
-
- percent = 0;
-
- do {
- data_block = mode[position];
- short_data_block_length = 0;
- do {
- short_data_block_length++;
- } while (((short_data_block_length + position) < length) && (mode[position + short_data_block_length] == data_block));
-
- switch(data_block) {
- case 'K':
- /* Kanji mode */
- /* Mode indicator */
- concat(binary, "1000");
-
- /* Character count indicator */
- qr_bscan(binary, short_data_block_length, 0x20 << (scheme*2)); /* scheme = 1..3 */
-
- if(debug) { printf("Kanji block (length %d)\n\t", short_data_block_length); }
-
- /* Character representation */
- for(i = 0; i < short_data_block_length; i++) {
- int jis = jisdata[position + i];
- int msb, lsb, prod;
-
- if(jis > 0x9fff) { jis -= 0xc140; }
- msb = (jis & 0xff00) >> 4;
- lsb = (jis & 0xff);
- prod = (msb * 0xc0) + lsb;
-
- qr_bscan(binary, prod, 0x1000);
-
- if(debug) { printf("0x%4X ", prod); }
- }
-
- if(debug) { printf("\n"); }
-
- break;
- case 'B':
- /* Byte mode */
- /* Mode indicator */
- concat(binary, "0100");
-
- /* Character count indicator */
- qr_bscan(binary, short_data_block_length, scheme > 1 ? 0x8000 : 0x80); /* scheme = 1..3 */
-
- if(debug) { printf("Byte block (length %d)\n\t", short_data_block_length); }
-
- /* Character representation */
- for(i = 0; i < short_data_block_length; i++) {
- int byte = jisdata[position + i];
-
- if(gs1 && (byte == '[')) {
- byte = 0x1d; /* FNC1 */
- }
-
- qr_bscan(binary, byte, 0x80);
-
- if(debug) { printf("0x%2X(%d) ", byte, byte); }
- }
-
- if(debug) { printf("\n"); }
-
- break;
- case 'A':
- /* Alphanumeric mode */
- /* Mode indicator */
- concat(binary, "0010");
-
- /* Character count indicator */
- qr_bscan(binary, short_data_block_length, 0x40 << (2 * scheme)); /* scheme = 1..3 */
-
- if(debug) { printf("Alpha block (length %d)\n\t", short_data_block_length); }
-
- /* Character representation */
- i = 0;
- while ( i < short_data_block_length ) {
- int count;
- int first = 0, second = 0, prod;
-
- if(percent == 0) {
- if(gs1 && (jisdata[position + i] == '%')) {
- first = posn(RHODIUM, '%');
- second = posn(RHODIUM, '%');
- count = 2;
- prod = (first * 45) + second;
- i++;
- } else {
- if(gs1 && (jisdata[position + i] == '[')) {
- first = posn(RHODIUM, '%'); /* FNC1 */
- } else {
- first = posn(RHODIUM, (char) jisdata[position + i]);
- }
- count = 1;
- i++;
- prod = first;
-
- if(mode[position + i] == 'A') {
- if(gs1 && (jisdata[position + i] == '%')) {
- second = posn(RHODIUM, '%');
- count = 2;
- prod = (first * 45) + second;
- percent = 1;
- } else {
- if(gs1 && (jisdata[position + i] == '[')) {
- second = posn(RHODIUM, '%'); /* FNC1 */
- } else {
- second = posn(RHODIUM, (char) jisdata[position + i]);
- }
- count = 2;
- i++;
- prod = (first * 45) + second;
- }
- }
- }
- } else {
- first = posn(RHODIUM, '%');
- count = 1;
- i++;
- prod = first;
- percent = 0;
-
- if(mode[position + i] == 'A') {
- if(gs1 && (jisdata[position + i] == '%')) {
- second = posn(RHODIUM, '%');
- count = 2;
- prod = (first * 45) + second;
- percent = 1;
- } else {
- if(gs1 && (jisdata[position + i] == '[')) {
- second = posn(RHODIUM, '%'); /* FNC1 */
- } else {
- second = posn(RHODIUM, (char) jisdata[position + i]);
- }
- count = 2;
- i++;
- prod = (first * 45) + second;
- }
- }
- }
-
- qr_bscan(binary, prod, count == 2 ? 0x400 : 0x20); /* count = 1..2 */
-
- if(debug) { printf("0x%4X ", prod); }
- };
-
- if(debug) { printf("\n"); }
-
- break;
- case 'N':
- /* Numeric mode */
- /* Mode indicator */
- concat(binary, "0001");
-
- /* Character count indicator */
- qr_bscan(binary, short_data_block_length, 0x80 << (2 * scheme)); /* scheme = 1..3 */
-
- if(debug) { printf("Number block (length %d)\n\t", short_data_block_length); }
-
- /* Character representation */
- i = 0;
- while ( i < short_data_block_length ) {
- int count;
- int first = 0, second = 0, third = 0, prod;
-
- first = posn(NEON, (char) jisdata[position + i]);
- count = 1;
- prod = first;
-
- if(mode[position + i + 1] == 'N') {
- second = posn(NEON, (char) jisdata[position + i + 1]);
- count = 2;
- prod = (prod * 10) + second;
-
- if(mode[position + i + 2] == 'N') {
- third = posn(NEON, (char) jisdata[position + i + 2]);
- count = 3;
- prod = (prod * 10) + third;
- }
- }
-
- qr_bscan(binary, prod, 1 << (3 * count)); /* count = 1..3 */
-
- if(debug) { printf("0x%4X (%d)", prod, prod); }
-
- i += count;
- };
-
- if(debug) { printf("\n"); }
-
- break;
- }
-
- position += short_data_block_length;
- } while (position < length) ;
-
- /* Terminator */
- concat(binary, "0000");
-
- current_binlen = strlen(binary);
- padbits = 8 - (current_binlen % 8);
- if(padbits == 8) { padbits = 0; }
- current_bytes = (current_binlen + padbits) / 8;
-
- /* Padding bits */
- for(i = 0; i < padbits; i++) {
- concat(binary, "0");
- }
-
- /* Put data into 8-bit codewords */
- for(i = 0; i < current_bytes; i++) {
- datastream[i] = 0x00;
- if(binary[i * 8] == '1') { datastream[i] += 0x80; }
- if(binary[i * 8 + 1] == '1') { datastream[i] += 0x40; }
- if(binary[i * 8 + 2] == '1') { datastream[i] += 0x20; }
- if(binary[i * 8 + 3] == '1') { datastream[i] += 0x10; }
- if(binary[i * 8 + 4] == '1') { datastream[i] += 0x08; }
- if(binary[i * 8 + 5] == '1') { datastream[i] += 0x04; }
- if(binary[i * 8 + 6] == '1') { datastream[i] += 0x02; }
- if(binary[i * 8 + 7] == '1') { datastream[i] += 0x01; }
- }
-
- /* Add pad codewords */
- toggle = 0;
- for(i = current_bytes; i < target_binlen; i++) {
- if(toggle == 0) {
- datastream[i] = 0xec;
- toggle = 1;
- } else {
- datastream[i] = 0x11;
- toggle = 0;
- }
- }
-
- if(debug) {
- printf("Resulting codewords:\n\t");
- for(i = 0; i < target_binlen; i++) {
- printf("0x%2X ", datastream[i]);
- }
- printf("\n");
- }
-}
-
-void add_ecc(int fullstream[], int datastream[], int version, int data_cw, int blocks)
-{
- /* Split data into blocks, add error correction and then interleave the blocks and error correction data */
- int ecc_cw = qr_total_codewords[version - 1] - data_cw;
- int short_data_block_length = data_cw / blocks;
- int qty_long_blocks = data_cw % blocks;
- int qty_short_blocks = blocks - qty_long_blocks;
- int ecc_block_length = ecc_cw / blocks;
- int i, j, length_this_block, posn, debug = 0;
-
-
-#ifndef _MSC_VER
- unsigned char data_block[short_data_block_length + 2];
- unsigned char ecc_block[ecc_block_length + 2];
- int interleaved_data[data_cw + 2];
- int interleaved_ecc[ecc_cw + 2];
-#else
- unsigned char* data_block = (unsigned char *)_alloca(short_data_block_length + 2);
- unsigned char* ecc_block = (unsigned char *)_alloca(ecc_block_length + 2);
- int* interleaved_data = (int *)_alloca((data_cw + 2) * sizeof(int));
- int* interleaved_ecc = (int *)_alloca((ecc_cw + 2) * sizeof(int));
-#endif
-
- posn = 0;
-
- for(i = 0; i < blocks; i++) {
- if(i < qty_short_blocks) { length_this_block = short_data_block_length; } else { length_this_block = short_data_block_length + 1; }
-
- for(j = 0; j < ecc_block_length; j++) {
- ecc_block[j] = 0;
- }
-
- for(j = 0; j < length_this_block; j++) {
- data_block[j] = (unsigned char) datastream[posn + j];
- }
-
- rs_init_gf(0x11d);
- rs_init_code(ecc_block_length, 0);
- rs_encode(length_this_block, data_block, ecc_block);
- rs_free();
-
- if(debug) {
- printf("Block %d: ", i + 1);
- for(j = 0; j < length_this_block; j++) {
- printf("%2X ", data_block[j]);
- }
- if(i < qty_short_blocks) {
- printf(" ");
- }
- printf(" // ");
- for(j = 0; j < ecc_block_length; j++) {
- printf("%2X ", ecc_block[ecc_block_length - j - 1]);
- }
- printf("\n");
- }
-
- for(j = 0; j < short_data_block_length; j++) {
- interleaved_data[(j * blocks) + i] = (int) data_block[j];
- }
-
- if(i >= qty_short_blocks){
- interleaved_data[(short_data_block_length * blocks) + (i - qty_short_blocks)] = (int) data_block[short_data_block_length];
- }
-
- for(j = 0; j < ecc_block_length; j++) {
- interleaved_ecc[(j * blocks) + i] = (int) ecc_block[ecc_block_length - j - 1];
- }
-
- posn += length_this_block;
- }
-
- for(j = 0; j < data_cw; j++) {
- fullstream[j] = interleaved_data[j];
- }
- for(j = 0; j < ecc_cw; j++) {
- fullstream[j + data_cw] = interleaved_ecc[j];
- }
-
- if(debug) {
- printf("\nData Stream: \n");
- for(j = 0; j < (data_cw + ecc_cw); j++) {
- printf("%2X ", fullstream[j]);
- }
- printf("\n");
- }
-}
-
-void place_finder(unsigned char grid[], int size, int x, int y)
-{
- int xp, yp;
-
- int finder[] = {
- 1, 1, 1, 1, 1, 1, 1,
- 1, 0, 0, 0, 0, 0, 1,
- 1, 0, 1, 1, 1, 0, 1,
- 1, 0, 1, 1, 1, 0, 1,
- 1, 0, 1, 1, 1, 0, 1,
- 1, 0, 0, 0, 0, 0, 1,
- 1, 1, 1, 1, 1, 1, 1
- };
-
- for(xp = 0; xp < 7; xp++) {
- for(yp = 0; yp < 7; yp++) {
- if (finder[xp + (7 * yp)] == 1) {
- grid[((yp + y) * size) + (xp + x)] = 0x11;
- } else {
- grid[((yp + y) * size) + (xp + x)] = 0x10;
- }
- }
- }
-}
-
-void place_align(unsigned char grid[], int size, int x, int y)
-{
- int xp, yp;
-
- int alignment[] = {
- 1, 1, 1, 1, 1,
- 1, 0, 0, 0, 1,
- 1, 0, 1, 0, 1,
- 1, 0, 0, 0, 1,
- 1, 1, 1, 1, 1
- };
-
- x -= 2;
- y -= 2; /* Input values represent centre of pattern */
-
- for(xp = 0; xp < 5; xp++) {
- for(yp = 0; yp < 5; yp++) {
- if (alignment[xp + (5 * yp)] == 1) {
- grid[((yp + y) * size) + (xp + x)] = 0x11;
- } else {
- grid[((yp + y) * size) + (xp + x)] = 0x10;
- }
- }
- }
-}
-
-void setup_grid(unsigned char* grid, int size, int version)
-{
- int i, toggle = 1;
- int loopsize, x, y, xcoord, ycoord;
-
- /* Add timing patterns */
- for(i = 0; i < size; i++) {
- if(toggle == 1) {
- grid[(6 * size) + i] = 0x21;
- grid[(i * size) + 6] = 0x21;
- toggle = 0;
- } else {
- grid[(6 * size) + i] = 0x20;
- grid[(i * size) + 6] = 0x20;
- toggle = 1;
- }
- }
-
- /* Add finder patterns */
- place_finder(grid, size, 0, 0);
- place_finder(grid, size, 0, size - 7);
- place_finder(grid, size, size - 7, 0);
-
- /* Add separators */
- for(i = 0; i < 7; i++) {
- grid[(7 * size) + i] = 0x10;
- grid[(i * size) + 7] = 0x10;
- grid[(7 * size) + (size - 1 - i)] = 0x10;
- grid[(i * size) + (size - 8)] = 0x10;
- grid[((size - 8) * size) + i] = 0x10;
- grid[((size - 1 - i) * size) + 7] = 0x10;
- }
- grid[(7 * size) + 7] = 0x10;
- grid[(7 * size) + (size - 8)] = 0x10;
- grid[((size - 8) * size) + 7] = 0x10;
-
- /* Add alignment patterns */
- if(version != 1) {
- /* Version 1 does not have alignment patterns */
-
- loopsize = qr_align_loopsize[version - 1];
- for(x = 0; x < loopsize; x++) {
- for(y = 0; y < loopsize; y++) {
- xcoord = qr_table_e1[((version - 2) * 7) + x];
- ycoord = qr_table_e1[((version - 2) * 7) + y];
-
- if(!(grid[(ycoord * size) + xcoord] & 0x10)) {
- place_align(grid, size, xcoord, ycoord);
- }
- }
- }
- }
-
- /* Reserve space for format information */
- for(i = 0; i < 8; i++) {
- grid[(8 * size) + i] += 0x20;
- grid[(i * size) + 8] += 0x20;
- grid[(8 * size) + (size - 1 - i)] = 0x20;
- grid[((size - 1 - i) * size) + 8] = 0x20;
- }
- grid[(8 * size) + 8] += 20;
- grid[((size - 1 - 7) * size) + 8] = 0x21; /* Dark Module from Figure 25 */
-
- /* Reserve space for version information */
- if(version >= 7) {
- for(i = 0; i < 6; i++) {
- grid[((size - 9) * size) + i] = 0x20;
- grid[((size - 10) * size) + i] = 0x20;
- grid[((size - 11) * size) + i] = 0x20;
- grid[(i * size) + (size - 9)] = 0x20;
- grid[(i * size) + (size - 10)] = 0x20;
- grid[(i * size) + (size - 11)] = 0x20;
- }
- }
-}
-
-int cwbit(int* datastream, int i) {
- int word = i / 8;
- int bit = i % 8;
- int resultant = 0;
-
- switch(bit) {
- case 0: if(datastream[word] & 0x80) { resultant = 1; } else { resultant = 0; } break;
- case 1: if(datastream[word] & 0x40) { resultant = 1; } else { resultant = 0; } break;
- case 2: if(datastream[word] & 0x20) { resultant = 1; } else { resultant = 0; } break;
- case 3: if(datastream[word] & 0x10) { resultant = 1; } else { resultant = 0; } break;
- case 4: if(datastream[word] & 0x08) { resultant = 1; } else { resultant = 0; } break;
- case 5: if(datastream[word] & 0x04) { resultant = 1; } else { resultant = 0; } break;
- case 6: if(datastream[word] & 0x02) { resultant = 1; } else { resultant = 0; } break;
- case 7: if(datastream[word] & 0x01) { resultant = 1; } else { resultant = 0; } break;
- }
-
- return resultant;
-}
-
-void populate_grid(unsigned char* grid, int size, int* datastream, int cw)
-{
- int direction = 1; /* up */
- int row = 0; /* right hand side */
-
- int i, n, x, y;
-
- n = cw * 8;
- y = size - 1;
- i = 0;
- do {
- x = (size - 2) - (row * 2);
- if(x < 6)
- x--; /* skip over vertical timing pattern */
-
- if(!(grid[(y * size) + (x + 1)] & 0xf0)) {
- if (cwbit(datastream, i)) {
- grid[(y * size) + (x + 1)] = 0x01;
- } else {
- grid[(y * size) + (x + 1)] = 0x00;
- }
- i++;
- }
-
- if(i < n) {
- if(!(grid[(y * size) + x] & 0xf0)) {
- if (cwbit(datastream, i)) {
- grid[(y * size) + x] = 0x01;
- } else {
- grid[(y * size) + x] = 0x00;
- }
- i++;
- }
- }
-
- if(direction) { y--; } else { y++; }
- if(y == -1) {
- /* reached the top */
- row++;
- y = 0;
- direction = 0;
- }
- if(y == size) {
- /* reached the bottom */
- row++;
- y = size - 1;
- direction = 1;
- }
- } while (i < n);
-}
-
-int evaluate(unsigned char *grid, int size, int pattern)
-{
- int x, y, block;
- int result = 0;
- char state;
- int p;
- int dark_mods;
- int percentage, k;
-
-#ifndef _MSC_VER
- char local[size * size];
-#else
- char* local = (char *)_alloca((size * size) * sizeof(char));
-#endif
-
- for(x = 0; x < size; x++) {
- for(y = 0; y < size; y++) {
- switch(pattern) {
- case 0: if (grid[(y * size) + x] & 0x01) { local[(y * size) + x] = '1'; } else { local[(y * size) + x] = '0'; } break;
- case 1: if (grid[(y * size) + x] & 0x02) { local[(y * size) + x] = '1'; } else { local[(y * size) + x] = '0'; } break;
- case 2: if (grid[(y * size) + x] & 0x04) { local[(y * size) + x] = '1'; } else { local[(y * size) + x] = '0'; } break;
- case 3: if (grid[(y * size) + x] & 0x08) { local[(y * size) + x] = '1'; } else { local[(y * size) + x] = '0'; } break;
- case 4: if (grid[(y * size) + x] & 0x10) { local[(y * size) + x] = '1'; } else { local[(y * size) + x] = '0'; } break;
- case 5: if (grid[(y * size) + x] & 0x20) { local[(y * size) + x] = '1'; } else { local[(y * size) + x] = '0'; } break;
- case 6: if (grid[(y * size) + x] & 0x40) { local[(y * size) + x] = '1'; } else { local[(y * size) + x] = '0'; } break;
- case 7: if (grid[(y * size) + x] & 0x80) { local[(y * size) + x] = '1'; } else { local[(y * size) + x] = '0'; } break;
- }
- }
- }
-
- /* Test 1: Adjacent modules in row/column in same colour */
- /* Vertical */
- for(x = 0; x < size; x++) {
- state = local[x];
- block = 0;
- for(y = 0; y < size; y++) {
- if(local[(y * size) + x] == state) {
- block++;
- } else {
- if(block > 5) {
- result += (3 + block);
- }
- block = 0;
- state = local[(y * size) + x];
- }
- }
- if(block > 5) {
- result += (3 + block);
- }
- }
-
- /* Horizontal */
- for(y = 0; y < size; y++) {
- state = local[y * size];
- block = 0;
- for(x = 0; x < size; x++) {
- if(local[(y * size) + x] == state) {
- block++;
- } else {
- if(block > 5) {
- result += (3 + block);
- }
- block = 0;
- state = local[(y * size) + x];
- }
- }
- if(block > 5) {
- result += (3 + block);
- }
- }
-
- /* Test 2 is not implimented */
-
- /* Test 3: 1:1:3:1:1 ratio pattern in row/column */
- /* Vertical */
- for(x = 0; x < size; x++) {
- for(y = 0; y < (size - 7); y++) {
- p = 0;
- if(local[(y * size) + x] == '1') { p += 0x40; }
- if(local[((y + 1) * size) + x] == '1') { p += 0x20; }
- if(local[((y + 2) * size) + x] == '1') { p += 0x10; }
- if(local[((y + 3) * size) + x] == '1') { p += 0x08; }
- if(local[((y + 4) * size) + x] == '1') { p += 0x04; }
- if(local[((y + 5) * size) + x] == '1') { p += 0x02; }
- if(local[((y + 6) * size) + x] == '1') { p += 0x01; }
- if(p == 0x5d) {
- result += 40;
- }
- }
- }
-
- /* Horizontal */
- for(y = 0; y < size; y++) {
- for(x = 0; x < (size - 7); x++) {
- p = 0;
- if(local[(y * size) + x] == '1') { p += 0x40; }
- if(local[(y * size) + x + 1] == '1') { p += 0x20; }
- if(local[(y * size) + x + 2] == '1') { p += 0x10; }
- if(local[(y * size) + x + 3] == '1') { p += 0x08; }
- if(local[(y * size) + x + 4] == '1') { p += 0x04; }
- if(local[(y * size) + x + 5] == '1') { p += 0x02; }
- if(local[(y * size) + x + 6] == '1') { p += 0x01; }
- if(p == 0x5d) {
- result += 40;
- }
- }
- }
-
- /* Test 4: Proportion of dark modules in entire symbol */
- dark_mods = 0;
- for(x = 0; x < size; x++) {
- for(y = 0; y < size; y++) {
- if(local[(y * size) + x] == '1') {
- dark_mods++;
- }
- }
- }
- percentage = 100 * (dark_mods / (size * size));
- if(percentage <= 50) {
- k = ((100 - percentage) - 50) / 5;
- } else {
- k = (percentage - 50) / 5;
- }
-
- result += 10 * k;
-
- return result;
-}
-
-
-int apply_bitmask(unsigned char *grid, int size)
-{
- int x, y;
- unsigned char p;
- int pattern, penalty[8];
- int best_val, best_pattern;
- int bit;
-
-#ifndef _MSC_VER
- unsigned char mask[size * size];
- unsigned char eval[size * size];
-#else
- unsigned char* mask = (unsigned char *)_alloca((size * size) * sizeof(unsigned char));
- unsigned char* eval = (unsigned char *)_alloca((size * size) * sizeof(unsigned char));
-#endif
-
- /* Perform data masking */
- for(x = 0; x < size; x++) {
- for(y = 0; y < size; y++) {
- mask[(y * size) + x] = 0x00;
-
- if (!(grid[(y * size) + x] & 0xf0)) {
- if(((y + x) & 1) == 0) { mask[(y * size) + x] += 0x01; }
- if((y & 1) == 0) { mask[(y * size) + x] += 0x02; }
- if((x % 3) == 0) { mask[(y * size) + x] += 0x04; }
- if(((y + x) % 3) == 0) { mask[(y * size) + x] += 0x08; }
- if((((y / 2) + (x / 3)) & 1) == 0) { mask[(y * size) + x] += 0x10; }
- if((((y * x) & 1) + ((y * x) % 3)) == 0) { mask[(y * size) + x] += 0x20; }
- if(((((y * x) & 1) + ((y * x) % 3)) & 1) == 0) { mask[(y * size) + x] += 0x40; }
- if(((((y + x) & 1) + ((y * x) % 3)) & 1) == 0) { mask[(y * size) + x] += 0x80; }
- }
- }
- }
-
- for(x = 0; x < size; x++) {
- for(y = 0; y < size; y++) {
- if(grid[(y * size) + x] & 0x01) { p = 0xff; } else { p = 0x00; }
-
- eval[(y * size) + x] = mask[(y * size) + x] ^ p;
- }
- }
-
-
- /* Evaluate result */
- for(pattern = 0; pattern < 8; pattern++) {
- penalty[pattern] = evaluate(eval, size, pattern);
- }
-
- best_pattern = 0;
- best_val = penalty[0];
- for(pattern = 1; pattern < 8; pattern++) {
- if(penalty[pattern] < best_val) {
- best_pattern = pattern;
- best_val = penalty[pattern];
- }
- }
-
- /* Apply mask */
- for(x = 0; x < size; x++) {
- for(y = 0; y < size; y++) {
- bit = 0;
- switch(best_pattern) {
- case 0: if(mask[(y * size) + x] & 0x01) { bit = 1; } break;
- case 1: if(mask[(y * size) + x] & 0x02) { bit = 1; } break;
- case 2: if(mask[(y * size) + x] & 0x04) { bit = 1; } break;
- case 3: if(mask[(y * size) + x] & 0x08) { bit = 1; } break;
- case 4: if(mask[(y * size) + x] & 0x10) { bit = 1; } break;
- case 5: if(mask[(y * size) + x] & 0x20) { bit = 1; } break;
- case 6: if(mask[(y * size) + x] & 0x40) { bit = 1; } break;
- case 7: if(mask[(y * size) + x] & 0x80) { bit = 1; } break;
- }
- if(bit == 1) {
- if(grid[(y * size) + x] & 0x01) {
- grid[(y * size) + x] = 0x00;
- } else {
- grid[(y * size) + x] = 0x01;
- }
- }
- }
- }
-
- return best_pattern;
-}
-
-void add_format_info(unsigned char *grid, int size, int ecc_level, int pattern)
-{
- /* Add format information to grid */
-
- int format = pattern;
- unsigned int seq;
- int i;
-
- switch(ecc_level) {
- case LEVEL_L: format += 0x08; break;
- case LEVEL_Q: format += 0x18; break;
- case LEVEL_H: format += 0x10; break;
- }
-
- seq = qr_annex_c[format];
-
- for(i = 0; i < 6; i++) {
- grid[(i * size) + 8] += (seq >> i) & 0x01;
- }
-
- for(i = 0; i < 8; i++) {
- grid[(8 * size) + (size - i - 1)] += (seq >> i) & 0x01;
- }
-
- for(i = 0; i < 6; i++) {
- grid[(8 * size) + (5 - i)] += (seq >> (i + 9)) & 0x01;
- }
-
- for(i = 0; i < 7; i++) {
- grid[(((size - 7) + i) * size) + 8] += (seq >> (i + 8)) & 0x01;
- }
-
- grid[(7 * size) + 8] += (seq >> 6) & 0x01;
- grid[(8 * size) + 8] += (seq >> 7) & 0x01;
- grid[(8 * size) + 7] += (seq >> 8) & 0x01;
-}
-
-void add_version_info(unsigned char *grid, int size, int version)
-{
- /* Add version information */
- int i;
-
- long int version_data = qr_annex_d[version - 7];
- for(i = 0; i < 6; i++) {
- grid[((size - 11) * size) + i] += (version_data >> (i * 3)) & 0x01;
- grid[((size - 10) * size) + i] += (version_data >> ((i * 3) + 1)) & 0x01;
- grid[((size - 9) * size) + i] += (version_data >> ((i * 3) + 2)) & 0x01;
- grid[(i * size) + (size - 11)] += (version_data >> (i * 3)) & 0x01;
- grid[(i * size) + (size - 10)] += (version_data >> ((i * 3) + 1)) & 0x01;
- grid[(i * size) + (size - 9)] += (version_data >> ((i * 3) + 2)) & 0x01;
- }
-}
-
-int qr_code(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- int error_number, i, j, glyph, est_binlen;
- int ecc_level, autosize, version, max_cw, target_binlen, blocks, size;
- int bitmask, gs1;
-
-#ifndef _MSC_VER
- int utfdata[length + 1];
- int jisdata[length + 1];
- char mode[length + 1];
-#else
- int* datastream;
- int* fullstream;
- unsigned char* grid;
- int* utfdata = (int *)_alloca((length + 1) * sizeof(int));
- int* jisdata = (int *)_alloca((length + 1) * sizeof(int));
- char* mode = (char *)_alloca(length + 1);
-#endif
-
- gs1 = (symbol->input_mode == GS1_MODE);
-
- switch(symbol->input_mode) {
- case DATA_MODE:
- for(i = 0; i < length; i++) {
- jisdata[i] = (int)source[i];
- }
- break;
- default:
- /* Convert Unicode input to Shift-JIS */
- error_number = utf8toutf16(symbol, source, utfdata, &length);
- if(error_number != 0) { return error_number; }
-
- for(i = 0; i < length; i++) {
- if(utfdata[i] <= 0xff) {
- jisdata[i] = utfdata[i];
- } else {
- j = 0;
- glyph = 0;
- do {
- if(sjis_lookup[j * 2] == utfdata[i]) {
- glyph = sjis_lookup[(j * 2) + 1];
- }
- j++;
- } while ((j < 6843) && (glyph == 0));
- if(glyph == 0) {
- strcpy(symbol->errtxt, "Invalid character in input data");
- return ERROR_INVALID_DATA1;
- }
- jisdata[i] = glyph;
- }
- }
- break;
- }
-
- define_mode(mode, jisdata, length, gs1);
- est_binlen = estimate_binary_length(mode, length, gs1);
-
- ecc_level = LEVEL_L;
- max_cw = 2956;
- if((symbol->option_1 >= 1) && (symbol->option_1 <= 4)) {
- switch (symbol->option_1) {
- case 1: ecc_level = LEVEL_L; max_cw = 2956; break;
- case 2: ecc_level = LEVEL_M; max_cw = 2334; break;
- case 3: ecc_level = LEVEL_Q; max_cw = 1666; break;
- case 4: ecc_level = LEVEL_H; max_cw = 1276; break;
- }
- }
-
- if(est_binlen > (8 * max_cw)) {
- strcpy(symbol->errtxt, "Input too long for selected error correction level");
- return ERROR_TOO_LONG;
- }
-
- autosize = 40;
- for(i = 39; i >= 0; i--) {
- switch(ecc_level) {
- case LEVEL_L:
- if ((8 * qr_data_codewords_L[i]) >= est_binlen) {
- autosize = i + 1;
- }
- break;
- case LEVEL_M:
- if ((8 * qr_data_codewords_M[i]) >= est_binlen) {
- autosize = i + 1;
- }
- break;
- case LEVEL_Q:
- if ((8 * qr_data_codewords_Q[i]) >= est_binlen) {
- autosize = i + 1;
- }
- break;
- case LEVEL_H:
- if ((8 * qr_data_codewords_H[i]) >= est_binlen) {
- autosize = i + 1;
- }
- break;
- }
- }
-
- if((symbol->option_2 >= 1) && (symbol->option_2 <= 40)) {
- if (symbol->option_2 > autosize) {
- version = symbol->option_2;
- } else {
- version = autosize;
- }
- } else {
- version = autosize;
- }
-
- /* Ensure maxium error correction capacity */
- if(est_binlen <= qr_data_codewords_M[version - 1]) { ecc_level = LEVEL_M; }
- if(est_binlen <= qr_data_codewords_Q[version - 1]) { ecc_level = LEVEL_Q; }
- if(est_binlen <= qr_data_codewords_H[version - 1]) { ecc_level = LEVEL_H; }
-
- target_binlen = qr_data_codewords_L[version - 1]; blocks = qr_blocks_L[version - 1];
- switch(ecc_level) {
- case LEVEL_M: target_binlen = qr_data_codewords_M[version - 1]; blocks = qr_blocks_M[version - 1]; break;
- case LEVEL_Q: target_binlen = qr_data_codewords_Q[version - 1]; blocks = qr_blocks_Q[version - 1]; break;
- case LEVEL_H: target_binlen = qr_data_codewords_H[version - 1]; blocks = qr_blocks_H[version - 1]; break;
- }
-
-#ifndef _MSC_VER
- int datastream[target_binlen + 1];
- int fullstream[qr_total_codewords[version - 1] + 1];
-#else
- datastream = (int *)_alloca((target_binlen + 1) * sizeof(int));
- fullstream = (int *)_alloca((qr_total_codewords[version - 1] + 1) * sizeof(int));
-#endif
-
- qr_binary(datastream, version, target_binlen, mode, jisdata, length, gs1, est_binlen);
- add_ecc(fullstream, datastream, version, target_binlen, blocks);
-
- size = qr_sizes[version - 1];
-#ifndef _MSC_VER
- unsigned char grid[size * size];
-#else
- grid = (unsigned char *)_alloca((size * size) * sizeof(unsigned char));
-#endif
-
- for(i = 0; i < size; i++) {
- for(j = 0; j < size; j++) {
- grid[(i * size) + j] = 0;
- }
- }
-
- setup_grid(grid, size, version);
- populate_grid(grid, size, fullstream, qr_total_codewords[version - 1]);
- bitmask = apply_bitmask(grid, size);
- add_format_info(grid, size, ecc_level, bitmask);
- if(version >= 7) {
- add_version_info(grid, size, version);
- }
-
- symbol->width = size;
- symbol->rows = size;
-
- for(i = 0; i < size; i++) {
- for(j = 0; j < size; j++) {
- if(grid[(i * size) + j] & 0x01) {
- set_module(symbol, i, j);
- }
- }
- symbol->row_height[i] = 1;
- }
-
- return 0;
-}
-
-/* NOTE: From this point forward concerns Micro QR Code only */
-
-int micro_qr_intermediate(char binary[], int jisdata[], char mode[], int length, int *kanji_used, int *alphanum_used, int *byte_used)
-{
- /* Convert input data to an "intermediate stage" where data is binary encoded but
- control information is not */
- int position = 0, debug = 0;
- int short_data_block_length, i;
- char data_block;
- char buffer[2];
-
- strcpy(binary, "");
-
- if(debug) {
- for(i = 0; i < length; i++) {
- printf("%c", mode[i]);
- }
- printf("\n");
- }
-
- do {
- if(strlen(binary) > 128) {
- return ERROR_TOO_LONG;
- }
-
- data_block = mode[position];
- short_data_block_length = 0;
- do {
- short_data_block_length++;
- } while (((short_data_block_length + position) < length) && (mode[position + short_data_block_length] == data_block));
-
- switch(data_block) {
- case 'K':
- /* Kanji mode */
- /* Mode indicator */
- concat(binary, "K");
- *kanji_used = 1;
-
- /* Character count indicator */
- buffer[0] = short_data_block_length;
- buffer[1] = '\0';
- concat(binary, buffer);
-
- if(debug) { printf("Kanji block (length %d)\n\t", short_data_block_length); }
-
- /* Character representation */
- for(i = 0; i < short_data_block_length; i++) {
- int jis = jisdata[position + i];
- int msb, lsb, prod;
-
- if(jis > 0x9fff) { jis -= 0xc140; }
- msb = (jis & 0xff00) >> 4;
- lsb = (jis & 0xff);
- prod = (msb * 0xc0) + lsb;
-
- qr_bscan(binary, prod, 0x1000);
-
- if(debug) { printf("0x%4X ", prod); }
-
- if(strlen(binary) > 128) {
- return ERROR_TOO_LONG;
- }
- }
-
- if(debug) { printf("\n"); }
-
- break;
- case 'B':
- /* Byte mode */
- /* Mode indicator */
- concat(binary, "B");
- *byte_used = 1;
-
- /* Character count indicator */
- buffer[0] = short_data_block_length;
- buffer[1] = '\0';
- concat(binary, buffer);
-
- if(debug) { printf("Byte block (length %d)\n\t", short_data_block_length); }
-
- /* Character representation */
- for(i = 0; i < short_data_block_length; i++) {
- int byte = jisdata[position + i];
-
- qr_bscan(binary, byte, 0x80);
-
- if(debug) { printf("0x%4X ", byte); }
-
- if(strlen(binary) > 128) {
- return ERROR_TOO_LONG;
- }
- }
-
- if(debug) { printf("\n"); }
-
- break;
- case 'A':
- /* Alphanumeric mode */
- /* Mode indicator */
- concat(binary, "A");
- *alphanum_used = 1;
-
- /* Character count indicator */
- buffer[0] = short_data_block_length;
- buffer[1] = '\0';
- concat(binary, buffer);
-
- if(debug) { printf("Alpha block (length %d)\n\t", short_data_block_length); }
-
- /* Character representation */
- i = 0;
- while ( i < short_data_block_length ) {
- int count;
- int first = 0, second = 0, prod;
-
- first = posn(RHODIUM, (char) jisdata[position + i]);
- count = 1;
- prod = first;
-
- if(mode[position + i + 1] == 'A') {
- second = posn(RHODIUM, (char) jisdata[position + i + 1]);
- count = 2;
- prod = (first * 45) + second;
- }
-
- qr_bscan(binary, prod, 1 << (5 * count)); /* count = 1..2 */
-
- if(debug) { printf("0x%4X ", prod); }
-
- if(strlen(binary) > 128) {
- return ERROR_TOO_LONG;
- }
-
- i += 2;
- };
-
- if(debug) { printf("\n"); }
-
- break;
- case 'N':
- /* Numeric mode */
- /* Mode indicator */
- concat(binary, "N");
-
- /* Character count indicator */
- buffer[0] = short_data_block_length;
- buffer[1] = '\0';
- concat(binary, buffer);
-
- if(debug) { printf("Number block (length %d)\n\t", short_data_block_length); }
-
- /* Character representation */
- i = 0;
- while ( i < short_data_block_length ) {
- int count;
- int first = 0, second = 0, third = 0, prod;
-
- first = posn(NEON, (char) jisdata[position + i]);
- count = 1;
- prod = first;
-
- if(mode[position + i + 1] == 'N') {
- second = posn(NEON, (char) jisdata[position + i + 1]);
- count = 2;
- prod = (prod * 10) + second;
- }
-
- if(mode[position + i + 2] == 'N') {
- third = posn(NEON, (char) jisdata[position + i + 2]);
- count = 3;
- prod = (prod * 10) + third;
- }
-
- qr_bscan(binary, prod, 1 << (3 * count)); /* count = 1..3 */
-
- if(debug) { printf("0x%4X (%d)", prod, prod); }
-
- if(strlen(binary) > 128) {
- return ERROR_TOO_LONG;
- }
-
- i += 3;
- };
-
- if(debug) { printf("\n"); }
-
- break;
- }
-
- position += short_data_block_length;
- } while (position < length - 1) ;
-
- return 0;
-}
-
-void get_bitlength(int count[], char stream[]) {
- int length, i;
-
- length = strlen(stream);
-
- for(i = 0; i < 4; i++) {
- count[i] = 0;
- }
-
- i = 0;
- do {
- if((stream[i] == '0') || (stream[i] == '1')) {
- count[0]++;
- count[1]++;
- count[2]++;
- count[3]++;
- i++;
- } else {
- switch(stream[i]) {
- case 'K':
- count[2] += 5;
- count[3] += 7;
- i += 2;
- break;
- case 'B':
- count[2] += 6;
- count[3] += 8;
- i += 2;
- break;
- case 'A':
- count[1] += 4;
- count[2] += 6;
- count[3] += 8;
- i += 2;
- break;
- case 'N':
- count[0] += 3;
- count[1] += 5;
- count[2] += 7;
- count[3] += 9;
- i += 2;
- break;
- }
- }
- } while (i < length);
-}
-
-void microqr_expand_binary(char binary_stream[], char full_stream[], int version)
-{
- int i, length;
-
- length = strlen(binary_stream);
-
- i = 0;
- do {
- switch(binary_stream[i]) {
- case '1': concat(full_stream, "1"); i++; break;
- case '0': concat(full_stream, "0"); i++; break;
- case 'N':
- /* Numeric Mode */
- /* Mode indicator */
- switch(version) {
- case 1: concat(full_stream, "0"); break;
- case 2: concat(full_stream, "00"); break;
- case 3: concat(full_stream, "000"); break;
- }
-
- /* Character count indicator */
- qr_bscan(full_stream, binary_stream[i + 1], 4 << version); /* version = 0..3 */
-
- i += 2;
- break;
- case 'A':
- /* Alphanumeric Mode */
- /* Mode indicator */
- switch(version) {
- case 1: concat(full_stream, "1"); break;
- case 2: concat(full_stream, "01"); break;
- case 3: concat(full_stream, "001"); break;
- }
-
- /* Character count indicator */
- qr_bscan(full_stream, binary_stream[i + 1], 2 << version); /* version = 1..3 */
-
- i += 2;
- break;
- case 'B':
- /* Byte Mode */
- /* Mode indicator */
- switch(version) {
- case 2: concat(full_stream, "10"); break;
- case 3: concat(full_stream, "010"); break;
- }
-
- /* Character count indicator */
- qr_bscan(full_stream, binary_stream[i + 1], 2 << version); /* version = 2..3 */
-
- i += 2;
- break;
- case 'K':
- /* Kanji Mode */
- /* Mode indicator */
- switch(version) {
- case 2: concat(full_stream, "11"); break;
- case 3: concat(full_stream, "011"); break;
- }
-
- /* Character count indicator */
- qr_bscan(full_stream, binary_stream[i + 1], 1 << version); /* version = 2..3 */
-
- i += 2;
- break;
- }
-
- } while (i < length);
-}
-
-void micro_qr_m1(char binary_data[])
-{
- int i, latch;
- int bits_total, bits_left, remainder;
- int data_codewords, ecc_codewords;
- unsigned char data_blocks[4], ecc_blocks[3];
-
- bits_total = 20;
- latch = 0;
-
- /* Add terminator */
- bits_left = bits_total - strlen(binary_data);
- if(bits_left <= 3) {
- for(i = 0; i < bits_left; i++) {
- concat(binary_data, "0");
- }
- latch = 1;
- } else {
- concat(binary_data, "000");
- }
-
- if(latch == 0) {
- /* Manage last (4-bit) block */
- bits_left = bits_total - strlen(binary_data);
- if(bits_left <= 4) {
- for(i = 0; i < bits_left; i++) {
- concat(binary_data, "0");
- }
- latch = 1;
- }
- }
-
- if(latch == 0) {
- /* Complete current byte */
- remainder = 8 - (strlen(binary_data) % 8);
- if(remainder == 8) { remainder = 0; }
- for(i = 0; i < remainder; i++) {
- concat(binary_data, "0");
- }
-
- /* Add padding */
- bits_left = bits_total - strlen(binary_data);
- if(bits_left > 4) {
- remainder = (bits_left - 4) / 8;
- for(i = 0; i < remainder; i++) {
- concat(binary_data, i & 1 ? "00010001" : "11101100");
- }
- }
- concat(binary_data, "0000");
- }
-
- data_codewords = 3;
- ecc_codewords = 2;
-
- /* Copy data into codewords */
- for(i = 0; i < (data_codewords - 1); i++) {
- data_blocks[i] = 0;
- if(binary_data[i * 8] == '1') { data_blocks[i] += 0x80; }
- if(binary_data[(i * 8) + 1] == '1') { data_blocks[i] += 0x40; }
- if(binary_data[(i * 8) + 2] == '1') { data_blocks[i] += 0x20; }
- if(binary_data[(i * 8) + 3] == '1') { data_blocks[i] += 0x10; }
- if(binary_data[(i * 8) + 4] == '1') { data_blocks[i] += 0x08; }
- if(binary_data[(i * 8) + 5] == '1') { data_blocks[i] += 0x04; }
- if(binary_data[(i * 8) + 6] == '1') { data_blocks[i] += 0x02; }
- if(binary_data[(i * 8) + 7] == '1') { data_blocks[i] += 0x01; }
- }
- data_blocks[2] = 0;
- if(binary_data[16] == '1') { data_blocks[2] += 0x08; }
- if(binary_data[17] == '1') { data_blocks[2] += 0x04; }
- if(binary_data[18] == '1') { data_blocks[2] += 0x02; }
- if(binary_data[19] == '1') { data_blocks[2] += 0x01; }
-
- /* Calculate Reed-Solomon error codewords */
- rs_init_gf(0x11d);
- rs_init_code(ecc_codewords, 0);
- rs_encode(data_codewords,data_blocks,ecc_blocks);
- rs_free();
-
- /* Add Reed-Solomon codewords to binary data */
- for(i = 0; i < ecc_codewords; i++) {
- qr_bscan(binary_data, ecc_blocks[ecc_codewords - i - 1], 0x80);
- }
-}
-
-void micro_qr_m2(char binary_data[], int ecc_mode)
-{
- int i, latch;
- int bits_total, bits_left, remainder;
- int data_codewords, ecc_codewords;
- unsigned char data_blocks[6], ecc_blocks[7];
-
- latch = 0;
-
- if(ecc_mode == LEVEL_L) { bits_total = 40; }
- if(ecc_mode == LEVEL_M) { bits_total = 32; }
-
- /* Add terminator */
- bits_left = bits_total - strlen(binary_data);
- if(bits_left <= 5) {
- for(i = 0; i < bits_left; i++) {
- concat(binary_data, "0");
- }
- latch = 1;
- } else {
- concat(binary_data, "00000");
- }
-
- if(latch == 0) {
- /* Complete current byte */
- remainder = 8 - (strlen(binary_data) % 8);
- if(remainder == 8) { remainder = 0; }
- for(i = 0; i < remainder; i++) {
- concat(binary_data, "0");
- }
-
- /* Add padding */
- bits_left = bits_total - strlen(binary_data);
- remainder = bits_left / 8;
- for(i = 0; i < remainder; i++) {
- concat(binary_data, i & 1 ? "00010001" : "11101100");
- }
- }
-
- if(ecc_mode == LEVEL_L) { data_codewords = 5; ecc_codewords = 5; }
- if(ecc_mode == LEVEL_M) { data_codewords = 4; ecc_codewords = 6; }
-
- /* Copy data into codewords */
- for(i = 0; i < data_codewords; i++) {
- data_blocks[i] = 0;
- if(binary_data[i * 8] == '1') { data_blocks[i] += 0x80; }
- if(binary_data[(i * 8) + 1] == '1') { data_blocks[i] += 0x40; }
- if(binary_data[(i * 8) + 2] == '1') { data_blocks[i] += 0x20; }
- if(binary_data[(i * 8) + 3] == '1') { data_blocks[i] += 0x10; }
- if(binary_data[(i * 8) + 4] == '1') { data_blocks[i] += 0x08; }
- if(binary_data[(i * 8) + 5] == '1') { data_blocks[i] += 0x04; }
- if(binary_data[(i * 8) + 6] == '1') { data_blocks[i] += 0x02; }
- if(binary_data[(i * 8) + 7] == '1') { data_blocks[i] += 0x01; }
- }
-
- /* Calculate Reed-Solomon error codewords */
- rs_init_gf(0x11d);
- rs_init_code(ecc_codewords, 0);
- rs_encode(data_codewords,data_blocks,ecc_blocks);
- rs_free();
-
- /* Add Reed-Solomon codewords to binary data */
- for(i = 0; i < ecc_codewords; i++) {
- qr_bscan(binary_data, ecc_blocks[ecc_codewords - i - 1], 0x80);
- }
-
- return;
-}
-
-void micro_qr_m3(char binary_data[], int ecc_mode)
-{
- int i, latch;
- int bits_total, bits_left, remainder;
- int data_codewords, ecc_codewords;
- unsigned char data_blocks[12], ecc_blocks[9];
-
- latch = 0;
-
- if(ecc_mode == LEVEL_L) { bits_total = 84; }
- if(ecc_mode == LEVEL_M) { bits_total = 68; }
-
- /* Add terminator */
- bits_left = bits_total - strlen(binary_data);
- if(bits_left <= 7) {
- for(i = 0; i < bits_left; i++) {
- concat(binary_data, "0");
- }
- latch = 1;
- } else {
- concat(binary_data, "0000000");
- }
-
- if(latch == 0) {
- /* Manage last (4-bit) block */
- bits_left = bits_total - strlen(binary_data);
- if(bits_left <= 4) {
- for(i = 0; i < bits_left; i++) {
- concat(binary_data, "0");
- }
- latch = 1;
- }
- }
-
- if(latch == 0) {
- /* Complete current byte */
- remainder = 8 - (strlen(binary_data) % 8);
- if(remainder == 8) { remainder = 0; }
- for(i = 0; i < remainder; i++) {
- concat(binary_data, "0");
- }
-
- /* Add padding */
- bits_left = bits_total - strlen(binary_data);
- if(bits_left > 4) {
- remainder = (bits_left - 4) / 8;
- for(i = 0; i < remainder; i++) {
- concat(binary_data, i & 1 ? "00010001" : "11101100");
- }
- }
- concat(binary_data, "0000");
- }
-
- if(ecc_mode == LEVEL_L) { data_codewords = 11; ecc_codewords = 6; }
- if(ecc_mode == LEVEL_M) { data_codewords = 9; ecc_codewords = 8; }
-
- /* Copy data into codewords */
- for(i = 0; i < (data_codewords - 1); i++) {
- data_blocks[i] = 0;
- if(binary_data[i * 8] == '1') { data_blocks[i] += 0x80; }
- if(binary_data[(i * 8) + 1] == '1') { data_blocks[i] += 0x40; }
- if(binary_data[(i * 8) + 2] == '1') { data_blocks[i] += 0x20; }
- if(binary_data[(i * 8) + 3] == '1') { data_blocks[i] += 0x10; }
- if(binary_data[(i * 8) + 4] == '1') { data_blocks[i] += 0x08; }
- if(binary_data[(i * 8) + 5] == '1') { data_blocks[i] += 0x04; }
- if(binary_data[(i * 8) + 6] == '1') { data_blocks[i] += 0x02; }
- if(binary_data[(i * 8) + 7] == '1') { data_blocks[i] += 0x01; }
- }
-
- if(ecc_mode == LEVEL_L) {
- data_blocks[11] = 0;
- if(binary_data[80] == '1') { data_blocks[2] += 0x08; }
- if(binary_data[81] == '1') { data_blocks[2] += 0x04; }
- if(binary_data[82] == '1') { data_blocks[2] += 0x02; }
- if(binary_data[83] == '1') { data_blocks[2] += 0x01; }
- }
-
- if(ecc_mode == LEVEL_M) {
- data_blocks[9] = 0;
- if(binary_data[64] == '1') { data_blocks[2] += 0x08; }
- if(binary_data[65] == '1') { data_blocks[2] += 0x04; }
- if(binary_data[66] == '1') { data_blocks[2] += 0x02; }
- if(binary_data[67] == '1') { data_blocks[2] += 0x01; }
- }
-
- /* Calculate Reed-Solomon error codewords */
- rs_init_gf(0x11d);
- rs_init_code(ecc_codewords, 0);
- rs_encode(data_codewords,data_blocks,ecc_blocks);
- rs_free();
-
- /* Add Reed-Solomon codewords to binary data */
- for(i = 0; i < ecc_codewords; i++) {
- qr_bscan(binary_data, ecc_blocks[ecc_codewords - i - 1], 0x80);
- }
-
- return;
-}
-
-void micro_qr_m4(char binary_data[], int ecc_mode)
-{
- int i, latch;
- int bits_total, bits_left, remainder;
- int data_codewords, ecc_codewords;
- unsigned char data_blocks[17], ecc_blocks[15];
-
- latch = 0;
-
- if(ecc_mode == LEVEL_L) { bits_total = 128; }
- if(ecc_mode == LEVEL_M) { bits_total = 112; }
- if(ecc_mode == LEVEL_Q) { bits_total = 80; }
-
- /* Add terminator */
- bits_left = bits_total - strlen(binary_data);
- if(bits_left <= 9) {
- for(i = 0; i < bits_left; i++) {
- concat(binary_data, "0");
- }
- latch = 1;
- } else {
- concat(binary_data, "000000000");
- }
-
- if(latch == 0) {
- /* Complete current byte */
- remainder = 8 - (strlen(binary_data) % 8);
- if(remainder == 8) { remainder = 0; }
- for(i = 0; i < remainder; i++) {
- concat(binary_data, "0");
- }
-
- /* Add padding */
- bits_left = bits_total - strlen(binary_data);
- remainder = bits_left / 8;
- for(i = 0; i < remainder; i++) {
- concat(binary_data, i & 1 ? "00010001" : "11101100");
- }
- }
-
- if(ecc_mode == LEVEL_L) { data_codewords = 16; ecc_codewords = 8; }
- if(ecc_mode == LEVEL_M) { data_codewords = 14; ecc_codewords = 10; }
- if(ecc_mode == LEVEL_Q) { data_codewords = 10; ecc_codewords = 14; }
-
- /* Copy data into codewords */
- for(i = 0; i < data_codewords; i++) {
- data_blocks[i] = 0;
- if(binary_data[i * 8] == '1') { data_blocks[i] += 0x80; }
- if(binary_data[(i * 8) + 1] == '1') { data_blocks[i] += 0x40; }
- if(binary_data[(i * 8) + 2] == '1') { data_blocks[i] += 0x20; }
- if(binary_data[(i * 8) + 3] == '1') { data_blocks[i] += 0x10; }
- if(binary_data[(i * 8) + 4] == '1') { data_blocks[i] += 0x08; }
- if(binary_data[(i * 8) + 5] == '1') { data_blocks[i] += 0x04; }
- if(binary_data[(i * 8) + 6] == '1') { data_blocks[i] += 0x02; }
- if(binary_data[(i * 8) + 7] == '1') { data_blocks[i] += 0x01; }
- }
-
- /* Calculate Reed-Solomon error codewords */
- rs_init_gf(0x11d);
- rs_init_code(ecc_codewords, 0);
- rs_encode(data_codewords,data_blocks,ecc_blocks);
- rs_free();
-
- /* Add Reed-Solomon codewords to binary data */
- for(i = 0; i < ecc_codewords; i++) {
- qr_bscan(binary_data, ecc_blocks[ecc_codewords - i - 1], 0x80);
- }
-}
-
-void micro_setup_grid(unsigned char* grid, int size)
-{
- int i, toggle = 1;
-
- /* Add timing patterns */
- for(i = 0; i < size; i++) {
- if(toggle == 1) {
- grid[i] = 0x21;
- grid[(i * size)] = 0x21;
- toggle = 0;
- } else {
- grid[i] = 0x20;
- grid[(i * size)] = 0x20;
- toggle = 1;
- }
- }
-
- /* Add finder patterns */
- place_finder(grid, size, 0, 0);
-
- /* Add separators */
- for(i = 0; i < 7; i++) {
- grid[(7 * size) + i] = 0x10;
- grid[(i * size) + 7] = 0x10;
- }
- grid[(7 * size) + 7] = 0x10;
-
-
- /* Reserve space for format information */
- for(i = 0; i < 8; i++) {
- grid[(8 * size) + i] += 0x20;
- grid[(i * size) + 8] += 0x20;
- }
- grid[(8 * size) + 8] += 20;
-}
-
-void micro_populate_grid(unsigned char* grid, int size, char full_stream[])
-{
- int direction = 1; /* up */
- int row = 0; /* right hand side */
-
- int i, n, x, y;
-
- n = strlen(full_stream);
- y = size - 1;
- i = 0;
- do {
- x = (size - 2) - (row * 2);
-
- if(!(grid[(y * size) + (x + 1)] & 0xf0)) {
- if (full_stream[i] == '1') {
- grid[(y * size) + (x + 1)] = 0x01;
- } else {
- grid[(y * size) + (x + 1)] = 0x00;
- }
- i++;
- }
-
- if(i < n) {
- if(!(grid[(y * size) + x] & 0xf0)) {
- if (full_stream[i] == '1') {
- grid[(y * size) + x] = 0x01;
- } else {
- grid[(y * size) + x] = 0x00;
- }
- i++;
- }
- }
-
- if(direction) { y--; } else { y++; }
- if(y == 0) {
- /* reached the top */
- row++;
- y = 1;
- direction = 0;
- }
- if(y == size) {
- /* reached the bottom */
- row++;
- y = size - 1;
- direction = 1;
- }
- } while (i < n);
-}
-
-int micro_evaluate(unsigned char *grid, int size, int pattern)
-{
- int sum1, sum2, i, filter = 0, retval;
-
- switch(pattern) {
- case 0: filter = 0x01; break;
- case 1: filter = 0x02; break;
- case 2: filter = 0x04; break;
- case 3: filter = 0x08; break;
- }
-
- sum1 = 0;
- sum2 = 0;
- for(i = 1; i < size; i++) {
- if(grid[(i * size) + size - 1] & filter) { sum1++; }
- if(grid[((size - 1) * size) + i] & filter) { sum2++; }
- }
-
- if(sum1 <= sum2) { retval = (sum1 * 16) + sum2; } else { retval = (sum2 * 16) + sum1; }
-
- return retval;
-}
-
-int micro_apply_bitmask(unsigned char *grid, int size)
-{
- int x, y;
- unsigned char p;
- int pattern, value[8];
- int best_val, best_pattern;
- int bit;
-
-#ifndef _MSC_VER
- unsigned char mask[size * size];
- unsigned char eval[size * size];
-#else
- unsigned char* mask = (unsigned char *)_alloca((size * size) * sizeof(unsigned char));
- unsigned char* eval = (unsigned char *)_alloca((size * size) * sizeof(unsigned char));
-#endif
-
- /* Perform data masking */
- for(x = 0; x < size; x++) {
- for(y = 0; y < size; y++) {
- mask[(y * size) + x] = 0x00;
-
- if (!(grid[(y * size) + x] & 0xf0)) {
- if((y & 1) == 0) {
- mask[(y * size) + x] += 0x01;
- }
-
- if((((y / 2) + (x / 3)) & 1) == 0) {
- mask[(y * size) + x] += 0x02;
- }
-
- if(((((y * x) & 1) + ((y * x) % 3)) & 1) == 0) {
- mask[(y * size) + x] += 0x04;
- }
-
- if(((((y + x) & 1) + ((y * x) % 3)) & 1) == 0) {
- mask[(y * size) + x] += 0x08;
- }
- }
- }
- }
-
- for(x = 0; x < size; x++) {
- for(y = 0; y < size; y++) {
- if(grid[(y * size) + x] & 0x01) { p = 0xff; } else { p = 0x00; }
-
- eval[(y * size) + x] = mask[(y * size) + x] ^ p;
- }
- }
-
-
- /* Evaluate result */
- for(pattern = 0; pattern < 8; pattern++) {
- value[pattern] = micro_evaluate(eval, size, pattern);
- }
-
- best_pattern = 0;
- best_val = value[0];
- for(pattern = 1; pattern < 4; pattern++) {
- if(value[pattern] > best_val) {
- best_pattern = pattern;
- best_val = value[pattern];
- }
- }
-
- /* Apply mask */
- for(x = 0; x < size; x++) {
- for(y = 0; y < size; y++) {
- bit = 0;
- switch(best_pattern) {
- case 0: if(mask[(y * size) + x] & 0x01) { bit = 1; } break;
- case 1: if(mask[(y * size) + x] & 0x02) { bit = 1; } break;
- case 2: if(mask[(y * size) + x] & 0x04) { bit = 1; } break;
- case 3: if(mask[(y * size) + x] & 0x08) { bit = 1; } break;
- }
- if(bit == 1) {
- if(grid[(y * size) + x] & 0x01) {
- grid[(y * size) + x] = 0x00;
- } else {
- grid[(y * size) + x] = 0x01;
- }
- }
- }
- }
-
- return best_pattern;
-}
-
-int microqr(struct zint_symbol *symbol, unsigned char source[], int length)
-{
- int i, j, glyph, size;
- char binary_stream[200];
- char full_stream[200];
- int utfdata[40];
- int jisdata[40];
- char mode[40];
- int error_number, kanji_used = 0, alphanum_used = 0, byte_used = 0;
- int version_valid[4];
- int binary_count[4];
- int ecc_level, autoversion, version;
- int n_count, a_count, bitmask, format, format_full;
-
-#ifdef _MSC_VER
- unsigned char* grid;
-#endif
-
- if(length > 35) {
- strcpy(symbol->errtxt, "Input data too long");
- return ERROR_TOO_LONG;
- }
-
- for(i = 0; i < 4; i++) {
- version_valid[i] = 1;
- }
-
- switch(symbol->input_mode) {
- case DATA_MODE:
- for(i = 0; i < length; i++) {
- jisdata[i] = (int)source[i];
- }
- break;
- default:
- /* Convert Unicode input to Shift-JIS */
- error_number = utf8toutf16(symbol, source, utfdata, &length);
- if(error_number != 0) { return error_number; }
-
- for(i = 0; i < length; i++) {
- if(utfdata[i] <= 0xff) {
- jisdata[i] = utfdata[i];
- } else {
- j = 0;
- glyph = 0;
- do {
- if(sjis_lookup[j * 2] == utfdata[i]) {
- glyph = sjis_lookup[(j * 2) + 1];
- }
- j++;
- } while ((j < 6843) && (glyph == 0));
- if(glyph == 0) {
- strcpy(symbol->errtxt, "Invalid character in input data");
- return ERROR_INVALID_DATA1;
- }
- jisdata[i] = glyph;
- }
- }
- break;
- }
-
- define_mode(mode, jisdata, length, 0);
-
- n_count = 0;
- a_count = 0;
- for(i = 0; i < length; i++) {
- if((jisdata[i] >= '0') && (jisdata[i] <= '9')) { n_count++; }
- if(in_alpha(jisdata[i])) { a_count++; }
- }
-
- if(a_count == length) {
- /* All data can be encoded in Alphanumeric mode */
- for(i = 0; i < length; i++) {
- mode[i] = 'A';
- }
- }
-
- if(n_count == length) {
- /* All data can be encoded in Numeric mode */
- for(i = 0; i < length; i++) {
- mode[i] = 'N';
- }
- }
-
- error_number = micro_qr_intermediate(binary_stream, jisdata, mode, length, &kanji_used, &alphanum_used, &byte_used);
- if(error_number != 0) {
- strcpy(symbol->errtxt, "Input data too long");
- return error_number;
- }
-
- get_bitlength(binary_count, binary_stream);
-
- /* Eliminate possivle versions depending on type of content */
- if(byte_used) {
- version_valid[0] = 0;
- version_valid[1] = 0;
- }
-
- if(alphanum_used) {
- version_valid[0] = 0;
- }
-
- if(kanji_used) {
- version_valid[0] = 0;
- version_valid[1] = 0;
- }
-
- /* Eliminate possible versions depending on length of binary data */
- if(binary_count[0] > 20) { version_valid[0] = 0; }
- if(binary_count[1] > 40) { version_valid[1] = 0; }
- if(binary_count[2] > 84) { version_valid[2] = 0; }
- if(binary_count[3] > 128) {
- strcpy(symbol->errtxt, "Input data too long");
- return ERROR_TOO_LONG;
- }
-
- /* Eliminate possible versions depending on error correction level specified */
- ecc_level = LEVEL_L;
- if((symbol->option_1 >= 1) && (symbol->option_2 <= 4)) {
- ecc_level = symbol->option_1;
- }
-
- if(ecc_level == LEVEL_H) {
- strcpy(symbol->errtxt, "Error correction level H not available");
- return ERROR_INVALID_OPTION;
- }
-
- if(ecc_level == LEVEL_Q) {
- version_valid[0] = 0;
- version_valid[1] = 0;
- version_valid[2] = 0;
- if(binary_count[3] > 80) {
- strcpy(symbol->errtxt, "Input data too long");
- return ERROR_TOO_LONG;
- }
- }
-
- if(ecc_level == LEVEL_M) {
- version_valid[0] = 0;
- if(binary_count[1] > 32) { version_valid[1] = 0; }
- if(binary_count[2] > 68) { version_valid[2] = 0; }
- if(binary_count[3] > 112) {
- strcpy(symbol->errtxt, "Input data too long");
- return ERROR_TOO_LONG;
- }
- }
-
- autoversion = 3;
- if(version_valid[2]) { autoversion = 2; }
- if(version_valid[1]) { autoversion = 1; }
- if(version_valid[0]) { autoversion = 0; }
-
- version = autoversion;
- /* Get version from user */
- if((symbol->option_2 >= 1) && (symbol->option_2 <= 4)) {
- if(symbol->option_2 >= autoversion) {
- version = symbol->option_2;
- }
- }
-
- /* If there is enough unused space then increase the error correction level */
- if(version == 3) {
- if(binary_count[3] <= 112) { ecc_level = LEVEL_M; }
- if(binary_count[3] <= 80) { ecc_level = LEVEL_Q; }
- }
-
- if(version == 2) {
- if(binary_count[2] <= 68) { ecc_level = LEVEL_M; }
- }
-
- if(version == 1) {
- if(binary_count[1] <= 32) { ecc_level = LEVEL_M; }
- }
-
- strcpy(full_stream, "");
- microqr_expand_binary(binary_stream, full_stream, version);
-
- switch(version) {
- case 0: micro_qr_m1(full_stream); break;
- case 1: micro_qr_m2(full_stream, ecc_level); break;
- case 2: micro_qr_m3(full_stream, ecc_level); break;
- case 3: micro_qr_m4(full_stream, ecc_level); break;
- }
-
- size = micro_qr_sizes[version];
-#ifndef _MSC_VER
- unsigned char grid[size * size];
-#else
- grid = (unsigned char *)_alloca((size * size) * sizeof(unsigned char));
-#endif
-
- for(i = 0; i < size; i++) {
- for(j = 0; j < size; j++) {
- grid[(i * size) + j] = 0;
- }
- }
-
- micro_setup_grid(grid, size);
- micro_populate_grid(grid, size, full_stream);
- bitmask = micro_apply_bitmask(grid, size);
-
- /* Add format data */
- format = 0;
- switch(version) {
- case 1: switch(ecc_level) {
- case 1: format = 1; break;
- case 2: format = 2; break;
- }
- break;
- case 2: switch(ecc_level) {
- case 1: format = 3; break;
- case 2: format = 4; break;
- }
- break;
- case 3: switch(ecc_level) {
- case 1: format = 5; break;
- case 2: format = 6; break;
- case 3: format = 7; break;
- }
- break;
- }
-
- format_full = qr_annex_c1[(format << 2) + bitmask];
-
- if(format_full & 0x4000) { grid[(8 * size) + 1] += 0x01; }
- if(format_full & 0x2000) { grid[(8 * size) + 2] += 0x01; }
- if(format_full & 0x1000) { grid[(8 * size) + 3] += 0x01; }
- if(format_full & 0x800) { grid[(8 * size) + 4] += 0x01; }
- if(format_full & 0x400) { grid[(8 * size) + 5] += 0x01; }
- if(format_full & 0x200) { grid[(8 * size) + 6] += 0x01; }
- if(format_full & 0x100) { grid[(8 * size) + 7] += 0x01; }
- if(format_full & 0x80) { grid[(8 * size) + 8] += 0x01; }
- if(format_full & 0x40) { grid[(7 * size) + 8] += 0x01; }
- if(format_full & 0x20) { grid[(6 * size) + 8] += 0x01; }
- if(format_full & 0x10) { grid[(5 * size) + 8] += 0x01; }
- if(format_full & 0x08) { grid[(4 * size) + 8] += 0x01; }
- if(format_full & 0x04) { grid[(3 * size) + 8] += 0x01; }
- if(format_full & 0x02) { grid[(2 * size) + 8] += 0x01; }
- if(format_full & 0x01) { grid[(1 * size) + 8] += 0x01; }
-
- symbol->width = size;
- symbol->rows = size;
-
- for(i = 0; i < size; i++) {
- for(j = 0; j < size; j++) {
- if(grid[(i * size) + j] & 0x01) {
- set_module(symbol, i, j);
- }
- }
- symbol->row_height[i] = 1;
- }
-
- return 0;
-}
diff --git a/3rdparty/zint-2.4.4/backend/qr.h b/3rdparty/zint-2.4.4/backend/qr.h
deleted file mode 100644
index 47576d5..0000000
--- a/3rdparty/zint-2.4.4/backend/qr.h
+++ /dev/null
@@ -1,156 +0,0 @@
-/* qr.h Data for QR Code */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
- Copyright (C) 2006 Kentaro Fukuchi
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#define LEVEL_L 1
-#define LEVEL_M 2
-#define LEVEL_Q 3
-#define LEVEL_H 4
-
-#define RHODIUM "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:"
-
-/* From ISO/IEC 18004:2006 Table 7 */
-static int qr_data_codewords_L[] = {
- 19, 34, 55, 80, 108, 136, 156, 194, 232, 274, 324, 370, 428, 461, 523, 589, 647,
- 721, 795, 861, 932, 1006, 1094, 1174, 1276, 1370, 1468, 1531, 1631,
- 1735, 1843, 1955, 2071, 2191, 2306, 2434, 2566, 2702, 2812, 2956
-};
-
-static int qr_data_codewords_M[] = {
- 16, 28, 44, 64, 86, 108, 124, 154, 182, 216, 254, 290, 334, 365, 415, 453, 507,
- 563, 627, 669, 714, 782, 860, 914, 1000, 1062, 1128, 1193, 1267,
- 1373, 1455, 1541, 1631, 1725, 1812, 1914, 1992, 2102, 2216, 2334
-};
-
-static int qr_data_codewords_Q[] = {
- 13, 22, 34, 48, 62, 76, 88, 110, 132, 154, 180, 206, 244, 261, 295, 325, 367,
- 397, 445, 485, 512, 568, 614, 664, 718, 754, 808, 871, 911,
- 985, 1033, 1115, 1171, 1231, 1286, 1354, 1426, 1502, 1582, 1666
-};
-
-static int qr_data_codewords_H[] = {
- 9, 16, 26, 36, 46, 60, 66, 86, 100, 122, 140, 158, 180, 197, 223, 253, 283,
- 313, 341, 385, 406, 442, 464, 514, 538, 596, 628, 661, 701,
- 745, 793, 845, 901, 961, 986, 1054, 1096, 1142, 1222, 1276
-};
-
-static int qr_total_codewords[] = {
- 26, 44, 70, 100, 134, 172, 196, 242, 292, 346, 404, 466, 532, 581, 655, 733, 815,
- 901, 991, 1085, 1156, 1258, 1364, 1474, 1588, 1706, 1828, 1921, 2051,
- 2185, 2323, 2465, 2611, 2761, 2876, 3034, 3196, 3362, 3532, 3706
-};
-
-static int qr_blocks_L[] = {
- 1, 1, 1, 1, 1, 2, 2, 2, 2, 4, 4, 4, 4, 4, 6, 6, 6, 6, 7, 8, 8, 9, 9, 10, 12, 12,
- 12, 13, 14, 15, 16, 17, 18, 19, 19, 20, 21, 22, 24, 25
-};
-
-static int qr_blocks_M[] = {
- 1, 1, 1, 2, 2, 4, 4, 4, 5, 5, 5, 8, 9, 9, 10, 10, 11, 13, 14, 16, 17, 17, 18, 20,
- 21, 23, 25, 26, 28, 29, 31, 33, 35, 37, 38, 40, 43, 45, 47, 49
-};
-
-static int qr_blocks_Q[] = {
- 1, 1, 2, 2, 4, 4, 6, 6, 8, 8, 8, 10, 12, 16, 12, 17, 16, 18, 21, 20, 23, 23, 25,
- 27, 29, 34, 34, 35, 38, 40, 43, 45, 48, 51, 53, 56, 59, 62, 65, 68
-};
-
-static int qr_blocks_H[] = {
- 1, 1, 2, 4, 4, 4, 5, 6, 8, 8, 11, 11, 16, 16, 18, 16, 19, 21, 25, 25, 25, 34, 30,
- 32, 35, 37, 40, 42, 45, 48, 51, 54, 57, 60, 63, 66, 70, 74, 77, 81
-};
-
-static int qr_sizes[] = {
- 21, 25, 29, 33, 37, 41, 45, 49, 53, 57, 61, 65, 69, 73, 77, 81, 85, 89, 93, 97,
- 101, 105, 109, 113, 117, 121, 125, 129, 133, 137, 141, 145, 149, 153, 157, 161, 165, 169, 173, 177
-};
-
-static int micro_qr_sizes[] = {
- 11, 13, 15, 17
-};
-
-static int qr_align_loopsize[] = {
- 0, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7
-};
-
-static int qr_table_e1[] = {
- 6, 18, 0, 0, 0, 0, 0,
- 6, 22, 0, 0, 0, 0, 0,
- 6, 26, 0, 0, 0, 0, 0,
- 6, 30, 0, 0, 0, 0, 0,
- 6, 34, 0, 0, 0, 0, 0,
- 6, 22, 38, 0, 0, 0, 0,
- 6, 24, 42, 0, 0, 0, 0,
- 6, 26, 46, 0, 0, 0, 0,
- 6, 28, 50, 0, 0, 0, 0,
- 6, 30, 54, 0, 0, 0, 0,
- 6, 32, 58, 0, 0, 0, 0,
- 6, 34, 62, 0, 0, 0, 0,
- 6, 26, 46, 66, 0, 0, 0,
- 6, 26, 48, 70, 0, 0, 0,
- 6, 26, 50, 74, 0, 0, 0,
- 6, 30, 54, 78, 0, 0, 0,
- 6, 30, 56, 82, 0, 0, 0,
- 6, 30, 58, 86, 0, 0, 0,
- 6, 34, 62, 90, 0, 0, 0,
- 6, 28, 50, 72, 94, 0, 0,
- 6, 26, 50, 74, 98, 0, 0,
- 6, 30, 54, 78, 102, 0, 0,
- 6, 28, 54, 80, 106, 0, 0,
- 6, 32, 58, 84, 110, 0, 0,
- 6, 30, 58, 86, 114, 0, 0,
- 6, 34, 62, 90, 118, 0, 0,
- 6, 26, 50, 74, 98, 122, 0,
- 6, 30, 54, 78, 102, 126, 0,
- 6, 26, 52, 78, 104, 130, 0,
- 6, 30, 56, 82, 108, 134, 0,
- 6, 34, 60, 86, 112, 138, 0,
- 6, 30, 58, 86, 114, 142, 0,
- 6, 34, 62, 90, 118, 146, 0,
- 6, 30, 54, 78, 102, 126, 150,
- 6, 24, 50, 76, 102, 128, 154,
- 6, 28, 54, 80, 106, 132, 158,
- 6, 32, 58, 84, 110, 136, 162,
- 6, 26, 54, 82, 110, 138, 166,
- 6, 30, 58, 86, 114, 142, 170
-};
-
-static unsigned int qr_annex_c[] = {
- /* Format information bit sequences */
- 0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0, 0x77c4, 0x72f3, 0x7daa, 0x789d,
- 0x662f, 0x6318, 0x6c41, 0x6976, 0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b,
- 0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed
-};
-
-static long int qr_annex_d[] = {
- /* Version information bit sequences */
- 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d, 0x0f928, 0x10b78,
- 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9, 0x177ec, 0x18ec4, 0x191e1, 0x1afab,
- 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75, 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b,
- 0x2542e, 0x26a64, 0x27541, 0x28c69
-};
-
-static int qr_annex_c1[] = {
- /* Micro QR Code format information */
- 0x4445, 0x4172, 0x4e2b, 0x4b1c, 0x55ae, 0x5099, 0x5fc0, 0x5af7, 0x6793, 0x62a4, 0x6dfd, 0x68ca, 0x7678, 0x734f,
- 0x7c16, 0x7921, 0x06de, 0x03e9, 0x0cb0, 0x0987, 0x1735, 0x1202, 0x1d5b, 0x186c, 0x2508, 0x203f, 0x2f66, 0x2a51, 0x34e3,
- 0x31d4, 0x3e8d, 0x3bba
-};
\ No newline at end of file
diff --git a/3rdparty/zint-2.4.4/backend/reedsol.c b/3rdparty/zint-2.4.4/backend/reedsol.c
deleted file mode 100644
index b37950b..0000000
--- a/3rdparty/zint-2.4.4/backend/reedsol.c
+++ /dev/null
@@ -1,161 +0,0 @@
-/**
- *
- * This is a simple Reed-Solomon encoder
- * (C) Cliff Hones 2004
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-// It is not written with high efficiency in mind, so is probably
-// not suitable for real-time encoding. The aim was to keep it
-// simple, general and clear.
-//
-//
-
-// Usage:
-// First call rs_init_gf(poly) to set up the Galois Field parameters.
-// Then call rs_init_code(size, index) to set the encoding size
-// Then call rs_encode(datasize, data, out) to encode the data.
-//
-// These can be called repeatedly as required - but note that
-// rs_init_code must be called following any rs_init_gf call.
-//
-// If the parameters are fixed, some of the statics below can be
-// replaced with constants in the obvious way, and additionally
-// malloc/free can be avoided by using static arrays of a suitable
-// size.
-
-#include // only needed for debug (main)
-#include // only needed for malloc/free
-#include "reedsol.h"
-static int gfpoly;
-static int symsize; // in bits
-static int logmod; // 2**symsize - 1
-static int rlen;
-
-static int *logt = NULL, *alog = NULL, *rspoly = NULL;
-
-// rs_init_gf(poly) initialises the parameters for the Galois Field.
-// The symbol size is determined from the highest bit set in poly
-// This implementation will support sizes up to 30 bits (though that
-// will result in very large log/antilog tables) - bit sizes of
-// 8 or 4 are typical
-//
-// The poly is the bit pattern representing the GF characteristic
-// polynomial. e.g. for ECC200 (8-bit symbols) the polynomial is
-// a**8 + a**5 + a**3 + a**2 + 1, which translates to 0x12d.
-
-void rs_init_gf(int poly)
-{
- int m, b, p, v;
-
- // Find the top bit, and hence the symbol size
- for (b = 1, m = 0; b <= poly; b <<= 1)
- m++;
- b >>= 1;
- m--;
- gfpoly = poly;
- symsize = m;
-
- // Calculate the log/alog tables
- logmod = (1 << m) - 1;
- logt = (int *)malloc(sizeof(int) * (logmod + 1));
- alog = (int *)malloc(sizeof(int) * logmod);
-
- for (p = 1, v = 0; v < logmod; v++) {
- alog[v] = p;
- logt[p] = v;
- p <<= 1;
- if (p & b)
- p ^= poly;
- }
-}
-
-// rs_init_code(nsym, index) initialises the Reed-Solomon encoder
-// nsym is the number of symbols to be generated (to be appended
-// to the input data). index is usually 1 - it is the index of
-// the constant in the first term (i) of the RS generator polynomial:
-// (x + 2**i)*(x + 2**(i+1))*... [nsym terms]
-// For ECC200, index is 1.
-
-void rs_init_code(int nsym, int index)
-{
- int i, k;
-
- rspoly = (int *)malloc(sizeof(int) * (nsym + 1));
-
- rlen = nsym;
-
- rspoly[0] = 1;
- for (i = 1; i <= nsym; i++) {
- rspoly[i] = 1;
- for (k = i - 1; k > 0; k--) {
- if (rspoly[k])
- rspoly[k] = alog[(logt[rspoly[k]] + index) % logmod];
- rspoly[k] ^= rspoly[k - 1];
- }
- rspoly[0] = alog[(logt[rspoly[0]] + index) % logmod];
- index++;
- }
-}
-
-void rs_encode(int len, unsigned char *data, unsigned char *res)
-{
- int i, k, m;
- for (i = 0; i < rlen; i++)
- res[i] = 0;
- for (i = 0; i < len; i++) {
- m = res[rlen - 1] ^ data[i];
- for (k = rlen - 1; k > 0; k--) {
- if (m && rspoly[k])
- res[k] = res[k - 1] ^ alog[(logt[m] + logt[rspoly[k]]) % logmod];
- else
- res[k] = res[k - 1];
- }
- if (m && rspoly[0])
- res[0] = alog[(logt[m] + logt[rspoly[0]]) % logmod];
- else
- res[0] = 0;
- }
-}
-
-void rs_encode_long(int len, unsigned int *data, unsigned int *res)
-{ /* The same as above but for larger bitlengths - Aztec code compatible */
- int i, k, m;
- for (i = 0; i < rlen; i++)
- res[i] = 0;
- for (i = 0; i < len; i++) {
- m = res[rlen - 1] ^ data[i];
- for (k = rlen - 1; k > 0; k--) {
- if (m && rspoly[k])
- res[k] = res[k - 1] ^ alog[(logt[m] + logt[rspoly[k]]) % logmod];
- else
- res[k] = res[k - 1];
- }
- if (m && rspoly[0])
- res[0] = alog[(logt[m] + logt[rspoly[0]]) % logmod];
- else
- res[0] = 0;
- }
-}
-
-void rs_free(void)
-{ /* Free memory */
- free(logt);
- free(alog);
- free(rspoly);
- rspoly = NULL;
-}
diff --git a/3rdparty/zint-2.4.4/backend/reedsol.h b/3rdparty/zint-2.4.4/backend/reedsol.h
deleted file mode 100644
index 3a7f8ef..0000000
--- a/3rdparty/zint-2.4.4/backend/reedsol.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/**
- *
- * This is a simple Reed-Solomon encoder
- * (C) Cliff Hones 2004
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- *
- */
-
-#ifndef __REEDSOL_H
-#define __REEDSOL_H
-
-#ifdef __cplusplus
-extern "C"
-{
-#endif /* __cplusplus */
-
-extern void rs_init_gf(int poly);
-extern void rs_init_code(int nsym, int index);
-extern void rs_encode(int len, unsigned char *data, unsigned char *res);
-extern void rs_encode_long(int len, unsigned int *data, unsigned int *res);
-extern void rs_free(void);
-
-#ifdef __cplusplus
-}
-#endif /* __cplusplus */
-
-#endif /* __REEDSOL_H */
diff --git a/3rdparty/zint-2.4.4/backend/render.c b/3rdparty/zint-2.4.4/backend/render.c
deleted file mode 100644
index de086d5..0000000
--- a/3rdparty/zint-2.4.4/backend/render.c
+++ /dev/null
@@ -1,798 +0,0 @@
-/*
- * render.c - Generic Rendered Format
- *
- * Initiall written by Sam Lown for use in gLabels. Converts encoded
- * data into a generic internal structure of lines and characters
- * usable in external applications.
- */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#include
-#include
-#include
-#include
-#ifdef _MSC_VER
-#include
-#endif
-#include "common.h"
-
-#define GL_CONST 2.8346
-
-struct zint_render_line *render_plot_create_line(float x, float y, float width, float length);
-int render_plot_add_line(struct zint_symbol *symbol, struct zint_render_line *line, struct zint_render_line **last_line);
-struct zint_render_ring *render_plot_create_ring(float x, float y, float radius, float line_width);
-int render_plot_add_ring(struct zint_symbol *symbol, struct zint_render_ring *ring, struct zint_render_ring **last_ring);
-struct zint_render_hexagon *render_plot_create_hexagon(float x, float y);
-int render_plot_add_hexagon(struct zint_symbol *symbol, struct zint_render_hexagon *ring, struct zint_render_hexagon **last_hexagon);
-
-int render_plot_add_string(struct zint_symbol *symbol, unsigned char *text, float x, float y, float fsize, float width, struct zint_render_string **last_string);
-
-int render_plot(struct zint_symbol *symbol, float width, float height)
-{
- struct zint_render *render;
- struct zint_render_line *line, *last_line = NULL;
- struct zint_render_string *last_string = NULL;
- struct zint_render_ring *ring, *last_ring = NULL;
- struct zint_render_hexagon *hexagon, *last_hexagon = NULL;
-
- int i, r, block_width, latch, this_row;
- float textpos, textwidth, large_bar_height, preset_height, row_height, row_posn = 0.0;
- // int error_number = 0;
- int text_offset, text_height, xoffset, yoffset, textdone, main_symbol_width_x, addon_width_x;
- char addon[6], textpart[10];
- int large_bar_count, symbol_lead_in, total_symbol_width_x, total_area_width_x;
- float addon_text_posn;
- float default_text_posn;
- float scaler;
- const char *locale = NULL;
- int hide_text = 0;
- float required_aspect;
- float symbol_aspect = 1;
- float x_dimension;
- int upceanflag = 0;
-
- // Allocate memory for the rendered version
-#ifndef _MSC_VER
- render = symbol->rendered = malloc(sizeof(struct zint_render));
-#else
- render = symbol->rendered = (struct zint_render *)_alloca(sizeof(struct zint_render));
-#endif
- render->lines = NULL;
- render->strings = NULL;
- render->rings = NULL;
- render->hexagons = NULL;
-
- locale = setlocale(LC_ALL, "C");
-
- row_height = 0;
- textdone = 0;
- textpos = 0.0;
- main_symbol_width_x = symbol->width;
- strcpy(addon, "");
- symbol_lead_in = 0;
- addon_text_posn = 0.0;
- addon_width_x = 0;
-
- /*
- * Determine if there will be any addon texts and text height
- */
- latch = 0;
- r = 0;
- /* Isolate add-on text */
- if(is_extendable(symbol->symbology)) {
- for(i = 0; i < ustrlen(symbol->text); i++) {
- if (latch == 1) {
- addon[r] = symbol->text[i];
- r++;
- }
- if (symbol->text[i] == '+') {
- latch = 1;
- }
- }
- }
- addon[r] = '\0';
-
- if((!symbol->show_hrt) || (ustrlen(symbol->text) == 0)) {
- hide_text = 1;
- text_height = text_offset = 0.0;
- } else {
- text_height = 9.0;
- text_offset = 2.0;
- }
-
-
- /*
- * Calculate the width of the barcode, especially if there are any extra
- * borders or white space to add.
- */
-
- while(!(module_is_set(symbol, symbol->rows - 1, symbol_lead_in))) {
- symbol_lead_in++;
- }
-
- /* Certain symbols need whitespace otherwise characters get chopped off the sides */
- if ((((symbol->symbology == BARCODE_EANX) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_EANX_CC))
- || (symbol->symbology == BARCODE_ISBNX)) {
- switch(ustrlen(symbol->text)) {
- case 13: /* EAN 13 */
- case 16:
- case 19:
- if(symbol->whitespace_width == 0) {
- symbol->whitespace_width = 10;
- }
- main_symbol_width_x = 96 + symbol_lead_in;
- upceanflag = 13;
- break;
- case 2:
- main_symbol_width_x = 22 + symbol_lead_in;
- upceanflag = 2;
- break;
- case 5:
- main_symbol_width_x = 49 + symbol_lead_in;
- upceanflag = 5;
- break;
- default:
- main_symbol_width_x = 68 + symbol_lead_in;
- upceanflag = 8;
- }
- switch(ustrlen(symbol->text)) {
- case 11:
- case 16:
- /* EAN-2 add-on */
- addon_width_x = 31;
- break;
- case 14:
- case 19:
- /* EAN-5 add-on */
- addon_width_x = 58;
- break;
- }
- }
-
- if (((symbol->symbology == BARCODE_UPCA) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCA_CC)) {
- upceanflag = 12;
- if(symbol->whitespace_width < 10) {
- symbol->whitespace_width = 10;
- main_symbol_width_x = 96 + symbol_lead_in;
- }
- switch(ustrlen(symbol->text)) {
- case 15:
- /* EAN-2 add-on */
- addon_width_x = 31;
- break;
- case 18:
- /* EAN-5 add-on */
- addon_width_x = 58;
- break;
- }
- }
-
- if (((symbol->symbology == BARCODE_UPCE) && (symbol->rows == 1)) || (symbol->symbology == BARCODE_UPCE_CC)) {
- upceanflag = 6;
- if(symbol->whitespace_width == 0) {
- symbol->whitespace_width = 10;
- main_symbol_width_x = 51 + symbol_lead_in;
- }
- switch(ustrlen(symbol->text)) {
- case 11:
- /* EAN-2 add-on */
- addon_width_x = 31;
- break;
- case 14:
- /* EAN-5 add-on */
- addon_width_x = 58;
- break;
- }
- }
-
- total_symbol_width_x = main_symbol_width_x + addon_width_x;
- total_area_width_x = total_symbol_width_x + (2 * (symbol->border_width + symbol->whitespace_width));
-
- xoffset = symbol->border_width + symbol->whitespace_width;
- yoffset = symbol->border_width;
-
- // Determine if height should be overridden
- large_bar_count = 0;
- preset_height = 0.0;
- for(i = 0; i < symbol->rows; i++) {
- preset_height += symbol->row_height[i];
- if(symbol->row_height[i] == 0) {
- large_bar_count++;
- }
- }
-
- if (large_bar_count == 0) {
- required_aspect = width / height;
- symbol_aspect = (total_symbol_width_x + (2 * xoffset)) / (preset_height + (2 * yoffset) + text_offset + text_height);
- symbol->height = preset_height;
- if (required_aspect > symbol_aspect) {
- /* the area is too wide */
- scaler = height / (preset_height + (2 * yoffset) + text_offset + text_height);
- render->width = symbol_aspect * height;
- render->height = height;
- } else {
- /* the area is too high */
- scaler = width / (total_symbol_width_x + (2 * xoffset));
- render->width = width;
- render->height = width / symbol_aspect;
- }
- } else {
- scaler = width / (total_symbol_width_x + (2 * xoffset));
- symbol->height = (height / scaler) - ((2 * yoffset) + text_offset + text_height);
-
- render->width = width;
- render->height = height;
- }
- large_bar_height = (symbol->height - preset_height) / large_bar_count;
-
- if(((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) {
- default_text_posn = (symbol->height + text_offset + symbol->border_width + symbol->border_width) * scaler;
- } else {
- default_text_posn = (symbol->height + text_offset + symbol->border_width) * scaler;
- }
-
- x_dimension = render->width / total_area_width_x;
- x_dimension /= GL_CONST;
-
- /* Set minimum size of symbol */
- /* Barcode must be at least 2mm high by 2mm across */
- if(render->height < ((x_dimension * ((2 * symbol->border_width) + text_offset + text_height)) + 2.0) * GL_CONST) {
- render->height = ((x_dimension * ((2 * symbol->border_width) + text_offset + text_height)) + 2.0) * GL_CONST;
- }
- if(render->width < (2.0 * GL_CONST)) {
- render->width = (2.0 * GL_CONST);
- }
-
- if(symbol->symbology == BARCODE_CODABAR) {
- /* The minimum X-dimension of Codabar is 0.191mm. The minimum bar height is 5mm */
- if(x_dimension < 0.191) {
- render->width = 0.191 * GL_CONST * total_area_width_x;
- }
- if(render->height < ((x_dimension * ((2 * symbol->border_width) + text_offset + text_height)) + 5.0) * GL_CONST) {
- render->height = ((x_dimension * ((2 * symbol->border_width) + text_offset + text_height)) + 5.0) * GL_CONST;
- }
- }
-
- if(symbol->symbology == BARCODE_CODE49) {
- /* The minimum X-dimension of Code 49 is 0.191mm */
- if(x_dimension < 0.191) {
- render->width = 0.191 * GL_CONST * total_area_width_x;
- render->height = render->width / symbol_aspect;
- }
- }
-
- if(upceanflag != 0) {
- /* The X-dimension of UPC/EAN symbols is fixed at 0.330mm */
- /* NOTE: This code will need adjustment before it correctly deals with composite symbols */
- render->width = 0.330 * GL_CONST * total_area_width_x;
- /* The height is also fixed */
- switch (upceanflag) {
- case 6:
- case 12:
- case 13:
- /* UPC-A, UPC-E and EAN-13 */
- /* Height of bars should be 22.85mm */
- render->height = ((0.330 * ((2 * symbol->border_width) + text_offset + text_height)) + 22.85) * GL_CONST;
- break;
- case 8:
- /* EAN-8 */
- /* Height of bars should be 18.23mm */
- render->height = ((0.330 * ((2 * symbol->border_width) + text_offset + text_height)) + 18.23) * GL_CONST;
- break;
- default:
- /* EAN-2 and EAN-5 */
- /* Height of bars should be 21.10mm */
- render->height = ((0.330 * ((2 * symbol->border_width) + text_offset + text_height)) + 21.10) * GL_CONST;
- }
- }
-
- if(symbol->symbology == BARCODE_ONECODE) {
- /* The size of USPS Intelligent Mail barcode is fixed */
- render->width = 0.508 * GL_CONST * total_area_width_x;
- render->height = 4.064 * GL_CONST;
- }
-
- if((symbol->symbology == BARCODE_POSTNET) || (symbol->symbology == BARCODE_PLANET)) {
- /* The size of PostNet and PLANET are fized */
- render->width = 0.508 * GL_CONST * total_area_width_x;
- render->height = 2.921 * GL_CONST;
- }
-
- if(((symbol->symbology == BARCODE_AUSPOST) || (symbol->symbology == BARCODE_AUSREPLY)) ||
- ((symbol->symbology == BARCODE_AUSROUTE) || (symbol->symbology == BARCODE_AUSREDIRECT))) {
- /* Australia Post use the same sizes as USPS */
- render->width = 0.508 * GL_CONST * total_area_width_x;
- render->height = 4.064 * GL_CONST;
- }
-
- if((symbol->symbology == BARCODE_RM4SCC) || (symbol->symbology == BARCODE_KIX)) {
- /* Royal Mail and KIX Code uses 22 bars per inch */
- render->width = 0.577 * GL_CONST * total_area_width_x;
- render->height = 5.22 * GL_CONST;
- }
-
- if(symbol->symbology == BARCODE_MAXICODE) {
- /* Maxicode is a fixed size */
- scaler = GL_CONST; /* Converts from millimeters to the scale used by glabels */
- render->width = 28.16 * scaler;
- render->height = 26.86 * scaler;
-
- /* Central bullseye pattern */
- ring = render_plot_create_ring(13.64 * scaler, 13.43 * scaler, 0.85 * scaler, 0.67 * scaler);
- render_plot_add_ring(symbol, ring, &last_ring);
- ring = render_plot_create_ring(13.64 * scaler, 13.43 * scaler, 2.20 * scaler, 0.67 * scaler);
- render_plot_add_ring(symbol, ring, &last_ring);
- ring = render_plot_create_ring(13.64 * scaler, 13.43 * scaler, 3.54 * scaler, 0.67 * scaler);
- render_plot_add_ring(symbol, ring, &last_ring);
-
- /* Hexagons */
- for(r = 0; r < symbol->rows; r++) {
- for(i = 0; i < symbol->width; i++) {
- if(module_is_set(symbol, r, i)) {
- hexagon = render_plot_create_hexagon(((i * 0.88) + (r & 1 ? 1.76 : 1.32)) * scaler, ((r * 0.76) + 0.76) * scaler);
- render_plot_add_hexagon(symbol, hexagon, &last_hexagon);
- }
- }
- }
-
- } else {
- /* everything else uses rectangles (or squares) */
- /* Works from the bottom of the symbol up */
- int addon_latch = 0;
-
- for(r = 0; r < symbol->rows; r++) {
- this_row = r;
- if(symbol->row_height[this_row] == 0) {
- row_height = large_bar_height;
- } else {
- row_height = symbol->row_height[this_row];
- }
- row_posn = 0;
- for(i = 0; i < r; i++) {
- if(symbol->row_height[i] == 0) {
- row_posn += large_bar_height;
- } else {
- row_posn += symbol->row_height[i];
- }
- }
- row_posn += yoffset;
-
- i = 0;
- if(module_is_set(symbol, this_row, 0)) {
- latch = 1;
- } else {
- latch = 0;
- }
-
- do {
- block_width = 0;
- do {
- block_width++;
- } while (module_is_set(symbol, this_row, i + block_width) == module_is_set(symbol, this_row, i));
- if((addon_latch == 0) && (r == (symbol->rows - 1)) && (i > main_symbol_width_x)) {
- addon_text_posn = row_posn * scaler;
- addon_latch = 1;
- }
- if(latch == 1) {
- /* a bar */
- if(addon_latch == 0) {
- line = render_plot_create_line((i + xoffset) * scaler, (row_posn) * scaler, block_width * scaler, row_height * scaler);
- } else {
- line = render_plot_create_line((i + xoffset) * scaler, (row_posn + 10.0) * scaler, block_width * scaler, (row_height - 5.0) * scaler);
- }
- latch = 0;
-
- render_plot_add_line(symbol, line, &last_line);
- } else {
- /* a space */
- latch = 1;
- }
- i += block_width;
-
- } while (i < symbol->width);
- }
- }
- /* That's done the actual data area, everything else is human-friendly */
-
-
- /* Add the text */
- xoffset -= symbol_lead_in;
- row_posn = (row_posn + large_bar_height) * scaler;
-
- if (!hide_text) {
- if(upceanflag == 8) {
- /* guard bar extensions and text formatting for EAN-8 */
- i = 0;
- for (line = symbol->rendered->lines; line != NULL; line = line->next) {
- switch(i) {
- case 0:
- case 1:
- case 10:
- case 11:
- case 20:
- case 21:
- line->length += (5.0 * scaler);
- break;
- }
- i++;
- }
-
- for(i = 0; i < 4; i++) {
- textpart[i] = symbol->text[i];
- }
- textpart[4] = '\0';
- textpos = 17;
- textwidth = 4.0 * 8.5;
- render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string);
- for(i = 0; i < 4; i++) {
- textpart[i] = symbol->text[i + 4];
- }
- textpart[4] = '\0';
- textpos = 50;
- render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string);
- textdone = 1;
- switch(strlen(addon)) {
- case 2:
- textpos = xoffset + 86;
- textwidth = 2.0 * 8.5;
- render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string);
- break;
- case 5:
- textpos = xoffset + 100;
- textwidth = 5.0 * 8.5;
- render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string);
- break;
- }
-
- }
-
- if(upceanflag == 13) {
- /* guard bar extensions and text formatting for EAN-13 */
- i = 0;
- for (line = symbol->rendered->lines; line != NULL; line = line->next) {
- switch(i) {
- case 0:
- case 1:
- case 14:
- case 15:
- case 28:
- case 29:
- line->length += (5.0 * scaler);
- break;
- }
- i++;
- }
-
- textpart[0] = symbol->text[0];
- textpart[1] = '\0';
- textpos = -5; // 7
- textwidth = 8.5;
- render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string);
-
- for(i = 0; i < 6; i++) {
- textpart[i] = symbol->text[i + 1];
- }
- textpart[6] = '\0';
- textpos = 25;
- textwidth = 6.0 * 8.5;
- render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string);
- for(i = 0; i < 6; i++) {
- textpart[i] = symbol->text[i + 7];
- }
- textpart[6] = '\0';
- textpos = 72;
- render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string);
- textdone = 1;
- switch(strlen(addon)) {
- case 2:
- textpos = xoffset + 114;
- textwidth = 2.0 * 8.5;
- render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string);
- break;
- case 5:
- textpos = xoffset + 128;
- textwidth = 5.0 * 8.5;
- render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string);
- break;
- }
- }
-
- if (upceanflag == 12) {
- /* guard bar extensions and text formatting for UPCA */
- i = 0;
- for (line = symbol->rendered->lines; line != NULL; line = line->next) {
- switch(i) {
- case 0:
- case 1:
- case 2:
- case 3:
- case 14:
- case 15:
- case 26:
- case 27:
- case 28:
- case 29:
- line->length += (5.0 * scaler);
- break;
- }
- i++;
- }
-
- textpart[0] = symbol->text[0];
- textpart[1] = '\0';
- textpos = -5;
- textwidth = 6.2;
- render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn + (2.0 * scaler), 8.0 * scaler, textwidth * scaler, &last_string);
- for(i = 0; i < 5; i++) {
- textpart[i] = symbol->text[i + 1];
- }
- textpart[5] = '\0';
- textpos = 27;
- textwidth = 5.0 * 8.5;
- render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string);
- for(i = 0; i < 5; i++) {
- textpart[i] = symbol->text[i + 6];
- }
- textpos = 68;
- render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string);
- textpart[0] = symbol->text[11];
- textpart[1] = '\0';
- textpos = 100;
- textwidth = 6.2;
- render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn + (2.0 * scaler), 8.0 * scaler, textwidth * scaler, &last_string);
- textdone = 1;
- switch(strlen(addon)) {
- case 2:
- textpos = xoffset + 116;
- textwidth = 2.0 * 8.5;
- render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string);
- break;
- case 5:
- textpos = xoffset + 130;
- textwidth = 5.0 * 8.5;
- render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string);
- break;
- }
- }
-
- if (upceanflag == 6) {
- /* guard bar extensions and text formatting for UPCE */
- i = 0;
- for (line = symbol->rendered->lines; line != NULL; line = line->next) {
- switch(i) {
- case 0:
- case 1:
- case 14:
- case 15:
- case 16:
- line->length += (5.0 * scaler);
- break;
- }
- i++;
- }
-
- textpart[0] = symbol->text[0];
- textpart[1] = '\0';
- textpos = -5;
- textwidth = 6.2;
- render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn + (2.0 * scaler), 8.0 * scaler, textwidth * scaler, &last_string);
- for(i = 0; i < 6; i++) {
- textpart[i] = symbol->text[i + 1];
- }
- textpart[6] = '\0';
- textpos = 24;
- textwidth = 6.0 * 8.5;
- render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn, 11.0 * scaler, textwidth * scaler, &last_string);
- textpart[0] = symbol->text[7];
- textpart[1] = '\0';
- textpos = 55;
- textwidth = 6.2;
- render_plot_add_string(symbol, (unsigned char *) textpart, (textpos + xoffset) * scaler, default_text_posn + (2.0 * scaler), 8.0 * scaler, textwidth * scaler, &last_string);
- textdone = 1;
- switch(strlen(addon)) {
- case 2:
- textpos = xoffset + 70;
- textwidth = 2.0 * 8.5;
- render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string);
- break;
- case 5:
- textpos = xoffset + 84;
- textwidth = 5.0 * 8.5;
- render_plot_add_string(symbol, (unsigned char *) addon, textpos * scaler, addon_text_posn * scaler, 11.0 * scaler, textwidth * scaler, &last_string);
- break;
- }
- }
-
- /* Put normal human readable text at the bottom (and centered) */
- if (textdone == 0) {
- // caculate start xoffset to center text
- render_plot_add_string(symbol, symbol->text, ((symbol->width / 2.0) + xoffset) * scaler, default_text_posn, 9.0 * scaler, 0.0, &last_string);
- }
- }
-
- switch(symbol->symbology) {
- case BARCODE_MAXICODE:
- /* Do nothing! */
- break;
- default:
- if((symbol->output_options & BARCODE_BIND) != 0) {
- if((symbol->rows > 1) && (is_stackable(symbol->symbology) == 1)) {
- /* row binding */
- for(r = 1; r < symbol->rows; r++) {
- line = render_plot_create_line(xoffset * scaler, ((r * row_height) + yoffset - 1) * scaler, symbol->width * scaler, 2.0 * scaler);
- render_plot_add_line(symbol, line, &last_line);
- }
- }
- }
- if (((symbol->output_options & BARCODE_BOX) != 0) || ((symbol->output_options & BARCODE_BIND) != 0)) {
- line = render_plot_create_line(0, 0, (symbol->width + xoffset + xoffset) * scaler, symbol->border_width * scaler);
- render_plot_add_line(symbol, line, &last_line);
- line = render_plot_create_line(0, (symbol->height + symbol->border_width) * scaler, (symbol->width + xoffset + xoffset) * scaler, symbol->border_width * scaler);
- render_plot_add_line(symbol, line, &last_line);
- }
- if((symbol->output_options & BARCODE_BOX) != 0) {
- /* side bars */
- line = render_plot_create_line(0, 0, symbol->border_width * scaler, (symbol->height + (2 * symbol->border_width)) * scaler);
- render_plot_add_line(symbol, line, &last_line);
- line = render_plot_create_line((symbol->width + xoffset + xoffset - symbol->border_width) * scaler, 0, symbol->border_width * scaler, (symbol->height + (2 * symbol->border_width)) * scaler);
- render_plot_add_line(symbol, line, &last_line);
- }
- break;
- }
-
- if (locale)
- setlocale(LC_ALL, locale);
-
- return 1;
-}
-
-
-/*
- * Create a new line with its memory allocated ready for adding to the
- * rendered structure.
- *
- * This is much quicker than writing out each line manually (in some cases!)
- */
-struct zint_render_line *render_plot_create_line(float x, float y, float width, float length)
-{
- struct zint_render_line *line;
-
-#ifndef _MSC_VER
- line = malloc(sizeof(struct zint_render_line));
-#else
- line = (struct zint_render_line *)_alloca(sizeof(struct zint_render_line));
-#endif
- line->next = NULL;
- line->x = x;
- line->y = y;
- line->width = width;
- line->length = length;
-
- return line;
-}
-
-/*
- * Add the line to the current rendering and update the last line's
- * next value.
- */
-int render_plot_add_line(struct zint_symbol *symbol, struct zint_render_line *line, struct zint_render_line **last_line)
-{
- if (*last_line)
- (*last_line)->next = line;
- else
- symbol->rendered->lines = line; // first line
-
- *last_line = line;
- return 1;
-}
-
-struct zint_render_ring *render_plot_create_ring(float x, float y, float radius, float line_width)
-{
- struct zint_render_ring *ring;
-
-#ifndef _MSC_VER
- ring = malloc(sizeof(struct zint_render_ring));
-#else
- ring = (struct zint_render_ring *)_alloca(sizeof(struct zint_render_ring));
-#endif
- ring->next = NULL;
- ring->x = x;
- ring->y = y;
- ring->radius = radius;
- ring->line_width = line_width;
-
- return ring;
-}
-
-int render_plot_add_ring(struct zint_symbol *symbol, struct zint_render_ring *ring, struct zint_render_ring **last_ring)
-{
- if (*last_ring)
- (*last_ring)->next = ring;
- else
- symbol->rendered->rings = ring; // first ring
-
- *last_ring = ring;
- return 1;
-}
-
-struct zint_render_hexagon *render_plot_create_hexagon(float x, float y)
-{
- struct zint_render_hexagon *hexagon;
-
-#ifndef _MSC_VER
- hexagon = malloc(sizeof(struct zint_render_hexagon));
-#else
- hexagon = (struct zint_render_hexagon *)_alloca(sizeof(struct zint_render_hexagon));
-#endif
- hexagon->next = NULL;
- hexagon->x = x;
- hexagon->y = y;
-
- return hexagon;
-}
-
-int render_plot_add_hexagon(struct zint_symbol *symbol, struct zint_render_hexagon *hexagon, struct zint_render_hexagon **last_hexagon)
-{
- if (*last_hexagon)
- (*last_hexagon)->next = hexagon;
- else
- symbol->rendered->hexagons = hexagon; // first hexagon
-
- *last_hexagon = hexagon;
- return 1;
-}
-
-/*
- * Add a string structure to the symbol.
- * Coordinates assumed to be from top-center.
- */
-int render_plot_add_string(struct zint_symbol *symbol,
- unsigned char *text, float x, float y, float fsize, float width,
- struct zint_render_string **last_string)
-{
- struct zint_render_string *string;
-
-#ifndef _MSC_VER
- string = malloc(sizeof(struct zint_render_string));
-#else
- string = (struct zint_render_string *)_alloca(sizeof(struct zint_render_string));
-#endif
- string->next = NULL;
- string->x = x;
- string->y = y;
- string->width = width;
- string->fsize = fsize;
- string->length = ustrlen(text);
-#ifndef _MSC_VER
- string->text = malloc(sizeof(unsigned char) * (ustrlen(text) + 1));
-#else
- string->text = (unsigned char *)_alloca((ustrlen(text) + 1) * sizeof(unsigned char));
-#endif
- ustrcpy(string->text, text);
-
- if (*last_string)
- (*last_string)->next = string;
- else
- symbol->rendered->strings = string; // First character
- *last_string = string;
-
- return 1;
-}
diff --git a/3rdparty/zint-2.4.4/backend/rss.c b/3rdparty/zint-2.4.4/backend/rss.c
deleted file mode 100644
index edf1cdc..0000000
--- a/3rdparty/zint-2.4.4/backend/rss.c
+++ /dev/null
@@ -1,2264 +0,0 @@
-/* rss.c - Handles Reduced Space Symbology (GS1 DataBar) */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2008 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-/* The functions "combins" and "getRSSwidths" are copyright BSI and are
- released with permission under the following terms:
-
- "Copyright subsists in all BSI publications. BSI also holds the copyright, in the
- UK, of the international standardisation bodies. Except as
- permitted under the Copyright, Designs and Patents Act 1988 no extract may be
- reproduced, stored in a retrieval system or transmitted in any form or by any
- means - electronic, photocopying, recording or otherwise - without prior written
- permission from BSI.
-
- "This does not preclude the free use, in the course of implementing the standard,
- of necessary details such as symbols, and size, type or grade designations. If these
- details are to be used for any other purpose than implementation then the prior
- written permission of BSI must be obtained."
-
- The date of publication for these functions is 30 November 2006
-*/
-
-/* Includes numerous bugfixes thanks to Pablo Orduña @ the PIRAmIDE project */
-
-#include
-#include
-#include
-#ifdef _MSC_VER
-#include
-#endif
-#include "common.h"
-#include "large.h"
-#include "rss.h"
-#include "gs1.h"
-
-/**********************************************************************
-* combins(n,r): returns the number of Combinations of r selected from n:
-* Combinations = n! / ((n - r)! * r!)
-**********************************************************************/
-int combins(int n, int r) {
- int i, j;
- int maxDenom, minDenom;
- int val;
-
- if (n-r > r) {
- minDenom = r;
- maxDenom = n-r;
- }
- else {
- minDenom = n-r;
- maxDenom = r;
- }
- val = 1;
- j = 1;
- for (i = n; i > maxDenom; i--) {
- val *= i;
- if (j <= minDenom) {
- val /= j;
- j++;
- }
- }
- for (; j <= minDenom; j++) {
- val /= j;
- }
- return(val);
-}
-
-/**********************************************************************
-* getRSSwidths
-* routine to generate widths for RSS elements for a given value.#
-*
-* Calling arguments:
-* val = required value
-* n = number of modules
-* elements = elements in a set (RSS-14 & Expanded = 4; RSS Limited = 7)
-* maxWidth = maximum module width of an element
-* noNarrow = 0 will skip patterns without a one module wide element
-*
-* Return:
-* static int widths[] = element widths
-**********************************************************************/
-void getRSSwidths(int val, int n, int elements, int maxWidth, int noNarrow)
-{
- int bar;
- int elmWidth;
- int mxwElement;
- int subVal, lessVal;
- int narrowMask = 0;
- for (bar = 0; bar < elements-1; bar++)
- {
- for(elmWidth = 1, narrowMask |= (1<= elements-bar-1))
- {
- subVal -= combins(n-elmWidth-(elements-bar), elements-bar-2);
- }
- /* less combinations with elements > maxVal */
- if (elements-bar-1 > 1)
- {
- lessVal = 0;
- for (mxwElement = n-elmWidth-(elements-bar-2);
- mxwElement > maxWidth;
- mxwElement--)
- {
- lessVal += combins(n-elmWidth-mxwElement-1, elements-bar-3);
- }
- subVal -= lessVal * (elements-1-bar);
- }
- else if (n-elmWidth > maxWidth)
- {
- subVal--;
- }
- val -= subVal;
- if (val < 0) break;
- }
- val += subVal;
- n -= elmWidth;
- widths[bar] = elmWidth;
- }
- widths[bar] = n;
- return;
-}
-
-int rss14(struct zint_symbol *symbol, unsigned char source[], int src_len)
-{ /* GS1 DataBar-14 */
- int error_number = 0, i, j, mask;
- short int accum[112], left_reg[112], right_reg[112], x_reg[112], y_reg[112];
- int data_character[4], data_group[4], v_odd[4], v_even[4];
- int data_widths[8][4], checksum, c_left, c_right, total_widths[46], writer;
- char latch, hrt[15], temp[32];
- int check_digit, count, separator_row;
-
- separator_row = 0;
-
- if(src_len > 13) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, src_len);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
-
- /* make some room for a separator row for composite symbols */
- switch(symbol->symbology) {
- case BARCODE_RSS14_CC:
- case BARCODE_RSS14STACK_CC:
- case BARCODE_RSS14_OMNI_CC:
- separator_row = symbol->rows;
- symbol->row_height[separator_row] = 1;
- symbol->rows += 1;
- break;
- }
-
- for(i = 0; i < 112; i++) {
- accum[i] = 0;
- x_reg[i] = 0;
- y_reg[i] = 0;
- }
-
- for(i = 0; i < 4; i++) {
- data_character[i] = 0;
- data_group[i] = 0;
- }
-
- binary_load(accum, (char*)source, src_len);
- strcpy(temp, "10000000000000");
- if(symbol->option_1 == 2) {
- /* Add symbol linkage flag */
- binary_load(y_reg, temp, strlen(temp));
- binary_add(accum, y_reg);
- for(i = 0; i < 112; i++) {
- y_reg[i] = 0;
- }
- }
-
- /* Calculate left and right pair values */
- strcpy(temp, "4537077");
- binary_load(x_reg, temp, strlen(temp));
-
- for(i = 0; i < 24; i++) {
- shiftup(x_reg);
- }
-
- for(i = 24; i >= 0; i--) {
- y_reg[i] = islarger(accum, x_reg);
- if(y_reg[i] == 1) {
- binary_subtract(accum, x_reg);
- }
- shiftdown(x_reg);
- }
-
- for(i = 0; i < 112; i++) {
- left_reg[i] = y_reg[i];
- right_reg[i] = accum[i];
- }
-
- /* Calculate four data characters */
- strcpy(temp, "1597");
- binary_load(x_reg, temp, strlen(temp));
- for(i = 0; i < 112; i++) {
- accum[i] = left_reg[i];
- }
-
- for(i = 0; i < 24; i++) {
- shiftup(x_reg);
- }
-
- for(i = 24; i >= 0; i--) {
- y_reg[i] = islarger(accum, x_reg);
- if(y_reg[i] == 1) {
- binary_subtract(accum, x_reg);
- }
- shiftdown(x_reg);
- }
-
- data_character[0] = 0;
- data_character[1] = 0;
- mask = 0x2000;
- for(i = 13; i >= 0; i--) {
- if(y_reg[i] == 1) {
- data_character[0] += mask;
- }
- if(accum[i] == 1) {
- data_character[1] += mask;
- }
- mask = mask >> 1;
- }
- strcpy(temp, "1597");
- binary_load(x_reg, temp, strlen(temp));
- for(i = 0; i < 112; i++) {
- accum[i] = right_reg[i];
- }
-
- for(i = 0; i < 24; i++) {
- shiftup(x_reg);
- }
-
- for(i = 24; i >= 0; i--) {
- y_reg[i] = islarger(accum, x_reg);
- if(y_reg[i] == 1) {
- binary_subtract(accum, x_reg);
- }
- shiftdown(x_reg);
- }
-
- data_character[2] = 0;
- data_character[3] = 0;
- mask = 0x2000;
- for(i = 13; i >= 0; i--) {
- if(y_reg[i] == 1) {
- data_character[2] += mask;
- }
- if(accum[i] == 1) {
- data_character[3] += mask;
- }
- mask = mask >> 1;
- }
-
- /* Calculate odd and even subset values */
-
- if((data_character[0] >= 0) && (data_character[0] <= 160)) { data_group[0] = 0; }
- if((data_character[0] >= 161) && (data_character[0] <= 960)) { data_group[0] = 1; }
- if((data_character[0] >= 961) && (data_character[0] <= 2014)) { data_group[0] = 2; }
- if((data_character[0] >= 2015) && (data_character[0] <= 2714)) { data_group[0] = 3; }
- if((data_character[0] >= 2715) && (data_character[0] <= 2840)) { data_group[0] = 4; }
- if((data_character[1] >= 0) && (data_character[1] <= 335)) { data_group[1] = 5; }
- if((data_character[1] >= 336) && (data_character[1] <= 1035)) { data_group[1] = 6; }
- if((data_character[1] >= 1036) && (data_character[1] <= 1515)) { data_group[1] = 7; }
- if((data_character[1] >= 1516) && (data_character[1] <= 1596)) { data_group[1] = 8; }
- if((data_character[3] >= 0) && (data_character[3] <= 335)) { data_group[3] = 5; }
- if((data_character[3] >= 336) && (data_character[3] <= 1035)) { data_group[3] = 6; }
- if((data_character[3] >= 1036) && (data_character[3] <= 1515)) { data_group[3] = 7; }
- if((data_character[3] >= 1516) && (data_character[3] <= 1596)) { data_group[3] = 8; }
- if((data_character[2] >= 0) && (data_character[2] <= 160)) { data_group[2] = 0; }
- if((data_character[2] >= 161) && (data_character[2] <= 960)) { data_group[2] = 1; }
- if((data_character[2] >= 961) && (data_character[2] <= 2014)) { data_group[2] = 2; }
- if((data_character[2] >= 2015) && (data_character[2] <= 2714)) { data_group[2] = 3; }
- if((data_character[2] >= 2715) && (data_character[2] <= 2840)) { data_group[2] = 4; }
-
- v_odd[0] = (data_character[0] - g_sum_table[data_group[0]]) / t_table[data_group[0]];
- v_even[0] = (data_character[0] - g_sum_table[data_group[0]]) % t_table[data_group[0]];
- v_odd[1] = (data_character[1] - g_sum_table[data_group[1]]) % t_table[data_group[1]];
- v_even[1] = (data_character[1] - g_sum_table[data_group[1]]) / t_table[data_group[1]];
- v_odd[3] = (data_character[3] - g_sum_table[data_group[3]]) % t_table[data_group[3]];
- v_even[3] = (data_character[3] - g_sum_table[data_group[3]]) / t_table[data_group[3]];
- v_odd[2] = (data_character[2] - g_sum_table[data_group[2]]) / t_table[data_group[2]];
- v_even[2] = (data_character[2] - g_sum_table[data_group[2]]) % t_table[data_group[2]];
-
-
- /* Use RSS subset width algorithm */
- for(i = 0; i < 4; i++) {
- if((i == 0)||(i == 2)) {
- getRSSwidths(v_odd[i], modules_odd[data_group[i]], 4, widest_odd[data_group[i]], 1);
- data_widths[0][i] = widths[0];
- data_widths[2][i] = widths[1];
- data_widths[4][i] = widths[2];
- data_widths[6][i] = widths[3];
- getRSSwidths(v_even[i], modules_even[data_group[i]], 4, widest_even[data_group[i]], 0);
- data_widths[1][i] = widths[0];
- data_widths[3][i] = widths[1];
- data_widths[5][i] = widths[2];
- data_widths[7][i] = widths[3];
- } else {
- getRSSwidths(v_odd[i], modules_odd[data_group[i]], 4, widest_odd[data_group[i]], 0);
- data_widths[0][i] = widths[0];
- data_widths[2][i] = widths[1];
- data_widths[4][i] = widths[2];
- data_widths[6][i] = widths[3];
- getRSSwidths(v_even[i], modules_even[data_group[i]], 4, widest_even[data_group[i]], 1);
- data_widths[1][i] = widths[0];
- data_widths[3][i] = widths[1];
- data_widths[5][i] = widths[2];
- data_widths[7][i] = widths[3];
- }
- }
-
-
- checksum = 0;
- /* Calculate the checksum */
- for(i = 0; i < 8; i++) {
- checksum += checksum_weight[i] * data_widths[i][0];
- checksum += checksum_weight[i+8] * data_widths[i][1];
- checksum += checksum_weight[i+16] * data_widths[i][2];
- checksum += checksum_weight[i+24] * data_widths[i][3];
- }
- checksum %= 79;
-
- /* Calculate the two check characters */
- if(checksum >= 8) { checksum++; }
- if(checksum >= 72) { checksum++; }
- c_left = checksum / 9;
- c_right = checksum % 9;
-
- /* Put element widths together */
- total_widths[0] = 1;
- total_widths[1] = 1;
- total_widths[44] = 1;
- total_widths[45] = 1;
- for(i = 0; i < 8; i++) {
- total_widths[i + 2] = data_widths[i][0];
- total_widths[i + 15] = data_widths[7 - i][1];
- total_widths[i + 23] = data_widths[i][3];
- total_widths[i + 36] = data_widths[7 - i][2];
- }
- for(i = 0; i < 5; i++) {
- total_widths[i + 10] = finder_pattern[i + (5 * c_left)];
- total_widths[i + 31] = finder_pattern[(4 - i) + (5 * c_right)];
- }
-
- /* Put this data into the symbol */
- if((symbol->symbology == BARCODE_RSS14) || (symbol->symbology == BARCODE_RSS14_CC)) {
- writer = 0;
- latch = '0';
- for(i = 0; i < 46; i++) {
- for(j = 0; j < total_widths[i]; j++) {
- if(latch == '1') { set_module(symbol, symbol->rows, writer); }
- writer++;
- }
- if(latch == '1') {
- latch = '0';
- } else {
- latch = '1';
- }
- }
- if(symbol->width < writer) { symbol->width = writer; }
- if(symbol->symbology == BARCODE_RSS14_CC) {
- /* separator pattern for composite symbol */
- for(i = 4; i < 92; i++) {
- if(!(module_is_set(symbol, separator_row + 1, i))) {
- set_module(symbol, separator_row, i); }
- }
- latch = '1';
- for(i = 16; i < 32; i++) {
- if(!(module_is_set(symbol, separator_row + 1, i))) {
- if(latch == '1') {
- set_module(symbol, separator_row, i);
- latch = '0';
- } else {
- unset_module(symbol, separator_row, i);
- latch = '1';
- }
- } else {
- unset_module(symbol, separator_row, i);
- latch = '1';
- }
- }
- latch = '1';
- for(i = 63; i < 78; i++) {
- if(!(module_is_set(symbol, separator_row + 1, i))) {
- if(latch == '1') {
- set_module(symbol, separator_row, i);
- latch = '0';
- } else {
- unset_module(symbol, separator_row, i);
- latch = '1';
- }
- } else {
- unset_module(symbol, separator_row, i);
- latch = '1';
- }
- }
- }
- symbol->rows = symbol->rows + 1;
-
- count = 0;
- check_digit = 0;
-
- /* Calculate check digit from Annex A and place human readable text */
- ustrcpy(symbol->text, (unsigned char*)"(01)");
- for(i = 0; i < 14; i++) {
- hrt[i] = '0';
- }
- for(i = 0; i < src_len; i++) {
- hrt[12 - i] = source[src_len - i - 1];
- }
- hrt[14] = '\0';
-
- for (i = 0; i < 13; i++) {
- count += ctoi(hrt[i]);
-
- if (!(i & 1)) {
- count += 2 * (ctoi(hrt[i]));
- }
- }
-
- check_digit = 10 - (count%10);
- if (check_digit == 10) { check_digit = 0; }
- hrt[13] = itoc(check_digit);
-
- uconcat(symbol->text, (unsigned char*)hrt);
- }
-
- if((symbol->symbology == BARCODE_RSS14STACK) || (symbol->symbology == BARCODE_RSS14STACK_CC)) {
- /* top row */
- writer = 0;
- latch = '0';
- for(i = 0; i < 23; i++) {
- for(j = 0; j < total_widths[i]; j++) {
- if(latch == '1') {
- set_module(symbol, symbol->rows, writer);
- } else {
- unset_module(symbol, symbol->rows, writer);
- }
- writer++;
- }
- if(latch == '1') {
- latch = '0';
- } else {
- latch = '1';
- }
- }
- set_module(symbol, symbol->rows, writer);
- unset_module(symbol, symbol->rows, writer + 1);
- symbol->row_height[symbol->rows] = 5;
- /* bottom row */
- symbol->rows = symbol->rows + 2;
- set_module(symbol, symbol->rows, 0);
- unset_module(symbol, symbol->rows, 1);
- writer = 0;
- latch = '1';
- for(i = 23; i < 46; i++) {
- for(j = 0; j < total_widths[i]; j++) {
- if(latch == '1') {
- set_module(symbol, symbol->rows, writer + 2);
- } else {
- unset_module(symbol, symbol->rows, writer + 2);
- }
- writer++;
- }
- if(latch == '1') {
- latch = '0';
- } else {
- latch = '1';
- }
- }
- symbol->row_height[symbol->rows] = 7;
- /* separator pattern */
- for(i = 4; i < 46; i++) {
- if(module_is_set(symbol, symbol->rows - 2, i) == module_is_set(symbol, symbol->rows, i)) {
- if(!(module_is_set(symbol, symbol->rows - 2, i))) {
- set_module(symbol, symbol->rows - 1, i);
- }
- } else {
- if(!(module_is_set(symbol, symbol->rows - 1, i - 1))) {
- set_module(symbol, symbol->rows - 1, i);
- }
- }
- }
- symbol->row_height[symbol->rows - 1] = 1;
- if(symbol->symbology == BARCODE_RSS14STACK_CC) {
- /* separator pattern for composite symbol */
- for(i = 4; i < 46; i++) {
- if(!(module_is_set(symbol, separator_row + 1, i))) {
- set_module(symbol, separator_row, i);
- }
- }
- latch = '1';
- for(i = 16; i < 32; i++) {
- if(!(module_is_set(symbol, separator_row + 1, i))) {
- if(latch == '1') {
- set_module(symbol, separator_row, i);
- latch = '0';
- } else {
- unset_module(symbol, separator_row, i);
- latch = '1';
- }
- } else {
- unset_module(symbol, separator_row, i);
- latch = '1';
- }
- }
- }
- symbol->rows = symbol->rows + 1;
- if(symbol->width < 50) { symbol->width = 50; }
- }
-
- if((symbol->symbology == BARCODE_RSS14STACK_OMNI) || (symbol->symbology == BARCODE_RSS14_OMNI_CC)) {
- /* top row */
- writer = 0;
- latch = '0';
- for(i = 0; i < 23; i++) {
- for(j = 0; j < total_widths[i]; j++) {
- if(latch == '1') { set_module(symbol, symbol->rows, writer); } else { unset_module(symbol, symbol->rows, writer); }
- writer++;
- }
- latch = (latch == '1' ? '0' : '1');
- }
- set_module(symbol, symbol->rows, writer);
- unset_module(symbol, symbol->rows, writer + 1);
- /* bottom row */
- symbol->rows = symbol->rows + 4;
- set_module(symbol, symbol->rows, 0);
- unset_module(symbol, symbol->rows, 1);
- writer = 0;
- latch = '1';
- for(i = 23; i < 46; i++) {
- for(j = 0; j < total_widths[i]; j++) {
- if(latch == '1') { set_module(symbol, symbol->rows, writer + 2); } else { unset_module(symbol, symbol->rows, writer + 2); }
- writer++;
- }
- if(latch == '1') {
- latch = '0';
- } else {
- latch = '1';
- }
- }
- /* middle separator */
- for(i = 5; i < 46; i += 2) {
- set_module(symbol, symbol->rows - 2, i);
- }
- symbol->row_height[symbol->rows - 2] = 1;
- /* top separator */
- for(i = 4; i < 46; i++) {
- if(!(module_is_set(symbol, symbol->rows - 4, i))) {
- set_module(symbol, symbol->rows - 3, i);
- }
- }
- latch = '1';
- for(i = 17; i < 33; i++) {
- if(!(module_is_set(symbol, symbol->rows - 4, i))) {
- if(latch == '1') {
- set_module(symbol, symbol->rows - 3, i);
- latch = '0';
- } else {
- unset_module(symbol, symbol->rows - 3, i);
- latch = '1';
- }
- } else {
- unset_module(symbol, symbol->rows - 3, i);
- latch = '1';
- }
- }
- symbol->row_height[symbol->rows - 3] = 1;
- /* bottom separator */
- for(i = 4; i < 46; i++) {
- if(!(module_is_set(symbol, symbol->rows, i))) {
- set_module(symbol, symbol->rows - 1, i);
- }
- }
- latch = '1';
- for(i = 16; i < 32; i++) {
- if(!(module_is_set(symbol, symbol->rows, i))) {
- if(latch == '1') {
- set_module(symbol, symbol->rows - 1, i);
- latch = '0';
- } else {
- unset_module(symbol, symbol->rows - 1, i);
- latch = '1';
- }
- } else {
- unset_module(symbol, symbol->rows - 1, i);
- latch = '1';
- }
- }
- symbol->row_height[symbol->rows - 1] = 1;
- if(symbol->width < 50) { symbol->width = 50; }
- if(symbol->symbology == BARCODE_RSS14_OMNI_CC) {
- /* separator pattern for composite symbol */
- for(i = 4; i < 46; i++) {
- if(!(module_is_set(symbol, separator_row + 1, i))) {
- set_module(symbol, separator_row, i);
- }
- }
- latch = '1';
- for(i = 16; i < 32; i++) {
- if(!(module_is_set(symbol, separator_row + 1, i))) {
- if(latch == '1') {
- set_module(symbol, separator_row, i);
- latch = '0';
- } else {
- unset_module(symbol, separator_row, i);
- latch = '1';
- }
- } else {
- unset_module(symbol, separator_row, i);
- latch = '1';
- }
- }
- }
- symbol->rows = symbol->rows + 1;
- }
-
-
- return error_number;
-}
-
-int rsslimited(struct zint_symbol *symbol, unsigned char source[], int src_len)
-{ /* GS1 DataBar Limited */
- int error_number = 0, i, mask;
- short int accum[112], left_reg[112], right_reg[112], x_reg[112], y_reg[112];
- int left_group, right_group, left_odd, left_even, right_odd, right_even;
- int left_character, right_character, left_widths[14], right_widths[14];
- int checksum, check_elements[14], total_widths[46], writer, j, check_digit, count;
- char latch, hrt[15], temp[32];
- int separator_row;
-
- separator_row = 0;
-
- if(src_len > 13) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
- error_number = is_sane(NEON, source, src_len);
- if(error_number == ERROR_INVALID_DATA1) {
- strcpy(symbol->errtxt, "Invalid characters in data");
- return error_number;
- }
- if(src_len == 13) {
- if((source[0] != '0') && (source[0] != '1')) {
- strcpy(symbol->errtxt, "Input out of range");
- return ERROR_INVALID_DATA1;
- }
- }
-
- /* make some room for a separator row for composite symbols */
- if(symbol->symbology == BARCODE_RSS_LTD_CC) {
- separator_row = symbol->rows;
- symbol->row_height[separator_row] = 1;
- symbol->rows += 1;
- }
-
- for(i = 0; i < 112; i++) {
- accum[i] = 0;
- x_reg[i] = 0;
- y_reg[i] = 0;
- }
-
- binary_load(accum, (char*)source, src_len);
- if(symbol->option_1 == 2) {
- /* Add symbol linkage flag */
- strcpy(temp, "2015133531096");
- binary_load(y_reg, temp, strlen(temp));
- binary_add(accum, y_reg);
- for(i = 0; i < 112; i++) {
- y_reg[i] = 0;
- }
- }
-
- /* Calculate left and right pair values */
- strcpy(temp, "2013571");
- binary_load(x_reg, temp, strlen(temp));
-
- for(i = 0; i < 24; i++) {
- shiftup(x_reg);
- }
-
- for(i = 24; i >= 0; i--) {
- y_reg[i] = islarger(accum, x_reg);
- if(y_reg[i] == 1) {
- binary_subtract(accum, x_reg);
- }
- shiftdown(x_reg);
- }
-
- for(i = 0; i < 112; i++) {
- left_reg[i] = y_reg[i];
- right_reg[i] = accum[i];
- }
-
- left_group = 0;
- strcpy(temp, "183063");
- binary_load(accum, temp, strlen(temp));
- if(islarger(left_reg, accum)) { left_group = 1; }
- strcpy(temp, "820063");
- binary_load(accum, temp, strlen(temp));
- if(islarger(left_reg, accum)) { left_group = 2; }
- strcpy(temp, "1000775");
- binary_load(accum, temp, strlen(temp));
- if(islarger(left_reg, accum)) { left_group = 3; }
- strcpy(temp, "1491020");
- binary_load(accum, temp, strlen(temp));
- if(islarger(left_reg, accum)) { left_group = 4; }
- strcpy(temp, "1979844");
- binary_load(accum, temp, strlen(temp));
- if(islarger(left_reg, accum)) { left_group = 5; }
- strcpy(temp, "1996938");
- binary_load(accum, temp, strlen(temp));
- if(islarger(left_reg, accum)) { left_group = 6; }
- right_group = 0;
- strcpy(temp, "183063");
- binary_load(accum, temp, strlen(temp));
- if(islarger(right_reg, accum)) { right_group = 1; }
- strcpy(temp, "820063");
- binary_load(accum, temp, strlen(temp));
- if(islarger(right_reg, accum)) { right_group = 2; }
- strcpy(temp, "1000775");
- binary_load(accum, temp, strlen(temp));
- if(islarger(right_reg, accum)) { right_group = 3; }
- strcpy(temp, "1491020");
- binary_load(accum, temp, strlen(temp));
- if(islarger(right_reg, accum)) { right_group = 4; }
- strcpy(temp, "1979844");
- binary_load(accum, temp, strlen(temp));
- if(islarger(right_reg, accum)) { right_group = 5; }
- strcpy(temp, "1996938");
- binary_load(accum, temp, strlen(temp));
- if(islarger(right_reg, accum)) { right_group = 6; }
-
- switch(left_group) {
- case 1: strcpy(temp, "183064");
- binary_load(accum, temp, strlen(temp));
- binary_subtract(left_reg, accum);
- break;
- case 2: strcpy(temp, "820064");
- binary_load(accum, temp, strlen(temp));
- binary_subtract(left_reg, accum);
- break;
- case 3: strcpy(temp, "1000776");
- binary_load(accum, temp, strlen(temp));
- binary_subtract(left_reg, accum);
- break;
- case 4: strcpy(temp, "1491021");
- binary_load(accum, temp, strlen(temp));
- binary_subtract(left_reg, accum);
- break;
- case 5: strcpy(temp, "1979845");
- binary_load(accum, temp, strlen(temp));
- binary_subtract(left_reg, accum);
- break;
- case 6: strcpy(temp, "1996939");
- binary_load(accum, temp, strlen(temp));
- binary_subtract(left_reg, accum);
- break;
- }
-
- switch(right_group) {
- case 1: strcpy(temp, "183064");
- binary_load(accum, temp, strlen(temp));
- binary_subtract(right_reg, accum);
- break;
- case 2: strcpy(temp, "820064");
- binary_load(accum, temp, strlen(temp));
- binary_subtract(right_reg, accum);
- break;
- case 3: strcpy(temp, "1000776");
- binary_load(accum, temp, strlen(temp));
- binary_subtract(right_reg, accum);
- break;
- case 4: strcpy(temp, "1491021");
- binary_load(accum, temp, strlen(temp));
- binary_subtract(right_reg, accum);
- break;
- case 5: strcpy(temp, "1979845");
- binary_load(accum, temp, strlen(temp));
- binary_subtract(right_reg, accum);
- break;
- case 6: strcpy(temp, "1996939");
- binary_load(accum, temp, strlen(temp));
- binary_subtract(right_reg, accum);
- break;
- }
-
- left_character = 0;
- right_character = 0;
- mask = 0x800000;
- for(i = 23; i >= 0; i--) {
- if(left_reg[i] == 1) {
- left_character += mask;
- }
- if(right_reg[i] == 1) {
- right_character += mask;
- }
- mask = mask >> 1;
- }
-
- left_odd = left_character / t_even_ltd[left_group];
- left_even = left_character % t_even_ltd[left_group];
- right_odd = right_character / t_even_ltd[right_group];
- right_even = right_character % t_even_ltd[right_group];
-
- getRSSwidths(left_odd, modules_odd_ltd[left_group], 7, widest_odd_ltd[left_group], 1);
- left_widths[0] = widths[0];
- left_widths[2] = widths[1];
- left_widths[4] = widths[2];
- left_widths[6] = widths[3];
- left_widths[8] = widths[4];
- left_widths[10] = widths[5];
- left_widths[12] = widths[6];
- getRSSwidths(left_even, modules_even_ltd[left_group], 7, widest_even_ltd[left_group], 0);
- left_widths[1] = widths[0];
- left_widths[3] = widths[1];
- left_widths[5] = widths[2];
- left_widths[7] = widths[3];
- left_widths[9] = widths[4];
- left_widths[11] = widths[5];
- left_widths[13] = widths[6];
- getRSSwidths(right_odd, modules_odd_ltd[right_group], 7, widest_odd_ltd[right_group], 1);
- right_widths[0] = widths[0];
- right_widths[2] = widths[1];
- right_widths[4] = widths[2];
- right_widths[6] = widths[3];
- right_widths[8] = widths[4];
- right_widths[10] = widths[5];
- right_widths[12] = widths[6];
- getRSSwidths(right_even, modules_even_ltd[right_group], 7, widest_even_ltd[right_group], 0);
- right_widths[1] = widths[0];
- right_widths[3] = widths[1];
- right_widths[5] = widths[2];
- right_widths[7] = widths[3];
- right_widths[9] = widths[4];
- right_widths[11] = widths[5];
- right_widths[13] = widths[6];
-
- checksum = 0;
- /* Calculate the checksum */
- for(i = 0; i < 14; i++) {
- checksum += checksum_weight_ltd[i] * left_widths[i];
- checksum += checksum_weight_ltd[i + 14] * right_widths[i];
- }
- checksum %= 89;
-
- for(i = 0; i < 14; i++) {
- check_elements[i] = finder_pattern_ltd[i + (checksum * 14)];
- }
-
- total_widths[0] = 1;
- total_widths[1] = 1;
- total_widths[44] = 1;
- total_widths[45] = 1;
- for(i = 0; i < 14; i++) {
- total_widths[i + 2] = left_widths[i];
- total_widths[i + 16] = check_elements[i];
- total_widths[i + 30] = right_widths[i];
- }
-
- writer = 0;
- latch = '0';
- for(i = 0; i < 46; i++) {
- for(j = 0; j < total_widths[i]; j++) {
- if(latch == '1') { set_module(symbol, symbol->rows, writer); } else { unset_module(symbol, symbol->rows, writer); }
- writer++;
- }
- latch = (latch == '1' ? '0' : '1');
- }
- if(symbol->width < writer) { symbol->width = writer; }
- symbol->rows = symbol->rows + 1;
-
- /* add separator pattern if composite symbol */
- if(symbol->symbology == BARCODE_RSS_LTD_CC) {
- for(i = 4; i < 70; i++) {
- if(!(module_is_set(symbol, separator_row + 1, i))) {
- set_module(symbol, separator_row, i);
- }
- }
- }
-
- /* Calculate check digit from Annex A and place human readable text */
-
- check_digit = 0;
- count = 0;
-
- ustrcpy(symbol->text, (unsigned char*)"(01)");
- for(i = 0; i < 14; i++) {
- hrt[i] = '0';
- }
- for(i = 0; i < src_len; i++) {
- hrt[12 - i] = source[src_len - i - 1];
- }
-
- for (i = 0; i < 13; i++) {
- count += ctoi(hrt[i]);
-
- if (!(i & 1)) {
- count += 2 * (ctoi(hrt[i]));
- }
- }
-
- check_digit = 10 - (count%10);
- if (check_digit == 10) { check_digit = 0; }
-
- hrt[13] = itoc(check_digit);
- hrt[14] = '\0';
-
- uconcat(symbol->text, (unsigned char*)hrt);
-
- return error_number;
-}
-
-int general_rules(char field[], char type[])
-{ /* Attempts to apply encoding rules from secions 7.2.5.5.1 to 7.2.5.5.3
- of ISO/IEC 24724:2006 */
- int block[2][200], block_count, i, j, k;
- char current, next, last;
-
- block_count = 0;
-
- block[0][block_count] = 1;
- block[1][block_count] = type[0];
-
- for(i = 1; i < strlen(type); i++) {
- current = type[i];
- last = type[i - 1];
-
- if(current == last) {
- block[0][block_count] = block[0][block_count] + 1;
- } else {
- block_count++;
- block[0][block_count] = 1;
- block[1][block_count] = type[i];
- }
- }
-
- block_count++;
-
- for(i = 0; i < block_count; i++) {
- }
-
- for(i = 0; i < block_count; i++) {
- current = block[1][i];
- next = (block[1][i + 1] & 0xFF);
-
- if((current == ISOIEC) && (i != (block_count - 1))) {
- if((next == ANY_ENC) && (block[0][i + 1] >= 4)) {
- block[1][i + 1] = NUMERIC;
- }
- if((next == ANY_ENC) && (block[0][i + 1] < 4)) {
- block[1][i + 1] = ISOIEC;
- }
- if((next == ALPHA_OR_ISO) && (block[0][i + 1] >= 5)) {
- block[1][i + 1] = ALPHA;
- }
- if((next == ALPHA_OR_ISO) && (block[0][i + 1] < 5)) {
- block[1][i + 1] = ISOIEC;
- }
- }
-
- if(current == ALPHA_OR_ISO) {
- block[1][i] = ALPHA;
- }
-
- if((current == ALPHA) && (i != (block_count - 1))) {
- if((next == ANY_ENC) && (block[0][i + 1] >= 6)) {
- block[1][i + 1] = NUMERIC;
- }
- if((next == ANY_ENC) && (block[0][i + 1] < 6)) {
- if((i == block_count - 2) && (block[0][i + 1] >= 4)) {
- block[1][i + 1] = NUMERIC;
- } else {
- block[1][i + 1] = ALPHA;
- }
- }
- }
-
- if(current == ANY_ENC) {
- block[1][i] = NUMERIC;
- }
- }
-
- if(block_count > 1) {
- i = 1;
- while(i < block_count) {
- if(block[1][i - 1] == block[1][i]) {
- /* bring together */
- block[0][i - 1] = block[0][i - 1] + block[0][i];
- j = i + 1;
-
- /* decreace the list */
- while(j < block_count) {
- block[0][j - 1] = block[0][j];
- block[1][j - 1] = block[1][j];
- j++;
- }
- block_count--;
- i--;
- }
- i++;
- }
- }
-
- for(i = 0; i < block_count - 1; i++) {
- if((block[1][i] == NUMERIC) && (block[0][i] & 1)) {
- /* Odd size numeric block */
- block[0][i] = block[0][i] - 1;
- block[0][i + 1] = block[0][i + 1] + 1;
- }
- }
-
- j = 0;
- for(i = 0; i < block_count; i++) {
- for(k = 0; k < block[0][i]; k++) {
- type[j] = block[1][i];
- j++;
- }
- }
-
- if((block[1][block_count - 1] == NUMERIC) && (block[0][block_count - 1] & 1)) {
- /* If the last block is numeric and an odd size, further
- processing needs to be done outside this procedure */
- return 1;
- } else {
- return 0;
- }
-}
-
-int rss_binary_string(struct zint_symbol *symbol, char source[], char binary_string[])
-{ /* Handles all data encodation from section 7.2.5 of ISO/IEC 24724 */
- int encoding_method, i, mask, j, read_posn, latch, debug = 0, last_mode = ISOIEC;
-#ifndef _MSC_VER
- char general_field[strlen(source)], general_field_type[strlen(source)];
-#else
- char* general_field = (char*)_alloca(strlen(source));
- char* general_field_type = (char*)_alloca(strlen(source));
-#endif
- int remainder, d1, d2, value;
- char padstring[40];
-
- read_posn=0;
- value=0;
-
- /* Decide whether a compressed data field is required and if so what
- method to use - method 2 = no compressed data field */
-
- if((strlen(source) >= 16) && ((source[0] == '0') && (source[1] == '1'))) {
- /* (01) and other AIs */
- encoding_method = 1;
- if(debug) printf("Choosing Method 1\n");
- } else {
- /* any AIs */
- encoding_method = 2;
- if(debug) printf("Choosing Mehod 2\n");
- }
-
- if(((strlen(source) >= 20) && (encoding_method == 1)) && ((source[2] == '9') && (source[16] == '3'))) {
- /* Possibly encoding method > 2 */
- if(debug) printf("Checking for other methods\n");
-
- if((strlen(source) >= 26) && (source[17] == '1')) {
- /* Methods 3, 7, 9, 11 and 13 */
-
- if(source[18] == '0') {
- /* (01) and (310x) */
- char weight_str[7];
- float weight; /* In kilos */
-
- for(i = 0; i < 6; i++) {
- weight_str[i] = source[20 + i];
- }
- weight_str[6] = '\0';
-
- if (weight_str[0] == '0') { /* Maximum weight = 99999 */
-
-
- encoding_method = 7;
-
- if((source[19] == '3') && (strlen(source) == 26)) {
- /* (01) and (3103) */
- weight = atof(weight_str) / 1000.0;
-
- if(weight <= 32.767) { encoding_method = 3; }
- }
-
- if(strlen(source) == 34){
- if((source[26] == '1') && (source[27] == '1')) {
- /* (01), (310x) and (11) - metric weight and production date */
- encoding_method = 7;
- }
-
- if((source[26] == '1') && (source[27] == '3')) {
- /* (01), (310x) and (13) - metric weight and packaging date */
- encoding_method = 9;
- }
-
- if((source[26] == '1') && (source[27] == '5')) {
- /* (01), (310x) and (15) - metric weight and "best before" date */
- encoding_method = 11;
- }
-
- if((source[26] == '1') && (source[27] == '7')) {
- /* (01), (310x) and (17) - metric weight and expiration date */
- encoding_method = 13;
- }
- }
- }
- }
- if(debug) printf("Now using method %d\n", encoding_method);
- }
-
- if((strlen(source) >= 26) && (source[17] == '2')) {
- /* Methods 4, 8, 10, 12 and 14 */
-
- if(source[18] == '0') {
- /* (01) and (320x) */
- char weight_str[7];
- float weight; /* In pounds */
-
- for(i = 0; i < 6; i++) {
- weight_str[i] = source[20 + i];
- }
- weight_str[6] = '\0';
-
- if (weight_str[0] == '0') { /* Maximum weight = 99999 */
-
- encoding_method = 8;
-
- if(((source[19] == '2') || (source[19] == '3')) && (strlen(source) == 26)) {
- /* (01) and (3202)/(3203) */
-
- if(source[19] == '3') {
- weight = atof(weight_str) / 1000.0;
- if(weight <= 22.767) {
- encoding_method = 4;
- }
- } else {
- weight = atof(weight_str) / 100.0;
- if(weight <= 99.99) {
- encoding_method = 4;
- }
- }
-
- }
-
- if(strlen(source) == 34){
- if((source[26] == '1') && (source[27] == '1')) {
- /* (01), (320x) and (11) - English weight and production date */
- encoding_method = 8;
- }
-
- if((source[26] == '1') && (source[27] == '3')) {
- /* (01), (320x) and (13) - English weight and packaging date */
- encoding_method = 10;
- }
-
- if((source[26] == '1') && (source[27] == '5')) {
- /* (01), (320x) and (15) - English weight and "best before" date */
- encoding_method = 12;
- }
-
- if((source[26] == '1') && (source[27] == '7')) {
- /* (01), (320x) and (17) - English weight and expiration date */
- encoding_method = 14;
- }
- }
- }
- }
- if(debug) printf("Now using method %d\n", encoding_method);
-
- }
-
- if(source[17] == '9') {
- /* Methods 5 and 6 */
- if((source[18] == '2') && ((source[19] >= '0') && (source[19] <= '3'))) {
- /* (01) and (392x) */
- encoding_method = 5;
- }
- if((source[18] == '3') && ((source[19] >= '0') && (source[19] <= '3'))) {
- /* (01) and (393x) */
- encoding_method = 6;
- }
- if(debug) printf("Now using method %d\n", encoding_method);
- }
- }
-
- switch(encoding_method) { /* Encoding method - Table 10 */
- case 1: concat(binary_string, "1XX"); read_posn = 16; break;
- case 2: concat(binary_string, "00XX"); read_posn = 0; break;
- case 3: concat(binary_string, "0100"); read_posn = strlen(source); break;
- case 4: concat(binary_string, "0101"); read_posn = strlen(source); break;
- case 5: concat(binary_string, "01100XX"); read_posn = 20; break;
- case 6: concat(binary_string, "01101XX"); read_posn = 23; break;
- case 7: concat(binary_string, "0111000"); read_posn = strlen(source); break;
- case 8: concat(binary_string, "0111001"); read_posn = strlen(source); break;
- case 9: concat(binary_string, "0111010"); read_posn = strlen(source); break;
- case 10: concat(binary_string, "0111011"); read_posn = strlen(source); break;
- case 11: concat(binary_string, "0111100"); read_posn = strlen(source); break;
- case 12: concat(binary_string, "0111101"); read_posn = strlen(source); break;
- case 13: concat(binary_string, "0111110"); read_posn = strlen(source); break;
- case 14: concat(binary_string, "0111111"); read_posn = strlen(source); break;
- }
- if(debug) printf("Setting binary = %s\n", binary_string);
-
- /* Variable length symbol bit field is just given a place holder (XX)
- for the time being */
-
- /* Verify that the data to be placed in the compressed data field is all
- numeric data before carrying out compression */
- for(i = 0; i < read_posn; i++) {
- if((source[i] < '0') || (source[i] > '9')) {
- if((source[i] != '[') && (source[i] != ']')) {
- /* Something is wrong */
- strcpy(symbol->errtxt, "Invalid characters in input data");
- return ERROR_INVALID_DATA1;
- }
- }
- }
-
- /* Now encode the compressed data field */
-
- if(debug) printf("Proceeding to encode data\n");
- if(encoding_method == 1) {
- /* Encoding method field "1" - general item identification data */
- char group[4];
- int group_val;
-
- group[0] = source[2];
- group[1] = '\0';
- group_val = atoi(group);
-
- mask = 0x08;
- for(j = 0; j < 4; j++) {
- concat(binary_string, (group_val & mask) ? "1" : "0");
- mask = mask >> 1;
- }
-
- for(i = 1; i < 5; i++) {
- group[0] = source[(i * 3)];
- group[1] = source[(i * 3) + 1];
- group[2] = source[(i * 3) + 2];
- group[3] = '\0';
- group_val = atoi(group);
-
- mask = 0x200;
- for(j = 0; j < 10; j++) {
- concat(binary_string, (group_val & mask) ? "1" : "0");
- mask = mask >> 1;
- }
- }
-
-
- }
-
-
- if(encoding_method == 3) {
- /* Encoding method field "0100" - variable weight item
- (0,001 kilogram icrements) */
- char group[4];
- int group_val;
- char weight_str[7];
-
- for(i = 1; i < 5; i++) {
- group[0] = source[(i * 3)];
- group[1] = source[(i * 3) + 1];
- group[2] = source[(i * 3) + 2];
- group[3] = '\0';
- group_val = atoi(group);
-
- mask = 0x200;
- for(j = 0; j < 10; j++) {
- concat(binary_string, (group_val & mask) ? "1" : "0");
- mask = mask >> 1;
- }
- }
-
- for(i = 0; i < 6; i++) {
- weight_str[i] = source[20 + i];
- }
- weight_str[6] = '\0';
- group_val = atoi(weight_str);
-
- mask = 0x4000;
- for(j = 0; j < 15; j++) {
- concat(binary_string, (group_val & mask) ? "1" : "0");
- mask = mask >> 1;
- }
-
-
- }
-
- if(encoding_method == 4) {
- /* Encoding method field "0101" - variable weight item (0,01 or
- 0,001 pound increment) */
- char group[4];
- int group_val;
- char weight_str[7];
-
- for(i = 1; i < 5; i++) {
- group[0] = source[(i * 3)];
- group[1] = source[(i * 3) + 1];
- group[2] = source[(i * 3) + 2];
- group[3] = '\0';
- group_val = atoi(group);
-
- mask = 0x200;
- for(j = 0; j < 10; j++) {
- concat(binary_string, (group_val & mask) ? "1" : "0");
- mask = mask >> 1;
- }
- }
-
- for(i = 0; i < 6; i++) {
- weight_str[i] = source[20 + i];
- }
- weight_str[6] = '\0';
- group_val = atoi(weight_str);
-
- if(source[19] == '3') {
- group_val = group_val + 10000;
- }
-
- mask = 0x4000;
- for(j = 0; j < 15; j++) {
- concat(binary_string, (group_val & mask) ? "1" : "0");
- mask = mask >> 1;
- }
-
- }
-
-
- if((encoding_method >= 7) && (encoding_method <= 14)) {
- /* Encoding method fields "0111000" through "0111111" - variable
- weight item plus date */
- char group[4];
- int group_val;
- char weight_str[8];
- char date_str[4];
-
- for(i = 1; i < 5; i++) {
- group[0] = source[(i * 3)];
- group[1] = source[(i * 3) + 1];
- group[2] = source[(i * 3) + 2];
- group[3] = '\0';
- group_val = atoi(group);
-
- mask = 0x200;
- for(j = 0; j < 10; j++) {
- concat(binary_string, (group_val & mask) ? "1" : "0");
- mask = mask >> 1;
- }
- }
-
- weight_str[0] = source[19];
-
- for(i = 0; i < 5; i++) {
- weight_str[i + 1] = source[21 + i];
- }
- weight_str[6] = '\0';
- group_val = atoi(weight_str);
-
- mask = 0x80000;
- for(j = 0; j < 20; j++) {
- concat(binary_string, (group_val & mask) ? "1" : "0");
- mask = mask >> 1;
- }
-
- if(strlen(source) == 34) {
- /* Date information is included */
- date_str[0] = source[28];
- date_str[1] = source[29];
- date_str[2] = '\0';
- group_val = atoi(date_str) * 384;
-
- date_str[0] = source[30];
- date_str[1] = source[31];
- group_val += (atoi(date_str) - 1) * 32;
-
- date_str[0] = source[32];
- date_str[1] = source[33];
- group_val += atoi(date_str);
- } else {
- group_val = 38400;
- }
-
- mask = 0x8000;
- for(j = 0; j < 16; j++) {
- concat(binary_string, (group_val & mask) ? "1" : "0");
- mask = mask >> 1;
- }
-
- }
-
- if(encoding_method == 5) {
- /* Encoding method field "01100" - variable measure item and price */
- char group[4];
- int group_val;
-
- for(i = 1; i < 5; i++) {
- group[0] = source[(i * 3)];
- group[1] = source[(i * 3) + 1];
- group[2] = source[(i * 3) + 2];
- group[3] = '\0';
- group_val = atoi(group);
-
- mask = 0x200;
- for(j = 0; j < 10; j++) {
- concat(binary_string, (group_val & mask) ? "1" : "0");
- mask = mask >> 1;
- }
- }
-
- switch(source[19]) {
- case '0': concat(binary_string, "00"); break;
- case '1': concat(binary_string, "01"); break;
- case '2': concat(binary_string, "10"); break;
- case '3': concat(binary_string, "11"); break;
- }
- }
-
- if(encoding_method == 6) {
- /* Encoding method "01101" - variable measure item and price with ISO 4217
- Currency Code */
-
- char group[4];
- int group_val;
- char currency_str[5];
-
- for(i = 1; i < 5; i++) {
- group[0] = source[(i * 3)];
- group[1] = source[(i * 3) + 1];
- group[2] = source[(i * 3) + 2];
- group[3] = '\0';
- group_val = atoi(group);
-
- mask = 0x200;
- for(j = 0; j < 10; j++) {
- concat(binary_string, (group_val & mask) ? "1" : "0");
- mask = mask >> 1;
- }
- }
-
- switch(source[19]) {
- case '0': concat(binary_string, "00"); break;
- case '1': concat(binary_string, "01"); break;
- case '2': concat(binary_string, "10"); break;
- case '3': concat(binary_string, "11"); break;
- }
-
- for(i = 0; i < 3; i++) {
- currency_str[i] = source[20 + i];
- }
- currency_str[3] = '\0';
- group_val = atoi(currency_str);
-
- mask = 0x200;
- for(j = 0; j < 10; j++) {
- concat(binary_string, (group_val & mask) ? "1" : "0");
- mask = mask >> 1;
- }
-
-
- }
-
- /* The compressed data field has been processed if appropriate - the
- rest of the data (if any) goes into a general-purpose data compaction field */
-
- j = 0;
- for(i = read_posn; i < strlen(source); i++) {
- general_field[j] = source[i];
- j++;
- }
- general_field[j] = '\0';
- if(debug) printf("General field data = %s\n", general_field);
-
- latch = 0;
- for(i = 0; i < strlen(general_field); i++) {
- /* Table 13 - ISO/IEC 646 encodation */
- if((general_field[i] < ' ') || (general_field[i] > 'z')) {
- general_field_type[i] = INVALID_CHAR; latch = 1;
- } else {
- general_field_type[i] = ISOIEC;
- }
-
- if(general_field[i] == '#') {
- general_field_type[i] = INVALID_CHAR; latch = 1;
- }
- if(general_field[i] == '$') {
- general_field_type[i] = INVALID_CHAR; latch = 1;
- }
- if(general_field[i] == '@') {
- general_field_type[i] = INVALID_CHAR; latch = 1;
- }
- if(general_field[i] == 92) {
- general_field_type[i] = INVALID_CHAR; latch = 1;
- }
- if(general_field[i] == '^') {
- general_field_type[i] = INVALID_CHAR; latch = 1;
- }
- if(general_field[i] == 96) {
- general_field_type[i] = INVALID_CHAR; latch = 1;
- }
-
- /* Table 12 - Alphanumeric encodation */
- if((general_field[i] >= 'A') && (general_field[i] <= 'Z')) {
- general_field_type[i] = ALPHA_OR_ISO;
- }
- if(general_field[i] == '*') {
- general_field_type[i] = ALPHA_OR_ISO;
- }
- if(general_field[i] == ',') {
- general_field_type[i] = ALPHA_OR_ISO;
- }
- if(general_field[i] == '-') {
- general_field_type[i] = ALPHA_OR_ISO;
- }
- if(general_field[i] == '.') {
- general_field_type[i] = ALPHA_OR_ISO;
- }
- if(general_field[i] == '/') {
- general_field_type[i] = ALPHA_OR_ISO;
- }
-
- /* Numeric encodation */
- if((general_field[i] >= '0') && (general_field[i] <= '9')) {
- general_field_type[i] = ANY_ENC;
- }
- if(general_field[i] == '[') {
- /* FNC1 can be encoded in any system */
- general_field_type[i] = ANY_ENC;
- }
-
- }
-
- general_field_type[strlen(general_field)] = '\0';
- if(debug) printf("General field type: %s\n", general_field_type);
-
- if(latch == 1) {
- /* Invalid characters in input data */
- strcpy(symbol->errtxt, "Invalid characters in input data");
- return ERROR_INVALID_DATA1;
- }
-
- for(i = 0; i < strlen(general_field); i++) {
- if((general_field_type[i] == ISOIEC) && (general_field[i + 1] == '[')) {
- general_field_type[i + 1] = ISOIEC;
- }
- }
-
- for(i = 0; i < strlen(general_field); i++) {
- if((general_field_type[i] == ALPHA_OR_ISO) && (general_field[i + 1] == '[')) {
- general_field_type[i + 1] = ALPHA_OR_ISO;
- }
- }
-
- latch = general_rules(general_field, general_field_type);
- if(debug) printf("General field type: %s\n", general_field_type);
-
- last_mode = NUMERIC;
-
- /* Set initial mode if not NUMERIC */
- if(general_field_type[0] == ALPHA) {
- concat(binary_string, "0000"); /* Alphanumeric latch */
- last_mode = ALPHA;
- }
- if(general_field_type[0] == ISOIEC) {
- concat(binary_string, "0000"); /* Alphanumeric latch */
- concat(binary_string, "00100"); /* ISO/IEC 646 latch */
- last_mode = ISOIEC;
- }
-
- i = 0;
- do {
- if(debug) printf("Processing character %d ", i);
- switch(general_field_type[i]) {
- case NUMERIC:
- if(debug) printf("as NUMERIC:");
-
- if(last_mode != NUMERIC) {
- concat(binary_string, "000"); /* Numeric latch */
- if(debug) printf("\n");
- }
-
- if(debug) printf(" %c%c > ", general_field[i], general_field[i + 1]);
- if(general_field[i] != '[') {
- d1 = ctoi(general_field[i]);
- } else {
- d1 = 10;
- }
-
- if(general_field[i + 1] != '[') {
- d2 = ctoi(general_field[i + 1]);
- } else {
- d2 = 10;
- }
-
- value = (11 * d1) + d2 + 8;
-
- mask = 0x40;
- for(j = 0; j < 7; j++) {
- concat(binary_string, (value & mask) ? "1" : "0");
- if (debug) {
- printf("%d", !!(value & mask));
- }
- mask = mask >> 1;
- }
-
- i += 2;
- if(debug) printf("\n");
- last_mode = NUMERIC;
- break;
-
- case ALPHA:
- if(debug) printf("as ALPHA\n");
- if(i != 0) {
- if(last_mode == NUMERIC) {
- concat(binary_string, "0000"); /* Alphanumeric latch */
- }
- if(last_mode == ISOIEC) {
- concat(binary_string, "00100"); /* Alphanumeric latch */
- }
- }
-
- if((general_field[i] >= '0') && (general_field[i] <= '9')) {
-
- value = general_field[i] - 43;
-
- mask = 0x10;
- for(j = 0; j < 5; j++) {
- concat(binary_string, (value & mask) ? "1" : "0");
- mask = mask >> 1;
- }
- }
-
- if((general_field[i] >= 'A') && (general_field[i] <= 'Z')) {
-
- value = general_field[i] - 33;
-
- mask = 0x20;
- for(j = 0; j < 6; j++) {
- concat(binary_string, (value & mask) ? "1" : "0");
- mask = mask >> 1;
- }
- }
-
- last_mode = ALPHA;
- if(general_field[i] == '[') { concat(binary_string, "01111"); last_mode = NUMERIC; } /* FNC1/Numeric latch */
- if(general_field[i] == '*') concat(binary_string, "111010"); /* asterisk */
- if(general_field[i] == ',') concat(binary_string, "111011"); /* comma */
- if(general_field[i] == '-') concat(binary_string, "111100"); /* minus or hyphen */
- if(general_field[i] == '.') concat(binary_string, "111101"); /* period or full stop */
- if(general_field[i] == '/') concat(binary_string, "111110"); /* slash or solidus */
-
- i++;
- break;
-
- case ISOIEC:
- if(debug) printf("as ISOIEC\n");
- if(i != 0) {
- if(last_mode == NUMERIC) {
- concat(binary_string, "0000"); /* Alphanumeric latch */
- concat(binary_string, "00100"); /* ISO/IEC 646 latch */
- }
- if(last_mode == ALPHA) {
- concat(binary_string, "00100"); /* ISO/IEC 646 latch */
- }
- }
-
- if((general_field[i] >= '0') && (general_field[i] <= '9')) {
-
- value = general_field[i] - 43;
-
- mask = 0x10;
- for(j = 0; j < 5; j++) {
- concat(binary_string, (value & mask) ? "1" : "0");
- mask = mask >> 1;
- }
- }
-
- if((general_field[i] >= 'A') && (general_field[i] <= 'Z')) {
-
- value = general_field[i] - 1;
-
- mask = 0x40;
- for(j = 0; j < 7; j++) {
- concat(binary_string, (value & mask) ? "1" : "0");
- mask = mask >> 1;
- }
- }
-
- if((general_field[i] >= 'a') && (general_field[i] <= 'z')) {
-
- value = general_field[i] - 7;
-
- mask = 0x40;
- for(j = 0; j < 7; j++) {
- concat(binary_string, (value & mask) ? "1" : "0");
- mask = mask >> 1;
- }
- }
-
- last_mode = ISOIEC;
- if(general_field[i] == '[') { concat(binary_string, "01111"); last_mode = NUMERIC; } /* FNC1/Numeric latch */
- if(general_field[i] == '!') concat(binary_string, "11101000"); /* exclamation mark */
- if(general_field[i] == 34) concat(binary_string, "11101001"); /* quotation mark */
- if(general_field[i] == 37) concat(binary_string, "11101010"); /* percent sign */
- if(general_field[i] == '&') concat(binary_string, "11101011"); /* ampersand */
- if(general_field[i] == 39) concat(binary_string, "11101100"); /* apostrophe */
- if(general_field[i] == '(') concat(binary_string, "11101101"); /* left parenthesis */
- if(general_field[i] == ')') concat(binary_string, "11101110"); /* right parenthesis */
- if(general_field[i] == '*') concat(binary_string, "11101111"); /* asterisk */
- if(general_field[i] == '+') concat(binary_string, "11110000"); /* plus sign */
- if(general_field[i] == ',') concat(binary_string, "11110001"); /* comma */
- if(general_field[i] == '-') concat(binary_string, "11110010"); /* minus or hyphen */
- if(general_field[i] == '.') concat(binary_string, "11110011"); /* period or full stop */
- if(general_field[i] == '/') concat(binary_string, "11110100"); /* slash or solidus */
- if(general_field[i] == ':') concat(binary_string, "11110101"); /* colon */
- if(general_field[i] == ';') concat(binary_string, "11110110"); /* semicolon */
- if(general_field[i] == '<') concat(binary_string, "11110111"); /* less-than sign */
- if(general_field[i] == '=') concat(binary_string, "11111000"); /* equals sign */
- if(general_field[i] == '>') concat(binary_string, "11111001"); /* greater-than sign */
- if(general_field[i] == '?') concat(binary_string, "11111010"); /* question mark */
- if(general_field[i] == '_') concat(binary_string, "11111011"); /* underline or low line */
- if(general_field[i] == ' ') concat(binary_string, "11111100"); /* space */
-
- i++;
- break;
- }
- } while (i + latch < strlen(general_field));
- if(debug) printf("Resultant binary = %s\n", binary_string);
- if(debug) printf("\tLength: %d\n", (int)strlen(binary_string));
-
- remainder = 12 - (strlen(binary_string) % 12);
- if(remainder == 12) { remainder = 0; }
- if(strlen(binary_string) < 36) { remainder = 36 - strlen(binary_string); }
-
- if(latch == 1) {
- /* There is still one more numeric digit to encode */
- if(debug) printf("Adding extra (odd) numeric digit\n");
-
- if(last_mode == NUMERIC) {
- if((remainder >= 4) && (remainder <= 6)) {
- value = ctoi(general_field[i]);
- value++;
-
- mask = 0x08;
- for(j = 0; j < 4; j++) {
- concat(binary_string, (value & mask) ? "1" : "0");
- mask = mask >> 1;
- }
- } else {
- d1 = ctoi(general_field[i]);
- d2 = 10;
-
- value = (11 * d1) + d2 + 8;
-
- mask = 0x40;
- for(j = 0; j < 7; j++) {
- concat(binary_string, (value & mask) ? "1" : "0");
- mask = mask >> 1;
- }
- }
- } else {
- value = general_field[i] - 43;
-
- mask = 0x10;
- for(j = 0; j < 5; j++) {
- concat(binary_string, (value & mask) ? "1" : "0");
- mask = mask >> 1;
- }
- }
-
- remainder = 12 - (strlen(binary_string) % 12);
- if(remainder == 12) { remainder = 0; }
- if(strlen(binary_string) < 36) { remainder = 36 - strlen(binary_string); }
- if(debug) printf("Resultant binary = %s\n", binary_string);
- if(debug) printf("\tLength: %d\n", (int)strlen(binary_string));
- }
-
- if(strlen(binary_string) > 252) {
- strcpy(symbol->errtxt, "Input too long");
- return ERROR_TOO_LONG;
- }
-
- /* Now add padding to binary string (7.2.5.5.4) */
- i = remainder;
- if((strlen(general_field) != 0) && (last_mode == NUMERIC)) {
- strcpy(padstring, "0000");
- i -= 4;
- } else {
- strcpy(padstring, "");
- }
- for(;i > 0;i -= 5) {
- concat(padstring, "00100");
- }
-
- padstring[remainder] = '\0';
- concat(binary_string, padstring);
-
- /* Patch variable length symbol bit field */
- d1 = ((strlen(binary_string) / 12) + 1) & 1;
- if(strlen(binary_string) <= 156) { d2 = 0; } else { d2 = 1; }
-
- if(encoding_method == 1) {
- binary_string[2] = d1 ? '1' : '0';
- binary_string[3] = d2 ? '1' : '0';
- }
- if(encoding_method == 2) {
- binary_string[3] = d1 ? '1' : '0';
- binary_string[4] = d2 ? '1' : '0';
- }
- if((encoding_method == 5) || (encoding_method == 6)) {
- binary_string[6] = d1 ? '1' : '0';
- binary_string[7] = d2 ? '1' : '0';
- }
- if(debug) printf("Resultant binary = %s\n", binary_string);
- if(debug) printf("\tLength: %d\n", (int)strlen(binary_string));
- return 0;
-}
-
-int rssexpanded(struct zint_symbol *symbol, unsigned char source[], int src_len)
-{ /* GS1 DataBar Expanded */
- int i, j, k, l, data_chars, vs[21], group[21], v_odd[21], v_even[21];
- char substring[21][14], latch;
- int char_widths[21][8], checksum, check_widths[8], c_group;
- int check_char, c_odd, c_even, elements[235], pattern_width, reader, writer;
- int row, elements_in_sub, special_case_row, left_to_right;
- int codeblocks, sub_elements[235], stack_rows, current_row, current_block;
- int separator_row;
-#ifndef _MSC_VER
- char reduced[src_len], binary_string[7 * src_len];
-#else
- char* reduced = (char*)_alloca(src_len);
- char* binary_string = (char*)_alloca(7 * src_len);
-#endif
-
- separator_row = 0;
- reader=0;
-
- if(symbol->input_mode != GS1_MODE) {
- /* GS1 data has not been verified yet */
- i = gs1_verify(symbol, source, src_len, reduced);
- if(i != 0) { return i; }
- }
-
- if((symbol->symbology == BARCODE_RSS_EXP_CC) || (symbol->symbology == BARCODE_RSS_EXPSTACK_CC)) {
- /* make space for a composite separator pattern */
- separator_row = symbol->rows;
- symbol->row_height[separator_row] = 1;
- symbol->rows += 1;
- }
-
- strcpy(binary_string, "");
-
- if(symbol->option_1 == 2) {
- concat(binary_string, "1");
- } else {
- concat(binary_string, "0");
- }
-
- i = rss_binary_string(symbol, reduced, binary_string);
- if(i != 0) {
- return i;
- }
-
- data_chars = strlen(binary_string) / 12;
-
- for(i = 0; i < data_chars; i++) {
- for(j = 0; j < 12; j++) {
- substring[i][j] = binary_string[(i * 12) + j];
- }
- substring[i][12] = '\0';
- }
-
- for(i = 0; i < data_chars; i++) {
- vs[i] = 0;
- if(substring[i][0] == '1') { vs[i] += 2048; }
- if(substring[i][1] == '1') { vs[i] += 1024; }
- if(substring[i][2] == '1') { vs[i] += 512; }
- if(substring[i][3] == '1') { vs[i] += 256; }
- if(substring[i][4] == '1') { vs[i] += 128; }
- if(substring[i][5] == '1') { vs[i] += 64; }
- if(substring[i][6] == '1') { vs[i] += 32; }
- if(substring[i][7] == '1') { vs[i] += 16; }
- if(substring[i][8] == '1') { vs[i] += 8; }
- if(substring[i][9] == '1') { vs[i] += 4; }
- if(substring[i][10] == '1') { vs[i] += 2; }
- if(substring[i][11] == '1') { vs[i] += 1; }
- }
-
- for(i = 0; i < data_chars; i++) {
- if(vs[i] <= 347) { group[i] = 1; }
- if((vs[i] >= 348) && (vs[i] <= 1387)) { group[i] = 2; }
- if((vs[i] >= 1388) && (vs[i] <= 2947)) { group[i] = 3; }
- if((vs[i] >= 2948) && (vs[i] <= 3987)) { group[i] = 4; }
- if(vs[i] >= 3988) { group[i] = 5; }
- v_odd[i] = (vs[i] - g_sum_exp[group[i] - 1]) / t_even_exp[group[i] - 1];
- v_even[i] = (vs[i] - g_sum_exp[group[i] - 1]) % t_even_exp[group[i] - 1];
-
- getRSSwidths(v_odd[i], modules_odd_exp[group[i] - 1], 4, widest_odd_exp[group[i] - 1], 0);
- char_widths[i][0] = widths[0];
- char_widths[i][2] = widths[1];
- char_widths[i][4] = widths[2];
- char_widths[i][6] = widths[3];
- getRSSwidths(v_even[i], modules_even_exp[group[i] - 1], 4, widest_even_exp[group[i] - 1], 1);
- char_widths[i][1] = widths[0];
- char_widths[i][3] = widths[1];
- char_widths[i][5] = widths[2];
- char_widths[i][7] = widths[3];
- }
-
- /* 7.2.6 Check character */
- /* The checksum value is equal to the mod 211 residue of the weighted sum of the widths of the
- elements in the data characters. */
- checksum = 0;
- for(i = 0; i < data_chars; i++) {
- row = weight_rows[(((data_chars - 2) / 2) * 21) + i];
- for(j = 0; j < 8; j++) {
- checksum += (char_widths[i][j] * checksum_weight_exp[(row * 8) + j]);
-
- }
- }
-
- check_char = (211 * ((data_chars + 1) - 4)) + (checksum % 211);
-
- if(check_char <= 347) { c_group = 1; }
- if((check_char >= 348) && (check_char <= 1387)) { c_group = 2; }
- if((check_char >= 1388) && (check_char <= 2947)) { c_group = 3; }
- if((check_char >= 2948) && (check_char <= 3987)) { c_group = 4; }
- if(check_char >= 3988) { c_group = 5; }
-
- c_odd = (check_char - g_sum_exp[c_group - 1]) / t_even_exp[c_group - 1];
- c_even = (check_char - g_sum_exp[c_group - 1]) % t_even_exp[c_group - 1];
-
- getRSSwidths(c_odd, modules_odd_exp[c_group - 1], 4, widest_odd_exp[c_group - 1], 0);
- check_widths[0] = widths[0];
- check_widths[2] = widths[1];
- check_widths[4] = widths[2];
- check_widths[6] = widths[3];
- getRSSwidths(c_even, modules_even_exp[c_group - 1], 4, widest_even_exp[c_group - 1], 1);
- check_widths[1] = widths[0];
- check_widths[3] = widths[1];
- check_widths[5] = widths[2];
- check_widths[7] = widths[3];
-
- /* Initialise element array */
- pattern_width = ((((data_chars + 1) / 2) + ((data_chars + 1) & 1)) * 5) + ((data_chars + 1) * 8) + 4;
- for(i = 0; i < pattern_width; i++) {
- elements[i] = 0;
- }
-
- elements[0] = 1;
- elements[1] = 1;
- elements[pattern_width - 2] = 1;
- elements[pattern_width - 1] = 1;
-
- /* Put finder patterns in element array */
- for(i = 0; i < (((data_chars + 1) / 2) + ((data_chars + 1) & 1)); i++) {
- k = ((((((data_chars + 1) - 2) / 2) + ((data_chars + 1) & 1)) - 1) * 11) + i;
- for(j = 0; j < 5; j++) {
- elements[(21 * i) + j + 10] = finder_pattern_exp[((finder_sequence[k] - 1) * 5) + j];
- }
- }
-
- /* Put check character in element array */
- for(i = 0; i < 8; i++) {
- elements[i + 2] = check_widths[i];
- }
-
- /* Put forward reading data characters in element array */
- for(i = 1; i < data_chars; i += 2) {
- for(j = 0; j < 8; j++) {
- elements[(((i - 1) / 2) * 21) + 23 + j] = char_widths[i][j];
- }
- }
-
- /* Put reversed data characters in element array */
- for(i = 0; i < data_chars; i += 2) {
- for(j = 0; j < 8; j++) {
- elements[((i / 2) * 21) + 15 + j] = char_widths[i][7 - j];
- }
- }
-
- if((symbol->symbology == BARCODE_RSS_EXP) || (symbol->symbology == BARCODE_RSS_EXP_CC)) {
- /* Copy elements into symbol */
- writer = 0;
- latch = '0';
- for(i = 0; i < pattern_width; i++) {
- for(j = 0; j < elements[i]; j++) {
- if(latch == '1') { set_module(symbol, symbol->rows, writer); } else { unset_module(symbol, symbol->rows, writer); }
- writer++;
- }
- if(latch == '1') {
- latch = '0';
- } else {
- latch = '1';
- }
- }
- if(symbol->width < writer) { symbol->width = writer; }
- symbol->rows = symbol->rows + 1;
- if(symbol->symbology == BARCODE_RSS_EXP_CC) {
- for(j = 4; j < (symbol->width - 4); j++) {
- if(module_is_set(symbol, separator_row + 1, j)) {
- unset_module(symbol, separator_row, j);
- } else {
- set_module(symbol, separator_row, j);
- }
- }
- /* finder bar adjustment */
- for(j = 0; j < (writer / 49); j++) {
- k = (49 * j) + 18;
- for(i = 0; i < 15; i++) {
- if((!(module_is_set(symbol, separator_row + 1, i + k - 1))) &&
- (!(module_is_set(symbol, separator_row + 1, i + k))) &&
- module_is_set(symbol, separator_row, i + k - 1)) {
- unset_module(symbol, separator_row, i + k);
- }
- }
- }
- }
-
- /* Add human readable text */
- for(i = 0; i <= src_len; i++) {
- if((source[i] != '[') && (source[i] != ']')) {
- symbol->text[i] = source[i];
- } else {
- if(source[i] == '[') {
- symbol->text[i] = '(';
- }
- if(source[i] == ']') {
- symbol->text[i] = ')';
- }
- }
- }
-
- } else {
- /* RSS Expanded Stacked */
-
- codeblocks = (data_chars + 1) / 2;
-
- if((symbol->option_2 < 1) || (symbol->option_2 > 10)) {
- symbol->option_2 = 2;
- }
- if((symbol->option_1 == 2) && (symbol->option_2 == 1)) {
- /* "There shall be a minimum of four symbol characters in the
- first row of an RSS Expanded Stacked symbol when it is the linear
- component of an EAN.UCC Composite symbol." */
- symbol->option_2 = 2;
- }
-
- stack_rows = codeblocks / symbol->option_2;
- if(codeblocks % symbol->option_2 > 0) {
- stack_rows++;
- }
-
- current_block = 0;
- for(current_row = 1; current_row <= stack_rows; current_row++) {
- for(i = 0; i < 235; i++) {
- sub_elements[i] = 0;
- }
- special_case_row = 0;
-
- /* Row Start */
- sub_elements[0] = 1;
- sub_elements[1] = 1;
- elements_in_sub = 2;
-
- /* Row Data */
- reader = 0;
- do {
- if(((symbol->option_2 & 1) || (current_row & 1)) ||
- ((current_row == stack_rows) && (codeblocks != (current_row * symbol->option_2)) &&
- (((current_row * symbol->option_2) - codeblocks) & 1))) {
- /* left to right */
- left_to_right = 1;
- i = 2 + (current_block * 21);
- for(j = 0; j < 21; j++) {
- sub_elements[j + (reader * 21) + 2] = elements[i + j];
- elements_in_sub++;
- }
- } else {
- /* right to left */
- left_to_right = 0;
- if((current_row * symbol->option_2) < codeblocks) {
- /* a full row */
- i = 2 + (((current_row * symbol->option_2) - reader - 1) * 21);
- for(j = 0; j < 21; j++) {
- sub_elements[(20 - j) + (reader * 21) + 2] = elements[i + j];
- elements_in_sub++;
- }
- } else {
- /* a partial row */
- k = ((current_row * symbol->option_2) - codeblocks);
- l = (current_row * symbol->option_2) - reader - 1;
- i = 2 + ((l - k) * 21);
- for(j = 0; j < 21; j++) {
- sub_elements[(20 - j) + (reader * 21) + 2] = elements[i + j];
- elements_in_sub++;
- }
- }
- }
- reader++;
- current_block++;
- } while ((reader < symbol->option_2) && (current_block < codeblocks));
-
- /* Row Stop */
- sub_elements[elements_in_sub] = 1;
- sub_elements[elements_in_sub + 1] = 1;
- elements_in_sub += 2;
-
- latch = current_row & 1 ? '0' : '1';
-
- if ((current_row == stack_rows) && (codeblocks != (current_row * symbol->option_2)) &&
- (((current_row * symbol->option_2) - codeblocks) & 1) ) {
- /* Special case bottom row */
- special_case_row = 1;
- sub_elements[0] = 2;
- latch = '0';
- }
-
- writer = 0;
- for(i = 0; i < elements_in_sub; i++) {
- for(j = 0; j < sub_elements[i]; j++) {
- if(latch == '1') { set_module(symbol, symbol->rows, writer); } else { unset_module(symbol, symbol->rows, writer); }
- writer++;
- }
- if(latch == '1') {
- latch = '0';
- } else {
- latch = '1';
- }
- }
- if(symbol->width < writer) { symbol->width = writer; }
-
- if(current_row != 1) {
- /* middle separator pattern (above current row) */
- for(j = 5; j < (49 * symbol->option_2); j += 2) {
- set_module(symbol, symbol->rows - 2, j);
- }
- symbol->row_height[symbol->rows - 2] = 1;
- /* bottom separator pattern (above current row) */
- for(j = 4; j < (writer - 4); j++) {
- if(module_is_set(symbol, symbol->rows, j)) {
- unset_module(symbol, symbol->rows - 1, j);
- } else {
- set_module(symbol, symbol->rows - 1, j);
- }
- }
- symbol->row_height[symbol->rows - 1] = 1;
- /* finder bar adjustment */
- for(j = 0; j < reader; j++) {
- k = (49 * j) + (special_case_row ? 19 : 18);
- if(left_to_right) {
- for(i = 0; i < 15; i++) {
- if((!(module_is_set(symbol, symbol->rows, i + k - 1))) &&
- (!(module_is_set(symbol, symbol->rows, i + k))) &&
- module_is_set(symbol, symbol->rows - 1, i + k - 1)) {
- unset_module(symbol, symbol->rows - 1, i + k);
- }
- }
- } else {
- for(i = 14; i >= 0; i--) {
- if((!(module_is_set(symbol, symbol->rows, i + k + 1))) &&
- (!(module_is_set(symbol, symbol->rows, i + k))) &&
- module_is_set(symbol, symbol->rows - 1, i + k + 1)) {
- unset_module(symbol, symbol->rows - 1, i + k);
- }
- }
- }
- }
- }
-
- if(current_row != stack_rows) {
- /* top separator pattern (below current row) */
- for(j = 4; j < (writer - 4); j++) {
- if(module_is_set(symbol, symbol->rows, j)) {
- unset_module(symbol, symbol->rows + 1, j);
- } else {
- set_module(symbol, symbol->rows + 1, j);
- }
- }
- symbol->row_height[symbol->rows + 1] = 1;
- /* finder bar adjustment */
- for(j = 0; j < reader; j++) {
- k = (49 * j) + 18;
- if(left_to_right) {
- for(i = 0; i < 15; i++) {
- if((!(module_is_set(symbol, symbol->rows, i + k - 1))) &&
- (!(module_is_set(symbol, symbol->rows, i + k))) &&
- module_is_set(symbol, symbol->rows + 1, i + k - 1)) {
- unset_module(symbol, symbol->rows + 1, i + k);
- }
- }
- } else{
- for(i = 14; i >= 0; i--) {
- if((!(module_is_set(symbol, symbol->rows, i + k + 1))) &&
- (!(module_is_set(symbol, symbol->rows, i + k))) &&
- module_is_set(symbol, symbol->rows + 1, i + k + 1)) {
- unset_module(symbol, symbol->rows + 1, i + k);
- }
- }
- }
- }
- }
-
- symbol->rows = symbol->rows + 4;
- }
- symbol->rows = symbol->rows - 3;
- if(symbol->symbology == BARCODE_RSS_EXPSTACK_CC) {
- for(j = 4; j < (symbol->width - 4); j++) {
- if(module_is_set(symbol, separator_row + 1, j)) {
- unset_module(symbol, separator_row, j);
- } else {
- set_module(symbol, separator_row, j);
- }
- }
- /* finder bar adjustment */
- for(j = 0; j < reader; j++) {
- k = (49 * j) + 18;
- for(i = 0; i < 15; i++) {
- if((!(module_is_set(symbol, separator_row + 1, i + k - 1))) &&
- (!(module_is_set(symbol, separator_row + 1, i + k))) &&
- module_is_set(symbol, separator_row, i + k - 1)) {
- unset_module(symbol, separator_row, i + k);
- }
- }
- }
- }
-
- }
-
- return 0;
-}
diff --git a/3rdparty/zint-2.4.4/backend/rss.h b/3rdparty/zint-2.4.4/backend/rss.h
deleted file mode 100644
index f1463a9..0000000
--- a/3rdparty/zint-2.4.4/backend/rss.h
+++ /dev/null
@@ -1,225 +0,0 @@
-/* rss.h - Data tables for Reduced Space Symbology */
-
-/*
- libzint - the open source barcode library
- Copyright (C) 2007 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-#define NUMERIC 110
-#define ALPHA 97
-#define ISOIEC 105
-#define INVALID_CHAR 100
-#define ANY_ENC 120
-#define ALPHA_OR_ISO 121
-
-/* RSS-14 Tables */
-static int g_sum_table[9] = { 0, 161, 961, 2015, 2715, 0, 336, 1036, 1516};
-static int t_table[9] = { 1, 10, 34, 70, 126, 4, 20, 48, 81};
-static int modules_odd[9] = { 12, 10, 8, 6, 4, 5, 7, 9, 11 };
-static int modules_even[9] = { 4, 6, 8, 10, 12, 10, 8, 6, 4 };
-static int widest_odd[9] = { 8, 6, 4, 3, 1, 2, 4, 6, 8 };
-static int widest_even[9] = { 1, 3, 5, 6, 8, 7, 5, 3, 1 };
-static int widths[8];
-static int finder_pattern[45] = {
- 3, 8, 2, 1, 1,
- 3, 5, 5, 1, 1,
- 3, 3, 7, 1, 1,
- 3, 1, 9, 1, 1,
- 2, 7, 4, 1, 1,
- 2, 5, 6, 1, 1,
- 2, 3, 8, 1, 1,
- 1, 5, 7, 1, 1,
- 1, 3, 9, 1, 1
-};
-static int checksum_weight[32] = { /* Table 5 */
- 1, 3, 9, 27, 2, 6, 18, 54,
- 4, 12, 36, 29, 8, 24, 72, 58,
- 16, 48, 65, 37, 32, 17, 51, 74,
- 64, 34, 23, 69, 49, 68, 46, 59
-};
-
-/* RSS Limited Tables */
-static int t_even_ltd[7] = { 28, 728, 6454, 203, 2408, 1, 16632 };
-static int modules_odd_ltd[7] = { 17, 13, 9, 15, 11, 19, 7 };
-static int modules_even_ltd[7] = { 9, 13, 17, 11, 15, 7, 19 };
-static int widest_odd_ltd[7] = { 6, 5, 3, 5, 4, 8, 1 };
-static int widest_even_ltd[7] = { 3, 4, 6, 4, 5, 1, 8 };
-static int checksum_weight_ltd[28] = { /* Table 7 */
- 1, 3, 9, 27, 81, 65, 17, 51, 64, 14, 42, 37, 22, 66,
- 20, 60, 2, 6, 18, 54, 73, 41, 34, 13, 39, 28, 84, 74
-};
-static int finder_pattern_ltd[1232] = {
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 2, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 2, 1, 2, 3, 1, 1, 1,
- 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1,
- 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 3, 2, 1, 1,
- 1, 1, 1, 1, 1, 2, 1, 1, 1, 2, 3, 1, 1, 1,
- 1, 1, 1, 1, 1, 2, 1, 2, 1, 1, 3, 1, 1, 1,
- 1, 1, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1,
- 1, 1, 1, 2, 1, 1, 1, 1, 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, 1, 1, 1, 2, 2, 2, 1, 1,
- 2, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1,
- 2, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 2, 1, 1,
- 2, 1, 1, 1, 1, 1, 1, 2, 1, 2, 2, 1, 1, 1,
- 2, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 1, 1, 1,
- 2, 1, 1, 1, 1, 2, 1, 1, 1, 2, 2, 1, 1, 1,
- 2, 1, 1, 1, 1, 2, 1, 2, 1, 1, 2, 1, 1, 1,
- 2, 1, 1, 2, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1
-};
-
-/* RSS Expanded Tables */
-static int g_sum_exp[5] = { 0, 348, 1388, 2948, 3988 };
-static int t_even_exp[5] = { 4, 20, 52, 104, 204 };
-static int modules_odd_exp[5] = { 12, 10, 8, 6, 4 };
-static int modules_even_exp[5] = { 5, 7, 9, 11, 13 };
-static int widest_odd_exp[5] = { 7, 5, 4, 3, 1 };
-static int widest_even_exp[5] = { 2, 4, 5, 6, 8 };
-static int checksum_weight_exp[184] = { /* Table 14 */
- 1, 3, 9, 27, 81, 32, 96, 77,
- 20, 60, 180, 118, 143, 7, 21, 63,
- 189, 145, 13, 39, 117, 140, 209, 205,
- 193, 157, 49, 147, 19, 57, 171, 91,
- 62, 186, 136, 197, 169, 85, 44, 132,
- 185, 133, 188, 142, 4, 12, 36, 108,
- 113, 128, 173, 97, 80, 29, 87, 50,
- 150, 28, 84, 41, 123, 158, 52, 156,
- 46, 138, 203, 187, 139, 206, 196, 166,
- 76, 17, 51, 153, 37, 111, 122, 155,
- 43, 129, 176, 106, 107, 110, 119, 146,
- 16, 48, 144, 10, 30, 90, 59, 177,
- 109, 116, 137, 200, 178, 112, 125, 164,
- 70, 210, 208, 202, 184, 130, 179, 115,
- 134, 191, 151, 31, 93, 68, 204, 190,
- 148, 22, 66, 198, 172, 94, 71, 2,
- 6, 18, 54, 162, 64, 192, 154, 40,
- 120, 149, 25, 75, 14, 42, 126, 167,
- 79, 26, 78, 23, 69, 207, 199, 175,
- 103, 98, 83, 38, 114, 131, 182, 124,
- 161, 61, 183, 127, 170, 88, 53, 159,
- 55, 165, 73, 8, 24, 72, 5, 15,
- 45, 135, 194, 160, 58, 174, 100, 89
-};
-static int finder_pattern_exp[60] = { /* Table 15 */
- 1, 8, 4, 1, 1,
- 1, 1, 4, 8, 1,
- 3, 6, 4, 1, 1,
- 1, 1, 4, 6, 3,
- 3, 4, 6, 1, 1,
- 1, 1, 6, 4, 3,
- 3, 2, 8, 1, 1,
- 1, 1, 8, 2, 3,
- 2, 6, 5, 1, 1,
- 1, 1, 5, 6, 2,
- 2, 2, 9, 1, 1,
- 1, 1, 9, 2, 2
-};
-static int finder_sequence[198] = { /* Table 16 */
- 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 4, 3, 0, 0, 0, 0, 0, 0, 0, 0,
- 1, 6, 3, 8, 0, 0, 0, 0, 0, 0, 0,
- 1, 10, 3, 8, 5, 0, 0, 0, 0, 0, 0,
- 1, 10, 3, 8, 7, 12, 0, 0, 0, 0, 0,
- 1, 10, 3, 8, 9, 12, 11, 0, 0, 0, 0,
- 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0,
- 1, 2, 3, 4, 5, 6, 7, 10, 9, 0, 0,
- 1, 2, 3, 4, 5, 6, 7, 10, 11, 12, 0,
- 1, 2, 3, 4, 5, 8, 7, 10, 9, 12, 11
-};
-static int weight_rows[210] = {
- 0, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 5, 6, 3, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 9, 10, 3, 4, 13, 14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 17, 18, 3, 4, 13, 14, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 17, 18, 3, 4, 13, 14, 11, 12, 21, 22, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 17, 18, 3, 4, 13, 14, 15, 16, 21, 22, 19, 20, 0, 0, 0, 0, 0, 0, 0, 0,
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 0, 0, 0, 0, 0, 0,
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 17, 18, 15, 16, 0, 0, 0, 0,
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 17, 18, 19, 20, 21, 22, 0, 0,
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 13, 14, 11, 12, 17, 18, 15, 16, 21, 22, 19, 20
-};
diff --git a/3rdparty/zint-2.4.4/backend/sjis.h b/3rdparty/zint-2.4.4/backend/sjis.h
deleted file mode 100644
index a75d80b..0000000
--- a/3rdparty/zint-2.4.4/backend/sjis.h
+++ /dev/null
@@ -1,6875 +0,0 @@
-/* sjis.h - Unicode to Shift JIS lookup table
-
- libzint - the open source barcode library
- Copyright (C) 2009 Robin Stuart
-
- 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, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-*/
-
-/* Derived from :
-## Shift_JIS (JIS X 0208:1997 Appendix 1) vs Unicode mapping table
-##
-## Date: 06 Mar 2002 06:01:22 GMT
-## License:
-## Copyright (C) 2001 earthian@tama.or.jp, All Rights Reserved.
-## Copyright (C) 2001 I'O, All Rights Reserved.
-## You can use, modify, distribute this table freely.
-*/
-
-unsigned long int sjis_lookup[] = {
- 0x005C,0x815F, // REVERSE SOLIDUS
- 0x00A2,0x8191, // CENT SIGN
- 0x00A3,0x8192, // POUND SIGN
- 0x00A7,0x8198, // SECTION SIGN
- 0x00A8,0x814E, // DIAERESIS
- 0x00AC,0x81CA, // NOT SIGN
- 0x00B0,0x818B, // DEGREE SIGN
- 0x00B1,0x817D, // PLUS-MINUS SIGN
- 0x00B4,0x814C, // ACUTE ACCENT
- 0x00B6,0x81F7, // PILCROW SIGN
- 0x00D7,0x817E, // MULTIPLICATION SIGN
- 0x00F7,0x8180, // DIVISION SIGN
- 0x0391,0x839F, // GREEK CAPITAL LETTER ALPHA
- 0x0392,0x83A0, // GREEK CAPITAL LETTER BETA
- 0x0393,0x83A1, // GREEK CAPITAL LETTER GAMMA
- 0x0394,0x83A2, // GREEK CAPITAL LETTER DELTA
- 0x0395,0x83A3, // GREEK CAPITAL LETTER EPSILON
- 0x0396,0x83A4, // GREEK CAPITAL LETTER ZETA
- 0x0397,0x83A5, // GREEK CAPITAL LETTER ETA
- 0x0398,0x83A6, // GREEK CAPITAL LETTER THETA
- 0x0399,0x83A7, // GREEK CAPITAL LETTER IOTA
- 0x039A,0x83A8, // GREEK CAPITAL LETTER KAPPA
- 0x039B,0x83A9, // GREEK CAPITAL LETTER LAMDA
- 0x039C,0x83AA, // GREEK CAPITAL LETTER MU
- 0x039D,0x83AB, // GREEK CAPITAL LETTER NU
- 0x039E,0x83AC, // GREEK CAPITAL LETTER XI
- 0x039F,0x83AD, // GREEK CAPITAL LETTER OMICRON
- 0x03A0,0x83AE, // GREEK CAPITAL LETTER PI
- 0x03A1,0x83AF, // GREEK CAPITAL LETTER RHO
- 0x03A3,0x83B0, // GREEK CAPITAL LETTER SIGMA
- 0x03A4,0x83B1, // GREEK CAPITAL LETTER TAU
- 0x03A5,0x83B2, // GREEK CAPITAL LETTER UPSILON
- 0x03A6,0x83B3, // GREEK CAPITAL LETTER PHI
- 0x03A7,0x83B4, // GREEK CAPITAL LETTER CHI
- 0x03A8,0x83B5, // GREEK CAPITAL LETTER PSI
- 0x03A9,0x83B6, // GREEK CAPITAL LETTER OMEGA
- 0x03B1,0x83BF, // GREEK SMALL LETTER ALPHA
- 0x03B2,0x83C0, // GREEK SMALL LETTER BETA
- 0x03B3,0x83C1, // GREEK SMALL LETTER GAMMA
- 0x03B4,0x83C2, // GREEK SMALL LETTER DELTA
- 0x03B5,0x83C3, // GREEK SMALL LETTER EPSILON
- 0x03B6,0x83C4, // GREEK SMALL LETTER ZETA
- 0x03B7,0x83C5, // GREEK SMALL LETTER ETA
- 0x03B8,0x83C6, // GREEK SMALL LETTER THETA
- 0x03B9,0x83C7, // GREEK SMALL LETTER IOTA
- 0x03BA,0x83C8, // GREEK SMALL LETTER KAPPA
- 0x03BB,0x83C9, // GREEK SMALL LETTER LAMDA
- 0x03BC,0x83CA, // GREEK SMALL LETTER MU
- 0x03BD,0x83CB, // GREEK SMALL LETTER NU
- 0x03BE,0x83CC, // GREEK SMALL LETTER XI
- 0x03BF,0x83CD, // GREEK SMALL LETTER OMICRON
- 0x03C0,0x83CE, // GREEK SMALL LETTER PI
- 0x03C1,0x83CF, // GREEK SMALL LETTER RHO
- 0x03C3,0x83D0, // GREEK SMALL LETTER SIGMA
- 0x03C4,0x83D1, // GREEK SMALL LETTER TAU
- 0x03C5,0x83D2, // GREEK SMALL LETTER UPSILON
- 0x03C6,0x83D3, // GREEK SMALL LETTER PHI
- 0x03C7,0x83D4, // GREEK SMALL LETTER CHI
- 0x03C8,0x83D5, // GREEK SMALL LETTER PSI
- 0x03C9,0x83D6, // GREEK SMALL LETTER OMEGA
- 0x0401,0x8446, // CYRILLIC CAPITAL LETTER IO
- 0x0410,0x8440, // CYRILLIC CAPITAL LETTER A
- 0x0411,0x8441, // CYRILLIC CAPITAL LETTER BE
- 0x0412,0x8442, // CYRILLIC CAPITAL LETTER VE
- 0x0413,0x8443, // CYRILLIC CAPITAL LETTER GHE
- 0x0414,0x8444, // CYRILLIC CAPITAL LETTER DE
- 0x0415,0x8445, // CYRILLIC CAPITAL LETTER IE
- 0x0416,0x8447, // CYRILLIC CAPITAL LETTER ZHE
- 0x0417,0x8448, // CYRILLIC CAPITAL LETTER ZE
- 0x0418,0x8449, // CYRILLIC CAPITAL LETTER I
- 0x0419,0x844A, // CYRILLIC CAPITAL LETTER SHORT I
- 0x041A,0x844B, // CYRILLIC CAPITAL LETTER KA
- 0x041B,0x844C, // CYRILLIC CAPITAL LETTER EL
- 0x041C,0x844D, // CYRILLIC CAPITAL LETTER EM
- 0x041D,0x844E, // CYRILLIC CAPITAL LETTER EN
- 0x041E,0x844F, // CYRILLIC CAPITAL LETTER O
- 0x041F,0x8450, // CYRILLIC CAPITAL LETTER PE
- 0x0420,0x8451, // CYRILLIC CAPITAL LETTER ER
- 0x0421,0x8452, // CYRILLIC CAPITAL LETTER ES
- 0x0422,0x8453, // CYRILLIC CAPITAL LETTER TE
- 0x0423,0x8454, // CYRILLIC CAPITAL LETTER U
- 0x0424,0x8455, // CYRILLIC CAPITAL LETTER EF
- 0x0425,0x8456, // CYRILLIC CAPITAL LETTER HA
- 0x0426,0x8457, // CYRILLIC CAPITAL LETTER TSE
- 0x0427,0x8458, // CYRILLIC CAPITAL LETTER CHE
- 0x0428,0x8459, // CYRILLIC CAPITAL LETTER SHA
- 0x0429,0x845A, // CYRILLIC CAPITAL LETTER SHCHA
- 0x042B,0x845C, // CYRILLIC CAPITAL LETTER YERU
- 0x042C,0x845D, // CYRILLIC CAPITAL LETTER SOFT SIGN
- 0x042D,0x845E, // CYRILLIC CAPITAL LETTER E
- 0x042E,0x845F, // CYRILLIC CAPITAL LETTER YU
- 0x042F,0x8460, // CYRILLIC CAPITAL LETTER YA
- 0x0430,0x8470, // CYRILLIC SMALL LETTER A
- 0x0431,0x8471, // CYRILLIC SMALL LETTER BE
- 0x0432,0x8472, // CYRILLIC SMALL LETTER VE
- 0x0433,0x8473, // CYRILLIC SMALL LETTER GHE
- 0x0434,0x8474, // CYRILLIC SMALL LETTER DE
- 0x0435,0x8475, // CYRILLIC SMALL LETTER IE
- 0x0436,0x8477, // CYRILLIC SMALL LETTER ZHE
- 0x0437,0x8478, // CYRILLIC SMALL LETTER ZE
- 0x0438,0x8479, // CYRILLIC SMALL LETTER I
- 0x0439,0x847A, // CYRILLIC SMALL LETTER SHORT I
- 0x043A,0x847B, // CYRILLIC SMALL LETTER KA
- 0x043B,0x847C, // CYRILLIC SMALL LETTER EL
- 0x043C,0x847D, // CYRILLIC SMALL LETTER EM
- 0x043D,0x847E, // CYRILLIC SMALL LETTER EN
- 0x043E,0x8480, // CYRILLIC SMALL LETTER O
- 0x043F,0x8481, // CYRILLIC SMALL LETTER PE
- 0x0440,0x8482, // CYRILLIC SMALL LETTER ER
- 0x0441,0x8483, // CYRILLIC SMALL LETTER ES
- 0x0442,0x8484, // CYRILLIC SMALL LETTER TE
- 0x0443,0x8485, // CYRILLIC SMALL LETTER U
- 0x0444,0x8486, // CYRILLIC SMALL LETTER EF
- 0x0445,0x8487, // CYRILLIC SMALL LETTER HA
- 0x0446,0x8488, // CYRILLIC SMALL LETTER TSE
- 0x0447,0x8489, // CYRILLIC SMALL LETTER CHE
- 0x0448,0x848A, // CYRILLIC SMALL LETTER SHA
- 0x0449,0x848B, // CYRILLIC SMALL LETTER SHCHA
- 0x044A,0x848C, // CYRILLIC SMALL LETTER HARD SIGN
- 0x044B,0x848D, // CYRILLIC SMALL LETTER YERU
- 0x044C,0x848E, // CYRILLIC SMALL LETTER SOFT SIGN
- 0x044D,0x848F, // CYRILLIC SMALL LETTER E
- 0x044E,0x8490, // CYRILLIC SMALL LETTER YU
- 0x044F,0x8491, // CYRILLIC SMALL LETTER YA
- 0x0451,0x8476, // CYRILLIC SMALL LETTER IO
- 0x2010,0x815D, // HYPHEN
- 0x2014,0x815C, // EM DASH
- 0x2016,0x8161, // DOUBLE VERTICAL LINE
- 0x2018,0x8165, // LEFT SINGLE QUOTATION MARK
- 0x2019,0x8166, // RIGHT SINGLE QUOTATION MARK
- 0x201C,0x8167, // LEFT DOUBLE QUOTATION MARK
- 0x201D,0x8168, // RIGHT DOUBLE QUOTATION MARK
- 0x2020,0x81F5, // DAGGER
- 0x2021,0x81F6, // DOUBLE DAGGER
- 0x2025,0x8164, // TWO DOT LEADER
- 0x2026,0x8163, // HORIZONTAL ELLIPSIS
- 0x2030,0x81F1, // PER MILLE SIGN
- 0x2032,0x818C, // PRIME
- 0x2033,0x818D, // DOUBLE PRIME
- 0x203B,0x81A6, // REFERENCE MARK
- 0x2103,0x818E, // DEGREE CELSIUS
- 0x212B,0x81F0, // ANGSTROM SIGN
- 0x2190,0x81A9, // LEFTWARDS ARROW
- 0x2191,0x81AA, // UPWARDS ARROW
- 0x2192,0x81A8, // RIGHTWARDS ARROW
- 0x2193,0x81AB, // DOWNWARDS ARROW
- 0x21D2,0x81CB, // RIGHTWARDS DOUBLE ARROW
- 0x21D4,0x81CC, // LEFT RIGHT DOUBLE ARROW
- 0x2200,0x81CD, // FOR ALL
- 0x2202,0x81DD, // PARTIAL DIFFERENTIAL
- 0x2203,0x81CE, // THERE EXISTS
- 0x2207,0x81DE, // NABLA
- 0x2208,0x81B8, // ELEMENT OF
- 0x220B,0x81B9, // CONTAINS AS MEMBER
- 0x2212,0x817C, // MINUS SIGN
- 0x221A,0x81E3, // SQUARE ROOT
- 0x221D,0x81E5, // PROPORTIONAL TO
- 0x221E,0x8187, // INFINITY
- 0x2220,0x81DA, // ANGLE
- 0x2227,0x81C8, // LOGICAL AND
- 0x2228,0x81C9, // LOGICAL OR
- 0x2229,0x81BF, // INTERSECTION
- 0x222A,0x81BE, // UNION
- 0x222B,0x81E7, // INTEGRAL
- 0x222C,0x81E8, // DOUBLE INTEGRAL
- 0x2234,0x8188, // THEREFORE
- 0x2235,0x81E6, // BECAUSE
- 0x223D,0x81E4, // REVERSED TILDE
- 0x2252,0x81E0, // APPROXIMATELY EQUAL TO OR THE IMAGE OF
- 0x2260,0x8182, // NOT EQUAL TO
- 0x2261,0x81DF, // IDENTICAL TO
- 0x2266,0x8185, // LESS-THAN OVER EQUAL TO
- 0x2267,0x8186, // GREATER-THAN OVER EQUAL TO
- 0x226A,0x81E1, // MUCH LESS-THAN
- 0x226B,0x81E2, // MUCH GREATER-THAN
- 0x2282,0x81BC, // SUBSET OF
- 0x2283,0x81BD, // SUPERSET OF
- 0x2286,0x81BA, // SUBSET OF OR EQUAL TO
- 0x2287,0x81BB, // SUPERSET OF OR EQUAL TO
- 0x22A5,0x81DB, // UP TACK
- 0x2312,0x81DC, // ARC
- 0x2500,0x849F, // BOX DRAWINGS LIGHT HORIZONTAL
- 0x2501,0x84AA, // BOX DRAWINGS HEAVY HORIZONTAL
- 0x2502,0x84A0, // BOX DRAWINGS LIGHT VERTICAL
- 0x2503,0x84AB, // BOX DRAWINGS HEAVY VERTICAL
- 0x250C,0x84A1, // BOX DRAWINGS LIGHT DOWN AND RIGHT
- 0x250F,0x84AC, // BOX DRAWINGS HEAVY DOWN AND RIGHT
- 0x2510,0x84A2, // BOX DRAWINGS LIGHT DOWN AND LEFT
- 0x2513,0x84AD, // BOX DRAWINGS HEAVY DOWN AND LEFT
- 0x2514,0x84A4, // BOX DRAWINGS LIGHT UP AND RIGHT
- 0x2517,0x84AF, // BOX DRAWINGS HEAVY UP AND RIGHT
- 0x2518,0x84A3, // BOX DRAWINGS LIGHT UP AND LEFT
- 0x251B,0x84AE, // BOX DRAWINGS HEAVY UP AND LEFT
- 0x251C,0x84A5, // BOX DRAWINGS LIGHT VERTICAL AND RIGHT
- 0x251D,0x84BA, // BOX DRAWINGS VERTICAL LIGHT AND RIGHT HEAVY
- 0x2520,0x84B5, // BOX DRAWINGS VERTICAL HEAVY AND RIGHT LIGHT
- 0x2523,0x84B0, // BOX DRAWINGS HEAVY VERTICAL AND RIGHT
- 0x2524,0x84A7, // BOX DRAWINGS LIGHT VERTICAL AND LEFT
- 0x2525,0x84BC, // BOX DRAWINGS VERTICAL LIGHT AND LEFT HEAVY
- 0x2528,0x84B7, // BOX DRAWINGS VERTICAL HEAVY AND LEFT LIGHT
- 0x252B,0x84B2, // BOX DRAWINGS HEAVY VERTICAL AND LEFT
- 0x252C,0x84A6, // BOX DRAWINGS LIGHT DOWN AND HORIZONTAL
- 0x252F,0x84B6, // BOX DRAWINGS DOWN LIGHT AND HORIZONTAL HEAVY
- 0x2530,0x84BB, // BOX DRAWINGS DOWN HEAVY AND HORIZONTAL LIGHT
- 0x2533,0x84B1, // BOX DRAWINGS HEAVY DOWN AND HORIZONTAL
- 0x2534,0x84A8, // BOX DRAWINGS LIGHT UP AND HORIZONTAL
- 0x2537,0x84B8, // BOX DRAWINGS UP LIGHT AND HORIZONTAL HEAVY
- 0x2538,0x84BD, // BOX DRAWINGS UP HEAVY AND HORIZONTAL LIGHT
- 0x253B,0x84B3, // BOX DRAWINGS HEAVY UP AND HORIZONTAL
- 0x253C,0x84A9, // BOX DRAWINGS LIGHT VERTICAL AND HORIZONTAL
- 0x253F,0x84B9, // BOX DRAWINGS VERTICAL LIGHT AND HORIZONTAL HEAVY
- 0x2542,0x84BE, // BOX DRAWINGS VERTICAL HEAVY AND HORIZONTAL LIGHT
- 0x254B,0x84B4, // BOX DRAWINGS HEAVY VERTICAL AND HORIZONTAL
- 0x25A0,0x81A1, // BLACK SQUARE
- 0x25A1,0x81A0, // WHITE SQUARE
- 0x25B2,0x81A3, // BLACK UP-POINTING TRIANGLE
- 0x25B3,0x81A2, // WHITE UP-POINTING TRIANGLE
- 0x25BC,0x81A5, // BLACK DOWN-POINTING TRIANGLE
- 0x25BD,0x81A4, // WHITE DOWN-POINTING TRIANGLE
- 0x25C6,0x819F, // BLACK DIAMOND
- 0x25C7,0x819E, // WHITE DIAMOND
- 0x25CB,0x819B, // WHITE CIRCLE
- 0x25CE,0x819D, // BULLSEYE
- 0x25CF,0x819C, // BLACK CIRCLE
- 0x25EF,0x81FC, // LARGE CIRCLE
- 0x2605,0x819A, // BLACK STAR
- 0x2606,0x8199, // WHITE STAR
- 0x2640,0x818A, // FEMALE SIGN
- 0x2642,0x8189, // MALE SIGN
- 0x266A,0x81F4, // EIGHTH NOTE
- 0x266D,0x81F3, // MUSIC FLAT SIGN
- 0x266F,0x81F2, // MUSIC SHARP SIGN
- 0x3000,0x8140, // IDEOGRAPHIC SPACE
- 0x3001,0x8141, // IDEOGRAPHIC COMMA
- 0x3002,0x8142, // IDEOGRAPHIC FULL STOP
- 0x3003,0x8156, // DITTO MARK
- 0x3005,0x8158, // IDEOGRAPHIC ITERATION MARK
- 0x3006,0x8159, // IDEOGRAPHIC CLOSING MARK
- 0x3007,0x815A, // IDEOGRAPHIC NUMBER ZERO
- 0x3008,0x8171, // LEFT ANGLE BRACKET
- 0x3009,0x8172, // RIGHT ANGLE BRACKET
- 0x300A,0x8173, // LEFT DOUBLE ANGLE BRACKET
- 0x300B,0x8174, // RIGHT DOUBLE ANGLE BRACKET
- 0x300C,0x8175, // LEFT CORNER BRACKET
- 0x300D,0x8176, // RIGHT CORNER BRACKET
- 0x300E,0x8177, // LEFT WHITE CORNER BRACKET
- 0x300F,0x8178, // RIGHT WHITE CORNER BRACKET
- 0x3010,0x8179, // LEFT BLACK LENTICULAR BRACKET
- 0x3011,0x817A, // RIGHT BLACK LENTICULAR BRACKET
- 0x3012,0x81A7, // POSTAL MARK
- 0x3013,0x81AC, // GETA MARK
- 0x3014,0x816B, // LEFT TORTOISE SHELL BRACKET
- 0x3015,0x816C, // RIGHT TORTOISE SHELL BRACKET
- 0x301C,0x8160, // WAVE DASH
- 0x3041,0x829F, // HIRAGANA LETTER SMALL A
- 0x3042,0x82A0, // HIRAGANA LETTER A
- 0x3043,0x82A1, // HIRAGANA LETTER SMALL I
- 0x3044,0x82A2, // HIRAGANA LETTER I
- 0x3045,0x82A3, // HIRAGANA LETTER SMALL U
- 0x3046,0x82A4, // HIRAGANA LETTER U
- 0x3047,0x82A5, // HIRAGANA LETTER SMALL E
- 0x3048,0x82A6, // HIRAGANA LETTER E
- 0x3049,0x82A7, // HIRAGANA LETTER SMALL O
- 0x304A,0x82A8, // HIRAGANA LETTER O
- 0x304B,0x82A9, // HIRAGANA LETTER KA
- 0x304C,0x82AA, // HIRAGANA LETTER GA
- 0x304D,0x82AB, // HIRAGANA LETTER KI
- 0x304E,0x82AC, // HIRAGANA LETTER GI
- 0x304F,0x82AD, // HIRAGANA LETTER KU
- 0x3050,0x82AE, // HIRAGANA LETTER GU
- 0x3051,0x82AF, // HIRAGANA LETTER KE
- 0x3052,0x82B0, // HIRAGANA LETTER GE
- 0x3053,0x82B1, // HIRAGANA LETTER KO
- 0x3054,0x82B2, // HIRAGANA LETTER GO
- 0x3055,0x82B3, // HIRAGANA LETTER SA
- 0x3056,0x82B4, // HIRAGANA LETTER ZA
- 0x3057,0x82B5, // HIRAGANA LETTER SI
- 0x3058,0x82B6, // HIRAGANA LETTER ZI
- 0x3059,0x82B7, // HIRAGANA LETTER SU
- 0x305A,0x82B8, // HIRAGANA LETTER ZU
- 0x305B,0x82B9, // HIRAGANA LETTER SE
- 0x305C,0x82BA, // HIRAGANA LETTER ZE
- 0x305D,0x82BB, // HIRAGANA LETTER SO
- 0x305E,0x82BC, // HIRAGANA LETTER ZO
- 0x305F,0x82BD, // HIRAGANA LETTER TA
- 0x3060,0x82BE, // HIRAGANA LETTER DA
- 0x3061,0x82BF, // HIRAGANA LETTER TI
- 0x3062,0x82C0, // HIRAGANA LETTER DI
- 0x3063,0x82C1, // HIRAGANA LETTER SMALL TU
- 0x3064,0x82C2, // HIRAGANA LETTER TU
- 0x3065,0x82C3, // HIRAGANA LETTER DU
- 0x3066,0x82C4, // HIRAGANA LETTER TE
- 0x3067,0x82C5, // HIRAGANA LETTER DE
- 0x3068,0x82C6, // HIRAGANA LETTER TO
- 0x3069,0x82C7, // HIRAGANA LETTER DO
- 0x306A,0x82C8, // HIRAGANA LETTER NA
- 0x306B,0x82C9, // HIRAGANA LETTER NI
- 0x306C,0x82CA, // HIRAGANA LETTER NU
- 0x306D,0x82CB, // HIRAGANA LETTER NE
- 0x306E,0x82CC, // HIRAGANA LETTER NO
- 0x306F,0x82CD, // HIRAGANA LETTER HA
- 0x3070,0x82CE, // HIRAGANA LETTER BA
- 0x3071,0x82CF, // HIRAGANA LETTER PA
- 0x3072,0x82D0, // HIRAGANA LETTER HI
- 0x3073,0x82D1, // HIRAGANA LETTER BI
- 0x3074,0x82D2, // HIRAGANA LETTER PI
- 0x3075,0x82D3, // HIRAGANA LETTER HU
- 0x3076,0x82D4, // HIRAGANA LETTER BU
- 0x3077,0x82D5, // HIRAGANA LETTER PU
- 0x3078,0x82D6, // HIRAGANA LETTER HE
- 0x3079,0x82D7, // HIRAGANA LETTER BE
- 0x307A,0x82D8, // HIRAGANA LETTER PE
- 0x307B,0x82D9, // HIRAGANA LETTER HO
- 0x307C,0x82DA, // HIRAGANA LETTER BO
- 0x307D,0x82DB, // HIRAGANA LETTER PO
- 0x307E,0x82DC, // HIRAGANA LETTER MA
- 0x307F,0x82DD, // HIRAGANA LETTER MI
- 0x3080,0x82DE, // HIRAGANA LETTER MU
- 0x3081,0x82DF, // HIRAGANA LETTER ME
- 0x3082,0x82E0, // HIRAGANA LETTER MO
- 0x3083,0x82E1, // HIRAGANA LETTER SMALL YA
- 0x3084,0x82E2, // HIRAGANA LETTER YA
- 0x3085,0x82E3, // HIRAGANA LETTER SMALL YU
- 0x3086,0x82E4, // HIRAGANA LETTER YU
- 0x3087,0x82E5, // HIRAGANA LETTER SMALL YO
- 0x3088,0x82E6, // HIRAGANA LETTER YO
- 0x3089,0x82E7, // HIRAGANA LETTER RA
- 0x308A,0x82E8, // HIRAGANA LETTER RI
- 0x308B,0x82E9, // HIRAGANA LETTER RU
- 0x308C,0x82EA, // HIRAGANA LETTER RE
- 0x308D,0x82EB, // HIRAGANA LETTER RO
- 0x308E,0x82EC, // HIRAGANA LETTER SMALL WA
- 0x308F,0x82ED, // HIRAGANA LETTER WA
- 0x3090,0x82EE, // HIRAGANA LETTER WI
- 0x3091,0x82EF, // HIRAGANA LETTER WE
- 0x3092,0x82F0, // HIRAGANA LETTER WO
- 0x3093,0x82F1, // HIRAGANA LETTER N
- 0x309B,0x814A, // KATAKANA-HIRAGANA VOICED SOUND MARK
- 0x309C,0x814B, // KATAKANA-HIRAGANA SEMI-VOICED SOUND MARK
- 0x309D,0x8154, // HIRAGANA ITERATION MARK
- 0x309E,0x8155, // HIRAGANA VOICED ITERATION MARK
- 0x30A1,0x8340, // KATAKANA LETTER SMALL A
- 0x30A2,0x8341, // KATAKANA LETTER A
- 0x30A3,0x8342, // KATAKANA LETTER SMALL I
- 0x30A4,0x8343, // KATAKANA LETTER I
- 0x30A5,0x8344, // KATAKANA LETTER SMALL U
- 0x30A6,0x8345, // KATAKANA LETTER U
- 0x30A7,0x8346, // KATAKANA LETTER SMALL E
- 0x30A8,0x8347, // KATAKANA LETTER E
- 0x30A9,0x8348, // KATAKANA LETTER SMALL O
- 0x30AA,0x8349, // KATAKANA LETTER O
- 0x30AB,0x834A, // KATAKANA LETTER KA
- 0x30AC,0x834B, // KATAKANA LETTER GA
- 0x30AD,0x834C, // KATAKANA LETTER KI
- 0x30AE,0x834D, // KATAKANA LETTER GI
- 0x30AF,0x834E, // KATAKANA LETTER KU
- 0x30B0,0x834F, // KATAKANA LETTER GU
- 0x30B1,0x8350, // KATAKANA LETTER KE
- 0x30B2,0x8351, // KATAKANA LETTER GE
- 0x30B3,0x8352, // KATAKANA LETTER KO
- 0x30B4,0x8353, // KATAKANA LETTER GO
- 0x30B5,0x8354, // KATAKANA LETTER SA
- 0x30B6,0x8355, // KATAKANA LETTER ZA
- 0x30B7,0x8356, // KATAKANA LETTER SI
- 0x30B8,0x8357, // KATAKANA LETTER ZI
- 0x30B9,0x8358, // KATAKANA LETTER SU
- 0x30BA,0x8359, // KATAKANA LETTER ZU
- 0x30BB,0x835A, // KATAKANA LETTER SE
- 0x30BD,0x835C, // KATAKANA LETTER SO
- 0x30BE,0x835D, // KATAKANA LETTER ZO
- 0x30BF,0x835E, // KATAKANA LETTER TA
- 0x30C0,0x835F, // KATAKANA LETTER DA
- 0x30C1,0x8360, // KATAKANA LETTER TI
- 0x30C2,0x8361, // KATAKANA LETTER DI
- 0x30C3,0x8362, // KATAKANA LETTER SMALL TU
- 0x30C4,0x8363, // KATAKANA LETTER TU
- 0x30C5,0x8364, // KATAKANA LETTER DU
- 0x30C6,0x8365, // KATAKANA LETTER TE
- 0x30C7,0x8366, // KATAKANA LETTER DE
- 0x30C8,0x8367, // KATAKANA LETTER TO
- 0x30C9,0x8368, // KATAKANA LETTER DO
- 0x30CA,0x8369, // KATAKANA LETTER NA
- 0x30CB,0x836A, // KATAKANA LETTER NI
- 0x30CC,0x836B, // KATAKANA LETTER NU
- 0x30CD,0x836C, // KATAKANA LETTER NE
- 0x30CE,0x836D, // KATAKANA LETTER NO
- 0x30CF,0x836E, // KATAKANA LETTER HA
- 0x30D0,0x836F, // KATAKANA LETTER BA
- 0x30D1,0x8370, // KATAKANA LETTER PA
- 0x30D2,0x8371, // KATAKANA LETTER HI
- 0x30D3,0x8372, // KATAKANA LETTER BI
- 0x30D4,0x8373, // KATAKANA LETTER PI
- 0x30D5,0x8374, // KATAKANA LETTER HU
- 0x30D6,0x8375, // KATAKANA LETTER BU
- 0x30D7,0x8376, // KATAKANA LETTER PU
- 0x30D8,0x8377, // KATAKANA LETTER HE
- 0x30D9,0x8378, // KATAKANA LETTER BE
- 0x30DA,0x8379, // KATAKANA LETTER PE
- 0x30DB,0x837A, // KATAKANA LETTER HO
- 0x30DC,0x837B, // KATAKANA LETTER BO
- 0x30DD,0x837C, // KATAKANA LETTER PO
- 0x30DE,0x837D, // KATAKANA LETTER MA
- 0x30DF,0x837E, // KATAKANA LETTER MI
- 0x30E0,0x8380, // KATAKANA LETTER MU
- 0x30E1,0x8381, // KATAKANA LETTER ME
- 0x30E2,0x8382, // KATAKANA LETTER MO
- 0x30E3,0x8383, // KATAKANA LETTER SMALL YA
- 0x30E4,0x8384, // KATAKANA LETTER YA
- 0x30E5,0x8385, // KATAKANA LETTER SMALL YU
- 0x30E6,0x8386, // KATAKANA LETTER YU
- 0x30E7,0x8387, // KATAKANA LETTER SMALL YO
- 0x30E8,0x8388, // KATAKANA LETTER YO
- 0x30E9,0x8389, // KATAKANA LETTER RA
- 0x30EA,0x838A, // KATAKANA LETTER RI
- 0x30EB,0x838B, // KATAKANA LETTER RU
- 0x30EC,0x838C, // KATAKANA LETTER RE
- 0x30ED,0x838D, // KATAKANA LETTER RO
- 0x30EE,0x838E, // KATAKANA LETTER SMALL WA
- 0x30EF,0x838F, // KATAKANA LETTER WA
- 0x30F0,0x8390, // KATAKANA LETTER WI
- 0x30F1,0x8391, // KATAKANA LETTER WE
- 0x30F2,0x8392, // KATAKANA LETTER WO
- 0x30F3,0x8393, // KATAKANA LETTER N
- 0x30F4,0x8394, // KATAKANA LETTER VU
- 0x30F5,0x8395, // KATAKANA LETTER SMALL KA
- 0x30F6,0x8396, // KATAKANA LETTER SMALL KE
- 0x30FB,0x8145, // KATAKANA MIDDLE DOT
- 0x30FD,0x8152, // KATAKANA ITERATION MARK
- 0x30FE,0x8153, // KATAKANA VOICED ITERATION MARK
- 0x4E00,0x88EA, //
- 0x4E01,0x929A, //
- 0x4E03,0x8EB5, //
- 0x4E07,0x969C, //
- 0x4E08,0x8FE4, //
- 0x4E09,0x8E4F, //
- 0x4E0A,0x8FE3, //
- 0x4E0B,0x89BA, //
- 0x4E0D,0x9573, //
- 0x4E0E,0x975E, //
- 0x4E10,0x98A0, //
- 0x4E11,0x894E, //
- 0x4E14,0x8A8E, //
- 0x4E15,0x98A1, //
- 0x4E16,0x90A2, //
- 0x4E17,0x99C0, //
- 0x4E18,0x8B75, //
- 0x4E19,0x95B8, //
- 0x4E1E,0x8FE5, //
- 0x4E21,0x97BC, //
- 0x4E26,0x95C0, //
- 0x4E2A,0x98A2, //
- 0x4E2D,0x9286, //
- 0x4E31,0x98A3, //
- 0x4E32,0x8BF8, //
- 0x4E36,0x98A4, //
- 0x4E38,0x8ADB, //
- 0x4E39,0x924F, //
- 0x4E3B,0x8EE5, //
- 0x4E3C,0x98A5, //
- 0x4E3F,0x98A6, //
- 0x4E42,0x98A7, //
- 0x4E43,0x9454, //
- 0x4E45,0x8B76, //
- 0x4E4B,0x9456, //
- 0x4E4D,0x93E1, //
- 0x4E4E,0x8CC1, //
- 0x4E4F,0x9652, //
- 0x4E55,0xE568, //
- 0x4E56,0x98A8, //
- 0x4E57,0x8FE6, //
- 0x4E58,0x98A9, //
- 0x4E59,0x89B3, //
- 0x4E5D,0x8BE3, //
- 0x4E5E,0x8CEE, //
- 0x4E5F,0x96E7, //
- 0x4E62,0x9BA4, //
- 0x4E71,0x9790, //
- 0x4E73,0x93FB, //
- 0x4E7E,0x8AA3, //
- 0x4E80,0x8B54, //
- 0x4E82,0x98AA, //
- 0x4E85,0x98AB, //
- 0x4E86,0x97B9, //
- 0x4E88,0x975C, //
- 0x4E89,0x9188, //
- 0x4E8A,0x98AD, //
- 0x4E8B,0x8E96, //
- 0x4E8C,0x93F1, //
- 0x4E8E,0x98B0, //
- 0x4E91,0x895D, //
- 0x4E92,0x8CDD, //
- 0x4E94,0x8CDC, //
- 0x4E95,0x88E4, //
- 0x4E98,0x986A, //
- 0x4E99,0x9869, //
- 0x4E9B,0x8DB1, //
- 0x4E9C,0x889F, //
- 0x4E9E,0x98B1, //
- 0x4E9F,0x98B2, //
- 0x4EA0,0x98B3, //
- 0x4EA1,0x9653, //
- 0x4EA2,0x98B4, //
- 0x4EA4,0x8CF0, //
- 0x4EA5,0x88E5, //
- 0x4EA6,0x9692, //
- 0x4EA8,0x8B9C, //
- 0x4EAB,0x8B9D, //
- 0x4EAC,0x8B9E, //
- 0x4EAD,0x92E0, //
- 0x4EAE,0x97BA, //
- 0x4EB0,0x98B5, //
- 0x4EB3,0x98B6, //
- 0x4EB6,0x98B7, //
- 0x4EBA,0x906C, //
- 0x4EC0,0x8F59, //
- 0x4EC1,0x906D, //